Skip to content

Commit

Permalink
[jsonnet] removed deprecated policy.v1beta1 (grafana#9978)
Browse files Browse the repository at this point in the history
**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](grafana@d10549e)

---------

Signed-off-by: Vladyslav Diachenko <vlad.diachenko@grafana.com>
  • Loading branch information
vlad-diachenko authored Jul 19, 2023
1 parent 78aad0b commit 28e9e15
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
12 changes: 12 additions & 0 deletions docs/sources/upgrading/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/common.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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() +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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() +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/multi-zone.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 28e9e15

Please sign in to comment.