From 28e9e15639347b4b44189f95d7ebd74d8885b715 Mon Sep 17 00:00:00 2001 From: Vladyslav Diachenko <82767850+vlad-diachenko@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:20:00 +0300 Subject: [PATCH] [jsonnet] removed deprecated policy.v1beta1 (#9978) **What this PR does / why we need it**: in k8s version 1.25 some k8s APIs are deprecated, such as policy.v1beta1 which is moved to policy.v1 **Checklist** - [ ] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [ ] Tests updated - [x] `CHANGELOG.md` updated - [ ] If the change is worth mentioning in the release notes, add `add-to-release-notes` label - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) --------- Signed-off-by: Vladyslav Diachenko --- CHANGELOG.md | 1 + docs/sources/upgrading/_index.md | 12 ++++++++++++ production/ksonnet/loki/common.libsonnet | 2 +- production/ksonnet/loki/ingester.libsonnet | 2 +- production/ksonnet/loki/multi-zone.libsonnet | 2 +- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e5c182436bd..af9c5787b023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,6 +113,7 @@ * [9790](https://github.com/grafana/loki/pull/9790) **manohar-koukuntla**: Add TSDB equivalent of `use_boltdb_shipper` flag to be able to configure `tsdb_shipper` section. * [8855](https://github.com/grafana/loki/pull/8855) **JoaoBraveCoding**: Add gRPC port to loki compactor mixin * [8880](https://github.com/grafana/loki/pull/8880) **JoaoBraveCoding**: Normalize headless service name for query-frontend/scheduler +* [9978](https://github.com/grafana/loki/pull/9978) ****vlad-diachenko****: replaced deprecated `policy.v1beta1` with `policy.v1`. ## 2.8.2 (2023-05-03) diff --git a/docs/sources/upgrading/_index.md b/docs/sources/upgrading/_index.md index 760d696ccd38..e8e66cff1daf 100644 --- a/docs/sources/upgrading/_index.md +++ b/docs/sources/upgrading/_index.md @@ -93,6 +93,18 @@ If you have a use-case that relies on strict parsing where you expect the parser logfmt parser doesn't include standalone keys(keys without a value) in the resulting label set anymore. You can use `--keep-empty` flag to retain them. +### Jsonnet + +##### Deprecated PodDisruptionBudget definition has been removed + +The `policy/v1beta1` API version of PodDisruptionBudget is no longer served as of Kubernetes v1.25. +To support the latest versions of the Kubernetes, it was necessary to replace `policy/v1beta1` with the new definition `policy/v1` that is available since v1.21. + +No impact is expected if you use Kubernetes v1.21 or newer. + +Please refer to [official migration guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125) for more details. + + ## 2.8.0 ### Loki diff --git a/production/ksonnet/loki/common.libsonnet b/production/ksonnet/loki/common.libsonnet index d9c0905f53b2..9cd5e9ab6c3e 100644 --- a/production/ksonnet/loki/common.libsonnet +++ b/production/ksonnet/loki/common.libsonnet @@ -48,7 +48,7 @@ local k = import 'ksonnet-util/kausal.libsonnet'; // functions for k8s objects newLokiPdb(deploymentName, maxUnavailable=1):: - local podDisruptionBudget = $.policy.v1beta1.podDisruptionBudget; + local podDisruptionBudget = $.policy.v1.podDisruptionBudget; local pdbName = '%s-pdb' % deploymentName; podDisruptionBudget.new() + diff --git a/production/ksonnet/loki/ingester.libsonnet b/production/ksonnet/loki/ingester.libsonnet index 3e6f51140f50..185ed55627d9 100644 --- a/production/ksonnet/loki/ingester.libsonnet +++ b/production/ksonnet/loki/ingester.libsonnet @@ -82,7 +82,7 @@ local k = import 'ksonnet-util/kausal.libsonnet'; else k.util.serviceFor($.ingester_statefulset, $._config.service_ignored_labels), - local podDisruptionBudget = k.policy.v1beta1.podDisruptionBudget, + local podDisruptionBudget = k.policy.v1.podDisruptionBudget, ingester_pdb: podDisruptionBudget.new() + diff --git a/production/ksonnet/loki/multi-zone.libsonnet b/production/ksonnet/loki/multi-zone.libsonnet index b2fc16c00831..83c132549fe1 100644 --- a/production/ksonnet/loki/multi-zone.libsonnet +++ b/production/ksonnet/loki/multi-zone.libsonnet @@ -2,7 +2,7 @@ local container = $.core.v1.container, local deployment = $.apps.v1.deployment, local statefulSet = $.apps.v1.statefulSet, - local podDisruptionBudget = $.policy.v1beta1.podDisruptionBudget, + local podDisruptionBudget = $.policy.v1.podDisruptionBudget, local volume = $.core.v1.volume, local roleBinding = $.rbac.v1.roleBinding, local role = $.rbac.v1.role,