From f32dc65f527f60c78ede2f53982d5e33a3183249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Mac=C3=ADk?= Date: Mon, 31 Oct 2022 10:44:43 +0100 Subject: [PATCH] Fix resource samples in CSV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel MacĂ­k --- config/samples/kustomization.yaml | 6 ++++-- config/samples/operators_v1alpha1_bindablekinds.yaml | 5 +++++ .../spec_v1alpha3_clusterworkloadresourcemapping.yaml | 11 +++++++++++ ...binding.yaml => spec_v1alpha3_servicebinding.yaml} | 2 +- .../spec_v1beta1_clusterworkloadresourcemapping.yaml | 9 +++++++-- config/samples/spec_v1beta1_servicebinding.yaml | 10 +++++++++- 6 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 config/samples/operators_v1alpha1_bindablekinds.yaml create mode 100644 config/samples/spec_v1alpha3_clusterworkloadresourcemapping.yaml rename config/samples/{servicebinding.io_v1alpha3_servicebinding.yaml => spec_v1alpha3_servicebinding.yaml} (92%) diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index c5f7ee053c..f91e187143 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,7 +1,9 @@ ## Append samples you want in your CSV to this file as resources ## resources: +- operators_v1alpha1_bindablekinds.yaml - operators_v1alpha1_servicebinding.yaml -- servicebinding.io_v1alpha3_servicebinding.yaml -- spec_v1beta1_servicebinding.yaml +- spec_v1alpha3_clusterworkloadresourcemapping.yaml +- spec_v1alpha3_servicebinding.yaml - spec_v1beta1_clusterworkloadresourcemapping.yaml +- spec_v1beta1_servicebinding.yaml # +kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/operators_v1alpha1_bindablekinds.yaml b/config/samples/operators_v1alpha1_bindablekinds.yaml new file mode 100644 index 0000000000..f28e233954 --- /dev/null +++ b/config/samples/operators_v1alpha1_bindablekinds.yaml @@ -0,0 +1,5 @@ +apiVersion: binding.operators.coreos.com/v1alpha1 +kind: BindableKinds +metadata: + name: bindable-kinds +spec: {} diff --git a/config/samples/spec_v1alpha3_clusterworkloadresourcemapping.yaml b/config/samples/spec_v1alpha3_clusterworkloadresourcemapping.yaml new file mode 100644 index 0000000000..1fcf7c95cd --- /dev/null +++ b/config/samples/spec_v1alpha3_clusterworkloadresourcemapping.yaml @@ -0,0 +1,11 @@ +apiVersion: servicebinding.io/v1alpha3 +kind: ClusterWorkloadResourceMapping +metadata: + name: cronjobs.batch +spec: + versions: + - version: "*" + volumes: .spec.jobTemplate.spec.template.spec.volumes + containers: + - path: .spec.jobTemplate.spec.template.spec.containers[*] + - path: .spec.jobTemplate.spec.template.spec.initContainers[*] diff --git a/config/samples/servicebinding.io_v1alpha3_servicebinding.yaml b/config/samples/spec_v1alpha3_servicebinding.yaml similarity index 92% rename from config/samples/servicebinding.io_v1alpha3_servicebinding.yaml rename to config/samples/spec_v1alpha3_servicebinding.yaml index 2758df49ca..12df057fd6 100644 --- a/config/samples/servicebinding.io_v1alpha3_servicebinding.yaml +++ b/config/samples/spec_v1alpha3_servicebinding.yaml @@ -10,4 +10,4 @@ spec: application: name: nodejs-rest-http-crud apiVersion: apps/v1 - Kind: Ddeployment + kind: Deployment diff --git a/config/samples/spec_v1beta1_clusterworkloadresourcemapping.yaml b/config/samples/spec_v1beta1_clusterworkloadresourcemapping.yaml index b92bfb1165..95938ff5a0 100644 --- a/config/samples/spec_v1beta1_clusterworkloadresourcemapping.yaml +++ b/config/samples/spec_v1beta1_clusterworkloadresourcemapping.yaml @@ -1,6 +1,11 @@ apiVersion: servicebinding.io/v1beta1 kind: ClusterWorkloadResourceMapping metadata: - name: clusterworkloadresourcemapping-sample + name: cronjobs.batch spec: - # TODO(user): Add fields here + versions: + - version: "*" + volumes: .spec.jobTemplate.spec.template.spec.volumes + containers: + - path: .spec.jobTemplate.spec.template.spec.containers[*] + - path: .spec.jobTemplate.spec.template.spec.initContainers[*] diff --git a/config/samples/spec_v1beta1_servicebinding.yaml b/config/samples/spec_v1beta1_servicebinding.yaml index 30eb60e3dd..55bef321bf 100644 --- a/config/samples/spec_v1beta1_servicebinding.yaml +++ b/config/samples/spec_v1beta1_servicebinding.yaml @@ -3,4 +3,12 @@ kind: ServiceBinding metadata: name: servicebinding-sample spec: - # TODO(user): Add fields here + type: postgres + service: + name: pg-instance + apiVersion: postgresql.example.dev/v1alpha1 + kind: Database + workload: + name: nodejs-rest-http-crud + apiVersion: apps/v1 + kind: Deployment