Skip to content

Commit

Permalink
add sidecar container
Browse files Browse the repository at this point in the history
  • Loading branch information
Elbehery committed Jul 12, 2024
1 parent fc34fe8 commit 5fe990f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
36 changes: 36 additions & 0 deletions bindata/etcd/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,36 @@ ${COMPUTED_ENV_VARS}
name: log-dir
- mountPath: /etc/kubernetes/static-pod-certs
name: cert-dir
- name: etcd-backup-noconfig
image: ${OPERATOR_IMAGE}
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command:
- /bin/sh
- -c
- |
#!/bin/sh
set -euo pipefail
exec nice -n -18 cluster-etcd-operator backup-server \
--endpoints=https://localhost:2379 \
--config-dir=/etc/kubernetes \
--data-dir=/var/lib/etcd
--backup-dir=/var/backup/etcd
securityContext:
privileged: true
resources:
requests:
memory: 50Mi
cpu: 10m
env:
${COMPUTED_ENV_VARS}
volumeMounts:
- mountPath: /var/lib/etcd
name: data-dir
- mountPath: /var/backup/etcd
name: backup-dir
- mountPath: /etc/kubernetes
name: config-dir
hostNetwork: true
priorityClassName: system-node-critical
tolerations:
Expand All @@ -335,3 +365,9 @@ ${COMPUTED_ENV_VARS}
- hostPath:
path: /var/log/etcd
name: log-dir
- hostPath:
path: /var/backup/etcd
name: backup-dir
- hostPath:
path: /etc/kubernetes
name: config-dir
2 changes: 1 addition & 1 deletion pkg/cmd/backuprestore/backupnoconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (b *backupNoConfig) AddFlags(fs *pflag.FlagSet) {
}

func (b *backupNoConfig) Validate() error {
return b.Validate()
return b.backupOptions.Validate()
}

func (b *backupNoConfig) Run() error {
Expand Down
36 changes: 36 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 5fe990f

Please sign in to comment.