Skip to content

Commit a0717aa

Browse files
authored
Remove use of namespace in kustomize (#2095)
The use of the namespace parameter is kustomization files is very tricky. In one particular instance, we have an ordering issue with the cert-manager CA component. If not ordered correctly in the set of kustomization files, the CA component namespace will be overwritten by prior namespace directives. This eliminates that edge case, and makes the kustomization more robust. Downstream uses a different overlay, so there's no issue there. Also, add `-n` option to the install script to allow users to easily change the namespace that they install OLMv1 into. Note that the manifests don't change; so this keep everything as-is. Signed-off-by: Todd Short <[email protected]>
1 parent ebc7986 commit a0717aa

34 files changed

+77
-38
lines changed

config/base/catalogd/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Does not include the CRD, which must be added separately (it's non-namespaced)
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
4-
namespace: olmv1-system
54
namePrefix: catalogd-
65
resources:
76
- rbac

config/base/catalogd/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: controller-manager
5-
namespace: system
5+
namespace: olmv1-system
66
annotations:
77
kubectl.kubernetes.io/default-logs-container: manager
88
labels:

config/base/catalogd/manager/network_policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1
22
kind: NetworkPolicy
33
metadata:
44
name: controller-manager
5-
namespace: system
5+
namespace: olmv1-system
66
spec:
77
podSelector:
88
matchLabels:

config/base/catalogd/manager/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
app.kubernetes.io/part-of: olm
66
app.kubernetes.io/name: catalogd
77
name: service
8-
namespace: system
8+
namespace: olmv1-system
99
spec:
1010
selector:
1111
control-plane: catalogd-controller-manager

config/base/catalogd/rbac/auth_proxy_role_binding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ roleRef:
1212
subjects:
1313
- kind: ServiceAccount
1414
name: controller-manager
15-
namespace: system
15+
namespace: olmv1-system

config/base/catalogd/rbac/leader_election_role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
app.kubernetes.io/part-of: olm
77
app.kubernetes.io/name: catalogd
88
name: leader-election-role
9+
namespace: olmv1-system
910
rules:
1011
- apiGroups:
1112
- ""

config/base/catalogd/rbac/leader_election_role_binding.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ metadata:
55
app.kubernetes.io/part-of: olm
66
app.kubernetes.io/name: catalogd
77
name: leader-election-rolebinding
8+
namespace: olmv1-system
89
roleRef:
910
apiGroup: rbac.authorization.k8s.io
1011
kind: Role
1112
name: leader-election-role
1213
subjects:
1314
- kind: ServiceAccount
1415
name: controller-manager
15-
namespace: system
16+
namespace: olmv1-system

config/base/catalogd/rbac/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ apiVersion: rbac.authorization.k8s.io/v1
3535
kind: Role
3636
metadata:
3737
name: manager-role
38-
namespace: system
38+
namespace: olmv1-system
3939
rules:
4040
- apiGroups:
4141
- ""

config/base/catalogd/rbac/role_binding.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ roleRef:
1212
subjects:
1313
- kind: ServiceAccount
1414
name: controller-manager
15-
namespace: system
15+
namespace: olmv1-system
1616
---
1717
apiVersion: rbac.authorization.k8s.io/v1
1818
kind: RoleBinding
@@ -21,12 +21,12 @@ metadata:
2121
app.kubernetes.io/part-of: olm
2222
app.kubernetes.io/name: catalogd
2323
name: manager-rolebinding
24-
namespace: system
24+
namespace: olmv1-system
2525
roleRef:
2626
apiGroup: rbac.authorization.k8s.io
2727
kind: Role
2828
name: manager-role
2929
subjects:
3030
- kind: ServiceAccount
3131
name: controller-manager
32-
namespace: system
32+
namespace: olmv1-system

config/base/catalogd/rbac/service_account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
app.kubernetes.io/part-of: olm
66
app.kubernetes.io/name: catalogd
77
name: controller-manager
8-
namespace: system
8+
namespace: olmv1-system

0 commit comments

Comments
 (0)