-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisttate.yml
172 lines (171 loc) · 4.37 KB
/
disttate.yml
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
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: disttates.tests.ckatsak
labels:
app: disttate
spec:
# group name to use for REST API: /apis/<group>/<version>
group: tests.ckatsak
# version name to use for REST API: /apis/<group>/<version>
version: v1alpha1
# either Namespaced or Cluster
scope: Namespaced
names:
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: disttates
# singular name to be used as an alias on the CLI and for display
singular: disttate
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: Disttate
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- dst
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: disttate-sa
labels:
app: disttate
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: disttate-clusterrole
labels:
app: disttate
rules:
- apiGroups:
- tests.ckatsak
resources:
- disttates
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: disttate-rb
labels:
app: disttate
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: disttate-clusterrole
subjects:
- kind: ServiceAccount
name: disttate-sa
namespace: default
---
apiVersion: tests.ckatsak/v1alpha1
kind: Disttate
metadata:
name: 'yolodisttate'
namespace: default
labels:
app: disttate
spec:
name: 'karagkiozas'
ringsize: 9
bitset: 'Q0hSSVNUT1VMQVM=' # base64url-encoded string --> []byte --> BitSet
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: 'disttate-depl'
namespace: default
labels:
app: disttate
spec:
selector:
matchLabels:
app: disttate
replicas: 2
template:
metadata:
labels:
app: disttate
spec:
serviceAccountName: disttate-sa
terminationGracePeriodSeconds: 15
containers:
- name: disttate
image: ckatsak/disttate:latest
imagePullPolicy: Always
stdin: false
tty: false
ports:
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NS
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
---
###############################################################################
#apiVersion: v1
#kind: Service
#metadata:
# name: 'disttate-svc'
# namespace: default
# labels:
# app: disttate
#spec:
# type: ClusterIP
# ports:
# clusterIP: None
# selector:
# app: disttate
#---
#apiVersion: apps/v1
#kind: StatefulSet
#metadata:
# name: disttate
# namespace: default
# labels:
# app: disttate
#spec:
# selector:
# matchLabels:
# app: disttate
# serviceName: 'disttate-svc'
# podManagementPolicy: Parallel
# replicas: 2
# template:
# metadata:
# labels:
# app: disttate
# spec:
# restartPolicy: Always
# serviceAccountName: disttate-sa
# terminationGracePeriodSeconds: 15
# containers:
# - name: disttate
# image: ckatsak/disttate:latest
# imagePullPolicy: Always
# ports:
# env:
# - name: POD_NAME
# valueFrom:
# fieldRef:
# fieldPath: metadata.name
# - name: POD_NAMESPACE
# valueFrom:
# fieldRef:
# fieldPath: metadata.namespace
# - name: POD_IP
# valueFrom:
# fieldRef:
# fieldPath: status.podIP