Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 22129 definable ingress class ingress.tpl #166

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v1/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ type Ingress struct {
IstioIngressSelectorKey string `json:"istioIngressSelectorKey,omitempty"`
IstioIngressSelectorValue string `json:"istioIngressSelectorValue,omitempty"`
OcpSecureRoutes bool `json:"ocpSecureRoutes,omitempty"`
IngressClassName string `json:"ingressClassName,omitempty"`
}

type HTTPS struct {
Expand Down
1 change: 1 addition & 0 deletions api/v1/appdefaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ var networkingDefault = Networking{
IstioIngressSelectorKey: "istio",
IstioIngressSelectorValue: "ingressgateway",
OcpSecureRoutes: false,
IngressClassName: "",
},
HTTPS: HTTPS{Enabled: false},
Proxy: Proxy{Enabled: false, ConfigRef: "cp-proxy"},
Expand Down
1 change: 1 addition & 0 deletions charts/cnvrg-cap/templates/cap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ spec:
istioIngressSelectorKey: {{.Values.networking.ingress.istioIngressSelectorKey}}
istioIngressSelectorValue: {{.Values.networking.ingress.istioIngressSelectorValue}}
ocpSecureRoutes: {{.Values.networking.ingress.ocpSecureRoutes}}
ingressClassName: {{.Values.networking.ingress.ingressClassName}}
https:
enabled: {{.Values.networking.https.enabled}}
certSecret: {{.Values.networking.https.certSecret}}
Expand Down
3 changes: 2 additions & 1 deletion charts/cnvrg-cap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ networking:
istioIngressSelectorKey: 'istio'
istioIngressSelectorValue: 'ingressgateway'
ocpSecureRoutes: false
ingressClassName: ''
https:
enabled: false
certSecret: ''
Expand Down Expand Up @@ -371,4 +372,4 @@ tenancy:
value: cnvrg-control-plane
priorityClass:
appClassRef: ""
jobClassRef: ""
jobClassRef: ""
2 changes: 2 additions & 0 deletions charts/cnvrg-operator/crds/mlops.cnvrg.io_cnvrgapps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,8 @@ spec:
type: string
ocpSecureRoutes:
type: boolean
ingressClassName:
type: string
type: object
proxy:
properties:
Expand Down
1 change: 1 addition & 0 deletions pkg/app/controlplane/tmpl/conf/cm/config-networking.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ data:
{{- if isTrue .Spec.Networking.Ingress.OcpSecureRoutes }}
OCP_SECURE_ROUTES: "true"
{{- end }}
INGRESS_CLASS_NAME: {{ .Spec.Networking.Ingress.IngressClassName }}
4 changes: 3 additions & 1 deletion pkg/app/controlplane/tmpl/webapp/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
name: {{ .Spec.ControlPlane.WebApp.SvcName }}
namespace: {{ .Namespace }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/dbs/tmpl/es/elastalert/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/dbs/tmpl/es/elastic/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: {{ .Spec.Dbs.Es.SvcName }}
port:
number: {{ .Spec.Dbs.Es.Port }}
number: {{ .Spec.Dbs.Es.Port }}
6 changes: 4 additions & 2 deletions pkg/app/dbs/tmpl/es/kibana/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -47,4 +49,4 @@ spec:
name: {{ .Spec.Dbs.Es.Kibana.SvcName }}
port:
number: {{ .Spec.Dbs.Es.Kibana.Port }}
{{- end}}
{{- end}}
4 changes: 3 additions & 1 deletion pkg/app/dbs/tmpl/minio/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/dbs/tmpl/prom/grafana/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/dbs/tmpl/prom/prometheus/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: {{ .Spec.Dbs.Prom.SvcName }}
port:
number: {{ .Spec.Dbs.Prom.Port }}
number: {{ .Spec.Dbs.Prom.Port }}
6 changes: 4 additions & 2 deletions pkg/app/sso/tmpl/central/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: {{.Spec.SSO.Central.SvcName}}
namespace: {{.Namespace }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: {{.Spec.SSO.Central.SvcName}}
port:
number: 8080
number: 8080
6 changes: 4 additions & 2 deletions pkg/app/sso/tmpl/jwks/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: {{ .Spec.SSO.Jwks.SvcName }}
namespace: {{.Namespace }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: "{{.Spec.SSO.Jwks.SvcName}}"
port:
number: 8080
number: 8080
Loading