Skip to content

Commit

Permalink
making .ReleaseIsInstall optional for init jobs (#480)
Browse files Browse the repository at this point in the history
* making .ReleasIsInstall optional for init jobs

* initialize simplifying an if condition based on feedback
  • Loading branch information
doug-ba authored Mar 26, 2024
1 parent 43ed6f5 commit 3dee8df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
{{- if or .Release.IsInstall .Values.initialize }}
{{- if or (and .Values.useReleaseStatus .Release.IsInstall) .Values.initialize }}
{{- if .Values.components.bookkeeper }}
apiVersion: batch/v1
kind: Job
Expand Down
2 changes: 1 addition & 1 deletion charts/pulsar/templates/pulsar-cluster-initialize.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

{{- if or .Release.IsInstall .Values.initialize }}
{{- if or (and .Values.useReleaseStatus .Release.IsInstall) .Values.initialize }}
{{- if .Values.components.broker }}
apiVersion: batch/v1
kind: Job
Expand Down
4 changes: 2 additions & 2 deletions charts/pulsar/templates/pulsar-manager-cluster-initialize.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

{{- if or .Release.IsInstall .Values.initialize }}
{{- if or (and .Values.useReleaseStatus .Release.IsInstall) .Values.initialize }}
{{- if .Values.components.pulsar_manager }}
apiVersion: batch/v1
kind: Job
Expand All @@ -28,7 +28,7 @@ metadata:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.pulsar_manager.component }}-init
spec:
{{- if or .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
{{- if and .Values.job.ttl.enabled (semverCompare ">=1.23-0" .Capabilities.KubeVersion.Version) }}
ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished | default 600 }}
{{- end }}
template:
Expand Down
3 changes: 2 additions & 1 deletion charts/pulsar/values.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ clusterDomain: cluster.local

## Set to true on install
initialize: false

## Set useReleaseStatus to false if you're deploying this chart using a system that doesn't track .Release.IsInstall or .Release.IsUpgrade (like argocd)
useReleaseStatus: true
## Set cluster name
# clusterName:

Expand Down

0 comments on commit 3dee8df

Please sign in to comment.