From 800efd2ac47ac41180e59e2add425a813315086e Mon Sep 17 00:00:00 2001 From: Mario Valderrama Date: Thu, 28 Apr 2022 16:03:24 +0200 Subject: [PATCH] [CA][Helm] Allow skipping service creation --- charts/cluster-autoscaler/Chart.yaml | 2 +- charts/cluster-autoscaler/README.md | 1 + charts/cluster-autoscaler/templates/service.yaml | 2 ++ charts/cluster-autoscaler/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 30a7a13db68c..5a57224be166 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -17,4 +17,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.18.1 +version: 9.19.0 diff --git a/charts/cluster-autoscaler/README.md b/charts/cluster-autoscaler/README.md index d6f142332740..31f8d7dbb83b 100644 --- a/charts/cluster-autoscaler/README.md +++ b/charts/cluster-autoscaler/README.md @@ -356,6 +356,7 @@ Though enough for the majority of installations, the default PodSecurityPolicy _ | resources | object | `{}` | Pod resource requests and limits. | | securityContext | object | `{}` | [Security context for pod](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) | | service.annotations | object | `{}` | Annotations to add to service | +| service.create | bool | `true` | If `true`, a Service will be created. | | service.externalIPs | list | `[]` | List of IP addresses at which the service is available. Ref: https://kubernetes.io/docs/user-guide/services/#external-ips. | | service.labels | object | `{}` | Labels to add to service | | service.loadBalancerIP | string | `""` | IP address to assign to load balancer (if supported). | diff --git a/charts/cluster-autoscaler/templates/service.yaml b/charts/cluster-autoscaler/templates/service.yaml index d630512d4ed2..255aea44b7e6 100644 --- a/charts/cluster-autoscaler/templates/service.yaml +++ b/charts/cluster-autoscaler/templates/service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.service.create }} apiVersion: v1 kind: Service metadata: @@ -35,3 +36,4 @@ spec: selector: {{ include "cluster-autoscaler.instance-name" . | indent 4 }} type: "{{ .Values.service.type }}" +{{- end }} diff --git a/charts/cluster-autoscaler/values.yaml b/charts/cluster-autoscaler/values.yaml index def598d9904a..c6ecc3096263 100644 --- a/charts/cluster-autoscaler/values.yaml +++ b/charts/cluster-autoscaler/values.yaml @@ -306,6 +306,8 @@ securityContext: {} # runAsGroup: 1001 service: + # service.create -- If `true`, a Service will be created. + create: true # service.annotations -- Annotations to add to service annotations: {} # service.labels -- Labels to add to service