Skip to content
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

fix(jiva): add tolerations to jiva cleanup jobs #1667

Merged
merged 1 commit into from
Apr 11, 2020
Merged
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
13 changes: 13 additions & 0 deletions pkg/install/v1alpha1/jiva_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ spec:
# should be cleared or retained.
- name: RetainReplicaData
enabled: "false"
- name: ReplicaTolerations
value: "none"
taskNamespace: {{env "OPENEBS_NAMESPACE"}}
run:
tasks:
Expand Down Expand Up @@ -1310,6 +1312,8 @@ spec:
- {{ $v | quote }}
{{- end }}
task: |
{{- $hasReplicaToleration := .Config.ReplicaTolerations.value | default "none" -}}
{{- $replicaTolerationVal := fromYaml .Config.ReplicaTolerations.value -}}
kind: Job
apiVersion: batch/v1
metadata:
Expand Down Expand Up @@ -1344,6 +1348,15 @@ spec:
volumeMounts:
- mountPath: /mnt/replica
name: replica-path
tolerations:
{{- if ne $hasReplicaToleration "none" }}
{{- range $k, $v := $replicaTolerationVal }}
-
{{- range $kk, $vv := $v }}
{{ $kk }}: {{ $vv }}
{{- end }}
{{- end }}
{{- end }}
post: |
{{- jsonpath .JsonResult "{.metadata.name}" | trim | addTo "jivavolumedelreplicascrub.objectName" .TaskResult | noop -}}
---
Expand Down