Skip to content

Commit d773bcc

Browse files
feat(platform-ingress): support configurable fallback ingress annotat… (#1134)
* feat(platform-ingress): support configurable fallback ingress annotations Add fallbackIngress.annotations to chart values and merge them into templates/fallback-ingress.yaml metadata annotations. This lets Argo-specific annotations such as argocd.argoproj.io/ignore-healthcheck: "true" persist across reconciliations without hardcoding them in the template. Updated fallback-ingress test and snapshot to cover custom annotation rendering. * feat(platform-ingress): support configurable fallback ingress annotations Add fallbackIngress.annotations to chart values and merge them into templates/fallback-ingress.yaml metadata annotations. This lets Argo-specific annotations such as argocd.argoproj.io/ignore-healthcheck: "true" persist across reconciliations without hardcoding them in the template. Updated fallback-ingress test and snapshot to cover custom annotation rendering. --------- Co-authored-by: oleksandr-sandbx <olexandr.kostiuk@sandbx.co>
1 parent fdcdcc2 commit d773bcc

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

charts/platform-ingress/templates/fallback-ingress.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ metadata:
66
annotations:
77
traefik.ingress.kubernetes.io/router.priority: "1"
88
traefik.ingress.kubernetes.io/router.middlewares: {{ .Release.Namespace }}-{{ .Release.Name }}-fallback@kubernetescrd
9+
{{- with .Values.fallbackIngress.annotations }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
912
spec:
1013
{{- with .Values.defaultClassName }}
1114
ingressClassName: {{ . }}

charts/platform-ingress/tests/__snapshot__/fallback-ingress_test.yaml.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
renders fallback ingress with middleware annotation and class name:
1+
renders fallback ingress with middleware annotation, custom annotations and class name:
22
1: |
33
apiVersion: networking.k8s.io/v1
44
kind: Ingress
55
metadata:
66
annotations:
7+
argocd.argoproj.io/ignore-healthcheck: "true"
78
traefik.ingress.kubernetes.io/router.middlewares: platform-ingress-fallback@kubernetescrd
89
traefik.ingress.kubernetes.io/router.priority: "1"
910
labels:

charts/platform-ingress/tests/fallback-ingress_test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ suite: platform-ingress fallback-ingress
22
templates:
33
- templates/fallback-ingress.yaml
44
tests:
5-
- it: renders fallback ingress with middleware annotation and class name
5+
- it: renders fallback ingress with middleware annotation, custom annotations and class name
66
release:
77
name: ingress
88
namespace: platform
99
set:
1010
defaultClassName: traefik
11+
fallbackIngress.annotations:
12+
argocd.argoproj.io/ignore-healthcheck: "true"
1113
asserts:
1214
- matchSnapshot: {}

charts/platform-ingress/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
clusterDnsName: ""
44
ingressAuthHost: api.apolo.us
55
fallbackHost: default.jobs.apolo.us
6+
fallbackIngress:
7+
annotations: {}
68

79
cors:
810
originList: []

0 commit comments

Comments
 (0)