-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathdefaults_snapshot_test.yaml.snap
More file actions
345 lines (344 loc) · 11.7 KB
/
Copy pathdefaults_snapshot_test.yaml.snap
File metadata and controls
345 lines (344 loc) · 11.7 KB
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
"":
1: |
raw: |
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace NAMESPACE -l "app.kubernetes.io/name=appsmith,app.kubernetes.io/instance=RELEASE-NAME" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace NAMESPACE $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace NAMESPACE port-forward $POD_NAME 8080:$CONTAINER_PORT
To expose your Appsmith service to be accessible from the Internet, please refer to our docs here https://docs.appsmith.com/getting-started/setup/installation-guides/kubernetes/publish-appsmith-online.
2: |
apiVersion: v1
data:
APPSMITH_DB_URL: |
mongodb+srv://root:password@appsmith-mongodb.NAMESPACE.svc.cluster.local/appsmith?retryWrites=true&authSource=admin&ssl=false
APPSMITH_DISABLE_IFRAME_WIDGET_SANDBOX: "false"
APPSMITH_KEYCLOAK_DB_DRIVER: postgresql
APPSMITH_KEYCLOAK_DB_PASSWORD: password
APPSMITH_KEYCLOAK_DB_URL: RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local:5432/keycloak
APPSMITH_KEYCLOAK_DB_USERNAME: root
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith
namespace: NAMESPACE
3: |
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith
namespace: NAMESPACE
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: appsmith
serviceName: RELEASE-NAME-appsmith
template:
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: appsmith
spec:
containers:
- env:
- name: APPSMITH_ENABLE_EMBEDDED_DB
value: "0"
- name: JGROUPS_DISCOVERY_PROTOCOL
value: kubernetes.KUBE_PING
- name: APPSMITH_HEADLESS_SVC
value: RELEASE-NAME-appsmith-headless
- name: APPSMITH_REDIS_PASSWORD
valueFrom:
secretKeyRef:
key: redis-password
name: appsmith-redis-secret
- name: APPSMITH_REDIS_URL
value: redis://:$(APPSMITH_REDIS_PASSWORD)@RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local:6379
envFrom:
- configMapRef:
name: RELEASE-NAME-appsmith
image: index.docker.io/appsmith/appsmith-ee:latest
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/v1/health
port: 80
periodSeconds: 60
name: appsmith
ports:
- containerPort: 80
name: http
protocol: TCP
- containerPort: 443
name: https
protocol: TCP
- containerPort: 2019
name: metrics
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /api/v1/health
port: 80
periodSeconds: 60
resources:
limits: {}
requests:
cpu: 500m
memory: 3000Mi
securityContext: {}
startupProbe:
failureThreshold: 3
httpGet:
path: /api/v1/health
port: 80
periodSeconds: 60
volumeMounts:
- mountPath: /appsmith-stacks
name: data
initContainers:
- command:
- sh
- -c
- until redis-cli -h RELEASE-NAME-redis-master.NAMESPACE.svc.cluster.local ping ; do echo waiting for redis; sleep 2; done
env:
- name: REDISCLI_AUTH
valueFrom:
secretKeyRef:
key: redis-password
name: appsmith-redis-secret
image: docker.io/redis:7.4.9
name: redis-init-container
- command:
- sh
- -c
- until mongosh --host appsmith-mongodb.NAMESPACE.svc.cluster.local --eval 'db.runCommand({ping:1})' ; do echo waiting for mongo; sleep 2; done
image: docker.io/appsmith/mongodb:6.0.27
name: mongo-init-container
- command:
- sh
- -c
- until pg_isready -U $postgresuser -d $postgresdb -h RELEASE-NAME-postgresql.NAMESPACE.svc.cluster.local; do echo waiting for postgresql; sleep 2; done
image: docker.io/bitnamilegacy/postgresql:14.12.0
name: psql-init-container
securityContext: {}
serviceAccountName: RELEASE-NAME-appsmith
volumes: null
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
4: |
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith-headless
namespace: NAMESPACE
spec:
clusterIP: None
clusterIPs:
- None
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: http
port: 8080
targetPort: 8080
selector:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: appsmith
type: ClusterIP
5: |
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: "-5"
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith-redis-password-init
namespace: NAMESPACE
6: |
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: "-5"
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith-redis-password-init
namespace: NAMESPACE
rules:
- apiGroups:
- ""
resourceNames:
- appsmith-redis-secret
resources:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
7: |
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: "-5"
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith-redis-password-init
namespace: NAMESPACE
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: RELEASE-NAME-appsmith-redis-password-init
subjects:
- kind: ServiceAccount
name: RELEASE-NAME-appsmith-redis-password-init
namespace: NAMESPACE
8: |
apiVersion: batch/v1
kind: Job
metadata:
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
helm.sh/hook-weight: "0"
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith-redis-password-init
namespace: NAMESPACE
spec:
backoffLimit: 3
template:
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
spec:
containers:
- command:
- /bin/sh
- -c
- |
set -eu
SECRET_NAME="appsmith-redis-secret"
NAMESPACE="NAMESPACE"
PASSWORD_KEY="redis-password"
if kubectl -n "$NAMESPACE" get secret "$SECRET_NAME" >/dev/null 2>&1; then
echo "Secret $SECRET_NAME already exists; leaving it untouched."
exit 0
fi
PASSWORD=$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 24)
kubectl -n "$NAMESPACE" create secret generic "$SECRET_NAME" \
--from-literal="$PASSWORD_KEY"="$PASSWORD"
echo "Created secret $SECRET_NAME."
image: docker.io/alpine/kubectl:latest
imagePullPolicy: IfNotPresent
name: create-password
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
restartPolicy: Never
serviceAccountName: RELEASE-NAME-appsmith-redis-password-init
ttlSecondsAfterFinished: 60
9: |
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: RELEASE-NAME-appsmith-pdb
namespace: NAMESPACE
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: appsmith
10: |
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith
namespace: NAMESPACE
spec:
ports:
- name: appsmith
nodePort: null
port: 80
targetPort: http
selector:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: appsmith
type: ClusterIP
11: |
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: appsmith
appsmith.sh/chart: appsmith-3.9.1
name: RELEASE-NAME-appsmith
namespace: NAMESPACE
secrets:
- name: RELEASE-NAME-appsmith