-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello-world-operator.yaml
181 lines (181 loc) · 3.41 KB
/
hello-world-operator.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
181
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-world-operator
labels:
app: hello-world-operator
spec:
replicas: 1
selector:
matchLabels:
app: hello-world-operator
template:
metadata:
labels:
app: hello-world-operator
spec:
serviceAccountName: hello-world-operator
serviceAccount: hello-world-operator
containers:
- name: hello-world-operator
image: registry.neon.local/library/hello-world-operator
imagePullPolicy: Always
ports:
- name: http-web
containerPort: 80
protocol: TCP
- name: http-metrics
containerPort: 9762
protocol: TCP
env:
- name: LOG_LEVEL
value: DEBUG
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: hello-world-operator
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: hello-world-operator
rules:
- apiGroups:
- demo.neonkube.io
resources:
- helloworlddemos
verbs:
- '*'
- apiGroups:
- neonkube.io
resources:
- neonssoclients
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- persistentvolumeclaims
- services
verbs:
- '*'
- apiGroups:
- networking.istio.io
resources:
- virtualservices
verbs:
- '*'
- apiGroups:
- security.istio.io
resources:
- authorizationpolicies
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- '*'
- apiGroups:
- integreatly.org
resources:
- grafanadashboards
verbs:
- '*'
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: hello-world-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: hello-world-operator
subjects:
- kind: ServiceAccount
name: hello-world-operator
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: hello-world-operator
namespace: default
rules:
- apiGroups:
- cert-manager.io
resources:
- certificates
verbs:
- '*'
- apiGroups:
- ""
resourceNames:
- hello-world-operator-webhook-tls
resources:
- secrets
verbs:
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: hello-world-operator
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: hello-world-operator
subjects:
- kind: ServiceAccount
name: hello-world-operator
namespace: default
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: hello-world-operator
prometheus: default
name: hello-world-operator
spec:
endpoints:
- interval: 5s
path: /metrics
scrapeTimeout: 2s
targetPort: 9762
jobLabel: hello-world-operator
selector:
matchLabels:
app: hello-world-operator