Skip to content

Commit

Permalink
add(helm): use commonLabels in chart
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoriaOrtega committed Aug 9, 2024
1 parent e23eef5 commit d6fe5da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/helm/charts/loki-rule-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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.8.0"
version: "0.8.1"

# 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
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/charts/loki-rule-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ helm.sh/chart: {{ include "loki-rule-operator.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
11 changes: 11 additions & 0 deletions deploy/helm/charts/loki-rule-operator/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,14 @@ tests:
- equal:
path: spec.template.spec.serviceAccountName
value: my-service-account
- it: should set commonLabels
values:
- ./minimal_values.yaml
set:
release:
name: my-release
commonLabels:
app.kubernetes.io/name: my-app
app.kubernetes.io/instance: my-instance
hasDocuments:
count: 1
2 changes: 2 additions & 0 deletions deploy/helm/charts/loki-rule-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ serviceAccount:

podAnnotations: {}

commonLabels: {}

resources:
limits:
cpu: 200m
Expand Down

0 comments on commit d6fe5da

Please sign in to comment.