Skip to content

Commit

Permalink
Merge pull request #493 from prasadkris/development
Browse files Browse the repository at this point in the history
update chart for compatibility with Kubernetes v1.22+
  • Loading branch information
afonsobspinto authored Mar 27, 2023
2 parents 625cd16 + 8943b41 commit 27cf035
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions deployment/helm/templates/certs/letsencrypt.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if and (not .Values.local) (not (not .Values.tls)) }}
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ printf "%s-%s" "letsencrypt" .Values.namespace }}
spec:
Expand All @@ -12,5 +12,5 @@ spec:
solvers:
- http01:
ingress:
ingressName: geppetto-meta-ingress
class: nginx
{{ end }}
18 changes: 12 additions & 6 deletions deployment/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,38 @@
http:
paths:
- path: /(.*)
pathType: ImplementationSpecific
backend:
serviceName: {{ .app.harness.service.name }}{{- if (and .app.harness.secured $secured_gatekeepers) }}-gk{{- end }}
servicePort: {{- if (and .app.harness.secured $secured_gatekeepers) }} 8080 {{- else }} {{ .app.harness.service.port | default 80 }}{{- end }}
service:
name: {{ .app.harness.service.name }}{{- if (and .app.harness.secured $secured_gatekeepers) }}-gk{{- end }}
port:
number: {{- if (and .app.harness.secured $secured_gatekeepers) }} 8080 {{- else }} {{ .app.harness.service.port | default 80 }}{{- end }}
{{- end }}
{{- define "deploy_utils.ingress.service" }}
{{ $domain := .root.Values.domain }}
{{ $secured_gatekeepers := and .root.Values.secured_gatekeepers }}
{{ $app := get .root.Values.apps (print .service_name | snakecase) }}
- path: /proxy/{{ $app.harness.service.name }}/(.*)
pathType: ImplementationSpecific
backend:
serviceName: {{ $app.harness.service.name }}{{- if (and $app.harness.secured $secured_gatekeepers) }}-gk{{- end }}
servicePort: {{- if (and $app.harness.secured $secured_gatekeepers) }} 8080 {{- else }} {{ $app.harness.service.port | default 80 }}{{- end }}
service:
name: {{ $app.harness.service.name }}{{- if (and $app.harness.secured $secured_gatekeepers) }}-gk{{- end }}
port:
number: {{- if (and $app.harness.secured $secured_gatekeepers) }} 8080 {{- else }} {{ $app.harness.service.port | default 80 }}{{- end }}
{{- end }}
{{- if .Values.ingress.enabled }}
{{ $domain := .Values.domain }}
{{ $tls := not (not .Values.tls) }}
{{ $mainapp := .Values.mainapp }}
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Values.ingress.name | quote }}
annotations:
kubernetes.io/ingress.class: nginx
{{- if and (not .Values.local) $tls }}
kubernetes.io/tls-acme: 'true'
cert-manager.io/cluster-issuer: {{ printf "%s-%s" "letsencrypt" .Values.namespace }}
cert-manager.io/issuer: {{ printf "%s-%s" "letsencrypt" .Values.namespace }}
{{- end }}
nginx.ingress.kubernetes.io/ssl-redirect: {{ (and $tls .Values.ingress.ssl_redirect) | quote }}
nginx.ingress.kubernetes.io/proxy-body-size: '250m'
Expand Down

0 comments on commit 27cf035

Please sign in to comment.