e2e: test HelmChart from Bucket

This commit is contained in:
Hidde Beydals 2020-09-21 11:21:56 +02:00
parent 03ce9d96da
commit 1798b200c9
4 changed files with 48 additions and 12 deletions

View File

@ -81,12 +81,22 @@ jobs:
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc chmod +x mc
./mc alias set minio http://localhost:9000 myaccesskey mysecretkey --api S3v4 ./mc alias set minio http://localhost:9000 myaccesskey mysecretkey --api S3v4
./mc mb minio/podinfo kubectl -n source-system apply -f ./config/testdata/minio/secret.yaml
./mc cp --recursive ./config/testdata/minio/manifests minio/podinfo - name: Run Bucket tests
- name: Run S3 tests
run: | run: |
kubectl -n source-system apply -f ./config/testdata/minio/source.yaml ./mc mb minio/podinfo
./mc mirror ./config/testdata/minio/manifests/ minio/podinfo
kubectl -n source-system apply -f ./config/testdata/bucket/source.yaml
kubectl -n source-system wait bucket/podinfo --for=condition=ready --timeout=1m kubectl -n source-system wait bucket/podinfo --for=condition=ready --timeout=1m
- name: Run HelmChart from Bucket tests
run: |
./mc mb minio/charts
./mc mirror ./controllers/testdata/helmchart/ minio/charts/helmchart
kubectl -n source-system apply -f ./config/testdata/helmchart-from-bucket/source.yaml
kubectl -n source-system wait bucket/charts --for=condition=ready --timeout=1m
kubectl -n source-system wait helmchart/helmchart-bucket --for=condition=ready --timeout=1m
- name: Debug failure - name: Debug failure
if: failure() if: failure()
run: | run: |

View File

@ -1,3 +1,4 @@
---
apiVersion: source.toolkit.fluxcd.io/v1alpha1 apiVersion: source.toolkit.fluxcd.io/v1alpha1
kind: Bucket kind: Bucket
metadata: metadata:
@ -11,11 +12,3 @@ spec:
insecure: true insecure: true
secretRef: secretRef:
name: minio-credentials name: minio-credentials
---
apiVersion: v1
kind: Secret
metadata:
name: minio-credentials
data:
accesskey: bXlhY2Nlc3NrZXk=
secretkey: bXlzZWNyZXRrZXk=

View File

@ -0,0 +1,25 @@
---
apiVersion: source.toolkit.fluxcd.io/v1alpha1
kind: Bucket
metadata:
name: charts
spec:
interval: 1m
provider: generic
bucketName: charts
endpoint: minio.minio.svc.cluster.local:9000
region: us-east-1
insecure: true
secretRef:
name: minio-credentials
---
apiVersion: source.toolkit.fluxcd.io/v1alpha1
kind: HelmChart
metadata:
name: helmchart-bucket
spec:
chart: ./helmchart
sourceRef:
kind: Bucket
name: charts
interval: 1m

8
config/testdata/minio/secret.yaml vendored Normal file
View File

@ -0,0 +1,8 @@
---
apiVersion: v1
kind: Secret
metadata:
name: minio-credentials
data:
accesskey: bXlhY2Nlc3NrZXk=
secretkey: bXlzZWNyZXRrZXk=