Skip to content

Commit

Permalink
Allow disabling the cert-manager check in cass-operator's helm charts (
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed Feb 14, 2024
1 parent c21d8d7 commit 402d7db
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/cass-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: cass-operator
description: |
Kubernetes operator which handles the provisioning and management of Apache Cassandra clusters.
type: application
version: 0.46.1
version: 0.46.2
appVersion: 1.18.2
dependencies:
- name: k8ssandra-common
Expand Down
3 changes: 2 additions & 1 deletion charts/cass-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- $certmanager := .Capabilities.APIVersions.Has "cert-manager.io/v1" -}}
{{- $webhooks := .Values.admissionWebhooks.enabled -}}
{{- $disableCertManagerCheck := .Values.disableCertManagerCheck -}}

{{- if and $webhooks (not $certmanager) -}}
{{- if and $webhooks (not $certmanager) (not $disableCertManagerCheck) -}}
{{- fail (print "cass-operator webhooks require cert-manager to be installed in the cluster") }}
{{- end -}}

Expand Down
3 changes: 2 additions & 1 deletion charts/cass-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- $certmanager := .Capabilities.APIVersions.Has "cert-manager.io/v1" -}}
{{- $webhooks := .Values.admissionWebhooks.enabled -}}
{{- $disableCertManagerCheck := .Values.disableCertManagerCheck -}}

{{- if and $webhooks (not $certmanager) -}}
{{- if and $webhooks (not $certmanager) (not $disableCertManagerCheck) -}}
{{- fail (print "cass-operator webhooks require cert-manager to be installed in the cluster") }}
{{- end -}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- $certmanager := .Capabilities.APIVersions.Has "cert-manager.io/v1" -}}
{{- $webhooks := .Values.admissionWebhooks.enabled -}}
{{- $disableCertManagerCheck := .Values.disableCertManagerCheck -}}

{{- if and $webhooks (not $certmanager) -}}
{{- if and $webhooks (not $certmanager) (not $disableCertManagerCheck) -}}
{{- fail (print "cass-operator webhooks require cert-manager to be installed in the cluster") }}
{{- end -}}
---
Expand Down
3 changes: 2 additions & 1 deletion charts/cass-operator/templates/webhook-service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- $certmanager := .Capabilities.APIVersions.Has "cert-manager.io/v1" -}}
{{- $webhooks := .Values.admissionWebhooks.enabled -}}
{{- $disableCertManagerCheck := .Values.disableCertManagerCheck -}}

{{- if and $webhooks (not $certmanager) -}}
{{- if and $webhooks (not $certmanager) (not $disableCertManagerCheck) -}}
{{- fail (print "cass-operator webhooks require cert-manager to be installed in the cluster") }}
{{- end -}}

Expand Down
4 changes: 4 additions & 0 deletions charts/cass-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ global:
# -- A name in place of the chart name which is used in the metadata.name of
# objects created by this chart.
nameOverride: ''

# -- A name in place of the value used for metadata.name in objects created by
# this chart. The default value has the form releaseName-chartName.
fullnameOverride: ''
Expand Down Expand Up @@ -88,3 +89,6 @@ imageConfig:
# to 127.0.0.1:8080
metrics:
address: ":8080"
# -- Allows to disable the check for cert-manager.
# This is useful when the helm templates are rendered without a cluster.
# disableCertManagerCheck: true

0 comments on commit 402d7db

Please sign in to comment.