-
Notifications
You must be signed in to change notification settings - Fork 3
Add extraVolumes and extraVolumeMounts Helm values for mounting files into the operator pod #65
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| # Workaround: quarkus-helm generates `extraVolumeMounts: {}` (object) instead of `[]` (array) | ||
| # when the value path uses a container name filter like `containers.(name == ...)`. | ||
| # This merge file corrects the default value type. | ||
| app: | ||
| extraVolumeMounts: [] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This file corrects app:
extraVolumeMounts: []
extraVolumes:
- {}
imagePullSecrets:
- {}So |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,6 +113,22 @@ quarkus: | |
| paths: | ||
| - (kind == Deployment).spec.template.spec.affinity | ||
| description: Kubernetes affinity configuration for Pod scheduling | ||
| extra-volumes: | ||
| property: extraVolumes | ||
| value: | ||
| - null | ||
| paths: | ||
| - (kind == Deployment).spec.template.spec.volumes | ||
| expression: "{{- if eq (toYaml .Values.app.extraVolumes | trim) \"- {}\" }} null{{- else }}{{ toYaml .Values.app.extraVolumes | nindent 8 }}{{- end }}" | ||
| description: Extra volumes to add to the operator pod | ||
| extra-volume-mounts: | ||
| property: extraVolumeMounts | ||
| value: | ||
| - null | ||
| paths: | ||
| - (kind == Deployment).spec.template.spec.containers.(name == postgresql-operator).volumeMounts | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The container name is hardcoded here. We should use Five other paths in this file already do, including line 86 and lines 99 to 109. A change to |
||
| expression: "{{- if eq (toYaml .Values.app.extraVolumeMounts | trim) \"- {}\" }} null{{- else }}{{- toYaml .Values.app.extraVolumeMounts | nindent 12 }}{{- end }}" | ||
| description: Extra volume mounts to add to the operator container | ||
| console-color: | ||
| property: envs.QUARKUS_CONSOLE_COLOR | ||
| value-as-bool: ${quarkus.console.color} | ||
|
|
@@ -130,6 +146,12 @@ quarkus: | |
| "affinity": | ||
| name: app.affinity | ||
| type: object | ||
| "extraVolumeMounts": | ||
| name: app.extraVolumeMounts | ||
| type: array | ||
| "extraVolumes": | ||
| name: app.extraVolumes | ||
| type: array | ||
| expressions: | ||
| release-name-labels: | ||
| expression: "{{ .Release.Name }}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,6 +92,8 @@ void helmInstall_createsDeployment() throws IOException { | |
|
|
||
| Objects.requireNonNull(appValues, "appValues should not be null"); | ||
| assertThat(appValues.get("image")).isNotNull(); | ||
| assertThat(appValues).containsKey("extraVolumes"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
assertThat(appValues.get("extraVolumes")).isEqualTo(List.of());Two further gaps in this test:
|
||
| assertThat(appValues).containsKey("extraVolumeMounts"); | ||
|
|
||
| assertThat(chartPath.resolve("LICENSE")).exists(); | ||
| assertThat(chartPath.resolve("README.md")).exists(); | ||
|
|
@@ -173,9 +175,11 @@ void helmInstall_createsDeployment() throws IOException { | |
|
|
||
| assertThat(deployment.getSpec()) | ||
| .isNotNull() | ||
| .satisfies(spec -> | ||
| assertThat(spec.getTemplate().getSpec().getImagePullSecrets()).isEmpty() | ||
| ); | ||
| .satisfies(spec -> { | ||
| assertThat(spec.getTemplate().getSpec().getImagePullSecrets()).isEmpty(); | ||
| assertThat(spec.getTemplate().getSpec().getVolumes()).isEmpty(); | ||
| assertThat(spec.getTemplate().getSpec().getContainers().getFirst().getVolumeMounts()).isEmpty(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
assertThat(spec.getTemplate().getSpec().getContainers())
.singleElement()
.satisfies(container -> {
assertThat(container.getName()).isEqualTo("postgresql-operator");
assertThat(container.getVolumeMounts()).isEmpty();
}); |
||
| }); | ||
|
|
||
| var selector = deployment.getSpec().getSelector(); | ||
|
|
||
|
|
||
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.
Missing Secrets Store CSI example.