Skip to content
New issue

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

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

Already on GitHub? # to your account

[Demo with Kustomize] Add missing ServiceAccount of color-svc #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rytswd
Copy link
Owner

@rytswd rytswd commented Sep 6, 2021

Change Overview

This fixes Kubernetes Deployment of color-svc, which uses ServiceAccount of color-svc but was missed in the setup.

Challenges

🤔 Easy to Miss in kustomization.yaml

Kustomize needs to explicitly list all the resources. This is a useful design and certainly has its own merit, but it also means you can end up with new resource files created without actually having any effect.

Because there is nothing wrong in the spec, it can be surprisingly difficult to spot how the new resource does not show up.

Solutions

🎯 Additional Tooling (no example here)

(As of Sep 2021)

There are useful tools like dyff, which is a CLI tool to view the diff between two YAML inputs. However, it has this limitation that it cannot show the diff if the number of documents in YAML does not match in those 2 files.

If this type of change is common, you'd need some other automation, perhaps even using sdiff against kustomize build output.

@rytswd
Copy link
Owner Author

rytswd commented Sep 6, 2021

/run-dyff

This command does not work well, as dyff has this limitation that it cannot handle different number of documents.

@github-actions
Copy link

github-actions bot commented Sep 6, 2021

Kustomize Diff

Diff based on the updated file of kustomize/color-svc-example


Diff based on the updated file of kustomize/color-svc-example


# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant