-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstorage.kubesphere.io_v1alpha1_initializer.yaml
93 lines (93 loc) · 2.07 KB
/
storage.kubesphere.io_v1alpha1_initializer.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
apiVersion: storage.kubesphere.io/v1alpha1
kind: Initializer
metadata:
labels:
app.kubernetes.io/name: initializer-sample
app.kubernetes.io/managed-by: kustomize
name: initializer-sample
spec:
enabled: true
initContainers:
- name: busybox-chmod
image: busybox:latest
command:
- sh
- '-c'
- chmod -R 777 $PVC_1_MOUNT_PATH
resources:
limits:
cpu: 500m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
- name: mongo-chown
securityContext:
runAsGroup: 0
runAsUser: 0
image: bitnami/mongodb:4.2.4-debian-10-r0
command:
- sh
- '-c'
- chown -R ${PVC_1_UID}:${PVC_1_GID} $PVC_1_MOUNT_PATH
resources:
limits:
cpu: 500m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
pvcMatchers:
- name: local-1
pvc:
fieldSelector:
- key: name
operator: In
values:
- ttt-mongodb-test-0
- mongodb-mongodb-test-0
pod:
labelSelector:
- key: app
operator: In
values:
- mongodb-test
storageClass:
fieldSelector:
- key: name
operator: In
values:
- local-path
namespace:
labelSelector:
- key: "kubernetes.io/metadata.name"
operator: In
values:
- default
- test
workspace:
fieldSelector:
- key: name
operator: NotIn
values:
- ws1
- name: local-2
storageClass:
fieldSelector:
- key: name
operator: In
values:
- local-path2
pvcInitializers:
- pvcMatcherName: local-1
initContainerName: busybox-chmod
- pvcMatcherName: local-2
initContainerName: mongo-chown
mountPathRoot: "/pvc"
status: {}