Skip to content

Commit 2d5df47

Browse files
authored
Merge pull request #406 from application-stacks/082-install-files
Add kustomize/kubectl install files for 0.8.2
2 parents 34a74ad + 6925262 commit 2d5df47

26 files changed

+13426
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
== Installation
3+
4+
The Runtime Component Operator can be installed to:
5+
6+
* watch own namespace
7+
* watch another namespace
8+
* watch all namespaces in the cluster
9+
10+
Appropriate roles and bindings are required to watch another namespace or watch all namespaces.
11+
12+
---
13+
14+
. Install Custom Resource Definitions (CRDs) for `RuntimeComponent` and `RuntimeOperation` for day-2 operation. This needs to be done only ONCE per cluster:
15+
+
16+
[source,sh]
17+
----
18+
kubectl apply -f https://raw.githubusercontent.com/application-stacks/runtime-component-operator/main/deploy/releases/0.8.2/kubectl/runtime-component-crd.yaml
19+
----
20+
21+
. Install the Runtime Component Operator:
22+
23+
.. Set operator namespace and the namespace to watch:
24+
+
25+
NOTE: Ensure that you replace `<SPECIFY_OPERATOR_NAMESPACE_HERE>` and `<SPECIFY_WATCH_NAMESPACE_HERE>` with proper values. The namespaces must already exist. The commands below will not create the namespaces.
26+
+
27+
* To watch all namespaces in the cluster, set `WATCH_NAMESPACE='""'`
28+
+
29+
30+
[source,sh]
31+
----
32+
OPERATOR_NAMESPACE=<SPECIFY_OPERATOR_NAMESPACE_HERE>
33+
WATCH_NAMESPACE=<SPECIFY_WATCH_NAMESPACE_HERE>
34+
----
35+
36+
.. _Optional_: Install roles and bindings to watch another namespace or all namespaces. This step can be skipped if the operator is only watching own namespace.
37+
38+
... To watch all namespaces, install cluster-level role-based access:
39+
+
40+
[source,sh]
41+
----
42+
curl -L https://raw.githubusercontent.com/application-stacks/runtime-component-operator/main/deploy/releases/0.8.2/kubectl/runtime-component-rbac-watch-all.yaml \
43+
| sed -e "s/RUNTIME_COMPONENT_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \
44+
| kubectl apply -f -
45+
----
46+
47+
... To watch another namespace, install role with access to another namespace:
48+
+
49+
[source,sh]
50+
----
51+
curl -L https://raw.githubusercontent.com/application-stacks/runtime-component-operator/main/deploy/releases/0.8.2/kubectl/runtime-component-rbac-watch-another.yaml \
52+
| sed -e "s/RUNTIME_COMPONENT_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \
53+
| sed -e "s/RUNTIME_COMPONENT_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \
54+
| kubectl apply -f -
55+
----
56+
57+
.. Install the operator:
58+
+
59+
[source,sh]
60+
----
61+
curl -L https://raw.githubusercontent.com/application-stacks/runtime-component-operator/main/deploy/releases/0.8.2/kubectl/runtime-component-operator.yaml \
62+
| sed -e "s/RUNTIME_COMPONENT_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \
63+
| kubectl apply -n ${OPERATOR_NAMESPACE} -f -
64+
----
65+
66+
== Uninstallation
67+
68+
To uninstall the operator, run commands from Step 2c first and then Step 2b (if applicable), but after replacing `kubectl apply` with `kubectl delete`.
69+
70+
To delete the CRD, run command from Step 1, but after replacing `kubectl apply` with `kubectl delete`.
71+
72+
_Deleting the CRD will also delete all instances of `RuntimeComponent` and `RuntimeOperation` in the cluster_

deploy/releases/0.8.2/kubectl/runtime-component-crd.yaml

Lines changed: 5911 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
labels:
6+
app.kubernetes.io/instance: runtime-component-operator
7+
app.kubernetes.io/managed-by: olm
8+
app.kubernetes.io/name: runtime-component-operator
9+
name: rco-controller-manager
10+
---
11+
apiVersion: rbac.authorization.k8s.io/v1
12+
kind: Role
13+
metadata:
14+
labels:
15+
app.kubernetes.io/instance: runtime-component-operator
16+
app.kubernetes.io/managed-by: olm
17+
app.kubernetes.io/name: runtime-component-operator
18+
name: rco-leader-election-role
19+
rules:
20+
- apiGroups:
21+
- ""
22+
resources:
23+
- configmaps
24+
verbs:
25+
- get
26+
- list
27+
- watch
28+
- create
29+
- update
30+
- patch
31+
- delete
32+
- apiGroups:
33+
- ""
34+
resources:
35+
- configmaps/status
36+
verbs:
37+
- get
38+
- update
39+
- patch
40+
- apiGroups:
41+
- ""
42+
resources:
43+
- events
44+
verbs:
45+
- create
46+
- patch
47+
- apiGroups:
48+
- coordination.k8s.io
49+
resources:
50+
- leases
51+
verbs:
52+
- get
53+
- list
54+
- watch
55+
- create
56+
- update
57+
- patch
58+
- delete
59+
---
60+
apiVersion: rbac.authorization.k8s.io/v1
61+
kind: Role
62+
metadata:
63+
creationTimestamp: null
64+
labels:
65+
app.kubernetes.io/instance: runtime-component-operator
66+
app.kubernetes.io/managed-by: olm
67+
app.kubernetes.io/name: runtime-component-operator
68+
name: rco-manager-role
69+
rules:
70+
- apiGroups:
71+
- apps
72+
resources:
73+
- deployments
74+
- statefulsets
75+
verbs:
76+
- '*'
77+
- apiGroups:
78+
- apps
79+
resources:
80+
- deployments/finalizers
81+
- statefulsets
82+
verbs:
83+
- update
84+
- apiGroups:
85+
- autoscaling
86+
resources:
87+
- horizontalpodautoscalers
88+
verbs:
89+
- '*'
90+
- apiGroups:
91+
- ""
92+
resources:
93+
- configmaps
94+
- secrets
95+
- serviceaccounts
96+
- services
97+
verbs:
98+
- '*'
99+
- apiGroups:
100+
- ""
101+
resources:
102+
- pods
103+
- pods/exec
104+
verbs:
105+
- '*'
106+
- apiGroups:
107+
- image.openshift.io
108+
resources:
109+
- imagestreams
110+
- imagestreamtags
111+
verbs:
112+
- get
113+
- list
114+
- watch
115+
- apiGroups:
116+
- monitoring.coreos.com
117+
resources:
118+
- servicemonitors
119+
verbs:
120+
- '*'
121+
- apiGroups:
122+
- networking.k8s.io
123+
resources:
124+
- ingresses
125+
verbs:
126+
- '*'
127+
- apiGroups:
128+
- rc.app.stacks
129+
resources:
130+
- runtimecomponents
131+
- runtimecomponents/finalizers
132+
- runtimecomponents/status
133+
verbs:
134+
- '*'
135+
- apiGroups:
136+
- rc.app.stacks
137+
resources:
138+
- runtimeoperations
139+
- runtimeoperations/finalizers
140+
- runtimeoperations/status
141+
verbs:
142+
- '*'
143+
- apiGroups:
144+
- route.openshift.io
145+
resources:
146+
- routes
147+
- routes/custom-host
148+
verbs:
149+
- '*'
150+
- apiGroups:
151+
- serving.knative.dev
152+
resources:
153+
- services
154+
verbs:
155+
- '*'
156+
---
157+
apiVersion: rbac.authorization.k8s.io/v1
158+
kind: RoleBinding
159+
metadata:
160+
labels:
161+
app.kubernetes.io/instance: runtime-component-operator
162+
app.kubernetes.io/managed-by: olm
163+
app.kubernetes.io/name: runtime-component-operator
164+
name: rco-leader-election-rolebinding
165+
roleRef:
166+
apiGroup: rbac.authorization.k8s.io
167+
kind: Role
168+
name: rco-leader-election-role
169+
subjects:
170+
- kind: ServiceAccount
171+
name: rco-controller-manager
172+
---
173+
apiVersion: rbac.authorization.k8s.io/v1
174+
kind: RoleBinding
175+
metadata:
176+
labels:
177+
app.kubernetes.io/instance: runtime-component-operator
178+
app.kubernetes.io/managed-by: olm
179+
app.kubernetes.io/name: runtime-component-operator
180+
name: rco-manager-rolebinding
181+
roleRef:
182+
apiGroup: rbac.authorization.k8s.io
183+
kind: Role
184+
name: rco-manager-role
185+
subjects:
186+
- kind: ServiceAccount
187+
name: rco-controller-manager
188+
---
189+
apiVersion: apps/v1
190+
kind: Deployment
191+
metadata:
192+
labels:
193+
app.kubernetes.io/instance: runtime-component-operator
194+
app.kubernetes.io/managed-by: olm
195+
app.kubernetes.io/name: runtime-component-operator
196+
control-plane: controller-manager
197+
name: rco-controller-manager
198+
spec:
199+
replicas: 1
200+
selector:
201+
matchLabels:
202+
app.kubernetes.io/instance: runtime-component-operator
203+
app.kubernetes.io/managed-by: olm
204+
app.kubernetes.io/name: runtime-component-operator
205+
control-plane: controller-manager
206+
template:
207+
metadata:
208+
labels:
209+
app.kubernetes.io/instance: runtime-component-operator
210+
app.kubernetes.io/managed-by: olm
211+
app.kubernetes.io/name: runtime-component-operator
212+
control-plane: controller-manager
213+
spec:
214+
containers:
215+
- args:
216+
- --enable-leader-election
217+
command:
218+
- /manager
219+
env:
220+
- name: OPERATOR_NAMESPACE
221+
valueFrom:
222+
fieldRef:
223+
fieldPath: metadata.namespace
224+
- name: WATCH_NAMESPACE
225+
value: RUNTIME_COMPONENT_WATCH_NAMESPACE
226+
image: applicationstacks/operator:0.8.2
227+
imagePullPolicy: Always
228+
name: manager
229+
resources:
230+
limits:
231+
cpu: 200m
232+
memory: 512Mi
233+
requests:
234+
cpu: 100m
235+
memory: 64Mi
236+
serviceAccountName: rco-controller-manager
237+
terminationGracePeriodSeconds: 10

0 commit comments

Comments
 (0)