diff --git a/changelog.d/1013.bugfix b/changelog.d/1013.bugfix new file mode 100644 index 00000000..f5cf3318 --- /dev/null +++ b/changelog.d/1013.bugfix @@ -0,0 +1 @@ +Fixed Helm chart templates missing `namespace:` in resource metadata, causing some resources to appear in different namespaces under certain circumstances, specifically deployment scenarios using ArgoCD-deployed Helmfile with a release namespace set for Hookshot differently than the ArgoCD Application's namespace. Most other Helm deployment methods should continue to work as expected with your existing configuration, as the inferred namespace would have resulted in proper resource placement without this change. \ No newline at end of file diff --git a/helm/hookshot/Chart.yaml b/helm/hookshot/Chart.yaml index 288ec676..50e8bfeb 100644 --- a/helm/hookshot/Chart.yaml +++ b/helm/hookshot/Chart.yaml @@ -14,7 +14,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.15 +version: 0.1.16 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/helm/hookshot/templates/deployment.yaml b/helm/hookshot/templates/deployment.yaml index 02d5b49a..cf147667 100644 --- a/helm/hookshot/templates/deployment.yaml +++ b/helm/hookshot/templates/deployment.yaml @@ -3,6 +3,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "hookshot.fullname" . }} + namespace: {{ template "hookshot.namespace" . }} labels: {{- include "hookshot.labels" . | nindent 4 }} spec: diff --git a/helm/hookshot/templates/hpa.yaml b/helm/hookshot/templates/hpa.yaml index d3a61dd5..011e0305 100644 --- a/helm/hookshot/templates/hpa.yaml +++ b/helm/hookshot/templates/hpa.yaml @@ -4,6 +4,7 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: {{ include "hookshot.fullname" . }} + namespace: {{ template "hookshot.namespace" . }} labels: {{- include "hookshot.labels" . | nindent 4 }} spec: diff --git a/helm/hookshot/templates/ingress-appservice.yaml b/helm/hookshot/templates/ingress-appservice.yaml index 3a537d56..8dc1efbf 100644 --- a/helm/hookshot/templates/ingress-appservice.yaml +++ b/helm/hookshot/templates/ingress-appservice.yaml @@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }}-appservice + namespace: {{ template "hookshot.namespace" . }} labels: {{- include "hookshot.labels" . | nindent 4 }} {{- with .Values.ingress.appservice.annotations }} diff --git a/helm/hookshot/templates/ingress.yaml b/helm/hookshot/templates/ingress.yaml index 129d19a3..22fe1bf6 100644 --- a/helm/hookshot/templates/ingress.yaml +++ b/helm/hookshot/templates/ingress.yaml @@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ template "hookshot.namespace" . }} labels: {{- include "hookshot.labels" . | nindent 4 }} {{- with .Values.ingress.webhook.annotations }} diff --git a/helm/hookshot/templates/service.yaml b/helm/hookshot/templates/service.yaml index a55cfbc6..7c4bcc7c 100644 --- a/helm/hookshot/templates/service.yaml +++ b/helm/hookshot/templates/service.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "hookshot.fullname" . }} + namespace: {{ template "hookshot.namespace" . }} {{- with .Values.service.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/helm/hookshot/templates/serviceaccount.yaml b/helm/hookshot/templates/serviceaccount.yaml index f4950c3c..8f732d49 100644 --- a/helm/hookshot/templates/serviceaccount.yaml +++ b/helm/hookshot/templates/serviceaccount.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "hookshot.serviceAccountName" . }} + namespace: {{ template "hookshot.namespace" . }} labels: {{- include "hookshot.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }}