-
Notifications
You must be signed in to change notification settings - Fork 3
Add volumes and volumeMounts values to the Helm chart for file-based credentials
#62
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
db11b93
Add `volumes` and `volumeMounts` values to the Helm chart for file-ba…
ThoSap 7c165bb
clarify Helm `values.yaml` comments on unusable generated defaults fo…
ThoSap 933a614
align Kubernetes deployment and `HelmTest` with `quarkus.kubernetes.n…
ThoSap 465ee82
fix the .gitignore `.kube/` directory exclusion
ThoSap acfecfa
rework the ClusterConnection docs with the new file reference option
ThoSap 3829c77
Merge branch 'main' into add-helm-volumes-values
ThoSap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| # This file overrides the default values that the quarkus-helm extension generates. | ||
| # | ||
| # Why it exists: a list field of the operator Deployment becomes a Helm value only if the key | ||
| # already exists in `src/main/kubernetes/kubernetes.yml`. An empty list `[]` does not survive | ||
| # there. The fabric8 model marks `PodSpec.imagePullSecrets`, `PodSpec.volumes` and | ||
| # `Container.volumeMounts` with `@JsonInclude(NON_EMPTY)`. A list with one null element does | ||
| # survive, but the generated default is then unusable, so this file replaces it with a real | ||
| # empty list. | ||
| # | ||
| # The unusable default takes one of two shapes, and the path of the value decides which: | ||
| # - A plain path, such as `spec.template.spec.volumes`, produces `- {}`, a list that holds | ||
| # one empty object. A user who copies that default and appends an entry gets invalid YAML. | ||
| # - A container-filtered path, such as | ||
| # `spec.template.spec.containers.(name == postgresql-operator).volumeMounts`, produces | ||
| # `{}`, an object. That shape also contradicts the `type: array` of `values.schema.json`. | ||
| # | ||
| # See https://github.com/quarkiverse/quarkus-helm/issues/453 | ||
| app: | ||
| imagePullSecrets: [] | ||
| volumes: [] | ||
| volumeMounts: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,19 @@ | ||
| --- | ||
| # See https://quarkus.io/guides/deploying-to-kubernetes#using-existing-resources | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| # The name must match `quarkus.kubernetes.name`, otherwise Dekorate adds a second Deployment. | ||
| # `HelmTest` has a test that makes sure this never drifts apart. | ||
| name: postgresql-operator | ||
| spec: | ||
| template: | ||
| spec: | ||
| affinity: {} | ||
| # The `[~]` placeholders are required, see operator/src/main/helm/values.yaml for the reason. | ||
| imagePullSecrets: [~] | ||
| volumes: [~] | ||
| containers: | ||
| # The name must match `quarkus.kubernetes.name`, otherwise Dekorate adds a second container. | ||
| - name: postgresql-operator | ||
| volumeMounts: [~] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Maybe it is just me but both new sections stop at the mount, no?
But the point of the PR is making
adminSecretFileRefusable from the chart. Could you end each example with the matching path?With the CSI one especially it's not obvious that the filename comes from objectAlias. And a line saying the Secrets Store CSI driver has to be installed first would save someone a confused pod.
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 carefully reading this 🙏🏼
I reworked the whole file, as since PR #60 it was really confusing and duplicated some stuff from the
#### Mount the credentials filesection partly again in### Examples.I moved these sections now under
## Examplesand cleaned it up a bit.