From e66d9e073f5644d670ca8ce8f51ee3c99db617c3 Mon Sep 17 00:00:00 2001 From: "Sam Wang (holyspectral)" Date: Tue, 3 Dec 2024 13:07:18 -0500 Subject: [PATCH] feat: allow ArgoCD users to disable lease creation ArgoCD doesn't allow lease objects to be created and generate warnings. With this option, ArgoCD users can prevent lease objects from being created. --- charts/core/README.md | 1 + charts/core/templates/controller-lease.yaml | 2 ++ charts/core/templates/upgrader-lease.yaml | 3 +++ charts/core/values.yaml | 3 +++ 4 files changed, 9 insertions(+) diff --git a/charts/core/README.md b/charts/core/README.md index cacd69b0..23fc897d 100644 --- a/charts/core/README.md +++ b/charts/core/README.md @@ -295,6 +295,7 @@ Parameter | Description | Default | Notes `crdwebhooksvc.enabled` | Enable crd service | `true` | `crdwebhook.enabled` | Create crd resources | `true` | `crdwebhook.type` | crd webhook type | `ClusterIP` | +`lease.enabled` | Create lease object or not | `true` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/charts/core/templates/controller-lease.yaml b/charts/core/templates/controller-lease.yaml index cccde547..0c8fdb71 100644 --- a/charts/core/templates/controller-lease.yaml +++ b/charts/core/templates/controller-lease.yaml @@ -1,3 +1,4 @@ +{{- if .Values.lease.enabled }} {{- if .Values.internal.autoGenerateCert }} apiVersion: coordination.k8s.io/v1 kind: Lease @@ -6,3 +7,4 @@ metadata: spec: leaseTransitions: 0 {{- end }} +{{- end }} diff --git a/charts/core/templates/upgrader-lease.yaml b/charts/core/templates/upgrader-lease.yaml index 2afa935d..724ed792 100644 --- a/charts/core/templates/upgrader-lease.yaml +++ b/charts/core/templates/upgrader-lease.yaml @@ -1,3 +1,4 @@ +{{- if .Values.lease.enabled }} {{- if .Values.internal.autoGenerateCert }} apiVersion: coordination.k8s.io/v1 kind: Lease @@ -6,3 +7,5 @@ metadata: spec: leaseTransitions: 0 {{- end }} +{{- end }} + diff --git a/charts/core/values.yaml b/charts/core/values.yaml index f39f9526..5c883835 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -636,3 +636,6 @@ crdwebhooksvc: crdwebhook: enabled: true type: ClusterIP + +lease: + enabled: true