Skip to content

Commit

Permalink
Make Path optional
Browse files Browse the repository at this point in the history
In 1ce6cda, Path was made a required field, but this was not
intended. This commit reverts the issue by adding an optional
header for kubebuilder. It also regenerates the YAML CRD.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Nov 2, 2020
1 parent df2332d commit 95a8717
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 2 additions & 6 deletions artifacts/crds/openfaas.com_functioningresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@ spec:
required:
- name
type: object
required:
- enabled
- issuerRef
type: object
required:
- domain
- function
- path
type: object
required:
- spec
Expand All @@ -89,5 +85,5 @@ status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
conditions: []
storedVersions: []
6 changes: 6 additions & 0 deletions pkg/apis/openfaas/v1alpha2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,30 @@ type FunctionIngressSpec struct {
Function string `json:"function"`

// Path such as "/v1/profiles/view/(.*)", or leave empty for default
// +optional
Path string `json:"path"`

// IngressType such as "nginx"
// +optional
IngressType string `json:"ingressType,omitempty"`

// Enable TLS via cert-manager
// +optional
TLS *FunctionIngressTLS `json:"tls,omitempty"`

// BypassGateway, when true creates an Ingress record
// directly for the Function name without using the gateway
// in the hot path
// +optional
BypassGateway bool `json:"bypassGateway,omitempty"`
}

// FunctionIngressTLS TLS options
type FunctionIngressTLS struct {
// +optional
Enabled bool `json:"enabled"`

// +optional
IssuerRef ObjectReference `json:"issuerRef"`
}

Expand Down

0 comments on commit 95a8717

Please sign in to comment.