diff --git a/.changelog/2869.txt b/.changelog/2869.txt new file mode 100644 index 0000000000..8771462414 --- /dev/null +++ b/.changelog/2869.txt @@ -0,0 +1,3 @@ +```release-note:bug +bug: Remove `global.acls.nodeSelector` and `global.acls.annotations` from Gateway Resources Jobs +``` diff --git a/charts/consul/templates/gateway-cleanup-job.yaml b/charts/consul/templates/gateway-cleanup-job.yaml index a987c3b591..20d2f8116e 100644 --- a/charts/consul/templates/gateway-cleanup-job.yaml +++ b/charts/consul/templates/gateway-cleanup-job.yaml @@ -31,9 +31,6 @@ spec: {{- end }} annotations: "consul.hashicorp.com/connect-inject": "false" - {{- if .Values.global.acls.annotations }} - {{- tpl .Values.global.acls.annotations . | nindent 8 }} - {{- end }} spec: restartPolicy: Never serviceAccountName: {{ template "consul.fullname" . }}-gateway-cleanup @@ -58,8 +55,4 @@ spec: tolerations: {{ tpl .Values.global.acls.tolerations . | indent 8 | trim }} {{- end }} - {{- if .Values.global.acls.nodeSelector }} - nodeSelector: - {{ tpl .Values.global.acls.nodeSelector . | indent 8 | trim }} - {{- end }} {{- end }} diff --git a/charts/consul/templates/gateway-resources-job.yaml b/charts/consul/templates/gateway-resources-job.yaml index a94c3f4e4e..de510d9dc4 100644 --- a/charts/consul/templates/gateway-resources-job.yaml +++ b/charts/consul/templates/gateway-resources-job.yaml @@ -31,9 +31,6 @@ spec: {{- end }} annotations: "consul.hashicorp.com/connect-inject": "false" - {{- if .Values.global.acls.annotations }} - {{- tpl .Values.global.acls.annotations . | nindent 8 }} - {{- end }} spec: restartPolicy: Never serviceAccountName: {{ template "consul.fullname" . }}-gateway-resources @@ -119,10 +116,6 @@ spec: tolerations: {{ tpl .Values.global.acls.tolerations . | indent 8 | trim }} {{- end }} - {{- if .Values.global.acls.nodeSelector }} - nodeSelector: - {{ tpl .Values.global.acls.nodeSelector . | indent 8 | trim }} - {{- end }} volumes: - name: config configMap: diff --git a/charts/consul/test/unit/gateway-cleanup-job.bats b/charts/consul/test/unit/gateway-cleanup-job.bats index 657bf4a791..711974b9c2 100644 --- a/charts/consul/test/unit/gateway-cleanup-job.bats +++ b/charts/consul/test/unit/gateway-cleanup-job.bats @@ -33,13 +33,3 @@ target=templates/gateway-cleanup-job.yaml yq -r '.spec.template.metadata.annotations | del(."consul.hashicorp.com/connect-inject") | del(."consul.hashicorp.com/config-checksum")' | tee /dev/stderr) [ "${actual}" = "{}" ] } - -@test "gatewaycleanup/Job: annotations can be set" { - cd `chart_dir` - local actual=$(helm template \ - -s $target \ - --set 'global.acls.annotations=foo: bar' \ - . | tee /dev/stderr | - yq -r '.spec.template.metadata.annotations.foo' | tee /dev/stderr) - [ "${actual}" = "bar" ] -} diff --git a/charts/consul/test/unit/gateway-resources-job.bats b/charts/consul/test/unit/gateway-resources-job.bats index 09322bd2a7..7d9334bae4 100644 --- a/charts/consul/test/unit/gateway-resources-job.bats +++ b/charts/consul/test/unit/gateway-resources-job.bats @@ -152,13 +152,3 @@ target=templates/gateway-resources-job.yaml yq -r '.spec.template.metadata.annotations | del(."consul.hashicorp.com/connect-inject") | del(."consul.hashicorp.com/config-checksum")' | tee /dev/stderr) [ "${actual}" = "{}" ] } - -@test "gatewayresources/Job: annotations can be set" { - cd `chart_dir` - local actual=$(helm template \ - -s $target \ - --set 'global.acls.annotations=foo: bar' \ - . | tee /dev/stderr | - yq -r '.spec.template.metadata.annotations.foo' | tee /dev/stderr) - [ "${actual}" = "bar" ] -}