diff --git a/assets/csi_controller_deployment.yaml b/assets/csi_controller_deployment.yaml index 03397fc42..32a68147f 100644 --- a/assets/csi_controller_deployment.yaml +++ b/assets/csi_controller_deployment.yaml @@ -2,7 +2,7 @@ kind: Deployment apiVersion: apps/v1 metadata: name: csi-snapshot-controller - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator spec: serviceName: "csi-snapshot-controller" replicas: 1 diff --git a/manifests/00_namespace.yaml b/manifests/00_namespace.yaml index 4a2da49ba..a07570eef 100644 --- a/manifests/00_namespace.yaml +++ b/manifests/00_namespace.yaml @@ -1,18 +1,8 @@ apiVersion: v1 kind: Namespace metadata: - name: openshift-csi-snapshot-controller-operator + name: openshift-cluster-storage-operator annotations: openshift.io/node-selector: "" labels: openshift.io/cluster-monitoring: "true" - ---- -apiVersion: v1 -kind: Namespace -metadata: - name: openshift-csi-snapshot-controller - annotations: - openshift.io/node-selector: "" - labels: - openshift.io/cluster-monitoring: "true" \ No newline at end of file diff --git a/manifests/03_configmap.yaml b/manifests/03_configmap.yaml index d77774346..a74c14c83 100644 --- a/manifests/03_configmap.yaml +++ b/manifests/03_configmap.yaml @@ -1,8 +1,10 @@ apiVersion: v1 kind: ConfigMap metadata: - namespace: openshift-csi-snapshot-controller-operator - name: openshift-csi-snapshot-controller-operator-config + namespace: openshift-cluster-storage-operator + name: csi-snapshot-controller-operator-config + labels: + app: csi-snapshot-controller-operator data: operator-config.yaml: | apiVersion: operator.openshift.io/v1alpha1 diff --git a/manifests/03_service.yaml b/manifests/03_service.yaml index 1c7deea63..bf5df39f2 100644 --- a/manifests/03_service.yaml +++ b/manifests/03_service.yaml @@ -6,8 +6,8 @@ metadata: service.alpha.openshift.io/serving-cert-secret-name: serving-cert labels: app: csi-snapshot-controller-operator - name: metrics - namespace: openshift-csi-snapshot-controller-operator + name: csi-snapshot-controller-operator-metrics + namespace: openshift-cluster-storage-operator spec: ports: - name: https diff --git a/manifests/04_serviceaccount.yaml b/manifests/04_serviceaccount.yaml index e6e2bb38f..0a029afcb 100644 --- a/manifests/04_serviceaccount.yaml +++ b/manifests/04_serviceaccount.yaml @@ -2,7 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: name: csi-snapshot-controller-operator - namespace: openshift-csi-snapshot-controller-operator + namespace: openshift-cluster-storage-operator + labels: + app: csi-snapshot-controller-operator --- @@ -10,4 +12,4 @@ apiVersion: v1 kind: ServiceAccount metadata: name: csi-snapshot-controller - namespace: openshift-csi-snapshot-controller \ No newline at end of file + namespace: openshift-cluster-storage-operator \ No newline at end of file diff --git a/manifests/05_operand_rbac.yaml b/manifests/05_operand_rbac.yaml index 88647d64f..4a5dd620a 100644 --- a/manifests/05_operand_rbac.yaml +++ b/manifests/05_operand_rbac.yaml @@ -36,7 +36,7 @@ metadata: subjects: - kind: ServiceAccount name: csi-snapshot-controller - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator roleRef: kind: ClusterRole name: openshift-csi-snapshot-controller-runner @@ -46,7 +46,7 @@ roleRef: kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator name: csi-snapshot-controller-leaderelection rules: - apiGroups: ["coordination.k8s.io"] @@ -58,11 +58,11 @@ kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-snapshot-controller-leaderelection - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator subjects: - kind: ServiceAccount name: csi-snapshot-controller - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator roleRef: kind: Role name: csi-snapshot-controller-leaderelection diff --git a/manifests/05_operator_rbac.yaml b/manifests/05_operator_rbac.yaml index 01213ae31..028a786d3 100644 --- a/manifests/05_operator_rbac.yaml +++ b/manifests/05_operator_rbac.yaml @@ -2,14 +2,14 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-snapshot-controller-operator-role - namespace: openshift-csi-snapshot-controller-operator + namespace: openshift-cluster-storage-operator labels: kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-snapshot-controller-operator - namespace: openshift-csi-snapshot-controller-operator + namespace: openshift-cluster-storage-operator roleRef: kind: ClusterRole name: cluster-admin diff --git a/manifests/07_deployment.yaml b/manifests/07_deployment.yaml index 8525c8988..a4efe05d8 100644 --- a/manifests/07_deployment.yaml +++ b/manifests/07_deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - namespace: openshift-csi-snapshot-controller-operator + namespace: openshift-cluster-storage-operator name: csi-snapshot-controller-operator labels: app: csi-snapshot-controller-operator @@ -48,7 +48,7 @@ spec: - name: config configMap: defaultMode: 440 - name: openshift-csi-snapshot-controller-operator-config + name: csi-snapshot-controller-operator-config priorityClassName: "system-cluster-critical" tolerations: - key: "node.kubernetes.io/unreachable" diff --git a/manifests/08_clusteroperator.yaml b/manifests/08_clusteroperator.yaml index 17c60cf2e..edc327d96 100644 --- a/manifests/08_clusteroperator.yaml +++ b/manifests/08_clusteroperator.yaml @@ -10,4 +10,4 @@ status: version: "0.0.1-snapshot" - name: csi-snapshot-controller version: "0.0.1-snapshot" -spec: {} \ No newline at end of file +spec: {} diff --git a/pkg/generated/bindata.go b/pkg/generated/bindata.go index 9e9c6ed7b..5d2148765 100644 --- a/pkg/generated/bindata.go +++ b/pkg/generated/bindata.go @@ -52,7 +52,7 @@ var _csi_controller_deploymentYaml = []byte(`kind: Deployment apiVersion: apps/v1 metadata: name: csi-snapshot-controller - namespace: openshift-csi-snapshot-controller + namespace: openshift-cluster-storage-operator spec: serviceName: "csi-snapshot-controller" replicas: 1 diff --git a/pkg/operator/operator.go b/pkg/operator/operator.go index 7922831f6..778db2d73 100644 --- a/pkg/operator/operator.go +++ b/pkg/operator/operator.go @@ -31,8 +31,8 @@ var deploymentVersionHashKey = operatorv1.GroupName + "/rvs-hash" const ( targetName = "csi-snapshot-controller" - targetNamespace = "openshift-csi-snapshot-controller" - operatorNamespace = "openshift-csi-snapshot-controller-operator" + targetNamespace = "openshift-cluster-storage-operator" + operatorNamespace = "openshift-cluster-storage-operator" globalConfigName = "cluster" operatorVersionEnvName = "OPERATOR_IMAGE_VERSION"