Prevent reoccurring namespace inconsistencies (#737)

https://gitea.com/gitea/helm-chart/pulls/713 ensured that all resources
contain a `namespace` field. When adding Gitea actions runner support in
https://gitea.com/gitea/helm-chart/pulls/666, this was an oversight.

Signed-off-by: justusbunsi <sk.bunsenbrenner@gmail.com>

Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/737
Co-authored-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Co-committed-by: justusbunsi <sk.bunsenbrenner@gmail.com>
This commit is contained in:
justusbunsi 2024-11-30 14:47:18 +00:00 committed by justusbunsi
parent 389a8460e4
commit 5f7d353901
9 changed files with 9 additions and 0 deletions

View File

@ -40,3 +40,4 @@
- [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm) - [ ] Parameters are documented in the `values.yaml` and added to the `README.md` using [readme-generator-for-helm](https://github.com/bitnami-labs/readme-generator-for-helm)
- [ ] Breaking changes are documented in the `README.md` - [ ] Breaking changes are documented in the `README.md`
- [ ] Templating unittests are added - [ ] Templating unittests are added
- [ ] All added template resources MUST render a namespace in metadata

View File

@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "gitea.fullname" . }}-act-runner-config name: {{ include "gitea.fullname" . }}-act-runner-config
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
data: data:

View File

@ -5,6 +5,7 @@ apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "gitea.fullname" . }}-scripts name: {{ include "gitea.fullname" . }}-scripts
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
data: data:

View File

@ -7,6 +7,7 @@ apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
name: {{ $name }} name: {{ $name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
{{- with .Values.actions.provisioning.labels }} {{- with .Values.actions.provisioning.labels }}

View File

@ -7,6 +7,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
name: {{ $name }} name: {{ $name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job app.kubernetes.io/component: token-job

View File

@ -7,6 +7,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
name: {{ $name }} name: {{ $name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job app.kubernetes.io/component: token-job

View File

@ -7,6 +7,7 @@ apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: {{ $secretName }} name: {{ $secretName }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job app.kubernetes.io/component: token-job

View File

@ -6,6 +6,7 @@ apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: {{ $name }} name: {{ $name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
app.kubernetes.io/component: token-job app.kubernetes.io/component: token-job

View File

@ -14,6 +14,7 @@ metadata:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{- end }} {{- end }}
name: {{ include "gitea.fullname" . }}-act-runner name: {{ include "gitea.fullname" . }}-act-runner
namespace: {{ .Values.namespace | default .Release.Namespace }}
spec: spec:
selector: selector:
matchLabels: matchLabels: