From be4c085ce6c0d26996b50d3ea490cbd5e13ffb31 Mon Sep 17 00:00:00 2001 From: Tobias Paepke Date: Wed, 23 Oct 2019 20:06:58 +0200 Subject: [PATCH] [stable/cockroachdb] labels for cockroachdb service (#18233) * Add labels to cockroachdb service and servicediscovery-service Signed-off-by: Tobias Paepke Signed-off-by: Tobias Paepke * update README.md to cover new values Signed-off-by: Tobias Paepke Signed-off-by: Tobias Paepke * Chart version bump Signed-off-by: Tobias Paepke Signed-off-by: Tobias Paepke --- stable/cockroachdb/Chart.yaml | 2 +- stable/cockroachdb/README.md | 2 ++ stable/cockroachdb/templates/service-discovery.yaml | 3 +++ stable/cockroachdb/templates/service.yaml | 3 +++ stable/cockroachdb/values.yaml | 3 +++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stable/cockroachdb/Chart.yaml b/stable/cockroachdb/Chart.yaml index 5254f4b2f4..a790473f22 100755 --- a/stable/cockroachdb/Chart.yaml +++ b/stable/cockroachdb/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: cockroachdb home: https://www.cockroachlabs.com -version: 2.1.15 +version: 2.1.16 appVersion: 19.1.5 description: CockroachDB is a scalable, survivable, strongly-consistent SQL database. icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png diff --git a/stable/cockroachdb/README.md b/stable/cockroachdb/README.md index b2dd7c7189..c616ced006 100644 --- a/stable/cockroachdb/README.md +++ b/stable/cockroachdb/README.md @@ -190,6 +190,8 @@ The following table lists the configurable parameters of the CockroachDB chart a | `NetworkPolicy.AllowExternal` | Don't require client label for connections | `true` | | `Service.Type` | Public service type | `ClusterIP` | | `Service.Annotations` | Annotations to apply to the service | `{}` | +| `Service.labels` | Labels to apply to the service | `{}` | +| `ServiceDiscovery.labels` | Labels to apply to the service for discovery | `{}` | | `PodManagementPolicy` | `OrderedReady` or `Parallel` pod creation/deletion order | `Parallel` | | `UpdateStrategy.type` | allows setting of RollingUpdate strategy | `RollingUpdate` | | `NodeSelector` | Node labels for pod assignment | `{}` | diff --git a/stable/cockroachdb/templates/service-discovery.yaml b/stable/cockroachdb/templates/service-discovery.yaml index 0b728699e3..abb5683754 100644 --- a/stable/cockroachdb/templates/service-discovery.yaml +++ b/stable/cockroachdb/templates/service-discovery.yaml @@ -11,6 +11,9 @@ metadata: release: {{ .Release.Name | quote }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" component: "{{ .Release.Name }}-{{ .Values.Component }}" +{{- if .Values.ServiceDiscovery.labels }} +{{ toYaml .Values.ServiceDiscovery.labels | indent 4 }} +{{- end }} annotations: # Use this annotation in addition to the actual field below because the # annotation will stop being respected soon but the field is broken in diff --git a/stable/cockroachdb/templates/service.yaml b/stable/cockroachdb/templates/service.yaml index f2b42e06a4..a5295051b7 100644 --- a/stable/cockroachdb/templates/service.yaml +++ b/stable/cockroachdb/templates/service.yaml @@ -11,6 +11,9 @@ metadata: release: {{ .Release.Name | quote }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" component: "{{ .Release.Name }}-{{ .Values.Component }}" +{{- if .Values.Service.labels }} +{{ toYaml .Values.Service.labels | indent 4 }} +{{- end }} spec: type: {{ .Values.Service.type }} ports: diff --git a/stable/cockroachdb/values.yaml b/stable/cockroachdb/values.yaml index abd7fc09b5..79cda32ca0 100644 --- a/stable/cockroachdb/values.yaml +++ b/stable/cockroachdb/values.yaml @@ -59,6 +59,9 @@ NetworkPolicy: Service: type: ClusterIP annotations: {} + labels: {} +ServiceDiscovery: + labels: {} PodManagementPolicy: Parallel UpdateStrategy: type: RollingUpdate