Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cockroachdb: add crdbcluster options. #446

Open
wants to merge 1 commit into
base: poc-deploy-operator
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cockroachdb/templates/crdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ spec:
features:
- reconcile
- reconcile-beta
{{- with .Values.operator.flags }}
flags: {{- toYaml . | nindent 4 }}
{{- end }}
rollingRestartDelay: {{ .Values.operator.rollingRestartDelay }}
template:
spec:
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
Expand All @@ -38,6 +42,12 @@ spec:
{{- with .Values.operator.dataStore }}
dataStore: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.env }}
env: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.operator.topologySpreadConstraints }}
topologySpreadConstraints: {{- toYaml . | nindent 8 }}
{{- end }}
podLabels:
app.kubernetes.io/name: {{ template "cockroachdb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
Expand Down
19 changes: 19 additions & 0 deletions cockroachdb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,25 @@ operator:
podLabels:
app.kubernetes.io/component: cockroachdb

# Flags passed to the cockroachdb container.
flags:
# Disable backup/restore to local disk by default.
--external-io-dir: disabled

# Environment variables set on cockroachdb pods.
env: []

# Delay between cockroachdb pod restarts. Wait 3m by default to avoid
# unavailability during restarts.
rollingRestartDelay: 3m0s

# Topology spread constraints set on cockroachdb pods. Spread cockroachdb
# pods across zones by default.
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule

Comment on lines +825 to +843
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to update build/templates/values.yaml and then run go run build/build.go generate to generate the changes to this file.

extras:
# Add a container with dnsutils (nslookup, dig, ping, etc.) installed.
dnsutils: false