Skip to content

Commit

Permalink
fix: use generic labels
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Kheifets <[email protected]>
  • Loading branch information
ikheifets-splunk committed Dec 10, 2024
1 parent 87e14bd commit 01e5062
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
10 changes: 10 additions & 0 deletions charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ app.kubernetes.io/name: {{ include "splunk-connect-for-snmp.worker.name" . }}-tr
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "splunk-connect-for-snmp.worker.flower.selectorLabels" -}}
app.kubernetes.io/name: {{ include "splunk-connect-for-snmp.worker.name" . }}-flower
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}


{{/*
Common labels
Expand All @@ -78,6 +83,11 @@ Common labels
{{ include "splunk-connect-for-snmp.labels" . }}
{{- end }}

{{- define "splunk-connect-for-snmp.worker.flower.labels" -}}
{{ include "splunk-connect-for-snmp.worker.flower.selectorLabels" . }}
{{ include "splunk-connect-for-snmp.labels" . }}
{{- end }}

{{- define "environmental-variables" -}}
- name: CONFIG_PATH
value: /app/config/config.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: flower
name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower
labels:
{{- include "splunk-connect-for-snmp.worker.flower.labels" . | nindent 4 }}

spec:
replicas: 1
selector:
matchLabels:
app: flower
{{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: flower
{{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: flower-svc
name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower-svc

spec:
selector:
Expand Down

0 comments on commit 01e5062

Please sign in to comment.