diff --git a/charts/kapparmor/Chart.yaml b/charts/kapparmor/Chart.yaml index c4fce56..5499b0e 100644 --- a/charts/kapparmor/Chart.yaml +++ b/charts/kapparmor/Chart.yaml @@ -6,7 +6,7 @@ home: https://artifacthub.io kubeVersion: ">= 1.23.0-0" # Respect spaces and double quotes since this will be validated by the build-app script. -version: "0.1.3" +version: "0.1.5" appVersion: "0.1.5" keywords: diff --git a/charts/kapparmor/templates/cm-profiles.yaml b/charts/kapparmor/templates/cm-profiles.yaml index 85861c8..977f061 100644 --- a/charts/kapparmor/templates/cm-profiles.yaml +++ b/charts/kapparmor/templates/cm-profiles.yaml @@ -3,5 +3,10 @@ kind: ConfigMap metadata: name: kapparmor-profiles namespace: {{ .Release.Namespace }} + labels: + {{- include "kapparmor.labels" . | nindent 4 }} + {{- with .Values.app.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} data: {{ (.Files.Glob "profiles/*").AsConfig | indent 2 }} \ No newline at end of file diff --git a/charts/kapparmor/templates/cm-settings.yaml b/charts/kapparmor/templates/cm-settings.yaml index ec15981..1e877db 100644 --- a/charts/kapparmor/templates/cm-settings.yaml +++ b/charts/kapparmor/templates/cm-settings.yaml @@ -3,6 +3,11 @@ kind: ConfigMap metadata: name: kapparmor-settings namespace: {{ .Release.Namespace }} + labels: + {{- include "kapparmor.labels" . | nindent 4 }} + {{- with .Values.app.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} data: PROFILES_DIR: "{{ .Values.app.profiles_dir }}" POLL_TIME: "{{ .Values.app.poll_time }}" \ No newline at end of file diff --git a/charts/kapparmor/templates/daemonset.yaml b/charts/kapparmor/templates/daemonset.yaml index ec49aac..56836bd 100644 --- a/charts/kapparmor/templates/daemonset.yaml +++ b/charts/kapparmor/templates/daemonset.yaml @@ -4,7 +4,10 @@ metadata: name: {{ include "kapparmor.fullname" . }} namespace: {{ .Release.Namespace }} labels: - {{- include "kapparmor.labels" . | nindent 4 }} + {{- include "kapparmor.labels" . | nindent 4 }} + {{- with .Values.daemonset.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: matchLabels: @@ -16,9 +19,11 @@ spec: {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} - labels: {{- include "kapparmor.selectorLabels" . | nindent 8 }} + {{- with .Values.app.labels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/kapparmor/templates/service.yaml b/charts/kapparmor/templates/service.yaml index 4dd8f27..bbb7da0 100644 --- a/charts/kapparmor/templates/service.yaml +++ b/charts/kapparmor/templates/service.yaml @@ -5,6 +5,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "kapparmor.labels" . | nindent 4 }} + {{- with .Values.app.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/charts/kapparmor/values.yaml b/charts/kapparmor/values.yaml index c120db3..322268b 100644 --- a/charts/kapparmor/values.yaml +++ b/charts/kapparmor/values.yaml @@ -12,6 +12,8 @@ fullnameOverride: "" app: profiles_dir: "/app/profiles" poll_time: 60 + labels: +# costgroup: "test" serviceAccount: # Specifies whether a service account should be created @@ -22,6 +24,9 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +daemonset: + labels: {} + podAnnotations: {} podSecurityContext: {} diff --git a/config/config b/config/config index 15674b4..bdb6896 100644 --- a/config/config +++ b/config/config @@ -1,2 +1,2 @@ APP_VERSION=0.1.5 -CHART_VERSION=0.1.3 \ No newline at end of file +CHART_VERSION=0.1.5 \ No newline at end of file diff --git a/docs/testing.md b/docs/testing.md index 9117c9c..47c4c3e 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -24,8 +24,13 @@ docker run -it --network host --workdir=/data --volume ~/.kube/config:/root/.kub /bin/sh -c "git config --global --add safe.directory /data; ct lint --print-config --charts ./charts/kapparmor" # Replace here a commit id being part of an image tag -export GITHUB_SHA="sha-93d0dc4c597a8ae8a9febe1d68e674daf1fa919a" -helm install --dry-run --atomic --generate-name --timeout 30s --debug --set image.tag=$GITHUB_SHA charts/kapparmor/ +export IMAGE_TAG="0.1.4_dev" +helm upgrade kapparmor --install --dry-run \ + --atomic \ + --timeout 30s \ + --debug \ + --namespace test \ + --set image.tag=$IMAGE_TAG charts/kapparmor/ ```