Skip to content

Commit

Permalink
Installing tenant custom resources
Browse files Browse the repository at this point in the history
So tenant operator correctly deploys tenant-specific matchers
  • Loading branch information
blaskoa committed Jan 25, 2024
1 parent 67ca531 commit bf60be0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,16 @@ jobs:
run: |
helm install smartface . -f ci/test-values.yaml --set tests.authentication.tenant1.clientSecret="$TENANT_1_SECRET" --set tests.authentication.tenant2.clientSecret="$TENANT_2_SECRET" -f ci/${{ matrix.variant }}-values.yaml
kubectl rollout status deployment sf-api --timeout=300s
if helm get values smartface -a | yq -e '.edgeStreamsStateSync.wlStreamPopulationJob.enabled'; then
kubectl wait --for=condition=complete job/sf-wl-update-log-population --timeout=300s
fi
- name: Apply tenant manifests
if: ${{ matrix.variant == 'multitenant' }}
run: |
kubectl apply -f ci/tenants.yaml
kubectl rollout status deployment sf-matcher-tenant-1 --timeout=300s
kubectl rollout status deployment sf-matcher-tenant-2 --timeout=300s
- name: Wait for stream log population job
if: ${{ matrix.variant == 'edge' }}
run: |
kubectl wait --for=condition=complete job/sf-wl-update-log-population --timeout=300s
- name: Test helm chart
run: |
helm test smartface
Expand Down
3 changes: 3 additions & 0 deletions ci/multitenant-values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
features:
multitenancy:
enabled: true

sf-tenant-operator:
installCrd: true
15 changes: 15 additions & 0 deletions ci/tenants.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
kind: Tenant
apiVersion: smartface.innovatrics.com/v1alpha1
metadata:
name: "tenant-1"
namespace: "default"
spec:
identifier: "tenant-1"
---
kind: Tenant
apiVersion: smartface.innovatrics.com/v1alpha1
metadata:
name: "tenant-2"
namespace: "default"
spec:
identifier: "tenant-2"

0 comments on commit bf60be0

Please sign in to comment.