You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2022/02/23 16:24:45 UTC
[pulsar-helm-chart] branch master updated: Remove completed init jobs using ttl (#235)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 192b3ca Remove completed init jobs using ttl (#235)
192b3ca is described below
commit 192b3ca2ef80c1e78acd98f64a7f5fa64136ccf8
Author: Chirag Modi <92...@users.noreply.github.com>
AuthorDate: Wed Feb 23 21:54:37 2022 +0530
Remove completed init jobs using ttl (#235)
* feat: added ttlSecondsAfterFinished configuration to delete completed jobs
* added comments for clarification
---
charts/pulsar/Chart.yaml | 2 +-
charts/pulsar/templates/bookkeeper-cluster-initialize.yaml | 5 +++++
charts/pulsar/templates/pulsar-cluster-initialize.yaml | 5 +++++
charts/pulsar/values.yaml | 8 ++++++++
4 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/charts/pulsar/Chart.yaml b/charts/pulsar/Chart.yaml
index c34fa4f..35bfed4 100644
--- a/charts/pulsar/Chart.yaml
+++ b/charts/pulsar/Chart.yaml
@@ -21,7 +21,7 @@ apiVersion: v2
appVersion: "2.7.4"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
-version: 2.7.12
+version: 2.7.13
home: https://pulsar.apache.org
sources:
- https://github.com/apache/pulsar
diff --git a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
index 9f9f33a..cbdb52f 100644
--- a/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
+++ b/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
@@ -27,6 +27,11 @@ metadata:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: "{{ .Values.bookkeeper.component }}-init"
spec:
+# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
+# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
+{{- if .Values.job.ttl.enabled }}
+ ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
+{{- end }}
template:
spec:
{{- if and .Values.rbac.enabled .Values.rbac.psp }}
diff --git a/charts/pulsar/templates/pulsar-cluster-initialize.yaml b/charts/pulsar/templates/pulsar-cluster-initialize.yaml
index 8f0c0a0..0b9b77a 100644
--- a/charts/pulsar/templates/pulsar-cluster-initialize.yaml
+++ b/charts/pulsar/templates/pulsar-cluster-initialize.yaml
@@ -28,6 +28,11 @@ metadata:
{{- include "pulsar.standardLabels" . | nindent 4 }}
component: {{ .Values.pulsar_metadata.component }}
spec:
+# This feature was previously behind a feature gate for several Kubernetes versions and will default to true in 1.23 and beyond
+# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
+{{- if .Values.job.ttl.enabled }}
+ ttlSecondsAfterFinished: {{ .Values.job.ttl.secondsAfterFinished }}
+{{- end }}
template:
spec:
initContainers:
diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml
index d862152..180f79b 100644
--- a/charts/pulsar/values.yaml
+++ b/charts/pulsar/values.yaml
@@ -1139,3 +1139,11 @@ pulsar_manager:
admin:
user: pulsar
password: pulsar
+
+# These are jobs where job ttl configuration is used
+# pulsar-helm-chart/charts/pulsar/templates/pulsar-cluster-initialize.yaml
+# pulsar-helm-chart/charts/pulsar/templates/bookkeeper-cluster-initialize.yaml
+job:
+ ttl:
+ enabled: false
+ secondsAfterFinished: 3600
\ No newline at end of file