-
Notifications
You must be signed in to change notification settings - Fork 0
/
redis-cart-in-cluster.yaml
76 lines (76 loc) · 2.27 KB
/
redis-cart-in-cluster.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
apiVersion: entity.humanitec.io/v1b1
kind: Definition
metadata:
id: redis-in-cluster
entity:
name: redis-in-cluster
type: redis
driver_type: humanitec/template
driver_inputs:
values:
templates:
init: |-
name: redis
port: 6379
manifests: |-
deployment.yaml:
location: namespace
data:
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .init.name }}
spec:
selector:
matchLabels:
app: {{ .init.name }}
template:
metadata:
labels:
app: {{ .init.name }}
spec:
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
containers:
- name: {{ .init.name }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
image: redis:alpine
ports:
- containerPort: {{ .init.port }}
volumeMounts:
- mountPath: /data
name: redis-data
volumes:
- name: redis-data
emptyDir: {}
service.yaml:
location: namespace
data:
apiVersion: v1
kind: Service
metadata:
name: {{ .init.name }}
spec:
type: ClusterIP
selector:
app: {{ .init.name }}
ports:
- name: tcp-redis
port: {{ .init.port }}
targetPort: {{ .init.port }}
outputs: |
host: {{ .init.name }}
port: {{ .init.port }}
criteria:
- {}