do not deprecate customCA

This commit is contained in:
Stanislav Dimov
2025-10-05 00:04:18 +01:00
parent c1b7ff1240
commit 1eb397e853
3 changed files with 16 additions and 16 deletions

View File

@@ -35,13 +35,8 @@
{{- fail (printf "%s - Both [customCA] and [customCASecretRef] defined in [credentials.%s]. Choose one" $caller $credName) -}}
{{- end -}}
{{- if $customCA -}}
{{- include "add.warning" (dict
"rootCtx" $rootCtx
"warn" (printf "WARNING: %s - Use of [customCA] (defined in [credentials.%s]) is deprecated and will be removed in a future release. Use [customCASecretRef] instead" $caller $credName)) -}}
{{- if not (kindIs "string" $customCA ) -}}
{{- fail (printf "%s - Expected [customCA] in [credentials.%s] to be a string. Got [%s]" $caller $credName (kindOf $customCA)) -}}
{{- end -}}
{{- if and $customCA (not (kindIs "string" $customCA )) -}}
{{- fail (printf "%s - Expected [customCA] in [credentials.%s] to be a string. Got [%s]" $caller $credName (kindOf $customCA)) -}}
{{- end -}}
{{- if $customCASecretRef -}}

View File

@@ -129,8 +129,9 @@
{{- include "tc.v1.common.class.secret" (dict "rootCtx" $ "objectData" $volsyncSecretData) -}}
{{/* Get the customCA secret name */}}
{{- if $credentials.customCASecretRef -}}
{{/* Get the customCA secret name */}}
{{- $customCASecretRef := $credentials.customCASecretRef -}}
{{- $expandName := (include "tc.v1.common.lib.util.expandName" (dict
"rootCtx" $ "objectData" $customCASecretRef
@@ -144,11 +145,9 @@
{{- end -}}
{{- $_ := set $volsyncData "customCA" (dict "name" $CAsecretName "key" $customCASecretRef.key) -}}
{{- end -}}
{{- else if $credentials.customCA -}}
{{/* Create Custom CA Secret for VolSync */}}
{{/* Create Custom CA Secret for VolSync
* NOTE: This is deprecated in favour of `$credentials.customCASecretRef` and should be removed in the next major release */}}
{{- if $credentials.customCA -}}
{{- $volsyncCASecretName := printf "%s-volsync-ca-%s" (include "tc.v1.common.lib.chart.names.fullname" $ ) $volsync.credentials -}}
{{- $volsyncCAKey := "ca.crt" -}}

View File

@@ -111,6 +111,13 @@ credentials:
Reference a secret containing a custom CA to be used when connecting to the
endpoint defined by `url` over HTTPS.
:::note
Defining both this and [customCA](/common/credentials#customca) is invalid and
will result in an error.
:::
| | |
| ---------- | ------------------------------------------------------------- |
| Key | `credentials.$name.customCASecretRef` |
@@ -202,11 +209,10 @@ credentials:
Define a custom CA certificate to be used when connecting to the endpoint
defined by `url` over HTTPS.
:::warning
:::note
**DEPRECATED**
Use [customCASecretRef](/common/credentials#customcasecretref) instead.
Defining both this and [customCASecretRef](/common/credentials#customcasecretref)
is invalid and will result in an error.
:::