Skip to content

Commit

Permalink
test: Update caspule version to the latest stable (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergiy Kulanov <[email protected]>
Change-Id: I7fcb729ce60b602cecae2c5382ed45c1d9671981
  • Loading branch information
SergK committed Nov 20, 2023
1 parent bfde04a commit d24974b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 24 deletions.
35 changes: 12 additions & 23 deletions tests/e2e/capsule-feature/00-install-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,24 @@ commands:
# TestSuit namespace creation doesn't work, so we need to create this namespace manually
- command: kubectl create namespace edp
namespaced: false
# install CRD first, since the default deployment will fail otherwise
- command: kubectl apply -f https://raw.githubusercontent.com/projectcapsule/capsule/v0.4.0-rc.3/charts/capsule/crds/capsuleconfiguration-crd.yaml
namespaced: false
# install capsule
- command: kubectl apply -f https://raw.githubusercontent.com/projectcapsule/capsule/v0.4.0-rc.3/config/install.yaml
- command: helm repo add projectcapsule https://projectcapsule.github.io/charts
namespaced: false
- command: helm repo update
namespaced: false
# We need to add system:serviceaccounts:edp to the list of userGroups, where `edp` is the namespace where EDP is installed
# see https://epam.github.io/edp-install/operator-guide/capsule/
- command: |
helm install capsule projectcapsule/capsule --version 0.5.2
--set manager.options.capsuleUserGroups[0]=capsule.clastix.io
--set manager.options.capsuleUserGroups[1]=system:serviceaccounts:edp
--create-namespace
--namespace capsule-system
namespaced: false
# install codebaseimagestreams CRD
- command: kubectl apply -f https://raw.githubusercontent.com/epam/edp-codebase-operator/master/deploy-templates/crds/v2.edp.epam.com_codebaseimagestreams.yaml
namespaced: false

# We need to add system:serviceaccounts:edp to the list of userGroups, where `edp` is the namespace where EDP is installed
# see https://epam.github.io/edp-install/operator-guide/capsule/
---
apiVersion: capsule.clastix.io/v1beta2
kind: CapsuleConfiguration
metadata:
name: capsule-default
spec:
enableTLSReconciler: true
forceTenantPrefix: false
overrides:
TLSSecretName: capsule-tls
mutatingWebhookConfigurationName: capsule-mutating-webhook-configuration
validatingWebhookConfigurationName: capsule-validating-webhook-configuration
protectedNamespaceRegex: ''
userGroups:
- capsule.clastix.io
- system:serviceaccounts:edp

# We "grab" registry URL from the edp-config configmap, if no configmap is found, we use EDPComponent CRD,
# so let's avoid this and create configmap manually
---
Expand Down
5 changes: 4 additions & 1 deletion tests/e2e/capsule-feature/02-install-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: helm install --set image.repository=${E2E_IMAGE_REPOSITORY} --set image.tag=${E2E_IMAGE_TAG} --replace --wait cd-pipeline-operator-e2e ../../../deploy-templates --set tenancyEngine=capsule
- command: |
helm install --set image.repository=${E2E_IMAGE_REPOSITORY}
--set image.tag=${E2E_IMAGE_TAG} --replace
--wait cd-pipeline-operator-e2e ../../../deploy-templates --set tenancyEngine=capsule
namespaced: true
25 changes: 25 additions & 0 deletions tests/e2e/capsule-feature/03-assert-cdpipeline-and-stages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,28 @@ kind: RoleBinding
metadata:
name: tenant-admin
namespace: custom-namespace

---
apiVersion: capsule.clastix.io/v1beta2
kind: Tenant
metadata:
name: edp-workload-edp
status:
namespaces:
- custom-namespace
- edp-mypipeline-dev
size: 2
state: Active
spec:
ingressOptions:
hostnameCollisionScope: Disabled
limitRanges: {}
networkPolicies: {}
owners:
- clusterRoles:
- admin
- capsule-namespace-deleter
kind: ServiceAccount
name: system:serviceaccount:edp:edp-cd-pipeline-operator
resourceQuotas:
scope: Tenant

0 comments on commit d24974b

Please sign in to comment.