Skip to content

Commit b15d0f7

Browse files
Add ability to configure deployment annotations and labels (#201)
* Add ability to configure deployment annotations and labels * Fix copy-paste mistake * Bump chart version to 0.79.0
1 parent f886df9 commit b15d0f7

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

charts/flipt/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: flipt
33
home: https://flipt.io
44
description: Flipt is an open-source, self-hosted feature flag solution.
55
type: application
6-
version: 0.78.1
6+
version: 0.79.0
77
appVersion: v1.54.1
88
maintainers:
99
- name: Flipt

charts/flipt/templates/_helpers.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ Pod annotations
112112
{{- printf "checksum/config: %v" (join "," .Values.flipt | sha256sum) | nindent 0 -}}
113113
{{- end -}}
114114

115+
{{/*
116+
Deployment annotations
117+
*/}}
118+
{{- define "common.classes.deploymentAnnotations" -}}
119+
{{- if .Values.deploymentAnnotations -}}
120+
{{- tpl (toYaml .Values.deploymentAnnotations) . | nindent 0 -}}
121+
{{- end -}}
122+
{{- printf "checksum/config: %v" (join "," .Values.flipt | sha256sum) | nindent 0 -}}
123+
{{- end -}}
124+
115125
{{/* Return the target Kubernetes version */}}
116126
{{- define "flipt.tools.kubeVersion" -}}
117127
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}

charts/flipt/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ kind: Deployment
33
metadata:
44
name: {{ include "flipt.fullname" . }}
55
namespace: {{ .Release.Namespace }}
6+
annotations: {{- include "common.classes.deploymentAnnotations" . | nindent 4 }}
67
labels:
78
{{- include "flipt.labels" . | nindent 4 }}
9+
{{- if .Values.deploymentLabels }}
10+
{{- toYaml .Values.deploymentLabels | nindent 4 }}
11+
{{- end }}
812
spec:
913
{{- if not .Values.autoscaling.enabled }}
1014
replicas: {{ .Values.replicaCount }}

charts/flipt/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ test:
2727
podAnnotations: {}
2828
podLabels: {}
2929

30+
deploymentAnnotations: {}
31+
deploymentLabels: {}
32+
3033
podSecurityContext:
3134
runAsUser: 100
3235
runAsGroup: 1000

0 commit comments

Comments
 (0)