Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
effective customizations chapter #2659
effective customizations chapter #2659
Changes from 2 commits
bf01897
fd96715
db85266
a6c4574
ebf4c6d
7f362f8
4f002cb
124a777
a2f9988
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd link to https://github.com/kubernetes/design-proposals-archive/blob/main/architecture/declarative-application-management.md#parameterization-pitfalls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link to https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be pretty easy to find a helm chart to link to as an example. I've used the jenkins chart in the past. A search for "universal helm chart" found this:
https://github.com/OleksandrUA/universal-helm-charts/blob/master/chart-service/_common/templates/deployment.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I call parameterizing every field the struct constructor pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/templates/jenkins-controller-statefulset.yaml#L84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's not hard to find a chart that suffers from the parameter problem. I think what @droot is asking for here is before and after so I'd have to create a feasible package for whatever it is that I showcase. There is also a limit to the size of the example to show case the end result. Maybe I can figure out how to just show code snippets here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also explain this as similar to kustomize but where the patch is automatically derived
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to re-read the sentence couple of times to understand the intent :) Can we start with a concrete use-case to describe the problem that can help the reader visualize the scenario better.
And then suggest how to do it the
kpt
way and then follow up with how existing tools (or techniques do) and discuss the trade-offs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is very generic and as a user it's not clear to me how to really apply it. We should describe the solution a bit more concretely here in context of an example. For ex.. in the tenant use case, enforcing the package to have only one namespace was one invariant we enforced using a custom function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example:
https://github.com/nghnam/kube-common-setup/blob/master/templates/cluster-role-bindings.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for linking to this, this is a good size package that we can possibly adopt since it's small and very readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest a ordering change because reading it as a user feels we are anchoring too much on the negatives of other existing techniques before even showing how to do it well in kpt.
Starting scenario with a concrete use-case. For ex. where we talk a bit about the
folder generation
use-cases show sparse config and what resources we want to stamp out and then discussing how to do it thekpt
way and then discussing other techniques (and how other tools do it) and explain the trade offs will be better ordering.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generation pattern isn't well supported, so I don't think the folder generator is a good example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The case for a general-purpose programming language would be similar to Pulumi or cdk8s. The difference between representing the configuration as code and assuming exclusive actuation and operating on the configuration with code is composability and interoperability.