Skip to content

Commit e1830c6

Browse files
committed
[BRE-1272] Adding custom label support for SM operator
1 parent 428758f commit e1830c6

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

charts/sm-operator/templates/_helpers.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ helm.sh/chart: {{ include "sm-operator.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- with .Values.commonLabels }}
44+
{{ toYaml . }}
45+
{{- end }}
4346
{{- end }}
4447

4548
{{/*

charts/sm-operator/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"properties": {
4+
"commonLabels": {
5+
"type": "object",
6+
"additionalProperties": {
7+
"type": "string"
8+
},
9+
"default": {}
10+
},
411
"containers": {
512
"properties": {
613
"manager": {

charts/sm-operator/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ settings:
1414
# The number of operator pod replicas to run. When in doubt, leave at 1
1515
replicas: 1
1616

17+
# Optional: Custom labels to be applied to all resources created by the operator
18+
# This can be used to identify the Bitwarden Secrets Manager project or for any other labeling needs
19+
# Example:
20+
# commonLabels:
21+
# custom-label: custom-label-value
22+
commonLabels: {}
23+
1724
# Settings specific to the pod containers
1825
containers:
1926
manager:

0 commit comments

Comments
 (0)