From 56818ee8d5f8b65b21c6da39465e7124278904d6 Mon Sep 17 00:00:00 2001 From: UMEZAWA Takeshi Date: Mon, 2 Nov 2020 15:36:39 +0900 Subject: [PATCH] fix e2e test Signed-off-by: UMEZAWA Takeshi --- config/manager/manager.yaml | 10 +++++----- config/namespace.yaml | 2 +- config/rbac/auth_proxy_client_clusterrole.yaml | 7 ------- config/rbac/auth_proxy_role.yaml | 13 ------------- config/rbac/auth_proxy_role_binding.yaml | 12 ------------ config/rbac/auth_proxy_service.yaml | 14 -------------- config/rbac/kustomization.yaml | 7 ------- e2e/manifests/kustomization.yaml | 2 ++ e2e/manifests/moco_controller.yaml | 11 +++++++++++ 9 files changed, 19 insertions(+), 59 deletions(-) delete mode 100644 config/rbac/auth_proxy_client_clusterrole.yaml delete mode 100644 config/rbac/auth_proxy_role.yaml delete mode 100644 config/rbac/auth_proxy_role_binding.yaml delete mode 100644 config/rbac/auth_proxy_service.yaml create mode 100644 e2e/manifests/moco_controller.yaml diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index dd54ee9a6..f0b323455 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -1,26 +1,26 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: moco-controller-manager namespace: system labels: - control-plane: controller-manager + control-plane: moco-controller-manager annotations: prometheus.io/port: "8080" spec: selector: matchLabels: - control-plane: controller-manager + control-plane: moco-controller-manager replicas: 1 template: metadata: labels: - control-plane: controller-manager + control-plane: moco-controller-manager spec: containers: - name: manager command: - - /manager + - /moco-controller image: controller:latest resources: limits: diff --git a/config/namespace.yaml b/config/namespace.yaml index ae6e7cd63..3a0eb4049 100644 --- a/config/namespace.yaml +++ b/config/namespace.yaml @@ -2,5 +2,5 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: moco-controller-manager name: moco-system diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml deleted file mode 100644 index 7d62534c5..000000000 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: metrics-reader -rules: -- nonResourceURLs: ["/metrics"] - verbs: ["get"] diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml deleted file mode 100644 index 618f5e417..000000000 --- a/config/rbac/auth_proxy_role.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: proxy-role -rules: -- apiGroups: ["authentication.k8s.io"] - resources: - - tokenreviews - verbs: ["create"] -- apiGroups: ["authorization.k8s.io"] - resources: - - subjectaccessreviews - verbs: ["create"] diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml deleted file mode 100644 index 48ed1e4b8..000000000 --- a/config/rbac/auth_proxy_role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: proxy-role -subjects: -- kind: ServiceAccount - name: default - namespace: system diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml deleted file mode 100644 index 6cf656be1..000000000 --- a/config/rbac/auth_proxy_service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - control-plane: controller-manager - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: https - port: 8443 - targetPort: https - selector: - control-plane: controller-manager diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index 66c28338f..c887f9f6f 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -3,10 +3,3 @@ resources: - role_binding.yaml - leader_election_role.yaml - leader_election_role_binding.yaml -# Comment the following 4 lines if you want to disable -# the auth proxy (https://github.com/brancz/kube-rbac-proxy) -# which protects your /metrics endpoint. -- auth_proxy_service.yaml -- auth_proxy_role.yaml -- auth_proxy_role_binding.yaml -- auth_proxy_client_clusterrole.yaml diff --git a/e2e/manifests/kustomization.yaml b/e2e/manifests/kustomization.yaml index 687a6b289..8c1489270 100644 --- a/e2e/manifests/kustomization.yaml +++ b/e2e/manifests/kustomization.yaml @@ -5,3 +5,5 @@ bases: images: - name: controller newTag: dev +patchesStrategicMerge: + - moco_controller.yaml diff --git a/e2e/manifests/moco_controller.yaml b/e2e/manifests/moco_controller.yaml new file mode 100644 index 000000000..5ed7b0e8d --- /dev/null +++ b/e2e/manifests/moco_controller.yaml @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: moco-controller-manager + namespace: moco-system +spec: + template: + spec: + containers: + - name: manager + imagePullPolicy: Never