Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename operator and router namespaces #52

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/defaults/cluster-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ClusterIngress
apiVersion: ingress.openshift.io/v1alpha1
metadata:
name: default
namespace: openshift-cluster-ingress-operator
namespace: openshift-ingress-operator
finalizers:
# Ensure that only the operator can delete the default cluster ingress object.
finalizers:
Expand Down
10 changes: 4 additions & 6 deletions assets/router/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress:router
name: openshift-ingress-router
subjects:
- kind: ServiceAccount
name: router
namespace: openshift-cluster-ingress-router
namespace: openshift-ingress
roleRef:
kind: ClusterRole
name: cluster-ingress:router
namespace: openshift-cluster-ingress-router
userNames:
- "system:serviceaccount:openshift-cluster-ingress-router:router"
name: openshift-ingress-router
namespace: openshift-ingress
2 changes: 1 addition & 1 deletion assets/router/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress:router
name: openshift-ingress-router
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions assets/router/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
# Name is set at runtime.
namespace: openshift-cluster-ingress-router
namespace: openshift-ingress
labels:
app: router
spec:
Expand Down Expand Up @@ -38,7 +38,7 @@ spec:
- name: STATS_PORT
value: "1936"
- name: ROUTER_SERVICE_NAMESPACE
value: openshift-cluster-ingress-router
value: openshift-ingress
livenessProbe:
initialDelaySeconds: 10
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion assets/router/namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: Namespace
apiVersion: v1
metadata:
name: openshift-cluster-ingress-router
name: openshift-ingress
annotations:
openshift.io/node-selector: ""
labels:
Expand Down
2 changes: 1 addition & 1 deletion assets/router/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ kind: ServiceAccount
apiVersion: v1
metadata:
name: router
namespace: openshift-cluster-ingress-router
namespace: openshift-ingress
2 changes: 1 addition & 1 deletion assets/router/service-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
apiVersion: v1
metadata:
# Name is set at runtime.
namespace: openshift-cluster-ingress-router
namespace: openshift-ingress
labels:
app: router
spec:
Expand Down
19 changes: 9 additions & 10 deletions hack/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ set -uo pipefail
# Disable the CVO
oc patch -n openshift-cluster-version daemonsets/cluster-version-operator --patch '{"spec": {"template": {"spec": {"nodeSelector": {"node-role.kubernetes.io/fake": ""}}}}}'

# Uninstall tectonic ingress
oc delete namespaces/openshift-ingress

# Uninstall the cluster-ingress-operator
oc delete --force --grace-period 0 -n openshift-cluster-ingress-operator clusteringresses/default
oc delete namespaces/openshift-cluster-ingress-operator
oc delete namespaces/openshift-cluster-ingress-router
oc delete clusterroles/cluster-ingress-operator:operator
oc delete clusterroles/cluster-ingress:router
oc delete clusterrolebindings/cluster-ingress-operator:operator
oc delete clusterrolebindings/cluster-ingress:router
oc delete -n openshift-ingress-operator deployments/ingress-operator
oc patch -n openshift-ingress-operator clusteringresses/default --patch '{"metadata":{"finalizers": []}}' --type=merge
oc delete --force --grace-period=0 -n openshift-ingress-operator clusteringresses/default
oc delete namespaces/openshift-ingress-operator
oc delete namespaces/openshift-ingress
oc delete clusterroles/openshift-ingress-operator
oc delete clusterroles/openshift-ingress-router
oc delete clusterrolebindings/openshift-ingress-operator
oc delete clusterrolebindings/openshift-ingress-router
oc delete customresourcedefinition.apiextensions.k8s.io/clusteringresses.ingress.openshift.io
2 changes: 1 addition & 1 deletion manifests/00-cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress-operator:operator
name: openshift-ingress-operator
rules:
- apiGroups:
- ""
Expand Down
2 changes: 1 addition & 1 deletion manifests/00-namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: Namespace
apiVersion: v1
metadata:
name: openshift-cluster-ingress-operator
name: openshift-ingress-operator
labels:
# set value to avoid depending on kube admission that depends on openshift apis
openshift.io/run-level: "0"
8 changes: 4 additions & 4 deletions manifests/01-cluster-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress-operator:operator
name: openshift-ingress-operator
subjects:
- kind: ServiceAccount
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: cluster-ingress-operator:operator
name: openshift-ingress-operator
10 changes: 5 additions & 5 deletions manifests/01-role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
subjects:
- kind: ServiceAccount
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: cluster-ingress-operator
name: ingress-operator
4 changes: 2 additions & 2 deletions manifests/01-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
rules:
- apiGroups:
- ingress.openshift.io
Expand Down
4 changes: 2 additions & 2 deletions manifests/01-service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
kind: ServiceAccount
apiVersion: v1
metadata:
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
14 changes: 7 additions & 7 deletions manifests/02-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cluster-ingress-operator
namespace: openshift-cluster-ingress-operator
name: ingress-operator
namespace: openshift-ingress-operator
spec:
replicas: 1
selector:
matchLabels:
name: cluster-ingress-operator
name: ingress-operator
template:
metadata:
labels:
name: cluster-ingress-operator
name: ingress-operator
spec:
containers:
- name: cluster-ingress-operator
- name: ingress-operator
image: openshift/origin-cluster-ingress-operator:latest
ports:
- containerPort: 60000
Expand All @@ -27,5 +27,5 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: "cluster-ingress-operator"
serviceAccountName: cluster-ingress-operator
value: ingress-operator
serviceAccountName: ingress-operator
Loading