Skip to content

Commit

Permalink
fix: make KongPluginBinding's spec.controlPlaneRef required (#238)
Browse files Browse the repository at this point in the history
* fix: make KongPluginBinding's spec.controlPlaneRef required

* address code review comments

* make cp ref non-pointer as it's required
  • Loading branch information
czeslavo authored Jan 21, 2025
1 parent b91b933 commit 8cc1c38
Show file tree
Hide file tree
Showing 47 changed files with 131 additions and 69 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ Adding a new version? You'll need three changes:
* Add the section header, like "## [v1.2.3]".
* Add the diff link, like "[v2.7.0]: https://github.com/kong/kubernetes-ingress-controller/compare/v1.2.2...v1.2.3".
--->
- [v1.1.0](#v110)
- [v1.0.6](#v106)
- [v1.0.5](#v105)
- [v1.0.4](#v104)
- [v1.0.3](#v103)
- [v1.0.2](#v102)
- [v1.0.0](#v100)

## Unreleased
## [v1.1.0]

[v1.1.0]: https://github.com/Kong/kubernetes-configuration/compare/v1.0.6...v1.1.0

### Changes

Expand All @@ -25,10 +28,13 @@ Adding a new version? You'll need three changes:
`targets` field. A new alternative is `GlobalInControlPlane` that will make the
plugin apply globally in a control plane.
[#236](https://github.com/Kong/kubernetes-configuration/pull/236)
- Make `KongPluginBinding`'s `spec.controlPlaneRef` field required as that's expected
by KGO.
[#238](https://github.com/Kong/kubernetes-configuration/pull/238)

## [v1.0.6]

[v1.0.6]: https://github.com/Kong/kubernetes-configuration/compare/v1.0.5...v1.0.6
[v1.0.6]: https://github.com/Kong/kubernetes-configuration/compare/v1.0.5...v1.0.6

### Changes

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v1.0.6
v1.1.0
latest
4 changes: 2 additions & 2 deletions api/configuration/v1alpha1/kongpluginbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ type KongPluginBindingSpec struct {
Targets *KongPluginBindingTargets `json:"targets,omitempty"`

// ControlPlaneRef is a reference to a ControlPlane this KongPluginBinding is associated with.
// +optional
ControlPlaneRef *ControlPlaneRef `json:"controlPlaneRef,omitempty"`
// +kubebuilder:validation:Required
ControlPlaneRef ControlPlaneRef `json:"controlPlaneRef"`

// Scope defines the scope of the plugin binding.
// +optional
Expand Down
6 changes: 1 addition & 5 deletions api/configuration/v1alpha1/zz_generated.deepcopy.go

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

8 changes: 6 additions & 2 deletions api/configuration/v1alpha1/zz_generated_funcs.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcacertificates.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcertificates.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: ingress-controller,gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongconsumergroups.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: ingress-controller,gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongconsumers.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcredentialacls.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcredentialapikeys.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcredentialbasicauths.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcredentialhmacs.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongcredentialjwts.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongdataplaneclientcertificates.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongkeys.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongkeysets.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: ingress-controller,gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: konglicenses.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongpluginbindings.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down Expand Up @@ -281,6 +281,7 @@ spec:
? (!has(self.routeRef) || self.routeRef.kind == ''KongRoute'')
: true'
required:
- controlPlaneRef
- pluginRef
type: object
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: ingress-controller,gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongplugins.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongroutes.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongservices.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongsnis.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongtargets.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongupstreams.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
kubernetes-configuration.konghq.com/channels: ingress-controller,gateway-operator
kubernetes-configuration.konghq.com/version: v1.0.6
kubernetes-configuration.konghq.com/version: v1.1.0
name: kongvaults.configuration.konghq.com
spec:
group: configuration.konghq.com
Expand Down

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading

0 comments on commit 8cc1c38

Please sign in to comment.