Skip to content

Commit

Permalink
Add DatadogAgent v1alpha1 deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
levan-m committed Feb 23, 2024
1 parent 0b71eb1 commit e3fcb0c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 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.1

* Add deprecation warning for `DatadogAgent` `v1alpha1` CRD version.

## 1.5.0

* Update Datadog Operator version to 1.4.0.
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: datadog-operator
version: 1.5.0
version: 1.5.1
appVersion: 1.4.0
description: Datadog Operator
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog Operator

![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![AppVersion: 1.4.0](https://img.shields.io/badge/AppVersion-1.4.0-informational?style=flat-square)
![Version: 1.5.1](https://img.shields.io/badge/Version-1.5.1-informational?style=flat-square) ![AppVersion: 1.4.0](https://img.shields.io/badge/AppVersion-1.4.0-informational?style=flat-square)

## Values

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. ####
##############################################################################

The 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 e3fcb0c

Please sign in to comment.