diff --git a/charts/artifact-hub/Chart.yaml b/charts/artifact-hub/Chart.yaml index a1a7ca165..c5cf6e300 100644 --- a/charts/artifact-hub/Chart.yaml +++ b/charts/artifact-hub/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: artifact-hub description: Artifact Hub is a web-based application that enables finding, installing, and publishing Cloud Native packages. type: application -version: 1.22.1-0 +version: 1.22.1-1 appVersion: 1.22.0 kubeVersion: ">= 1.19.0-0" home: https://artifacthub.io diff --git a/charts/artifact-hub/templates/_helpers.tpl b/charts/artifact-hub/templates/_helpers.tpl index 77d20912a..3f6c4767c 100644 --- a/charts/artifact-hub/templates/_helpers.tpl +++ b/charts/artifact-hub/templates/_helpers.tpl @@ -41,6 +41,9 @@ helm.sh/chart: {{ include "chart.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Values.commonLabels }} +{{ toYaml . }} +{{- end }} {{- end -}} {{/* diff --git a/charts/artifact-hub/templates/hub_deployment.yaml b/charts/artifact-hub/templates/hub_deployment.yaml index a63371712..9c687322b 100644 --- a/charts/artifact-hub/templates/hub_deployment.yaml +++ b/charts/artifact-hub/templates/hub_deployment.yaml @@ -23,6 +23,9 @@ spec: labels: app.kubernetes.io/component: hub {{- include "chart.selectorLabels" . | nindent 8 }} + {{- with .Values.commonLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.hub.deploy.extraPodLabels }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/artifact-hub/templates/trivy_deployment.yaml b/charts/artifact-hub/templates/trivy_deployment.yaml index d8687a7ad..1dd92e9ae 100644 --- a/charts/artifact-hub/templates/trivy_deployment.yaml +++ b/charts/artifact-hub/templates/trivy_deployment.yaml @@ -22,6 +22,9 @@ spec: labels: app.kubernetes.io/component: trivy {{- include "chart.selectorLabels" . | nindent 8 }} + {{- with .Values.commonLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.trivy.deploy.extraPodLabels }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/artifact-hub/values.schema.json b/charts/artifact-hub/values.schema.json index fa09fbfeb..bdd07cd17 100644 --- a/charts/artifact-hub/values.schema.json +++ b/charts/artifact-hub/values.schema.json @@ -3,6 +3,12 @@ "title": "Artifact Hub Chart JSON Schema", "type": "object", "properties": { + "commonLabels": { + "title": "Common labels", + "description": "Labels to add to all kubernetes resources provisioned by the helm chart", + "type": "object", + "default": {} + }, "creds": { "type": "object", "properties": { diff --git a/charts/artifact-hub/values.yaml b/charts/artifact-hub/values.yaml index 3a9433e47..8beeb5f05 100644 --- a/charts/artifact-hub/values.yaml +++ b/charts/artifact-hub/values.yaml @@ -1,5 +1,8 @@ # Artifact Hub Chart default configuration values +# Common labels to add to all resources +commonLabels: {} + imagePullSecrets: [] imageTag: "" nameOverride: ""