Skip to content

Commit

Permalink
Bump KSM chart version to use rbac.authorization.k8s.io/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
L3n41c committed Mar 15, 2021
1 parent 667059f commit 4638074
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/ct.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
chart-repos:
- stable=https://charts.helm.sh/stable
- datadog=https://helm.datadoghq.com
- kube-state-metrics=https://kubernetes.github.io/kube-state-metrics
helm-extra-args: --timeout 300s
check-version-increment: true
debug: true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Add default helm repo
run: helm repo add stable https://charts.helm.sh/stable && helm repo update
- name: Add datadog helm repo
run: helm repo add datadog https://helm.datadoghq.com && helm repo update
- name: Add KSM helm repo
run: helm repo add kube-state-metrics https://kubernetes.github.io/kube-state-metrics
- name: Run kubeval
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
git config user.email "[email protected]"
- name: Add repo
run: |
helm repo add stable https://charts.helm.sh/stable
helm repo add datadog https://helm.datadoghq.com
helm repo add kube-state-metrics https://kubernetes.github.io/kube-state-metrics
- name: Run chart-releaser
uses: helm/[email protected]
env:
Expand Down
4 changes: 4 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 2.10.3

* Bump version of KSM chart to get rid of `rbac.authorization.k8s.io/v1beta1 ClusterRole is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1` warnings

## 2.10.2

* Use an EmptyDir volume shared between all the agents for logs so that `agent flare` can gather the logs of all of them.
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.10.2
version: 2.10.3
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
4 changes: 2 additions & 2 deletions charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 2.10.2](https://img.shields.io/badge/Version-2.10.2-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 2.10.3](https://img.shields.io/badge/Version-2.10.3-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/kubernetes/charts/tree/master/stable/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/).

Expand Down Expand Up @@ -28,8 +28,8 @@ Kubernetes 1.10+ or OpenShift 3.10+, note that:

| Repository | Name | Version |
|------------|------|---------|
| https://charts.helm.sh/stable | kube-state-metrics | =2.8.11 |
| https://helm.datadoghq.com | datadog-crds | =0.1.1 |
| https://kubernetes.github.io/kube-state-metrics | kube-state-metrics | =2.13.0 |

## Quick start

Expand Down
8 changes: 4 additions & 4 deletions charts/datadog/requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies:
repository: https://helm.datadoghq.com
version: 0.1.1
- name: kube-state-metrics
repository: https://charts.helm.sh/stable
version: 2.8.11
digest: sha256:35c5ec4a7c5610cf2ff63bcd609293f8d2f8ac4bbc6e07462b9d66251b81b069
generated: "2020-11-16T14:56:38.28858+01:00"
repository: https://kubernetes.github.io/kube-state-metrics
version: 2.13.0
digest: sha256:b827463203e4d1ee45fb1f7f4aec3f24b4115da73fd106ddfee5fa100b3572b3
generated: "2021-03-15T15:58:44.189206+01:00"
4 changes: 2 additions & 2 deletions charts/datadog/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ dependencies:
tags:
- install-crds
- name: kube-state-metrics
version: "=2.8.11"
repository: https://charts.helm.sh/stable
version: "=2.13.0"
repository: https://kubernetes.github.io/kube-state-metrics
condition: datadog.kubeStateMetricsEnabled
18 changes: 18 additions & 0 deletions charts/datadog/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,21 @@ Ref: https://kubernetes.io/docs/concepts/services-networking/service-topology/

{{- end }}
{{- end }}

{{- if and (not (.Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1")) .Values.datadog.kubeStateMetricsEnabled }}

########################################################################################
#### WARNING: latest version of kube-state-metrics isn’t supported on your cluster ####
########################################################################################

datadog.kubeStateMetricsEnabled is true, meaning that KSM is required.

The target Kubernetes cluster {{ .Capabilities.KubeVersion }} doesn’t support API "rbac.authorization.k8s.io/v1"
which is used by KSM.

The recommended way to go forward is to disable KSM deployment from the datadog chart and to manually deploy an older version of KSM.
The last version of the KSM chart using "rbac.authorization.k8s.io/v1beta1" is 2.9.1 which can be installed with:

helm install ksm https://charts.helm.sh/stable/packages/kube-state-metrics-2.9.1.tgz

{{- end }}
2 changes: 1 addition & 1 deletion charts/datadog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Return secret name to be used based on provided values.
Return the appropriate apiVersion for RBAC APIs.
*/}}
{{- define "rbac.apiVersion" -}}
{{- if semverCompare "^1.8-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1" -}}
"rbac.authorization.k8s.io/v1"
{{- else -}}
"rbac.authorization.k8s.io/v1beta1"
Expand Down

0 comments on commit 4638074

Please sign in to comment.