Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix breaking examples #5024

Merged
merged 2 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions examples/loadHttp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed legacy patch syntax is used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in other examples - is it worth updating those as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cailynse

I think I searched and fixed other examples where the removed legacy patch was used.
Could you find other places for it was used?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! I misunderstood, I was thinking patchesStrategicMerge which is being used in many places

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry!

- 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
5 changes: 5 additions & 0 deletions examples/springboot/base/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
app.name=Staging Kinflate Demo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: The README.md specifies an application.properties that only has 1 line:

app.name=Kustomize Demo

Apparently the justification there is that maintenance is easier if we separate the credentials out into a separate file: https://github.com/kubernetes-sigs/kustomize/blob/master/examples/springboot/README.md?plain=1#L95-L99.

Feel free to ignore this comment. I don't think it's important, only an observation.

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://<production_db_ip>:3306/db_example
spring.datasource.username=root
spring.datasource.password=admin
8 changes: 8 additions & 0 deletions examples/springboot/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resources:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error caused by kustomization.yaml file is missing.

Copy link
Contributor

@cailyn-codes cailyn-codes Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the example in the issue never worked?

Just saw Katrina's comment!

- deployment.yaml
- service.yaml
configMapGenerator:
- name: demo-configmap
# behavior: merge
files:
- application.properties
8 changes: 4 additions & 4 deletions examples/springboot/overlays/production/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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-