forked from trustification/trustification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate the workaround to the helm chart
In cases where it is not possible to execute any commands when validating helm charts, this workaround can now be triggered through the helm chart itself.
- Loading branch information
Showing
5 changed files
with
74 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
48 changes: 48 additions & 0 deletions
48
deploy/k8s/charts/trustification/templates/workarounds/010-helm-wait-issue.yaml
This file contains 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,48 @@ | ||
{{- if .Values.modules.v11yWalker.enabled }} | ||
{{- if .Values.workarounds.initCronJobPvcs }} | ||
|
||
{{/* | ||
For more details "why" this is necessary, see the description of the field .workarounds.initCronJobPvcs. | ||
|
||
In order to trigger the creation of a volume, and getting the PVC out of the `WaitForFirstConsumer` state, we | ||
simply create a pod. | ||
|
||
**NOTE:** This pod will claim the PVC and thus might prevent the CronJob from working correctly. Do not use this in | ||
production! | ||
*/}} | ||
|
||
{{- $mod := dict "root" . "name" "init-pvc-v11y-walker" "component" "v11y" -}} | ||
{{- $ref := dict "root" . "name" "v11y-walker" "component" "v11y" -}} | ||
|
||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ include "trustification.common.name" $mod }} | ||
labels: | ||
{{- include "trustification.common.labels" $mod | nindent 12 }} | ||
|
||
spec: | ||
backoffLimit: 1000 | ||
completions: 1 | ||
parallelism: 1 | ||
ttlSecondsAfterFinished: 600 | ||
|
||
template: | ||
metadata: | ||
labels: | ||
{{- include "trustification.common.selectorLabels" $mod | nindent 12 }} | ||
spec: | ||
restartPolicy: OnFailure | ||
volumes: | ||
- name: init | ||
persistentVolumeClaim: | ||
claimName: {{ include "trustification.common.name" $ref }} | ||
containers: | ||
- image: registry.access.redhat.com/ubi9/ubi-minimal:latest | ||
name: init | ||
command: ["/bin/true"] | ||
volumeMounts: | ||
- mountPath: /mnt | ||
name: init | ||
{{- end }} | ||
{{- end }} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -208,3 +208,5 @@ modules: | |
enabled: false | ||
image: {} | ||
rust: {} | ||
|
||
workarounds: {} |