Skip to content

Commit fd92be6

Browse files
[prometheus-adapter] remove support for deprecated APIs (#5809)
Signed-off-by: drfaust92 <[email protected]> Signed-off-by: Ilia Lazebnik <[email protected]> Co-authored-by: Steven Sheehy <[email protected]>
1 parent 3489987 commit fd92be6

File tree

6 files changed

+7
-87
lines changed

6 files changed

+7
-87
lines changed

charts/prometheus-adapter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
22
name: prometheus-adapter
3-
version: 4.14.2
3+
version: 5.0.0
44
appVersion: v0.12.0
55
description: A Helm chart for k8s prometheus adapter
66
home: https://github.com/kubernetes-sigs/prometheus-adapter

charts/prometheus-adapter/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Installs the [Prometheus Adapter](https://github.com/kubernetes-sigs/prometheus-
44

55
## Prerequisites
66

7-
Kubernetes 1.14+
7+
Kubernetes 1.21+
88

99
## Usage
1010

@@ -43,6 +43,10 @@ helm upgrade [RELEASE_NAME] [CHART] --install
4343

4444
_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._
4545

46+
### To 5.0.0
47+
48+
This version removes support for the deprecated Kubernetes API `policy/v1beta1` for PodDisruptionBudgets. It also removes the deprecated `PodSecurityPolicy` resource. Minimum Kubernetes version >= 1.21 is now required.
49+
4650
#### To 4.2.0
4751

4852
Readiness and liveness probes are now fully configurable through values `readinessProbe` and `livenessProbe`. The previous values have been kept as defaults.

charts/prometheus-adapter/templates/_helpers.tpl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,3 @@ Create the name of the service account to use
7373
{{ default "default" .Values.serviceAccount.name }}
7474
{{- end -}}
7575
{{- end -}}
76-
77-
{{/* Get Policy API Version */}}
78-
{{- define "k8s-prometheus-adapter.pdb.apiVersion" -}}
79-
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
80-
{{- print "policy/v1" -}}
81-
{{- else -}}
82-
{{- print "policy/v1beta1" -}}
83-
{{- end -}}
84-
{{- end -}}

charts/prometheus-adapter/templates/pdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.podDisruptionBudget.enabled }}
2-
apiVersion: {{ include "k8s-prometheus-adapter.pdb.apiVersion" . }}
2+
apiVersion: policy/v1
33
kind: PodDisruptionBudget
44
metadata:
55
name: {{ template "k8s-prometheus-adapter.fullname" . }}

charts/prometheus-adapter/templates/psp.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

charts/prometheus-adapter/values.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,6 @@ rbac:
6767
customMetrics:
6868
resources: ["*"]
6969

70-
psp:
71-
# Specifies whether PSP resources should be created
72-
create: false
73-
# Annotations added to the pod security policy
74-
annotations: {}
75-
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
76-
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
77-
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
78-
7970
# If false then the user will opt out of automounting API credentials.
8071
automountServiceAccountToken: true
8172

0 commit comments

Comments
 (0)