diff --git a/CHANGELOG.md b/CHANGELOG.md index de1749a..96c5798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), chronology things are added/fixed/changed and - where possible - links to the PRs involved. ### Changes + +[v0.8.0] + +* **Potentially breaking change**: changed `alfresco-ingress` definition & default values to enable usage of `ingressClassName` property in favour of `kubernetes.io/ingress.class` annotation. + + **⚠️ This may particularly impact aws deployments using alb** + [v0.7.5] * added general.hibernate to set all replicas to 0 diff --git a/README.md b/README.md index 258039b..b29e3bc 100644 --- a/README.md +++ b/README.md @@ -260,14 +260,28 @@ nginx rules to redirect the normal pages to a 503 maintenance page. * Default: None * Description: The host that points to the alfresco cluster for the syncService service +#### `ingress.ingressClass` + +* Required: false +* Default: `nginx` +* Description: Reference name for the ingressClass to be used. + Replacement for `kubernetes.io/ingress.class` annotation since it's deprecation in k8s 1.18. + Set to `null` to allow usage of `kubernetes.io/ingress.class` in the `ingress.ingressAnnotations` dict. + #### `ingress.ingressAnnotations` * Required: false * Default: ``` - kubernetes.io/ingress.class: "nginx" + kubernetes.io/ingress.class: "nginx" + cert-manager.io/cluster-issuer: "letsencrypt-production" ``` -* Description: Annotations for ingress +* Description: Annotations for ingress. +* Remarks: + * The default value of `kubernetes.io/ingress.class: "nginx"` will be filtered + out if the `ingress.ingressClass` is set (This includes the default value). + The `kubernetes.io/ingress.class` is deprecated since k8s v1.18, but some setups still rely on it. + Hence it can still be set and used if `ingress.ingressClass` is set to `null`. #### `ingress.additionalPaths` diff --git a/local-values.yaml b/local-values.yaml index 2ca2f60..440f8ec 100644 --- a/local-values.yaml +++ b/local-values.yaml @@ -2,6 +2,8 @@ ingress: host: test protocol: http kubernetes.io/ingress.class: {} +# enabling the line below will cause the ingress.class annotation to be rendered instead of the ingressClass property +# ingressClass: null acs: resources: requests: diff --git a/xenit-alfresco/templates/ingress/alfresco-ingress.yaml b/xenit-alfresco/templates/ingress/alfresco-ingress.yaml index 6b00afb..7318e07 100644 --- a/xenit-alfresco/templates/ingress/alfresco-ingress.yaml +++ b/xenit-alfresco/templates/ingress/alfresco-ingress.yaml @@ -5,10 +5,23 @@ metadata: name: alfresco-ingress namespace: {{ .Release.Namespace | quote }} annotations: - {{- if .Values.ingress.ingressAnnotations}} - {{ toYaml .Values.ingress.ingressAnnotations | nindent 4 }} + {{- if .Values.ingress.ingressAnnotations }} + {{- /* + See https://kubernetes.io/docs/concepts/services-networking/ingress/#deprecated-annotation + Remove kubernetes.io/ingress.class annotation if ingressClass is set + ingressClass can be removed from defaults by setting ingressClass: null in values override + Tied to spec.ingressClassName + */ -}} + {{- range $key, $value := .Values.ingress.ingressAnnotations }} + {{- if not ( and ($.Values.ingress.ingressClass) (eq $key "kubernetes.io/ingress.class")) }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} {{- end }} spec: + {{- if .Values.ingress.ingressClass }} + ingressClassName: {{ .Values.ingress.ingressClass }} + {{- end }} {{- if eq .Values.ingress.protocol "https" }} tls: - hosts: diff --git a/xenit-alfresco/values.yaml b/xenit-alfresco/values.yaml index 1f1e625..23e75b9 100644 --- a/xenit-alfresco/values.yaml +++ b/xenit-alfresco/values.yaml @@ -21,6 +21,7 @@ general: selfManaged: false ingress: + ingressClass: "nginx" protocol: 'https' ingressAnnotations: kubernetes.io/ingress.class: "nginx"