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

feat: disallow cross namespace services refs #107

Merged
merged 1 commit into from
Oct 3, 2024
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
7 changes: 5 additions & 2 deletions api/configuration/v1alpha1/service_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ type ServiceRef struct {
NamespacedRef *NamespacedServiceRef `json:"namespacedRef,omitempty"`
}

// NamespacedServiceRef is a namespaced reference to a KongService.
//
// NOTE: currently cross namespace references are not supported.
type NamespacedServiceRef struct {
// +kubebuilder:validation:Required
Name string `json:"name"`

// +kubebuilder:validation:Optional
Namespace string `json:"namespace,omitempty"`
// TODO: handle cross namespace references.
// https://github.com/Kong/kubernetes-configuration/issues/106
}
2 changes: 0 additions & 2 deletions config/crd/bases/configuration.konghq.com_kongroutes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ spec:
properties:
name:
type: string
namespace:
type: string
required:
- name
type: object
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1543,14 +1543,14 @@ _Appears in:_
#### NamespacedServiceRef



NamespacedServiceRef is a namespaced reference to a KongService.<br /><br />
NOTE: currently cross namespace references are not supported.



| Field | Description |
| --- | --- |
| `name` _string_ | |
| `namespace` _string_ | |


_Appears in:_
Expand Down