From 716d5532a481150107fca2569f564029d253afbd Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 18 Sep 2020 11:38:52 +0300 Subject: [PATCH] Add S3 test data --- config/samples/source_v1alpha1_bucket.yaml | 1 - .../minio/manifests/namespace/namespace.yaml | 4 + .../minio/manifests/namespace/role.yaml | 13 ++++ .../minio/manifests/podinfo/deployment.yaml | 75 +++++++++++++++++++ .../minio/manifests/podinfo/service.yaml | 18 +++++ config/testdata/minio/source.yaml | 23 ++++++ 6 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 config/testdata/minio/manifests/namespace/namespace.yaml create mode 100644 config/testdata/minio/manifests/namespace/role.yaml create mode 100644 config/testdata/minio/manifests/podinfo/deployment.yaml create mode 100644 config/testdata/minio/manifests/podinfo/service.yaml create mode 100644 config/testdata/minio/source.yaml diff --git a/config/samples/source_v1alpha1_bucket.yaml b/config/samples/source_v1alpha1_bucket.yaml index d9dad440..6fa1b140 100644 --- a/config/samples/source_v1alpha1_bucket.yaml +++ b/config/samples/source_v1alpha1_bucket.yaml @@ -2,7 +2,6 @@ apiVersion: source.toolkit.fluxcd.io/v1alpha1 kind: Bucket metadata: name: bucket-sample - namespace: gitops-system spec: interval: 1m provider: generic diff --git a/config/testdata/minio/manifests/namespace/namespace.yaml b/config/testdata/minio/manifests/namespace/namespace.yaml new file mode 100644 index 00000000..92d01686 --- /dev/null +++ b/config/testdata/minio/manifests/namespace/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: minio-test diff --git a/config/testdata/minio/manifests/namespace/role.yaml b/config/testdata/minio/manifests/namespace/role.yaml new file mode 100644 index 00000000..60ac2efa --- /dev/null +++ b/config/testdata/minio/manifests/namespace/role.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: gotk-reconciler + namespace: minio-test +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - apiGroup: rbac.authorization.k8s.io + kind: User + name: gotk:web-team:reconciler diff --git a/config/testdata/minio/manifests/podinfo/deployment.yaml b/config/testdata/minio/manifests/podinfo/deployment.yaml new file mode 100644 index 00000000..de45798c --- /dev/null +++ b/config/testdata/minio/manifests/podinfo/deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: podinfo + namespace: minio-test +spec: + minReadySeconds: 3 + revisionHistoryLimit: 5 + progressDeadlineSeconds: 60 + strategy: + rollingUpdate: + maxUnavailable: 0 + type: RollingUpdate + selector: + matchLabels: + app: podinfo + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9797" + labels: + app: podinfo + spec: + containers: + - name: podinfod + image: stefanprodan/podinfo:4.0.6 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 9898 + protocol: TCP + - name: http-metrics + containerPort: 9797 + protocol: TCP + - name: grpc + containerPort: 9999 + protocol: TCP + command: + - ./podinfo + - --port=9898 + - --port-metrics=9797 + - --grpc-port=9999 + - --grpc-service-name=podinfo + - --level=info + - --random-delay=false + - --random-error=false + env: + - name: PODINFO_UI_COLOR + value: "#34577c" + livenessProbe: + exec: + command: + - podcli + - check + - http + - localhost:9898/healthz + initialDelaySeconds: 5 + timeoutSeconds: 5 + readinessProbe: + exec: + command: + - podcli + - check + - http + - localhost:9898/readyz + initialDelaySeconds: 5 + timeoutSeconds: 5 + resources: + limits: + cpu: 2000m + memory: 512Mi + requests: + cpu: 100m + memory: 64Mi diff --git a/config/testdata/minio/manifests/podinfo/service.yaml b/config/testdata/minio/manifests/podinfo/service.yaml new file mode 100644 index 00000000..4f7baeb1 --- /dev/null +++ b/config/testdata/minio/manifests/podinfo/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: podinfo + namespace: minio-test +spec: + type: ClusterIP + selector: + app: podinfo + ports: + - name: http + port: 9898 + protocol: TCP + targetPort: http + - port: 9999 + targetPort: grpc + protocol: TCP + name: grpc diff --git a/config/testdata/minio/source.yaml b/config/testdata/minio/source.yaml new file mode 100644 index 00000000..94d7c2c8 --- /dev/null +++ b/config/testdata/minio/source.yaml @@ -0,0 +1,23 @@ +apiVersion: source.toolkit.fluxcd.io/v1alpha1 +kind: Bucket +metadata: + name: podinfo + namespace: gitops-system +spec: + interval: 1m + provider: generic + bucketName: podinfo + endpoint: minio.minio.svc.cluster.local:9000 + region: us-east-1 + insecure: true + secretRef: + name: minio-credentials +--- +apiVersion: v1 +kind: Secret +metadata: + name: minio-credentials + namespace: gitops-system +data: + accesskey: bXlhY2Nlc3NrZXk= + secretkey: bXlzZWNyZXRrZXk=