From e1c530e420d93650c06618b3f77621f28e00a6f4 Mon Sep 17 00:00:00 2001 From: yugo kobayashi Date: Thu, 25 May 2023 02:02:50 +0900 Subject: [PATCH] fix breaking examples (#5024) * fix examples?springboot with no kustomization.yaml * fix examples/loadHttp with legacy patch syntax --- examples/loadHttp/kustomization.yaml | 17 ++++++++--------- examples/springboot/base/application.properties | 5 +++++ examples/springboot/base/kustomization.yaml | 8 ++++++++ .../overlays/production/kustomization.yaml | 8 ++++---- 4 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 examples/springboot/base/application.properties create mode 100644 examples/springboot/base/kustomization.yaml diff --git a/examples/loadHttp/kustomization.yaml b/examples/loadHttp/kustomization.yaml index 28e1b6ad4..718b03154 100644 --- a/examples/loadHttp/kustomization.yaml +++ b/examples/loadHttp/kustomization.yaml @@ -4,12 +4,11 @@ resources: - https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/wordpress/wordpress/deployment.yaml - https://github.com/knative/serving/releases/download/v0.12.0/serving.yaml # redirects to s3 patches: -- https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/wordpress/patch.yaml -patchesStrategicMerge: -- |- - apiVersion: rbac.authorization.k8s.io/v1 - kind: RoleBinding - metadata: - name: custom-metrics-auth-reader - namespace: kube-system - $patch: delete +- path: https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/wordpress/patch.yaml +- patch: |- + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: custom-metrics-auth-reader + namespace: kube-system + $patch: delete diff --git a/examples/springboot/base/application.properties b/examples/springboot/base/application.properties new file mode 100644 index 000000000..253ffd85e --- /dev/null +++ b/examples/springboot/base/application.properties @@ -0,0 +1,5 @@ +app.name=Staging Kinflate Demo +spring.jpa.hibernate.ddl-auto=update +spring.datasource.url=jdbc:mysql://:3306/db_example +spring.datasource.username=root +spring.datasource.password=admin diff --git a/examples/springboot/base/kustomization.yaml b/examples/springboot/base/kustomization.yaml new file mode 100644 index 000000000..31a790af8 --- /dev/null +++ b/examples/springboot/base/kustomization.yaml @@ -0,0 +1,8 @@ +resources: +- deployment.yaml +- service.yaml +configMapGenerator: +- name: demo-configmap + # behavior: merge + files: + - application.properties diff --git a/examples/springboot/overlays/production/kustomization.yaml b/examples/springboot/overlays/production/kustomization.yaml index f91b91523..1bbc43e91 100644 --- a/examples/springboot/overlays/production/kustomization.yaml +++ b/examples/springboot/overlays/production/kustomization.yaml @@ -1,7 +1,7 @@ resources: - ../../base -patchesStrategicMerge: -- patch.yaml -- healthcheck_patch.yaml -- memorylimit_patch.yaml +patches: +- path: patch.yaml +- path: healthcheck_patch.yaml +- path: memorylimit_patch.yaml namePrefix: production-