diff --git a/README.md b/README.md index fb323ad..6c0fb2a 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,10 @@ Automatically create Minio buckets based on K8S CRD. -WIP, early project \ No newline at end of file +WIP, early project + +Apply all K8s config files manually: + +```bash +cat yaml/*.yaml | kubectl apply -f - +``` \ No newline at end of file diff --git a/test/first-test.yaml b/test/first-test.yaml new file mode 100644 index 0000000..da2f0ba --- /dev/null +++ b/test/first-test.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Secret +metadata: + name: minio-root +type: Opaque +data: + accessKey: bWluaW8= + secretKey: bWluaW8= +--- +apiVersion: "communiquons.org/v1" +kind: MinioInstance +metadata: + name: my-minio-instance +spec: + endpoint: http://minio:9000/ + credentials: minio-root +--- +apiVersion: "communiquons.org/v1" +kind: MinioBucket +metadata: + name: first-bucket +spec: + instance: my-minio-instance + name: first-bucket + secret: bucket-secret \ No newline at end of file diff --git a/yaml/minio-bucket.yaml b/yaml/minio-bucket.yaml index c6efed3..7f74c7f 100644 --- a/yaml/minio-bucket.yaml +++ b/yaml/minio-bucket.yaml @@ -66,9 +66,6 @@ spec: enum: - compliance - governance - - - # either Namespaced or Cluster scope: Namespaced names: @@ -81,4 +78,5 @@ spec: # shortNames allow shorter string to match your resource on the CLI shortNames: - mbs - - buckets \ No newline at end of file + - buckets +--- diff --git a/yaml/minio-instance.yaml b/yaml/minio-instance.yaml index a4a48a5..c87f77b 100644 --- a/yaml/minio-instance.yaml +++ b/yaml/minio-instance.yaml @@ -45,4 +45,5 @@ spec: kind: MinioInstance # shortNames allow shorter string to match your resource on the CLI shortNames: - - mis \ No newline at end of file + - mis +--- diff --git a/yaml/service_account.yaml b/yaml/service_account.yaml index 7d375ae..3d89363 100644 --- a/yaml/service_account.yaml +++ b/yaml/service_account.yaml @@ -30,3 +30,4 @@ roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: minio-buckets +---