Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update API/KIND version #5793

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions api/krusty/namespaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ metadata:
`)

th.WriteF("clusterrolebinding.yaml", `
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
Expand All @@ -781,7 +781,7 @@ resources:

m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: iter8-prometheus
Expand Down
10 changes: 5 additions & 5 deletions api/krusty/openapicustomschema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func TestCustomOpenApiFieldBothPathAndVersion(t *testing.T) {
resources:
- mycrd.yaml
openapi:
version: v1.21.2
version: v1.30.4
path: mycrd_schema.json
`+customSchemaPatch)
writeCustomResource(th, "mycrd.yaml")
Expand Down Expand Up @@ -399,7 +399,7 @@ openapi:
resources:
- ../base
openapi:
version: v1.21.2
version: v1.30.4
`+customSchemaPatch)
writeCustomResource(th, "base/mycrd.yaml")
writeTestSchema(th, "base/")
Expand All @@ -416,7 +416,7 @@ spec:
- image: nginx
name: server
`)
assert.Equal(t, "v1.21.2", openapi.GetSchemaVersion())
assert.Equal(t, "v1.30.4", openapi.GetSchemaVersion())
})
}

Expand Down Expand Up @@ -547,7 +547,7 @@ func TestCustomOpenApiFieldVersion(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th.WriteK(".", `
openapi:
version: v1.21.2
version: v1.30.4
resources:
- deployment.yaml
`)
Expand Down Expand Up @@ -575,7 +575,7 @@ spec:
containers:
- image: whatever
`)
assert.Equal(t, "v1.21.2", openapi.GetSchemaVersion())
assert.Equal(t, "v1.30.4", openapi.GetSchemaVersion())
})
}

Expand Down
9 changes: 6 additions & 3 deletions api/krusty/remoteloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ cp -r testdata/remoteload/simple $ROOT/simple.git
(
cd $ROOT/simple.git
git config --global protocol.file.allow always
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
git checkout -b change-image
Expand All @@ -89,15 +90,17 @@ cp -r $ROOT/simple.git $ROOT/nosuffix
cp -r testdata/remoteload/multibase $ROOT/multibase.git
(
cd $ROOT/multibase.git
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
)
cp -r testdata/remoteload/with-submodule $ROOT/with-submodule.git # see README
cp -r $ROOT/simple.git/. $ROOT/$HASH_DIR
(
cd $ROOT/with-submodule.git
git init --initial-branch=main
git init
git checkout -b main
git add .
git commit -m "import"
git checkout -b relative-submodule
Expand Down
4 changes: 2 additions & 2 deletions kyaml/openapi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ MYGOBIN = $(shell go env GOBIN)
ifeq ($(MYGOBIN),)
MYGOBIN = $(shell go env GOPATH)/bin
endif
KIND_VERSION := "v0.11.1"
API_VERSION ?= "v1.21.2"
KIND_VERSION := "v0.24.0"
API_VERSION ?= "v1.30.4"

.PHONY: all
all: \
Expand Down
2 changes: 1 addition & 1 deletion kyaml/openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ make nuke

### Choose the new version to use

The compiled-in schema version should maximize API availability with respect to all actively supported Kubernetes versions. For example, while 1.20, 1.21 and 1.22 are the actively supported versions, 1.21 is the best choice. This is because 1.21 introduces at least one new API and does not remove any, while 1.22 removes a large set of long-deprecated APIs that are still supported in 1.20/1.21.
The compiled-in schema version should maximize API availability across all actively supported Kubernetes versions. For this purpose, a version like v1.30.4 is ideal, as it maintains compatibility with older versions while also providing access to new features. In contrast, v1.31.0 introduces breaking changes, making v1.30.4 appear more stable and reliable for ensuring compatibility and API availability.

### Generating additional schema

Expand Down
2 changes: 1 addition & 1 deletion kyaml/openapi/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Example_arrayReplace() {
fmt.Println(f.PatchStrategyAndKey()) // no patch strategy or merge key

// Output:
// Arguments to the entrypoint. The docker image's CMD is used if this is...
// Arguments to the entrypoint. The container image's CMD is used if this...
// [array]
}

Expand Down
8 changes: 4 additions & 4 deletions kyaml/openapi/kubernetesapi/openapiinfo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

249 changes: 0 additions & 249 deletions kyaml/openapi/kubernetesapi/v1_21_2/swagger.go

This file was deleted.

44,195 changes: 0 additions & 44,195 deletions kyaml/openapi/kubernetesapi/v1_21_2/swagger.pb

This file was deleted.

249 changes: 249 additions & 0 deletions kyaml/openapi/kubernetesapi/v1_30_4/swagger.go

Large diffs are not rendered by default.

Loading