-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildPodExample.yaml
51 lines (51 loc) · 1.3 KB
/
BuildPodExample.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apiVersion: v1
kind: Pod
metadata:
annotations: {}
spec:
containers:
- name: buildpod
securityContext:
privileged: true
fsGroup: 1000
runAsGroup: 1000
runAsUser: 1000
image: {Your_Build_Pod_Image}
command: [ "/bin/sh", "-c", "--" ]
args: [ "mkdir -p ${HOME}/.docker; cp /opt/ca/ca.pem /opt/key/key.pem /opt/cert/cert.pem ${HOME}/.docker/.; while true; do sleep 30; done;" ]
labels:
volumeMounts:
- name: ca
mountPath: "/opt/ca"
readOnly: true
- name: cert
mountPath: "/opt/cert"
readOnly: true
- name: key
mountPath: "/opt/key"
readOnly: true
- name: volume-1
mountPath: /etc/localtime
imagePullPolicy: Always
tty: true
env:
- name: DOCKER_HOST
value: tcp://{Docker_Pod_FQDN}:2376
- name: DOCKER_TLS_VERIFY
value: 1
volumes:
- name: volume-1
hostPath:
path: /usr/share/zoneinfo/US/Eastern
- name: ca
namespace: {POD NAMESPACE}
configMap:
name: dind-ca.pem
- name: cert
namespace: {POD NAMESPACE}
configMap:
name: dind-cert.pem
- name: key
namespace: {POD NAMESPACE}
configMap:
name: dind-key.pem