This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsalt-deployment.yaml
executable file
·180 lines (180 loc) · 5.84 KB
/
salt-deployment.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.service.expose: "true"
kompose.service.type: loadbalancer
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: salt
name: salt
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: salt
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.service.expose: "true"
kompose.service.type: loadbalancer
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
io.kompose.service: salt
spec:
containers:
- command:
- /bin/sh
- -c
- mkdir -p /srv/salt && tar -xzvf /tmp/salt-files.tar.gz -C /srv/salt && mkdir -p /etc/salt/pki/master/minions && cp /tmp/docker-salt-minion /etc/salt/pki/master/minions && cp /tmp/raspberrypi /etc/salt/pki/master/minions && /usr/bin/supervisord
env:
- name: SALT_API_CONFIG
value: '{ "rest_cherrypy":{ "port":8000, "disable_ssl":true }, "external_auth":{ "sharedsecret":{ "salt":[ ".*", "@wheel", "@jobs", "@runner" ] } }, "sharedsecret":"sharedsecret" } '
- name: SALT_MASTER_CONFIG
value: '{ "log_level": "info", "file_roots": { "base": [ "/srv/salt/" ] }, "pillar_roots": { "base": [ "/srv/pillar/" ] } } '
- name: SALT_SHARED_SECRET
value: sharedsecret
image: janniswarnat/salt:latest
name: salt
ports:
- containerPort: 4505
- containerPort: 4506
- containerPort: 8000
- containerPort: 9000
- containerPort: 1234
resources: {}
volumeMounts:
- mountPath: /etc/salt/pki/master/master.pem
name: master-pem
subPath: master.pem
- mountPath: /etc/salt/pki/master/master.pub
name: master-pub
subPath: master.pub
- mountPath: /tmp/docker-salt-minion
name: minion-pub
subPath: docker-salt-minion
- mountPath: /tmp/raspberrypi
name: raspberrypi-pub
subPath: raspberrypi
- mountPath: /github.com/smart-proxy/config/settings.yml
name: settings-yml
subPath: settings.yml
- mountPath: /github.com/smart-proxy/config/settings.d/salt.yml
name: salt-yml
subPath: salt.yml
- mountPath: /github.com/smart-proxy/config/settings.d/dynflow.yml
name: dynflow-yml
subPath: dynflow.yml
- mountPath: /etc/salt/master.d/foreman.conf
name: foreman-conf
subPath: foreman.conf
- mountPath: /etc/salt/foreman.yaml
name: foreman-yaml
subPath: foreman.yaml
- mountPath: /etc/supervisor/supervisord.conf
name: supervisor-conf
subPath: supervisord.conf
- mountPath: /tmp/salt-files.tar.gz
name: salt-files
subPath: salt-files.tar.gz
- mountPath: /srv/pillar/top.sls
name: pillar-top
subPath: top.sls
- mountPath: /srv/pillar/default.sls
name: pillar-default
subPath: default.sls
- mountPath: /srv/pillar/raspberrypi.sls
name: pillar-raspberrypi
subPath: raspberrypi.sls
restartPolicy: Always
volumes:
- configMap:
items:
- key: master.pem
path: master.pem
name: master-pem
name: master-pem
- configMap:
items:
- key: master.pub
path: master.pub
name: master-pub
name: master-pub
- configMap:
items:
- key: minion.pub
path: docker-salt-minion
name: minion-pub
name: minion-pub
- configMap:
items:
- key: raspberrypi
path: raspberrypi
name: raspberrypi-pub
name: raspberrypi-pub
- configMap:
items:
- key: settings.yml
path: settings.yml
name: settings-yml
name: settings-yml
- configMap:
items:
- key: salt.yml
path: salt.yml
name: salt-yml
name: salt-yml
- configMap:
items:
- key: dynflow.yml
path: dynflow.yml
name: dynflow-yml
name: dynflow-yml
- configMap:
items:
- key: foreman.conf
path: foreman.conf
name: foreman-conf
name: foreman-conf
- configMap:
items:
- key: foreman.yaml
path: foreman.yaml
name: foreman-yaml
name: foreman-yaml
- configMap:
items:
- key: supervisord.conf
path: supervisord.conf
name: supervisor-conf
name: supervisor-conf
- configMap:
items:
- key: salt-files.tar.gz
path: salt-files.tar.gz
name: salt-files
name: salt-files
- configMap:
items:
- key: top.sls
path: top.sls
name: pillar-top
name: pillar-top
- configMap:
items:
- key: default.sls
path: default.sls
name: pillar-default
name: pillar-default
- configMap:
items:
- key: raspberrypi.sls
path: raspberrypi.sls
name: pillar-raspberrypi
name: pillar-raspberrypi
status: {}