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 11, 2024
1 parent fc34fe8 commit 46881b6
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
40 changes: 40 additions & 0 deletions bindata/etcd/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,40 @@ ${COMPUTED_ENV_VARS}
priorityClassName: system-node-critical
tolerations:
- operator: "Exists"
- 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:
- operator: "Exists"
volumes:
- hostPath:
path: /etc/kubernetes/manifests
Expand All @@ -335,3 +369,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
40 changes: 40 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 46881b6

Please sign in to comment.