Skip to content

Commit

Permalink
Add staged apply e2e test (cert-manager)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
  • Loading branch information
stefanprodan committed Sep 1, 2021
1 parent 10c6940 commit 8bc5df4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ jobs:
kubectl get crd tests.testing.kustomizer.dev 2>&1 | grep NotFound
- name: Load test apply (110 objects)
run: |
time ./bin/kustomizer apply -k ./testdata/loadtest/ --inventory-name load-test
./bin/kustomizer apply -k ./testdata/loadtest/ --inventory-name load-test
- name: Load test delete (110 objects)
run: |
time ./bin/kustomizer delete --inventory-name load-test
./bin/kustomizer delete --inventory-name load-test
- name: Test staged apply
run: |
./bin/kustomizer apply -k ./testdata/certs/ --prune --wait --inventory-name cert-test --mode=ApplyAllStaged
kubectl -n kustomizer-cert-test wait issuers/my-ca-issuer --for=condition=ready --timeout=1m
- name: Debug failure
if: failure()
run: |
kubectl version --client --short
kubectl -n default get configmaps -oyaml
kubectl -n kustomizer-demo get all
37 changes: 37 additions & 0 deletions testdata/certs/cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: v1
kind: Namespace
metadata:
name: kustomizer-cert-test
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-issuer
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: my-selfsigned-ca
namespace: kustomizer-cert-test
spec:
isCA: true
commonName: my-selfsigned-ca
secretName: root-secret
privateKey:
algorithm: ECDSA
size: 384
issuerRef:
name: selfsigned-issuer
kind: ClusterIssuer
group: cert-manager.io
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: my-ca-issuer
namespace: kustomizer-cert-test
spec:
ca:
secretName: root-secret
5 changes: 5 additions & 0 deletions testdata/certs/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
- cert.yaml

0 comments on commit 8bc5df4

Please sign in to comment.