Skip to content

Commit

Permalink
chore: bump ControlPlane default version to 3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Jun 12, 2024
1 parent f883540 commit 7ecb7b8
Show file tree
Hide file tree
Showing 12 changed files with 1,453 additions and 17 deletions.
16 changes: 16 additions & 0 deletions config/rbac/role/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ rules:
- get
- patch
- update
- apiGroups:
- configuration.konghq.com
resources:
- kongcustomentities
verbs:
- get
- list
- watch
- apiGroups:
- configuration.konghq.com
resources:
- kongcustomentities/status
verbs:
- get
- patch
- update
- apiGroups:
- configuration.konghq.com
resources:
Expand Down
5 changes: 3 additions & 2 deletions internal/versions/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
// and those tests create KIC's URLs for things like roles or CRDs.
// Since KIC only defines the full tags in its repo (as expected) we cannot use
// a partial version here, as it would not match KIC's tag.
DefaultControlPlaneVersion = "3.1.3" // renovate: datasource=docker depName=kong/kubernetes-ingress-controller
DefaultControlPlaneVersion = "3.2.0" // renovate: datasource=docker depName=kong/kubernetes-ingress-controller
)

// minimumControlPlaneVersion indicates the bare minimum version of the
Expand All @@ -34,7 +34,8 @@ var minimumControlPlaneVersion = semver.MustParse("3.1.2")
// the release 5.0, a new entry '">=5.0": "5.0"' should be added to this map, and the previous most
// updated entry should be limited to "<5.0".
var ManifestsVersionsForKICVersions = map[string]semver.Version{
">=3.1": semver.MustParse("3.1.3"),
">=3.2": semver.MustParse("3.2.0"),
">=3.1, <3.2": semver.MustParse("3.1.6"),
}

// IsControlPlaneImageVersionSupported is a helper intended to validate the
Expand Down
20 changes: 15 additions & 5 deletions pkg/utils/kubernetes/resources/clusterrole_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestClusterroleHelpers(t *testing.T) {
controlplane: "test_3.1.2",
image: "kong/kubernetes-ingress-controller:3.1.2",
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1("test_3.1.2")
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1_lt3_2("test_3.1.2")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
Expand All @@ -33,7 +33,7 @@ func TestClusterroleHelpers(t *testing.T) {
image: "kong/kubernetes-ingress-controller:3.1",
devMode: true,
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1("test_3.1_dev")
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_2("test_3.1_dev")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
Expand All @@ -48,7 +48,7 @@ func TestClusterroleHelpers(t *testing.T) {
image: "kong/kubernetes-ingress-controller:3.0.0",
devMode: true,
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1("test_3.0_dev")
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_2("test_3.0_dev")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
Expand All @@ -63,7 +63,7 @@ func TestClusterroleHelpers(t *testing.T) {
image: "kong/kubernetes-ingress-controller:1.0",
devMode: true,
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1("test_unsupported_dev")
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_2("test_unsupported_dev")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
Expand All @@ -78,7 +78,17 @@ func TestClusterroleHelpers(t *testing.T) {
image: "test/development:main",
devMode: true,
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_1("test_invalid_tag_dev")
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_2("test_invalid_tag_dev")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
},
{
controlplane: "cp-3-2-0",
image: "kong/kubernetes-ingress-controller:3.2.0",
devMode: false,
expectedClusterRole: func() *rbacv1.ClusterRole {
cr := clusterroles.GenerateNewClusterRoleForControlPlane_ge3_2("cp-3-2-0")
resources.LabelObjectAsControlPlaneManaged(cr)
return cr
},
Expand Down

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

Loading

0 comments on commit 7ecb7b8

Please sign in to comment.