Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
- Bump solution-operator-lib Go version to 1.24
(PR[#4817](https://github.com/scality/metalk8s/pull/4817))

- Bump prometheus-adapter chart version to [5.3.0](https://github.com/prometheus-community/helm-charts/releases/tag/prometheus-adapter-5.3.0)
(PR[#4825](https://github.com/scality/metalk8s/pull/4825))

### Bug Fixes

- Fix a bug where part of the upgrade process would silently be skipped
Expand Down
3 changes: 2 additions & 1 deletion charts/prometheus-adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
appVersion: v0.12.0
description: A Helm chart for k8s prometheus adapter
home: https://github.com/kubernetes-sigs/prometheus-adapter
icon: https://raw.githubusercontent.com/cncf/artwork/master/prometheus/icon/color/prometheus-icon-color.svg
keywords:
- hpa
- metrics
Expand All @@ -20,4 +21,4 @@ name: prometheus-adapter
sources:
- https://github.com/kubernetes/charts
- https://github.com/kubernetes-sigs/prometheus-adapter
version: 4.14.1
version: 5.3.0
34 changes: 19 additions & 15 deletions charts/prometheus-adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ Installs the [Prometheus Adapter](https://github.com/kubernetes-sigs/prometheus-

## Prerequisites

Kubernetes 1.14+
Kubernetes 1.21+

## Get Helm Repositories Info
## Usage

```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
```
The chart is distributed as an [OCI Artifact](https://helm.sh/docs/topics/registries/) as well as via a traditional [Helm Repository](https://helm.sh/docs/topics/chart_repository/).

- OCI Artifact: `oci://ghcr.io/prometheus-community/charts/prometheus-adapter`
- Helm Repository: `https://prometheus-community.github.io/helm-charts` with chart `prometheus-adapter`

_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository.

## Install Helm Chart
### Install Helm Chart

```console
helm install [RELEASE_NAME] prometheus-community/prometheus-adapter
helm install [RELEASE_NAME] oci://ghcr.io/prometheus-community/charts/prometheus-adapter
```

_See [configuration](#configuration) below._

_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._

## Uninstall Helm Chart
### Uninstall Helm Chart

```console
helm uninstall [RELEASE_NAME]
Expand All @@ -35,23 +35,27 @@ This removes all the Kubernetes components associated with the chart and deletes

_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._

## Upgrading Helm Chart
### Upgrading Helm Chart

```console
helm upgrade [RELEASE_NAME] [CHART] --install
```

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

### To 4.2.0
### To 5.0.0

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.

#### To 4.2.0

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

### To 4.0.0
#### To 4.0.0

Previously, security context of the container was set directly in the deployment template. This release makes it configurable through the new configuration variable `securityContext` whilst keeping the previously set values as defaults. Furthermore, previous variable `runAsUser` is now set in `securityContext` and is not used any longer. Please, use `securityContext.runAsUser` instead. In the same security context, `seccompProfile` has been enabled and set to type `RuntimeDefault`.

### To 3.0.0
#### To 3.0.0

Due to a change in deployment labels, the upgrade requires `helm upgrade --force` in order to re-create the deployment.

Expand All @@ -60,7 +64,7 @@ Due to a change in deployment labels, the upgrade requires `helm upgrade --force
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](./values.yaml), or run these configuration commands:

```console
helm show values prometheus-community/prometheus-adapter
helm show values oci://ghcr.io/prometheus-community/charts/prometheus-adapter
```

### Prometheus Service Endpoint
Expand Down
9 changes: 0 additions & 9 deletions charts/prometheus-adapter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,3 @@ Create the name of the service account to use
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/* Get Policy API Version */}}
{{- define "k8s-prometheus-adapter.pdb.apiVersion" -}}
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
1 change: 1 addition & 0 deletions charts/prometheus-adapter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ metadata:
namespace: {{ include "k8s-prometheus-adapter.namespace" . }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
strategy: {{ toYaml .Values.strategy | nindent 4 }}
selector:
matchLabels:
Expand Down
19 changes: 12 additions & 7 deletions charts/prometheus-adapter/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: {{ include "k8s-prometheus-adapter.pdb.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "k8s-prometheus-adapter.fullname" . }}
Expand All @@ -11,12 +11,17 @@ metadata:
labels:
{{- include "k8s-prometheus-adapter.labels" . | indent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- with .Values.podDisruptionBudget }}
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
{{- end }}
{{- if .maxUnavailable }}
maxUnavailable: {{ .maxUnavailable }}
{{- end }}
{{- if .unhealthyPodEvictionPolicy }}
unhealthyPodEvictionPolicy: {{ .unhealthyPodEvictionPolicy }}
{{- end }}
{{- end }}
selector:
matchLabels:
{{- include "k8s-prometheus-adapter.selectorLabels" . | indent 6 }}
Expand Down
66 changes: 0 additions & 66 deletions charts/prometheus-adapter/templates/psp.yaml

This file was deleted.

20 changes: 11 additions & 9 deletions charts/prometheus-adapter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ affinity: {}

topologySpreadConstraints: []

# Override the name of the chart
nameOverride: ""

# Override the full name of the release
fullnameOverride: ""

image:
repository: registry.k8s.io/prometheus-adapter/prometheus-adapter
# if not set appVersion field from Chart.yaml is used
Expand Down Expand Up @@ -67,15 +73,6 @@ rbac:
customMetrics:
resources: ["*"]

psp:
# Specifies whether PSP resources should be created
create: false
# Annotations added to the pod security policy
annotations: {}
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl

# If false then the user will opt out of automounting API credentials.
automountServiceAccountToken: true

Expand Down Expand Up @@ -292,6 +289,8 @@ podDisruptionBudget:
enabled: false
minAvailable:
maxUnavailable: 1
# See https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy for possible values
unhealthyPodEvictionPolicy:

certManager:
enabled: false
Expand All @@ -312,3 +311,6 @@ extraManifests: []
# name: prometheus-extra
# data:
# extra-data: "value"

# Optional: set revisionHistoryLimit for the Deployment
revisionHistoryLimit: 10
Loading
Loading