diff --git a/charts/base/templates/daemonset.yaml b/charts/base/templates/daemonset.yaml index 5d898d3..9d28477 100644 --- a/charts/base/templates/daemonset.yaml +++ b/charts/base/templates/daemonset.yaml @@ -29,6 +29,24 @@ spec: tolerations: {{- toYaml .Values.logging.tolerations | nindent 8 }} {{- end }} + {{- if .Values.logging.ensureLease }} + initContainers: + - name: ensure-lease + image: bitnami/kubectl:1.31 + command: + - /bin/sh + - -c + - | + kubectl apply -f - <<'EOF' + apiVersion: coordination.k8s.io/v1 + kind: Lease + metadata: + name: nullplatform-metrics-extractor + namespace: {{ .Values.namespaces.nullplatformTools }} + spec: + holderIdentity: "" + EOF + {{- end }} containers: - name: nullplatform-log-controller image: {{ .Values.logging.controller.image }} diff --git a/charts/base/values.yaml b/charts/base/values.yaml index a264f37..df079fe 100644 --- a/charts/base/values.yaml +++ b/charts/base/values.yaml @@ -149,6 +149,7 @@ logging: # operator: "Exists" # effect: "NoSchedule" tolerations: [] + ensureLease: false streams: enabled: false mountPath: "/etc/null-logs/streams-dd.conf"