Skip to content

Commit e468289

Browse files
authored
Replace default namespace to runtime-component for kustomize artifacts (#532)
1 parent e6b9bdd commit e468289

File tree

23 files changed

+102
-102
lines changed

23 files changed

+102
-102
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ endif
9393
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
9494
CRD_OPTIONS ?= "crd:crdVersions=v1,generateEmbeddedObjectMeta=true"
9595

96-
# Produce files under internal/deploy/kustomize/daily with default namespace
97-
KUSTOMIZE_NAMESPACE = default
96+
# Produce files under internal/deploy/kustomize/daily with runtime-component namespace
97+
KUSTOMIZE_NAMESPACE = runtime-component
9898
KUSTOMIZE_IMG = icr.io/appcafe/runtime-component-operator:daily
9999

100100
# Use docker if available. Otherwise default to podman.

config/kustomize/operator/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resources:
44
- ../../manager
55

66
# Adds namespace to all resources.
7-
namespace: default
7+
namespace: runtime-component
88
namePrefix: rco-
99

1010
# Labels to add to all resources and selectors.

config/kustomize/roles/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resources:
44
- ../../rbac
55

66
# Adds namespace to all resources.
7-
namespace: default
7+
namespace: runtime-component
88
namePrefix: rco-
99

1010
# Labels to add to all resources and selectors.
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
11
= Installing the Runtime Component Operator using kustomize
22

3-
This directory contains kustomize files that can be used to install the operator
4-
in your cluster in various different configurations, and also some example overlays
5-
which show how the installation can be customized.
3+
This directory contains configuration files that helps installing the Runtime Component operator
4+
using `kustomize` with the Kubernetes command-line interface (CLI) (`kubectl`). These configurations
5+
are useful when the cluster is not a Red Hat® OpenShift® Container Platform cluster or when
6+
Operator Lifecycle Manager is not being used.
67

7-
== Install and watch own namespace
8+
== Installing and watching own namespace
89

910
=== base
10-
The simplest configuration will install the operator into the 'default' namespace, and the operator
11-
will watch for Runtime Component custom resource instances only in its own namespace. To install, run:
12-
`kubectl create -k base`
13-
and to uninstall, run:
14-
`kubectl delete -k base`
11+
The base configuration installs the operator into the 'runtime-component' namespace,
12+
and the operator watches for Runtime Component custom resource instances only in its own namespace.
13+
Create a namespace called 'runtime-component' for the operator.
14+
To install, run: `kubectl create -k base` and to uninstall, run: `kubectl delete -k base`
1515

1616
=== examples/watch-own-namespace
17-
This example overlay demonstrates how to modify the base configuration to install/watch a
18-
namespace other than 'default'. The example installs the operator to a namespace called
19-
'rco-ns' which should already exist. To install, run `kubectl create -k examples/watch-own-namespace`
17+
This example overlay demonstrates how to modify the base configuration to install the operator and have it
18+
watch a namespace other than 'runtime-component'. Create a namespace called 'rco-ns' for the operator.
19+
To install the operator into the 'rco-ns' namespace, run: `kubectl create -k examples/watch-own-namespace`
2020

21-
== Install and watch another namespace
21+
== Installing and watching another namespace
2222

2323
=== overlays/watch-another-namespace
2424
This overlay installs the operator into the namespace 'rco-ns', but configures it to
25-
watch for Runtime Component custom resource instances in a different namespace called 'rco-watched-ns'. As
26-
this overlay install resources into two different namespaces, the namespace must not be specified
27-
in the kustomize.yaml file. To install, run `kubectl create -k overlays/watch-another-namespace`
25+
watch for Runtime Component custom resource instances in a different namespace called 'rco-watched-ns'.
26+
Because this overlay installs resources into two different namespaces, the namespace must not be specified
27+
in the kustomize.yaml file. To install, run: `kubectl create -k overlays/watch-another-namespace`
2828

2929
=== examples/watch-another-namespace
30-
This example overlay builds on the previous one, but demonstrates how to change the
31-
install and watched namespaces. In this case, the operator is installed into 'rco-ns2'
32-
and it will watch for resources in 'rco-watched-ns2'. To install run `kubectl create -k
30+
This example overlay builds on the previous example, but demonstrates how to change
31+
the install and watched namespaces. In this case, the operator is installed into 'rco-ns2'
32+
and watches for resources in 'rco-watched-ns2'. To install run: `kubectl create -k
3333
examples/watch-another-namespace`
3434

35-
== Install and watch all namespaces
35+
== Installing and watching all namespaces
3636

3737
=== overlays/watch-all-namespaces
38-
This overlay installs the operator into the default namespace, but configures it
39-
to watch for Runtime Component custom resource instances in any namespace. Compared to the base,
40-
this requires additional ClusterRoles and ClusterRoleBindings. To install run:
41-
`kubectl create -k overlays/watch-all-namespaces`
38+
This overlay installs the operator into the 'runtime-component' namespace,
39+
but configures it to watch for Runtime Component custom resource instances in any namespaces.
40+
Compared to the base configuration, this overlay requires additional ClusterRoles and ClusterRoleBindings.
41+
To install, run: `kubectl create -k overlays/watch-all-namespaces`
4242

4343
=== examples/watch-all-namespaces
44-
This example overlay builds on the previous one, and demonstrates how to change
45-
which namespace the operator is installed into. In this example, the operator
46-
is installed into a namespace called 'rco-ns', and will still watch for
47-
Runtime Component custom resource instances in any namespace. To install, run:
48-
`kubectl create -k examples/watch-all-namespaces`
44+
This example overlay builds on the previous example and demonstrates how to change
45+
the namespace that the operator installs into. In this example, the operator installs
46+
into a namespace that is called 'rco-ns' and watches for Runtime Component custom resource
47+
instances in any namespaces. To install, run: `kubectl create -k examples/watch-all-namespaces`

internal/deploy/kustomize/1.2.0/base/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

4-
namespace: default
4+
namespace: runtime-component
55

66
resources:
77
- runtime-component-crd.yaml

internal/deploy/kustomize/1.2.0/base/runtime-component-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
app.kubernetes.io/name: runtime-component-operator
77
control-plane: controller-manager
88
name: rco-controller-manager
9-
namespace: default
9+
namespace: runtime-component
1010
spec:
1111
replicas: 1
1212
selector:

internal/deploy/kustomize/1.2.0/base/runtime-component-roles.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
app.kubernetes.io/instance: runtime-component-operator
66
app.kubernetes.io/name: runtime-component-operator
77
name: rco-controller-manager
8-
namespace: default
8+
namespace: runtime-component
99
---
1010
apiVersion: rbac.authorization.k8s.io/v1
1111
kind: Role
@@ -14,7 +14,7 @@ metadata:
1414
app.kubernetes.io/instance: runtime-component-operator
1515
app.kubernetes.io/name: runtime-component-operator
1616
name: rco-leader-election-role
17-
namespace: default
17+
namespace: runtime-component
1818
rules:
1919
- apiGroups:
2020
- ""
@@ -64,7 +64,7 @@ metadata:
6464
app.kubernetes.io/instance: runtime-component-operator
6565
app.kubernetes.io/name: runtime-component-operator
6666
name: rco-manager-role
67-
namespace: default
67+
namespace: runtime-component
6868
rules:
6969
- apiGroups:
7070
- apps
@@ -234,15 +234,15 @@ metadata:
234234
app.kubernetes.io/instance: runtime-component-operator
235235
app.kubernetes.io/name: runtime-component-operator
236236
name: rco-leader-election-rolebinding
237-
namespace: default
237+
namespace: runtime-component
238238
roleRef:
239239
apiGroup: rbac.authorization.k8s.io
240240
kind: Role
241241
name: rco-leader-election-role
242242
subjects:
243243
- kind: ServiceAccount
244244
name: rco-controller-manager
245-
namespace: default
245+
namespace: runtime-component
246246
---
247247
apiVersion: rbac.authorization.k8s.io/v1
248248
kind: RoleBinding
@@ -251,12 +251,12 @@ metadata:
251251
app.kubernetes.io/instance: runtime-component-operator
252252
app.kubernetes.io/name: runtime-component-operator
253253
name: rco-manager-rolebinding
254-
namespace: default
254+
namespace: runtime-component
255255
roleRef:
256256
apiGroup: rbac.authorization.k8s.io
257257
kind: Role
258258
name: rco-manager-role
259259
subjects:
260260
- kind: ServiceAccount
261261
name: rco-controller-manager
262-
namespace: default
262+
namespace: runtime-component

internal/deploy/kustomize/1.2.0/overlays/watch-all-namespaces/cluster-roles.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ roleRef:
238238
subjects:
239239
- kind: ServiceAccount
240240
name: rco-controller-manager
241-
namespace: default
241+
namespace: runtime-component
242242
---
243243
apiVersion: rbac.authorization.k8s.io/v1
244244
kind: ClusterRoleBinding
@@ -254,5 +254,5 @@ roleRef:
254254
subjects:
255255
- kind: ServiceAccount
256256
name: rco-controller-manager
257-
namespace: default
257+
namespace: runtime-component
258258
---

internal/deploy/kustomize/1.2.0/overlays/watch-all-namespaces/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

4-
namespace: default
4+
namespace: runtime-component
55

66
bases:
77
- ../../base

internal/deploy/kustomize/1.2.0/overlays/watch-all-namespaces/rco-all-namespaces.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: rco-controller-manager
5+
namespace: runtime-component
56
spec:
67
template:
78
spec:

0 commit comments

Comments
 (0)