mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/cockroachdb] Split template into multiple files (#17242)
* [Stable/Cockroachdb] Split manifest into files Signed-off-by: Paul Farver <paulfarver@gmail.com> * [Stable/Cockroachdb] Clean pr Signed-off-by: Paul Farver <paulfarver@gmail.com> * [Stable/Cockroachdb] Bump chart version Signed-off-by: Paul Farver <paulfarver@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
8faca09ce7
commit
8180c3ffcf
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: cockroachdb
|
||||
home: https://www.cockroachlabs.com
|
||||
version: 2.1.12
|
||||
version: 2.1.13
|
||||
appVersion: 19.1.3
|
||||
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
|
||||
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if .Values.Secure.Enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- certificates.k8s.io
|
||||
resources:
|
||||
- certificatesigningrequests
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- watch
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.Secure.Enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- end }}
|
||||
-1
@@ -1,5 +1,4 @@
|
||||
{{- if .Values.NetworkPolicy.Enabled }}
|
||||
---
|
||||
kind: NetworkPolicy
|
||||
apiVersion: {{ template "cockroachdb.networkPolicy.apiVersion" . }}
|
||||
metadata:
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}-budget"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
maxUnavailable: {{ .Values.MaxUnavailable }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.Secure.Enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.Secure.Enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,44 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
# This service only exists to create DNS entries for each pod in the stateful
|
||||
# set such that they can resolve each other's IP addresses. It does not
|
||||
# create a load-balanced ClusterIP and should not be used directly by clients
|
||||
# in most circumstances.
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
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
|
||||
# some versions of Kubernetes:
|
||||
# https://github.com/kubernetes/kubernetes/issues/58662
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
# Enable automatic monitoring of all instances when Prometheus is running in the cluster.
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "_status/vars"
|
||||
prometheus.io/port: "{{ .Values.ExternalHttpPort }}"
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.ExternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.ExternalGrpcName }}
|
||||
# The secondary port serves the UI as well as health and debug endpoints.
|
||||
- port: {{ .Values.ExternalHttpPort }}
|
||||
targetPort: {{ .Values.InternalHttpPort }}
|
||||
name: {{ .Values.HttpName }}
|
||||
{{- if ne .Values.InternalGrpcPort .Values.ExternalGrpcPort }}
|
||||
- port: {{ .Values.InternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.InternalGrpcName }}
|
||||
{{- end }}
|
||||
# We want all pods in the StatefulSet to have their addresses published for
|
||||
# the sake of the other CockroachDB pods even before they're ready, since they
|
||||
# have to be able to talk to each other in order to become ready.
|
||||
publishNotReadyAddresses: true
|
||||
clusterIP: None
|
||||
selector:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will
|
||||
# automatically load balance connections to the different database pods.
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}-public"
|
||||
annotations:
|
||||
{{ toYaml .Values.Service.annotations | indent 4 }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
spec:
|
||||
type: {{ .Values.Service.type }}
|
||||
ports:
|
||||
# The main port, served by gRPC, serves Postgres-flavor SQL, internode
|
||||
# traffic and the cli.
|
||||
- port: {{ .Values.ExternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.ExternalGrpcName }}
|
||||
# The secondary port serves the UI as well as health and debug endpoints.
|
||||
- port: {{ .Values.ExternalHttpPort }}
|
||||
targetPort: {{ .Values.InternalHttpPort }}
|
||||
name: {{ .Values.HttpName }}
|
||||
{{- if ne .Values.InternalGrpcPort .Values.ExternalGrpcPort }}
|
||||
- port: {{ .Values.InternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.InternalGrpcName }}
|
||||
{{- end }}
|
||||
selector:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
@@ -0,0 +1,11 @@
|
||||
{{- if and .Values.Secure.Enabled .Values.Secure.ServiceAccount.Create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
{{- end }}
|
||||
-180
@@ -1,183 +1,3 @@
|
||||
{{- if .Values.Secure.Enabled }}
|
||||
{{- if .Values.Secure.ServiceAccount.Create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
---
|
||||
{{- end }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- certificates.k8s.io
|
||||
resources:
|
||||
- certificatesigningrequests
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "cockroachdb.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will
|
||||
# automatically load balance connections to the different database pods.
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}-public"
|
||||
annotations:
|
||||
{{ toYaml .Values.Service.annotations | indent 4 }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
spec:
|
||||
type: {{ .Values.Service.type }}
|
||||
ports:
|
||||
# The main port, served by gRPC, serves Postgres-flavor SQL, internode
|
||||
# traffic and the cli.
|
||||
- port: {{ .Values.ExternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.ExternalGrpcName }}
|
||||
# The secondary port serves the UI as well as health and debug endpoints.
|
||||
- port: {{ .Values.ExternalHttpPort }}
|
||||
targetPort: {{ .Values.InternalHttpPort }}
|
||||
name: {{ .Values.HttpName }}
|
||||
{{- if ne .Values.InternalGrpcPort .Values.ExternalGrpcPort }}
|
||||
- port: {{ .Values.InternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.InternalGrpcName }}
|
||||
{{- end }}
|
||||
selector:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
# This service only exists to create DNS entries for each pod in the stateful
|
||||
# set such that they can resolve each other's IP addresses. It does not
|
||||
# create a load-balanced ClusterIP and should not be used directly by clients
|
||||
# in most circumstances.
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
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
|
||||
# some versions of Kubernetes:
|
||||
# https://github.com/kubernetes/kubernetes/issues/58662
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
# Enable automatic monitoring of all instances when Prometheus is running in the cluster.
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/path: "_status/vars"
|
||||
prometheus.io/port: "{{ .Values.ExternalHttpPort }}"
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.ExternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.ExternalGrpcName }}
|
||||
# The secondary port serves the UI as well as health and debug endpoints.
|
||||
- port: {{ .Values.ExternalHttpPort }}
|
||||
targetPort: {{ .Values.InternalHttpPort }}
|
||||
name: {{ .Values.HttpName }}
|
||||
{{- if ne .Values.InternalGrpcPort .Values.ExternalGrpcPort }}
|
||||
- port: {{ .Values.InternalGrpcPort }}
|
||||
targetPort: {{ .Values.InternalGrpcPort }}
|
||||
name: {{ .Values.InternalGrpcName }}
|
||||
{{- end }}
|
||||
# We want all pods in the StatefulSet to have their addresses published for
|
||||
# the sake of the other CockroachDB pods even before they're ready, since they
|
||||
# have to be able to talk to each other in order to become ready.
|
||||
publishNotReadyAddresses: true
|
||||
clusterIP: None
|
||||
selector:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
---
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}-budget"
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
component: "{{ .Release.Name }}-{{ .Values.Component }}"
|
||||
maxUnavailable: {{ .Values.MaxUnavailable }}
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
Reference in New Issue
Block a user