Skip to content

Commit

Permalink
Add the ability to specify labels and annotations for service, pod an…
Browse files Browse the repository at this point in the history
…d deployment (helm#11205)

Signed-off-by: Matthew DeVenny <[email protected]>
  • Loading branch information
matthewdevenny authored and k8s-ci-robot committed Feb 19, 2019
1 parent 51b2fd5 commit 4e22b01
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/mssql-linux/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: SQL Server 2017 Linux Helm Chart
name: mssql-linux
version: 0.6.5
version: 0.7.0
appVersion: 14.0.3023.8
home: https://hub.docker.com/r/microsoft/mssql-server-linux/
icon: https://img-prod-cms-rt-microsoft-com.akamaized.net/cms/api/am/imageFileData/RE1I4Dx
Expand Down
4 changes: 4 additions & 0 deletions stable/mssql-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ The configuration parameters in this section control the resources requested and
| service.type | Service Type | `ClusterIP` |
| service.port | Service Port | `1433` |
| service.annotations | Kubernetes service annotations | `{}` |
| service.labels | Kubernetes service labels | `{}` |
| deployment.annotations | Kubernetes deployment annotations | `{}` |
| deployment.labels | Kubernetes deployment labels | `{}` |
| pod.annotations | Kubernetes pod annotations | `{}` |
| pod.labels | Kubernetes pod labels | `{}` |
| collation | Default collation for SQL Server | `SQL_Latin1_General_CP1_CI_AS` |
| lcid | Default languages for SQL Server | `1033` |
| hadr | Enable Availability Group | `0` |
Expand Down
10 changes: 10 additions & 0 deletions stable/mssql-linux/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deployment.labels }}
{{ toYaml .Values.deployment.labels | indent 4 }}
{{- end }}
{{- if .Values.deployment.annotations }}
annotations:
{{ toYaml .Values.deployment.annotations | indent 4 }}
Expand All @@ -22,6 +25,13 @@ spec:
labels:
app: {{ template "mssql.name" . }}
release: {{ .Release.Name }}
{{- if .Values.pod.labels }}
{{ toYaml .Values.pod.labels | indent 8 }}
{{- end }}
{{- if .Values.pod.annotations }}
annotations:
{{ toYaml .Values.pod.annotations | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
Expand Down
3 changes: 3 additions & 0 deletions stable/mssql-linux/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
Expand Down
5 changes: 5 additions & 0 deletions stable/mssql-linux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ service:
type: ClusterIP
port: 1433
annotations: {}
labels: {}
deployment:
annotations: {}
labels: {}
pod:
annotations: {}
labels: {}
persistence:
enabled: true
# existingDataClaim:
Expand Down

0 comments on commit 4e22b01

Please sign in to comment.