Skip to content

Commit

Permalink
Add DatadogAgent v1alpha1 deprecation warning (#1332)
Browse files Browse the repository at this point in the history
* Add DatadogAgent v1alpha1 deprecation warning

* Update charts/datadog-operator/templates/NOTES.txt

Co-authored-by: Celene <celene@datadoghq.com>

* Update charts/datadog-operator/templates/NOTES.txt

Co-authored-by: Celene <celene@datadoghq.com>

* Update charts/datadog-operator/templates/NOTES.txt

Co-authored-by: Celene <celene@datadoghq.com>

---------

Co-authored-by: Celene <celene@datadoghq.com>
  • Loading branch information
levan-m and celenechang authored Feb 29, 2024
1 parent fde0bcd commit e5284d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/datadog-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 16 additions & 0 deletions charts/datadog-operator/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit e5284d5

Please sign in to comment.