Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.4
version: 0.3.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# openshift-data-foundations

![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 0.3.5](https://img.shields.io/badge/Version-0.3.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A Helm chart to install ODF on Openshift

### Notable changes

* v0.3.5: Add a `status: true` to podFailure specifications for <= 4.20
compatibility. The field is mandatory in <= 4.20, and still
accepted in later versions.

* v0.3.4: Add a `job-wait-for-mcp` Job (sync-wave -2, before the node-labeling
Job at -1 and the StorageCluster) that waits for the configured
MachineConfigPools (default: `worker`) to finish reconciling before
Expand Down
4 changes: 4 additions & 0 deletions README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

### Notable changes

* v0.3.5: Add a `status: true` to podFailure specifications for <= 4.20
compatibility. The field is mandatory in <= 4.20, and still
accepted in later versions.

* v0.3.4: Add a `job-wait-for-mcp` Job (sync-wave -2, before the node-labeling
Job at -1 and the StorageCluster) that waits for the configured
MachineConfigPools (default: `worker`) to finish reconciling before
Expand Down
17 changes: 17 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ standard-csi
{{- end -}}
{{- end -}}

{{/*
Pod failure policy shared by the label-storage-nodes Job and CronJob.
*/}}
{{- define "odf.labelStorageNodes.podFailurePolicy" -}}
podFailurePolicy:
rules:
- action: Ignore
onExitCodes:
containerName: label-storage-nodes
operator: In
values: [143]
- action: Ignore
onPodConditions:
- type: DisruptionTarget
status: "True"
{{- end }}

{{/*
Bash script used by the label-storage-nodes Job and CronJob.
Respects storageSystem.inventory.useSpecificNodes vs nodeJobLabelSelector.
Expand Down
11 changes: 1 addition & 10 deletions templates/cronjob-labelNodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@ spec:
spec:
# A drain-evicted (cancelled) pod is ignored rather than counted as a
# failure; only genuine failures count toward backoffLimit.
podFailurePolicy:
rules:
- action: Ignore
onExitCodes:
containerName: label-storage-nodes
operator: In
values: [143]
- action: Ignore
onPodConditions:
- type: DisruptionTarget
{{- include "odf.labelStorageNodes.podFailurePolicy" . | nindent 6 }}
template:
spec:
{{- include "odf.labelStorageNodes.podSpec" . | nindent 10 }}
11 changes: 1 addition & 10 deletions templates/job-labelNodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ spec:
# A drain-evicted (cancelled) pod is ignored rather than counted as a
# failure: the Job stays incomplete and a replacement pod retries the
# labeling. Only genuine failures count toward backoffLimit.
podFailurePolicy:
rules:
- action: Ignore
onExitCodes:
containerName: label-storage-nodes
operator: In
values: [143]
- action: Ignore
onPodConditions:
- type: DisruptionTarget
{{- include "odf.labelStorageNodes.podFailurePolicy" . | nindent 2 }}
template:
spec:
{{- include "odf.labelStorageNodes.podSpec" . | nindent 6 }}
1 change: 1 addition & 0 deletions templates/job-waitForMcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
- action: Ignore
onPodConditions:
- type: DisruptionTarget
status: "True"
template:
spec:
{{- include "odf.waitForMcp.podSpec" . | nindent 6 }}
Expand Down
6 changes: 6 additions & 0 deletions tests/cronjob_labelNodes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ tests:
- equal:
path: spec.concurrencyPolicy
value: Forbid
- equal:
path: spec.jobTemplate.spec.podFailurePolicy.rules[1].onPodConditions[0].type
value: DisruptionTarget
- equal:
path: spec.jobTemplate.spec.podFailurePolicy.rules[1].onPodConditions[0].status
value: "True"
- equal:
path: spec.jobTemplate.spec.template.spec.serviceAccountName
value: odf-node-label-sa
Expand Down
3 changes: 3 additions & 0 deletions tests/job_waitForMcp_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ tests:
- equal:
path: spec.podFailurePolicy.rules[1].onPodConditions[0].type
value: DisruptionTarget
- equal:
path: spec.podFailurePolicy.rules[1].onPodConditions[0].status
value: "True"


- it: Should support custom pools and timeout
Expand Down
Loading