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

Resolve conflict for "refactor(konnect): add SDK interface types and theirs mocks"(#507) #542

Merged
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
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ linters-settings:
alias: gwtypes

- pkg: github.com/Kong/sdk-konnect-go/models/components
alias: sdkkonnectgocomp
alias: sdkkonnectcomp
- pkg: github.com/Kong/sdk-konnect-go/models/operations
alias: sdkkonnectgoops
alias: sdkkonnectops
- pkg: github.com/Kong/sdk-konnect-go/models/sdkerrors
alias: sdkkonnectgoerrs
alias: sdkkonnecterrs
revive:
rules:
- name: errorf
Expand Down
2 changes: 1 addition & 1 deletion .tools_versions.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# renovate: datasource=github-tags depName=kubernetes/code-generator
code-generator: "0.31.0"
# renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools
controller-tools: "0.16.1"
controller-tools: "0.16.2"
# renovate: datasource=github-releases depName=kubernetes-sigs/kustomize
kustomize: "5.4.3"
# renovate: datasource=github-releases depName=golangci/golangci-lint
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
[#506](https://github.com/Kong/gateway-operator/pull/506)
- Add `KongConsumerGroup` reconciler for Konnect control planes.
[#510](https://github.com/Kong/gateway-operator/pull/510)
- Added command line flags to configure the certificate generator job's images.
[#516](https://github.com/Kong/gateway-operator/pull/516)
- Add `KongPluginBinding` reconciler for Konnect Plugins.
[#513](https://github.com/Kong/gateway-operator/pull/513)
[#535](https://github.com/Kong/gateway-operator/pull/535)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: aigateways.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: controlplanes.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: dataplanemetricsextensions.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: dataplanes.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: gatewayconfigurations.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: kongplugininstallations.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.1
controller-gen.kubebuilder.io/version: v0.16.2
name: dataplanes.gateway-operator.konghq.com
spec:
group: gateway-operator.konghq.com
Expand Down
134 changes: 68 additions & 66 deletions config/rbac/role/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,68 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- serviceaccounts
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps/status
- serviceaccounts/status
verbs:
- get
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- namespaces
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- patch
- update
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down Expand Up @@ -87,6 +149,7 @@ rules:
- kongcustomentities/status
- kongingresses/status
- konglicenses/status
- kongpluginbindings/status
- kongplugins/status
- kongservices/status
- kongupstreampolicies/status
Expand All @@ -100,18 +163,7 @@ rules:
- apiGroups:
- configuration.konghq.com
resources:
- kongplugins
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- configuration.konghq.com
resources:
- kongpluginbindings
- kongservices
verbs:
- get
Expand All @@ -120,9 +172,9 @@ rules:
- update
- watch
- apiGroups:
- coordination.k8s.io
- configuration.konghq.com
resources:
- leases
- kongplugins
verbs:
- create
- delete
Expand All @@ -132,11 +184,9 @@ rules:
- update
- watch
- apiGroups:
- ""
- coordination.k8s.io
resources:
- configmaps
- serviceaccounts
- services
- leases
verbs:
- create
- delete
Expand All @@ -145,54 +195,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps/status
- serviceaccounts/status
verbs:
- get
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- namespaces
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- patch
- update
- apiGroups:
- discovery.k8s.io
resources:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
containers:
- name: controller
# renovate: datasource=docker versioning=docker
image: kong/kubernetes-ingress-controller:3.2.4
image: kong/kubernetes-ingress-controller:3.3.1
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 3
Expand Down
2 changes: 1 addition & 1 deletion config/samples/gateway-httproute-allowedroutes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
containers:
- name: controller
# renovate: datasource=docker versioning=docker
image: kong/kubernetes-ingress-controller:3.2.4
image: kong/kubernetes-ingress-controller:3.3.1
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/gateway-httproute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ spec:
containers:
- name: controller
# renovate: datasource=docker versioning=docker
image: kong/kubernetes-ingress-controller:3.2.4
image: kong/kubernetes-ingress-controller:3.3.1
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
containers:
- name: controller
# renovate: datasource=docker versioning=docker
image: kong/kubernetes-ingress-controller:3.2.4
image: kong/kubernetes-ingress-controller:3.3.1
readinessProbe:
initialDelaySeconds: 1
periodSeconds: 1
Expand Down
64 changes: 64 additions & 0 deletions config/samples/konnect-kongpluginbinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
kind: KonnectAPIAuthConfiguration
apiVersion: konnect.konghq.com/v1alpha1
metadata:
name: demo-auth
namespace: default
spec:
type: token
token: kpat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
serverURL: eu.api.konghq.tech
---
kind: KonnectControlPlane
apiVersion: konnect.konghq.com/v1alpha1
metadata:
name: demo-cp
namespace: default
spec:
name: demo-cp
labels:
app: demo-cp
key1: demo-cp
konnect:
authRef:
name: demo-auth
# namespace not required if APIAuthConfiguration is in the same namespace
---
kind: KongService
apiVersion: configuration.konghq.com/v1alpha1
metadata:
name: service-1
namespace: default
spec:
name: service-1
host: example.com
controlPlaneRef:
type: konnectNamespacedRef
konnectNamespacedRef:
name: demo-cp
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rate-limit-5-min
config:
minute: 5
policy: local
plugin: rate-limiting
---
apiVersion: configuration.konghq.com/v1alpha1
kind: KongPluginBinding
metadata:
name: plugin-binding-kongservice
spec:
controlPlaneRef:
type: konnectNamespacedRef
konnectNamespacedRef:
name: demo-cp
pluginRef:
name: proxy-cache-all-endpoints
targets:
serviceRef:
name: service-1
kind: KongService
group: configuration.konghq.com
3 changes: 2 additions & 1 deletion controller/konnect/constraints/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ type SupportedKonnectEntityType interface {
configurationv1alpha1.KongService |
configurationv1alpha1.KongRoute |
configurationv1.KongConsumer |
configurationv1beta1.KongConsumerGroup
configurationv1beta1.KongConsumerGroup |
configurationv1alpha1.KongPluginBinding
// TODO: add other types

GetTypeName() string
Expand Down
Loading
Loading