Skip to content

Commit

Permalink
Remove k8s-libsonnet extensions patch in >= 1.22 (jsonnet-libs#152)
Browse files Browse the repository at this point in the history
The extensions/v1beta1 API was removed in Kubernetes v1.22. The patch
that adds documentation for that API shouldn't be applied if the API
doesn't exist.

Fixes jsonnet-libs#132.
  • Loading branch information
jtdoepke authored Apr 20, 2022
1 parent 99bff76 commit 5c6392a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/k8s/custom/core/apps.libsonnet
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local d = import 'doc-util/main.libsonnet';
local gen = import '../gen.libsonnet';

local patch = {
daemonSet+: {
Expand Down Expand Up @@ -72,8 +73,8 @@ local patch = {
};

{
extensions+: { // old, remove asap
v1beta1+: patch,
[if std.objectHas(gen, 'extensions') then 'extensions']+: { // This was removed in v1.22
[if std.objectHas(gen.extensions, 'v1beta1') then 'v1beta1']+: patch,
},
apps+: {
v1+: patch,
Expand Down

0 comments on commit 5c6392a

Please sign in to comment.