Helm Chart - Fix missing namespace attributes on resources (#1013)

* Add missing namespace attribute to resources

Signed-off-by: Rhea Danzey <rdanzey@element.io>

* Bump chart version to 0.1.16

Signed-off-by: Rhea Danzey <rdanzey@element.io>

* Add changelog entry

Signed-off-by: Rhea Danzey <rdanzey@element.io>

---------

Signed-off-by: Rhea Danzey <rdanzey@element.io>
This commit is contained in:
Rhea Danzey 2025-02-17 02:42:33 -06:00 committed by GitHub
parent 9c1aa89671
commit 3ec1fa6f21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 8 additions and 1 deletions

1
changelog.d/1013.bugfix Normal file
View File

@ -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.

View File

@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # 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 # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.

View File

@ -3,6 +3,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "hookshot.fullname" . }} name: {{ include "hookshot.fullname" . }}
namespace: {{ template "hookshot.namespace" . }}
labels: labels:
{{- include "hookshot.labels" . | nindent 4 }} {{- include "hookshot.labels" . | nindent 4 }}
spec: spec:

View File

@ -4,6 +4,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: {{ include "hookshot.fullname" . }} name: {{ include "hookshot.fullname" . }}
namespace: {{ template "hookshot.namespace" . }}
labels: labels:
{{- include "hookshot.labels" . | nindent 4 }} {{- include "hookshot.labels" . | nindent 4 }}
spec: spec:

View File

@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }}-appservice name: {{ $fullName }}-appservice
namespace: {{ template "hookshot.namespace" . }}
labels: labels:
{{- include "hookshot.labels" . | nindent 4 }} {{- include "hookshot.labels" . | nindent 4 }}
{{- with .Values.ingress.appservice.annotations }} {{- with .Values.ingress.appservice.annotations }}

View File

@ -17,6 +17,7 @@ apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ $fullName }}
namespace: {{ template "hookshot.namespace" . }}
labels: labels:
{{- include "hookshot.labels" . | nindent 4 }} {{- include "hookshot.labels" . | nindent 4 }}
{{- with .Values.ingress.webhook.annotations }} {{- with .Values.ingress.webhook.annotations }}

View File

@ -3,6 +3,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "hookshot.fullname" . }} name: {{ include "hookshot.fullname" . }}
namespace: {{ template "hookshot.namespace" . }}
{{- with .Values.service.annotations }} {{- with .Values.service.annotations }}
annotations: annotations:
{{ toYaml . | indent 4 }} {{ toYaml . | indent 4 }}

View File

@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: {{ include "hookshot.serviceAccountName" . }} name: {{ include "hookshot.serviceAccountName" . }}
namespace: {{ template "hookshot.namespace" . }}
labels: labels:
{{- include "hookshot.labels" . | nindent 4 }} {{- include "hookshot.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }} {{- with .Values.serviceAccount.annotations }}