From 96392b82a9e69bae2713cb31630829b389940335 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 2 Aug 2021 11:36:49 +0300 Subject: [PATCH 1/4] Update bundle Signed-off-by: Anatolii Bazko --- .../manifests/che-operator.clusterserviceversion.yaml | 5 +++-- .../manifests/che-operator.clusterserviceversion.yaml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bundle/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml b/bundle/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml index 42ece29f5a..5e8674805f 100644 --- a/bundle/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/nightly/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml @@ -83,7 +83,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che-preview-kubernetes.v7.34.0-269.nightly + name: eclipse-che-preview-kubernetes.v7.34.0-270.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -386,6 +386,7 @@ spec: - list - get - create + - update - delete - apiGroups: - "" @@ -1300,4 +1301,4 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.34.0-269.nightly + version: 7.34.0-270.nightly diff --git a/bundle/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml b/bundle/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml index 8051503e82..915178b2cd 100644 --- a/bundle/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml +++ b/bundle/nightly/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml @@ -74,7 +74,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/eclipse-che/che-operator support: Eclipse Foundation - name: eclipse-che-preview-openshift.v7.34.0-269.nightly + name: eclipse-che-preview-openshift.v7.34.0-270.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -451,6 +451,7 @@ spec: - list - get - create + - update - delete - apiGroups: - "" @@ -1364,4 +1365,4 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.34.0-269.nightly + version: 7.34.0-270.nightly From 2f7db91c88655ac068652f14f84fdd85ecbf6dda Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 2 Aug 2021 15:06:25 +0300 Subject: [PATCH 2/4] Test Signed-off-by: Anatolii Bazko --- .ci/oci-devworkspace-happy-path.sh | 2 +- .github/bin/common.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.ci/oci-devworkspace-happy-path.sh b/.ci/oci-devworkspace-happy-path.sh index 7defbbf589..e12b4f6446 100755 --- a/.ci/oci-devworkspace-happy-path.sh +++ b/.ci/oci-devworkspace-happy-path.sh @@ -52,7 +52,7 @@ function Catch_Finish() { bumpPodsInfo "admin-che" oc get devworkspaces -n "admin-che" -o=yaml > $ARTIFACTS_DIR/devworkspaces.yaml - collectCheLogWithChectl + collectLogs } overrideDefaults() { diff --git a/.github/bin/common.sh b/.github/bin/common.sh index 930ada011e..28d4d7a4cb 100755 --- a/.github/bin/common.sh +++ b/.github/bin/common.sh @@ -14,7 +14,7 @@ set -x catchFinish() { result=$? - collectCheLogWithChectl + collectLogs if [ "$result" != "0" ]; then echo "[ERROR] Job failed." else @@ -166,9 +166,14 @@ installYq() { } # Graps Eclipse Che logs -collectCheLogWithChectl() { +collectLogs() { mkdir -p ${ARTIFACTS_DIR} chectl server:logs --chenamespace=${NAMESPACE} --directory=${ARTIFACTS_DIR} + + set +x + oc get events -n ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} > ${ARTIFACTS_DIR}/events-${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE}.txt + oc get events -n ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} > ${ARTIFACTS_DIR}/events-${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE}.txt + set -x } # Build latest operator image From 1356f59054d4746a054df2ee8840899777d927da Mon Sep 17 00:00:00 2001 From: Max Shaposhnik Date: Mon, 2 Aug 2021 15:09:13 +0300 Subject: [PATCH 3/4] Add patch role Co-authored-by: Igor Vinokur --- controllers/che/workspace_namespace_permission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/che/workspace_namespace_permission.go b/controllers/che/workspace_namespace_permission.go index 7541066bbf..f28fe9e44a 100644 --- a/controllers/che/workspace_namespace_permission.go +++ b/controllers/che/workspace_namespace_permission.go @@ -261,7 +261,7 @@ func getWorkspacesPolicies() []rbac.PolicyRule { { APIGroups: []string{""}, Resources: []string{"secrets"}, - Verbs: []string{"get", "list", "update", "create", "delete"}, + Verbs: []string{"get", "patch", "list", "update", "create", "delete"}, }, { APIGroups: []string{""}, From 0af4915b37e63b8e6a9680c4492f40e7fd22ba62 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Mon, 2 Aug 2021 15:55:31 +0300 Subject: [PATCH 4/4] Test Signed-off-by: Anatolii Bazko --- .github/bin/minikube/test-olm.sh | 5 ++++- .github/bin/minikube/test-operator-singlehost-gateway.sh | 5 ++++- .github/bin/minikube/test-operator-singlehost-native.sh | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/bin/minikube/test-olm.sh b/.github/bin/minikube/test-olm.sh index a1da4d0e65..13c05fe836 100755 --- a/.github/bin/minikube/test-olm.sh +++ b/.github/bin/minikube/test-olm.sh @@ -42,10 +42,13 @@ runTest() { sleep 10s createWorkspaceDevWorkspaceController waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + + sleep 60s - sleep 10s createWorkspaceDevWorkspaceCheOperator waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} } initDefaults diff --git a/.github/bin/minikube/test-operator-singlehost-gateway.sh b/.github/bin/minikube/test-operator-singlehost-gateway.sh index ea18353f70..4634f4ea83 100755 --- a/.github/bin/minikube/test-operator-singlehost-gateway.sh +++ b/.github/bin/minikube/test-operator-singlehost-gateway.sh @@ -51,10 +51,13 @@ runTest() { sleep 10s createWorkspaceDevWorkspaceController waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + + sleep 60s - sleep 10s createWorkspaceDevWorkspaceCheOperator waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} } initDefaults diff --git a/.github/bin/minikube/test-operator-singlehost-native.sh b/.github/bin/minikube/test-operator-singlehost-native.sh index 3d2abca574..ffb17ab559 100755 --- a/.github/bin/minikube/test-operator-singlehost-native.sh +++ b/.github/bin/minikube/test-operator-singlehost-native.sh @@ -50,10 +50,13 @@ runTest() { sleep 10s createWorkspaceDevWorkspaceController waitAllPodsRunning ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CONTROLLER_TEST_NAMESPACE} + + sleep 60s - sleep 10s createWorkspaceDevWorkspaceCheOperator waitAllPodsRunning ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} + kubectl delete namespace ${DEVWORKSPACE_CHE_OPERATOR_TEST_NAMESPACE} } initDefaults