Skip to content

Commit 5a7e7cf

Browse files
authored
Merge pull request kubernetes#3575 from michelzanini/master
[Helm Chart] Add support to configure custom service labels
2 parents 59ba79b + 2ad0f02 commit 5a7e7cf

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

charts/cluster-autoscaler-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ name: cluster-autoscaler-chart
1717
sources:
1818
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
1919
type: application
20-
version: 1.0.3
20+
version: 1.0.4

charts/cluster-autoscaler-chart/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ Though enough for the majority of installations, the default PodSecurityPolicy _
335335
| resources | object | `{}` | Pod resource requests and limits. |
336336
| securityContext | object | `{}` | [Security context for pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) |
337337
| service.annotations | object | `{}` | Annotations to add to service |
338+
| service.labels | object | `{}` | Labels to add to service |
338339
| service.externalIPs | list | `[]` | List of IP addresses at which the service is available. Ref: https://kubernetes.io/docs/user-guide/services/#external-ips. |
339340
| service.loadBalancerIP | string | `""` | IP address to assign to load balancer (if supported). |
340341
| service.loadBalancerSourceRanges | list | `[]` | List of IP CIDRs allowed access to load balancer (if supported). |

charts/cluster-autoscaler-chart/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ metadata:
77
{{- end }}
88
labels:
99
{{ include "cluster-autoscaler.labels" . | indent 4 }}
10+
{{- if .Values.service.labels }}
11+
{{ toYaml .Values.service.labels | indent 4 }}
12+
{{- end }}
1013
name: {{ template "cluster-autoscaler.fullname" . }}
1114
spec:
1215
{{- if .Values.service.clusterIP }}

charts/cluster-autoscaler-chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ securityContext: {}
210210
service:
211211
# service.annotations -- Annotations to add to service
212212
annotations: {}
213+
# service.labels -- Labels to add to service
214+
labels: {}
213215
# service.externalIPs -- List of IP addresses at which the service is available. Ref: https://kubernetes.io/docs/user-guide/services/#external-ips.
214216
externalIPs: []
215217

0 commit comments

Comments
 (0)