From e5284d563b635628aa5650b827e16a2e15063b4e Mon Sep 17 00:00:00 2001 From: levan-m <116471169+levan-m@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:54:34 -0500 Subject: [PATCH] Add DatadogAgent v1alpha1 deprecation warning (#1332) * Add DatadogAgent v1alpha1 deprecation warning * Update charts/datadog-operator/templates/NOTES.txt Co-authored-by: Celene * Update charts/datadog-operator/templates/NOTES.txt Co-authored-by: Celene * Update charts/datadog-operator/templates/NOTES.txt Co-authored-by: Celene --------- Co-authored-by: Celene --- charts/datadog-operator/CHANGELOG.md | 4 ++++ charts/datadog-operator/templates/NOTES.txt | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/charts/datadog-operator/CHANGELOG.md b/charts/datadog-operator/CHANGELOG.md index 32d28b7aa..eb566f658 100644 --- a/charts/datadog-operator/CHANGELOG.md +++ b/charts/datadog-operator/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.5.2 + +* Add deprecation warning for `DatadogAgent` `v1alpha1` CRD version. + ## 1.5.1 * Add configuration for Operator flag `introspectionEnabled`: this parameter is used to enable the Introspection. It is disabled by default. diff --git a/charts/datadog-operator/templates/NOTES.txt b/charts/datadog-operator/templates/NOTES.txt index 85723cecb..a6fea9c5d 100644 --- a/charts/datadog-operator/templates/NOTES.txt +++ b/charts/datadog-operator/templates/NOTES.txt @@ -40,6 +40,22 @@ The maximumGoroutines parameter isn't supported by the Operator 1.0.0-rc.12 and Setting a value will not change the default defined in the Operator. {{- end }} {{- end }} + +{{- if (semverCompare ">=1.0.0" .Values.image.tag) }} + {{- if .Values.datadogCRDs.migration.datadogAgents.conversionWebhook.enabled }} +############################################################################## +#### WARNING: v1alpha1 and conversion webhook deprecation. #### +############################################################################## + +DatadogAgent v1alpha1 reconciliation in the Operator is deprecated since v1.2.0+ and will be removed in v1.7.0. +Once removed, the Datadog Operator cannot be configured to reconcile the v1alpha1 DatadogAgent CRD. +However, you will still be able to apply a v1alpha1 manifest with the conversion webhook enabled (using `datadogCRDs.migration.datadogAgents.conversionWebhook.enabled`). +DatadogAgent v1alpha1 and the conversion webhook will be removed in v1.8.0. +See the migration page for instructions on migrating to v2alpha1: https://docs.datadoghq.com/containers/guide/datadogoperator_migration/ + {{- end }} +{{- end }} + + {{- if not (and (semverCompare ">=1.0.0-0" .Values.image.tag) (eq .Values.datadogCRDs.migration.datadogAgents.version "v2alpha1")) }} {{- fail "The Datadog Operator `1.0.0` reconciles `DatadogAgent` versions `v2alpha1`. Using an old version of the Datadog Operator (< 1.0.0) with the new version of the DatadogAgent Customer Resource, or the Datadog Operator `1.X` with the `v1alpha1` as stored version of the DatadogAgent is not supported. If you are using a DatadogAgent `v1alpha1`, refer to the Migration Steps: https://github.com/DataDog/helm-charts/blob/main/charts/datadog-operator/README.md#migrating-to-the-version-10-of-the-datadog-operator."}} {{- end }}