From 0ae9053923823b973e9587c3c70ccffdbb1f74a6 Mon Sep 17 00:00:00 2001 From: "Wang, Shu" Date: Thu, 23 Dec 2021 09:13:24 +0800 Subject: [PATCH] Update api version of PodDisruptionBudget to get rid of warning message --- charts/datadog-operator/CHANGELOG.md | 4 ++++ charts/datadog-operator/Chart.yaml | 2 +- charts/datadog-operator/README.md | 2 +- charts/datadog-operator/templates/pod_disruption_budget.yaml | 4 ++++ charts/datadog/CHANGELOG.md | 4 ++++ charts/datadog/Chart.yaml | 2 +- charts/datadog/README.md | 2 +- charts/datadog/templates/agent-clusterchecks-pdb.yaml | 4 ++++ charts/datadog/templates/cluster-agent-pdb.yaml | 4 ++++ 9 files changed, 24 insertions(+), 4 deletions(-) diff --git a/charts/datadog-operator/CHANGELOG.md b/charts/datadog-operator/CHANGELOG.md index cdca72045..74be63156 100644 --- a/charts/datadog-operator/CHANGELOG.md +++ b/charts/datadog-operator/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.7.7 + +* Update `PodDisruptionBudget` api version to get rid of `policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget` warning. + ## 0.7.6 * Nothing diff --git a/charts/datadog-operator/Chart.yaml b/charts/datadog-operator/Chart.yaml index 5ce7e6c81..6269ce577 100644 --- a/charts/datadog-operator/Chart.yaml +++ b/charts/datadog-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: datadog-operator -version: 0.7.6 +version: 0.7.7 appVersion: 0.7.2 description: Datadog Operator keywords: diff --git a/charts/datadog-operator/README.md b/charts/datadog-operator/README.md index 1bc6a4cb1..b2b25ebe1 100644 --- a/charts/datadog-operator/README.md +++ b/charts/datadog-operator/README.md @@ -1,6 +1,6 @@ # Datadog Operator -![Version: 0.7.6](https://img.shields.io/badge/Version-0.7.6-informational?style=flat-square) ![AppVersion: 0.7.2](https://img.shields.io/badge/AppVersion-0.7.2-informational?style=flat-square) +![Version: 0.7.7](https://img.shields.io/badge/Version-0.7.7-informational?style=flat-square) ![AppVersion: 0.7.2](https://img.shields.io/badge/AppVersion-0.7.2-informational?style=flat-square) ## Values diff --git a/charts/datadog-operator/templates/pod_disruption_budget.yaml b/charts/datadog-operator/templates/pod_disruption_budget.yaml index b7a9580bd..5f969b212 100644 --- a/charts/datadog-operator/templates/pod_disruption_budget.yaml +++ b/charts/datadog-operator/templates/pod_disruption_budget.yaml @@ -1,5 +1,9 @@ {{- if gt .Values.replicaCount 1.0 -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" }} +apiVersion: policy/v1 +{{- else }} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ include "datadog-operator.fullname" . }} diff --git a/charts/datadog/CHANGELOG.md b/charts/datadog/CHANGELOG.md index cace01d96..0a05f7e2c 100644 --- a/charts/datadog/CHANGELOG.md +++ b/charts/datadog/CHANGELOG.md @@ -1,5 +1,9 @@ # Datadog changelog +## 2.28.6 + +* Update `PodDisruptionBudget` api version to get rid of `policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget` warning. + ## 2.28.5 * Default Datadog Agent image to `7.32.4`. diff --git a/charts/datadog/Chart.yaml b/charts/datadog/Chart.yaml index 631ffadae..aa39223c1 100644 --- a/charts/datadog/Chart.yaml +++ b/charts/datadog/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: datadog -version: 2.28.5 +version: 2.28.6 appVersion: "7" description: Datadog Agent keywords: diff --git a/charts/datadog/README.md b/charts/datadog/README.md index 702601b5f..d19496251 100644 --- a/charts/datadog/README.md +++ b/charts/datadog/README.md @@ -1,6 +1,6 @@ # Datadog -![Version: 2.28.5](https://img.shields.io/badge/Version-2.28.5-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square) +![Version: 2.28.6](https://img.shields.io/badge/Version-2.28.6-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square) [Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/). diff --git a/charts/datadog/templates/agent-clusterchecks-pdb.yaml b/charts/datadog/templates/agent-clusterchecks-pdb.yaml index 3482308c6..6562f96c6 100644 --- a/charts/datadog/templates/agent-clusterchecks-pdb.yaml +++ b/charts/datadog/templates/agent-clusterchecks-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.clusterChecksRunner.createPodDisruptionBudget -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" }} +apiVersion: policy/v1 +{{- else }} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ template "datadog.fullname" . }}-clusterchecks diff --git a/charts/datadog/templates/cluster-agent-pdb.yaml b/charts/datadog/templates/cluster-agent-pdb.yaml index 774aabe83..503ba71ac 100644 --- a/charts/datadog/templates/cluster-agent-pdb.yaml +++ b/charts/datadog/templates/cluster-agent-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.clusterAgent.createPodDisruptionBudget -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" }} +apiVersion: policy/v1 +{{- else }} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ template "datadog.fullname" . }}-cluster-agent