Skip to content

Commit fb987e1

Browse files
authored
K8SPS-241: Set OPERATOR_NS in default Jenkins pipeline (#680)
* Set OPERATOR_NS in defaul Jenkins pipeline. * Create ps-operator namespace. * Properly check for CW mode operator deployment. * Cluster wide orchestrator role. * Create secrets in right namespace for backup tests. * Regenerate cw files. * Regenerate files. * Revert cw generation. * Add destroy cluster gracefully step. * Create orc rbac objects. * Minor refactor. * Remove orchestrator RBAC from deploy files. * Remove copy. * Rbac to namespace. * Regenerate default role. * Regenarete deploy files. * Add rbac perms. * Correct kind for rbac. * Get pods for password leaks. * Fix tls tests. * Add namespace to minio endpoint in tests. * Fix script. * Update tests. * Update smart-update and version-service tests. * Remove rbac/namespace folder and regenerate yaml files. * Refactor. * Cleanup. * Fix version-service test.
1 parent 56af646 commit fb987e1

File tree

125 files changed

+1087
-769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1087
-769
lines changed

Jenkinsfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ pipeline {
280280
environment {
281281
CLOUDSDK_CORE_DISABLE_PROMPTS = 1
282282
CLEAN_NAMESPACE = 1
283+
OPERATOR_NS = 'ps-operator'
283284
GIT_SHORT_COMMIT = sh(script: 'git rev-parse --short HEAD', , returnStdout: true).trim()
284285
VERSION = "${env.GIT_BRANCH}-${env.GIT_SHORT_COMMIT}"
285286
CLUSTER_NAME = sh(script: "echo jen-ps-${env.CHANGE_ID}-${GIT_SHORT_COMMIT}-${env.BUILD_NUMBER} | tr '[:upper:]' '[:lower:]'", , returnStdout: true).trim()

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ e2e-test: kuttl-shfmt
101101
manifests: kustomize generate
102102
$(KUSTOMIZE) build config/crd/ > $(DEPLOYDIR)/crd.yaml
103103
echo "---" >> $(DEPLOYDIR)/crd.yaml
104+
104105
$(KUSTOMIZE) build config/rbac/ | sed 's/ClusterRole/Role/g' > $(DEPLOYDIR)/rbac.yaml
105106
echo "---" >> $(DEPLOYDIR)/rbac.yaml
106107
cd config/manager && $(KUSTOMIZE) edit set image perconalab/percona-server-mysql-operator=$(IMAGE)

config/rbac/cluster/kustomization copy.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

config/rbac/cluster/kustomization.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ resources:
99
- role_binding.yaml
1010
- leader_election_role.yaml
1111
- leader_election_role_binding.yaml
12-
- orchestrator_service_account.yaml
13-
- orchestrator_role.yaml
14-
- orchestrator_role_binding.yaml

config/rbac/cluster/orchestrator_role.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

config/rbac/cluster/orchestrator_role_binding.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

config/rbac/cluster/orchestrator_service_account.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/rbac/cluster/role.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ kind: ClusterRole
44
metadata:
55
name: percona-server-mysql-operator
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- serviceaccounts
11+
verbs:
12+
- create
13+
- get
14+
- list
15+
- patch
16+
- watch
717
- apiGroups:
818
- ""
919
resources:
@@ -133,3 +143,14 @@ rules:
133143
- patch
134144
- update
135145
- watch
146+
- apiGroups:
147+
- rbac.authorization.k8s.io
148+
resources:
149+
- rolebindings
150+
- roles
151+
verbs:
152+
- create
153+
- get
154+
- list
155+
- patch
156+
- watch

config/rbac/kustomization.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,3 @@ resources:
99
- role_binding.yaml
1010
- leader_election_role.yaml
1111
- leader_election_role_binding.yaml
12-
- orchestrator_service_account.yaml
13-
- orchestrator_role.yaml
14-
- orchestrator_role_binding.yaml

config/rbac/orchestrator_role.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)