Skip to content

Commit

Permalink
bindata/bootkube/bootstrap-manifests: add etcdctl container to bootst…
Browse files Browse the repository at this point in the history
…rap-etcd

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
  • Loading branch information
hexfusion committed Sep 30, 2021
1 parent f6906d6 commit 9e3ffd1
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions bindata/bootkube/bootstrap-manifests/etcd-member-pod.yaml
Expand Up @@ -7,6 +7,32 @@ metadata:
k8s-app: etcd
spec:
containers:
- name: etcdctl
image: {{ .Image }}
imagePullPolicy: IfNotPresent
command:
- "/bin/bash"
- "-c"
- "trap TERM INT; sleep infinity & wait"
resources:
requests:
memory: 60Mi
cpu: 10m
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
privileged: true
volumeMounts:
- name: certs
mountPath: /etc/ssl/etcd/
env:
- name: "ETCDCTL_KEY"
value: "/etc/ssl/etcd/etcd-all-certs/etcd-serving-{{ .Hostname }}.key"
- name: "ETCDCTL_CERT"
value: "/etc/ssl/etcd/etcd-all-certs/etcd-serving-{{ .Hostname }}.crt"
- name: "ETCDCTL_CACERT"
value: "/etc/ssl/etcd/ca.crt"
- name: "ETCDCTL_ENDPOINTS"
value: "https://localhost:2379"
- name: etcd
image: {{ .Image }}
command:
Expand Down Expand Up @@ -39,15 +65,10 @@ spec:
securityContext:
privileged: true
volumeMounts:
- name: discovery
mountPath: /run/etcd/
- name: certs
mountPath: /etc/ssl/etcd/
- name: data-dir
mountPath: /var/lib/etcd/
- name: conf
mountPath: /etc/etcd/

env:
{{.ComputedEnvVars }}
ports:
Expand All @@ -66,15 +87,6 @@ spec:
- name: certs
hostPath:
path: /etc/kubernetes/static-pod-resources/etcd-member
- name: kubeconfig
hostPath:
path: /etc/kubernetes/kubeconfig
- name: discovery
hostPath:
path: /run/etcd
- name: data-dir
hostPath:
path: /var/lib/etcd
- name: conf
hostPath:
path: /etc/etcd

0 comments on commit 9e3ffd1

Please sign in to comment.