Skip to content

Commit

Permalink
Merge pull request #1367 from tjungblu/ETCD-688
Browse files Browse the repository at this point in the history
ETCD-688: add readyZ for restore pods
  • Loading branch information
openshift-merge-bot[bot] authored Nov 13, 2024
2 parents 0079c87 + 9434853 commit 9a2aa20
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 0 deletions.
35 changes: 35 additions & 0 deletions bindata/etcd/quorum-restore-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,41 @@ ${COMPUTED_ENV_VARS}
name: data-dir
- mountPath: /var/lib/etcd-backup/
name: backup-dir
- name: etcd-readyz
image: ${OPERATOR_IMAGE}
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -euo pipefail
exec nice -n -18 cluster-etcd-operator readyz \
--target=https://localhost:2379 \
--listen-port=9980 \
--serving-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-certs/etcd-serving-NODE_NAME.crt \
--serving-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-certs/etcd-serving-NODE_NAME.key \
--client-cert-file=$(ETCDCTL_CERT) \
--client-key-file=$(ETCDCTL_KEY) \
--client-cacert-file=$(ETCDCTL_CACERT) \
--listen-cipher-suites=$(ETCD_CIPHER_SUITES)
securityContext:
privileged: true
ports:
- containerPort: 9980
name: readyz
protocol: TCP
resources:
requests:
memory: 50Mi
cpu: 10m
env:
${COMPUTED_ENV_VARS}
volumeMounts:
- mountPath: /etc/kubernetes/static-pod-certs
name: cert-dir
hostNetwork: true
priorityClassName: system-node-critical
tolerations:
Expand Down
35 changes: 35 additions & 0 deletions bindata/etcd/restore-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,41 @@ ${COMPUTED_ENV_VARS}
name: data-dir
- mountPath: /var/lib/etcd-backup/
name: backup-dir
- name: etcd-readyz
image: ${OPERATOR_IMAGE}
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -euo pipefail
exec nice -n -18 cluster-etcd-operator readyz \
--target=https://localhost:2379 \
--listen-port=9980 \
--serving-cert-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-certs/etcd-serving-NODE_NAME.crt \
--serving-key-file=/etc/kubernetes/static-pod-certs/secrets/etcd-all-certs/etcd-serving-NODE_NAME.key \
--client-cert-file=$(ETCDCTL_CERT) \
--client-key-file=$(ETCDCTL_KEY) \
--client-cacert-file=$(ETCDCTL_CACERT) \
--listen-cipher-suites=$(ETCD_CIPHER_SUITES)
securityContext:
privileged: true
ports:
- containerPort: 9980
name: readyz
protocol: TCP
resources:
requests:
memory: 50Mi
cpu: 10m
env:
${COMPUTED_ENV_VARS}
volumeMounts:
- mountPath: /etc/kubernetes/static-pod-certs
name: cert-dir
hostNetwork: true
priorityClassName: system-node-critical
tolerations:
Expand Down
70 changes: 70 additions & 0 deletions pkg/operator/etcd_assets/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a2aa20

Please sign in to comment.