-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use KongObjectRef in KongRoute (#142)
Co-authored-by: Tao Yi <[email protected]>
- Loading branch information
1 parent
05d5f58
commit 73ff963
Showing
8 changed files
with
60 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
package v1alpha1 | ||
|
||
// TODO: https://github.com/Kong/kubernetes-configuration/issues/96 | ||
// Change other types to use the generic `KongObjectRef` and move it to a common package | ||
// to prevent possible import cycles. | ||
|
||
// KongObjectRef is a reference to another object representing a Kong entity with deterministic type. | ||
// | ||
// TODO: https://github.com/Kong/kubernetes-configuration/issues/96 | ||
// change other types to use the generic `KongObjectRef` and move it to a common package to prevent possible import cycles. | ||
// +apireference:kgo:include | ||
type KongObjectRef struct { | ||
// Name is the name of the entity. | ||
// | ||
// NOTE: the `Required` validation rule does not reject empty strings so we use `MinLength` to reject empty string here. | ||
// +kubebuilder:validation:MinLength=1 | ||
Name string `json:"name"` | ||
|
||
// TODO: handle cross namespace references. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters