Skip to content
Draft
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ Adding a new version? You'll need three changes:
To prevent import cycles, `v1alpha1` now imports required types from `v1alpha2`.
[#550](https://github.com/Kong/kubernetes-configuration/pull/550)

### Added

- Added optional `ingressClassName` pointer field to the following CRDs to allow association with a specific `IngressClass` and ingress controller:
- `KongConsumer` (v1, in KongConsumerSpec)
- `KongConsumerGroup` (v1beta1, in KongConsumerGroupSpec)
- `KongClusterPlugin` (v1)
- `KongVault` (v1alpha1, in KongVaultSpec)
- `KongCustomEntity` (v1alpha1, in KongCustomEntitySpec)

## [v2.0.0-alpha.3]

[v2.0.0-alpha.3]: https://github.com/Kong/kubernetes-configuration/compare/v2.0.0-alpha.0...v2.0.0-alpha.3
Expand Down
4 changes: 4 additions & 0 deletions api/configuration/v1/kongclusterplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ type KongClusterPlugin struct {
// same plugin in multiple contexts, for example, on multiple services.
InstanceName string `json:"instance_name,omitempty"`

// IngressClassName is the name of the IngressClass associated with this resource.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`

// Status represents the current status of the KongClusterPlugin resource.
Status KongClusterPluginStatus `json:"status,omitempty"`
}
Expand Down
4 changes: 4 additions & 0 deletions api/configuration/v1/kongconsumer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ type KongConsumerSpec struct {

// Tags is an optional set of tags applied to the consumer.
Tags commonv1alpha1.Tags `json:"tags,omitempty"`

// IngressClassName is the name of the IngressClass associated with this resource.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
}

// KongConsumerList contains a list of KongConsumer.
Expand Down
10 changes: 10 additions & 0 deletions api/configuration/v1/zz_generated.deepcopy.go

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

4 changes: 4 additions & 0 deletions api/configuration/v1alpha1/kong_custom_entity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ type KongCustomEntitySpec struct {
// Currently only KongPlugin/KongClusterPlugin allowed. This will make the custom entity to be attached
// to the entity(service/route/consumer) where the plugin is attached.
ParentRef *ObjectReference `json:"parentRef,omitempty"`

// IngressClassName is the name of the IngressClass associated with this resource.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
}

// ObjectReference defines reference of a kubernetes object.
Expand Down
4 changes: 4 additions & 0 deletions api/configuration/v1alpha1/kong_vault_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ type KongVaultSpec struct {
// +kubebuilder:validation:XValidation:message="'konnectID' type is not supported", rule="self.type != 'konnectID'"
// +optional
ControlPlaneRef *commonv1alpha1.ControlPlaneRef `json:"controlPlaneRef,omitempty"`

// IngressClassName is the name of the IngressClass associated with this resource.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
}

// KongVaultStatus represents the current status of the KongVault resource.
Expand Down
10 changes: 10 additions & 0 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.

4 changes: 4 additions & 0 deletions api/configuration/v1beta1/kongconsumergroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ type KongConsumerGroupSpec struct {

// Tags is an optional set of tags applied to the ConsumerGroup.
Tags commonv1alpha1.Tags `json:"tags,omitempty"`

// IngressClassName is the name of the IngressClass associated with this resource.
// +optional
IngressClassName *string `json:"ingressClassName,omitempty"`
}

// KongConsumerGroupList contains a list of KongConsumerGroups.
Expand Down
5 changes: 5 additions & 0 deletions api/configuration/v1beta1/zz_generated.deepcopy.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 @@ -123,6 +123,10 @@ spec:
rule: '!has(self.type) ? !has(self.konnectID) : true'
- message: when type is unset, konnectNamespacedRef must not be set
rule: '!has(self.type) ? !has(self.konnectNamespacedRef) : true'
ingressClassName:
description: IngressClassName is the name of the IngressClass associated
with this resource.
type: string
name:
description: Name is the name of the ConsumerGroup in Kong.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ spec:
rule: '!has(self.type) ? !has(self.konnectID) : true'
- message: when type is unset, konnectNamespacedRef must not be set
rule: '!has(self.type) ? !has(self.konnectNamespacedRef) : true'
ingressClassName:
description: IngressClassName is the name of the IngressClass associated
with this resource.
type: string
tags:
description: Tags is an optional set of tags applied to the consumer.
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ spec:
description:
description: Description is the additional information about the vault.
type: string
ingressClassName:
description: IngressClassName is the name of the IngressClass associated
with this resource.
type: string
prefix:
description: |-
Prefix is the prefix of vault URI for referencing values in the vault.
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.

5 changes: 5 additions & 0 deletions docs/all-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ KongClusterPlugin is the Schema for the kongclusterplugins API.
| `protocols` _[KongProtocol](#kongprotocol) array_ | Protocols configures plugin to run on requests received on specific protocols. |
| `ordering` _[PluginOrdering](#pluginordering)_ | Ordering overrides the normal plugin execution order. It's only available on Kong Enterprise. `<phase>` is a request processing phase (for example, `access` or `body_filter`) and `<plugin>` is the name of the plugin that will run before or after the KongPlugin. For example, a KongPlugin with `plugin: rate-limiting` and `before.access: ["key-auth"]` will create a rate limiting plugin that limits requests _before_ they are authenticated. |
| `instance_name` _string_ | InstanceName is an optional custom name to identify an instance of the plugin. This is useful when running the same plugin in multiple contexts, for example, on multiple services. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |



Expand Down Expand Up @@ -143,6 +144,7 @@ KongConsumerSpec defines the specification of the KongConsumer.
| --- | --- |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this Consumer is associated with. |
| `tags` _[Tags](#tags)_ | Tags is an optional set of tags applied to the consumer. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -968,6 +970,7 @@ KongCustomEntitySpec defines the specification of the KongCustomEntity.
| `fields` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#json-v1-apiextensions-k8s-io)_ | Fields defines the fields of the Kong entity itself. |
| `controllerName` _string_ | ControllerName specifies the controller that should reconcile it, like ingress class. |
| `parentRef` _[ObjectReference](#objectreference)_ | ParentRef references the kubernetes resource it attached to when its scope is "attached". Currently only KongPlugin/KongClusterPlugin allowed. This will make the custom entity to be attached to the entity(service/route/consumer) where the plugin is attached. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -1440,6 +1443,7 @@ KongVaultSpec defines specification of a custom Kong vault.
| `config` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#json-v1-apiextensions-k8s-io)_ | Config is the configuration of the vault. Varies for different backends. |
| `tags` _[Tags](#tags)_ | Tags are the tags associated to the vault for grouping and filtering. |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane this KongVault is associated with. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -1661,6 +1665,7 @@ KongConsumerGroupSpec defines the desired state of KongConsumerGroup.
| `name` _string_ | Name is the name of the ConsumerGroup in Kong. |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this ConsumerGroup is associated with. |
| `tags` _[Tags](#tags)_ | Tags is an optional set of tags applied to the ConsumerGroup. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down
5 changes: 5 additions & 0 deletions docs/configuration-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ KongClusterPlugin is the Schema for the kongclusterplugins API.
| `protocols` _[KongProtocol](#kongprotocol) array_ | Protocols configures plugin to run on requests received on specific protocols. |
| `ordering` _[PluginOrdering](#pluginordering)_ | Ordering overrides the normal plugin execution order. It's only available on Kong Enterprise. `<phase>` is a request processing phase (for example, `access` or `body_filter`) and `<plugin>` is the name of the plugin that will run before or after the KongPlugin. For example, a KongPlugin with `plugin: rate-limiting` and `before.access: ["key-auth"]` will create a rate limiting plugin that limits requests _before_ they are authenticated. |
| `instance_name` _string_ | InstanceName is an optional custom name to identify an instance of the plugin. This is useful when running the same plugin in multiple contexts, for example, on multiple services. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |



Expand Down Expand Up @@ -137,6 +138,7 @@ KongConsumerSpec defines the specification of the KongConsumer.
| --- | --- |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this Consumer is associated with. |
| `tags` _[Tags](#tags)_ | Tags is an optional set of tags applied to the consumer. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -946,6 +948,7 @@ KongCustomEntitySpec defines the specification of the KongCustomEntity.
| `fields` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#json-v1-apiextensions-k8s-io)_ | Fields defines the fields of the Kong entity itself. |
| `controllerName` _string_ | ControllerName specifies the controller that should reconcile it, like ingress class. |
| `parentRef` _[ObjectReference](#objectreference)_ | ParentRef references the kubernetes resource it attached to when its scope is "attached". Currently only KongPlugin/KongClusterPlugin allowed. This will make the custom entity to be attached to the entity(service/route/consumer) where the plugin is attached. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -1418,6 +1421,7 @@ KongVaultSpec defines specification of a custom Kong vault.
| `config` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.33/#json-v1-apiextensions-k8s-io)_ | Config is the configuration of the vault. Varies for different backends. |
| `tags` _[Tags](#tags)_ | Tags are the tags associated to the vault for grouping and filtering. |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane this KongVault is associated with. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down Expand Up @@ -1639,6 +1643,7 @@ KongConsumerGroupSpec defines the desired state of KongConsumerGroup.
| `name` _string_ | Name is the name of the ConsumerGroup in Kong. |
| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this ConsumerGroup is associated with. |
| `tags` _[Tags](#tags)_ | Tags is an optional set of tags applied to the ConsumerGroup. |
| `ingressClassName` _string_ | IngressClassName is the name of the IngressClass associated with this resource. |


_Appears in:_
Expand Down