diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 4aab0cde..11139f91 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -81,12 +81,22 @@ jobs: wget -q https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc ./mc alias set minio http://localhost:9000 myaccesskey mysecretkey --api S3v4 - ./mc mb minio/podinfo - ./mc cp --recursive ./config/testdata/minio/manifests minio/podinfo - - name: Run S3 tests + kubectl -n source-system apply -f ./config/testdata/minio/secret.yaml + - name: Run Bucket tests 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 + - 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 if: failure() run: | diff --git a/config/testdata/minio/source.yaml b/config/testdata/bucket/source.yaml similarity index 68% rename from config/testdata/minio/source.yaml rename to config/testdata/bucket/source.yaml index ccd1ed8b..3bc569d3 100644 --- a/config/testdata/minio/source.yaml +++ b/config/testdata/bucket/source.yaml @@ -1,3 +1,4 @@ +--- apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: Bucket metadata: @@ -11,11 +12,3 @@ spec: insecure: true secretRef: name: minio-credentials ---- -apiVersion: v1 -kind: Secret -metadata: - name: minio-credentials -data: - accesskey: bXlhY2Nlc3NrZXk= - secretkey: bXlzZWNyZXRrZXk= diff --git a/config/testdata/helmchart-from-bucket/source.yaml b/config/testdata/helmchart-from-bucket/source.yaml new file mode 100644 index 00000000..9c09321f --- /dev/null +++ b/config/testdata/helmchart-from-bucket/source.yaml @@ -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 diff --git a/config/testdata/minio/secret.yaml b/config/testdata/minio/secret.yaml new file mode 100644 index 00000000..35cc5a39 --- /dev/null +++ b/config/testdata/minio/secret.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: minio-credentials +data: + accesskey: bXlhY2Nlc3NrZXk= + secretkey: bXlzZWNyZXRrZXk=