Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
randmonkey committed Sep 19, 2024
1 parent afa66c7 commit 26c51a5
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion api/configuration/v1/kongconsumer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
// +kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status`
// +kubebuilder:validation:XValidation:rule="has(self.username) || has(self.custom_id)", message="Need to provide either username or custom_id"
// +kubebuilder:validation:XValidation:rule="!has(oldSelf.spec.controlPlaneRef) || has(self.spec.controlPlaneRef)", message="controlPlaneRef is required once set"
// REVIEW: allow same namespace?
// +kubebuilder:validation:XValidation:rule="!has(self.spec.controlPlaneRef.konnectNamespacedRef) ? true : !has(self.spec.controlPlaneRef.konnectNamespacedRef.__namespace__)", message="spec.controlPlaneRef cannot specify namespace for namespaced resource"
// +kubebuilder:validation:XValidation:rule="(!has(self.status) || !self.status.conditions.exists(c, c.type == 'Programmed' && c.status == 'True')) ? true : oldSelf.spec.controlPlaneRef == self.spec.controlPlaneRef", message="spec.controlPlaneRef is immutable when an entity is already Programmed"

Expand Down
4 changes: 3 additions & 1 deletion api/configuration/v1alpha1/konnect_controlplaneref_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ type KonnectNamespacedRef struct {

// TODO: Implement cross namespace references:
// https://github.com/Kong/kubernetes-configuration/issues/36
// Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.

// Namespace is the namespace where the Konnect Control Plane is in.
// Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
//
// +optional
Namespace string `json:"namespace,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
3 changes: 1 addition & 2 deletions config/crd/bases/configuration.konghq.com_kongconsumers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
3 changes: 1 addition & 2 deletions config/crd/bases/configuration.konghq.com_kongservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
3 changes: 1 addition & 2 deletions config/crd/bases/configuration.konghq.com_kongupstreams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
3 changes: 1 addition & 2 deletions config/crd/bases/configuration.konghq.com_kongvaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ spec:
type: string
namespace:
description: |-
https://github.com/Kong/kubernetes-configuration/issues/36
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
Namespace is the namespace where the Konnect Control Plane is in.
Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
type: string
required:
- name
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ KonnectNamespacedRef is the schema for the KonnectNamespacedRef type.
| Field | Description |
| --- | --- |
| `name` _string_ | Name is the name of the Konnect Control Plane. |
| `namespace` _string_ | TODO: Implement cross namespace references: https://github.com/Kong/kubernetes-configuration/issues/36 Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`. Namespace is the namespace where the Konnect Control Plane is in. |
| `namespace` _string_ | Namespace is the namespace where the Konnect Control Plane is in. Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`. |


_Appears in:_
Expand Down

0 comments on commit 26c51a5

Please sign in to comment.