Skip to content

Commit

Permalink
feat: allow ArgoCD users to disable lease creation
Browse files Browse the repository at this point in the history
ArgoCD doesn't allow lease objects to be created and generate warnings.
With this option, ArgoCD users can prevent lease objects from being
created.
  • Loading branch information
holyspectral authored and venkateshjayagopal committed Dec 19, 2024
1 parent 2348b34 commit 40bb735
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 2 additions & 0 deletions charts/core/templates/controller-lease.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.lease.enabled }}
{{- if .Values.internal.autoGenerateCert }}
apiVersion: coordination.k8s.io/v1
kind: Lease
Expand All @@ -6,3 +7,4 @@ metadata:
spec:
leaseTransitions: 0
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/core/templates/upgrader-lease.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.lease.enabled }}
{{- if .Values.internal.autoGenerateCert }}
apiVersion: coordination.k8s.io/v1
kind: Lease
Expand All @@ -6,3 +7,5 @@ metadata:
spec:
leaseTransitions: 0
{{- end }}
{{- end }}

3 changes: 3 additions & 0 deletions charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -636,3 +636,6 @@ crdwebhooksvc:
crdwebhook:
enabled: true
type: ClusterIP

lease:
enabled: true

0 comments on commit 40bb735

Please sign in to comment.