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

[BREAK CHANGE]: remove legacy adopt existing configs #739

Open
wants to merge 4 commits into
base: master
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
58 changes: 2 additions & 56 deletions charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,7 @@ spec:
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets | indent 6 }}
{{- end }}
{{- if .Values.bookkeeper.operator.adopt_existing }}
volumes:
{{- if not (and .Values.volumes.persistence .Values.bookkeeper.volumes.persistence) }}
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}"
emptyDir: {}
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
emptyDir: {}
{{- end }}
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 4 }}
{{- include "pulsar.bookkeeper.log.volumes" . | nindent 4 }}
{{- end }}
{{- if and (not .Values.bookkeeper.operator.adopt_existing) .Values.tls.bookie.enabled }}
{{- if .Values.tls.bookie.enabled }}
volumes:
{{- include "pulsar.bookkeeper.certs.volumes" . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -155,13 +144,6 @@ spec:
{{- end }}
# Do not retain journal files as it increase the disk utilization
journalMaxBackups: "0"
{{- if .Values.bookkeeper.operator.adopt_existing }}
# if adopting existing bk cluster then also keep existing ledger/journal dir setting
journalDirectories: "/pulsar/data/bookkeeper/journal"
PULSAR_PREFIX_journalDirectories: "/pulsar/data/bookkeeper/journal"
ledgerDirectories: "/pulsar/data/bookkeeper/ledgers"
PULSAR_PREFIX_ledgerDirectories: "/pulsar/data/bookkeeper/ledgers"
{{- end }}
{{- include "pulsar.bookkeeper.config.tls" . | nindent 6 }}
{{ (.Files.Glob "conf/bookie/log4j2.yaml").AsConfig | indent 6 }}
autoRecovery:
Expand Down Expand Up @@ -229,52 +211,16 @@ spec:
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
updatePolicy:
{{- if .Values.bookkeeper.operator.adopt_existing }}
{{ .Values.bookkeeper.operator.updatePolicy }}
{{- else }}
- all
{{- end }}
{{- if .Values.bookkeeper.operator.adopt_existing }}
{{- if and .Values.volumes.persistence .Values.bookkeeper.volumes.persistence}}
volumeClaimTemplates:
- metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.bookkeeper.volumes.journal.size }}
{{- include "pulsar.bookkeeper.journal.storage.class" . | nindent 10 }}
- metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.bookkeeper.volumes.ledgers.size }}
{{- include "pulsar.bookkeeper.ledgers.storage.class" . | nindent 10 }}
{{- end }}
volumeMounts:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.journal.name }}"
mountPath: /pulsar/data/bookkeeper/journal
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}-{{ .Values.bookkeeper.volumes.ledgers.name }}"
mountPath: /pulsar/data/bookkeeper/ledgers
{{- include "pulsar.bookkeeper.certs.volumeMounts" . | nindent 6 }}
{{- include "pulsar.bookkeeper.log.volumeMounts" . | nindent 6 }}
{{- end }}
{{- if and (not .Values.bookkeeper.operator.adopt_existing) .Values.tls.bookie.enabled }}
{{- if .Values.tls.bookie.enabled }}
volumeMounts:
{{- include "pulsar.bookkeeper.certs.volumeMounts" . | nindent 6 }}
{{- end }}
autoRecoveryStatefulSet:
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.autorecovery.component }}"
updatePolicy:
{{- if .Values.autorecovery.operator.adopt_existing }}
{{ .Values.autorecovery.operator.updatePolicy }}
{{- else }}
- all
{{- end }}
configMap:
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.bookkeeper.component }}"
Expand Down
37 changes: 2 additions & 35 deletions charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,7 @@ spec:
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets | indent 6 }}
{{- end }}
{{- if .Values.zookeeper.operator.adopt_existing }}
volumes:
{{- include "pulsar.zookeeper.data.volumes" . | nindent 4 }}
{{- include "pulsar.zookeeper.certs.volumes" . | nindent 4 }}
{{- include "pulsar.zookeeper.log.volumes" . | nindent 4 }}
{{- include "pulsar.zookeeper.genzkconf.volumes" . | nindent 4 }}
{{- if .Values.zookeeper.customTools.restore.enable }}
- name: restore-config
configMap:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.customTools.restore.component }}"
{{- end }}
{{- end }}
{{- if and (not .Values.zookeeper.operator.adopt_existing) .Values.tls.zookeeper.enabled }}
{{- if .Values.tls.zookeeper.enabled }}
volumes:
{{- include "pulsar.zookeeper.certs.volumes" . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -174,14 +162,6 @@ spec:
serverCnxnFactory: {{ .Values.zookeeper.serverCnxnFactory }}
# copy from configmap
custom:
{{- if .Values.zookeeper.operator.adopt_existing }}
# if adopting existing zk cluster then also keep existing data/data-log dir setting
PULSAR_PREFIX_dataDir: /pulsar/data/zookeeper
{{- if .Values.zookeeper.volumes.useSeparateDiskForTxlog }}
# use a separate disk for tx log
PULSAR_PREFIX_dataLogDir: /pulsar/data/zookeeper-datalog
{{- end }}
{{- end }}
# enable zookeeper tls
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
secureClientPort: "{{ .Values.zookeeper.ports.clientTls }}"
Expand All @@ -207,21 +187,8 @@ spec:
metadata:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
updatePolicy:
{{- if .Values.zookeeper.operator.adopt_existing }}
{{ .Values.zookeeper.operator.updatePolicy }}
{{- else }}
- all
{{- end }}
{{- if .Values.zookeeper.operator.adopt_existing }}
volumeClaimTemplates:
{{- include "pulsar.zookeeper.data.volumeClaimTemplates" . | nindent 6 }}
volumeMounts:
{{- include "pulsar.zookeeper.data.volumeMounts" . | nindent 6 }}
{{- include "pulsar.zookeeper.certs.volumeMounts" . | nindent 6 }}
{{- include "pulsar.zookeeper.log.volumeMounts" . | nindent 6 }}
{{- include "pulsar.zookeeper.genzkconf.volumeMounts" . | nindent 6 }}
{{- end }}
{{- if and (not .Values.zookeeper.operator.adopt_existing) .Values.tls.zookeeper.enabled }}
{{- if .Values.tls.zookeeper.enabled }}
volumeMounts:
{{- include "pulsar.zookeeper.certs.volumeMounts" . | nindent 6 }}
{{- end }}
Expand Down
33 changes: 3 additions & 30 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -804,13 +804,9 @@ zookeeper:
OPTS: ""
secrets:
use: false
# aws:
# secretName: "restore-aws-secret"
## Operator Controller
## templates/zookeeper-cluster.yaml
operator:
adopt_existing: false
updatePolicy: []
# aws:
# secretName: "restore-aws-secret"

## Retention Policy
resourcePolicy:
keep: false
Expand Down Expand Up @@ -963,12 +959,6 @@ bookkeeper:
gcLoggingOptions: []
custom: {}
configData: {}
## Operator Controller
## templates/bookkeeper-cluster.yaml
operator:
adopt_existing: false
updatePolicy: >
- finalizers
## Retention Policy
resourcePolicy:
keep: false
Expand Down Expand Up @@ -1012,11 +1002,6 @@ autorecovery:
extraOptions: []
gcLoggingOptions: []
configData: {}
## Operator Controller
## templates/bookkeeper-cluster.yaml
operator:
adopt_existing: false
updatePolicy: []
## Retention Policy
resourcePolicy:
keep: false
Expand Down Expand Up @@ -1261,12 +1246,6 @@ broker:
# [secret name]
# ```
# secret: [k8s secret that stores azure credentials]
## Operator Controller
## templates/broker-cluster.yaml
operator:
adopt_existing: false
updatePolicy: >
- finalizers
## Retention Policy
resourcePolicy:
keep: false
Expand Down Expand Up @@ -1516,12 +1495,6 @@ proxy:
pulsarssl: 6651
websocket: 9090
websockettls: 9443
## Operator Controller
## templates/broker-cluster.yaml
operator:
adopt_existing: false
updatePolicy: >
- finalizers
## Retention Policy
resourcePolicy:
keep: false
Expand Down