feat(tenant): support gateway/class (#1463)

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

* feat(tenant): support gateway/class

Signed-off-by: Hristo Hristov <me@hhristov.info>

---------

Signed-off-by: Hristo Hristov <me@hhristov.info>
Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
Hristo Hristov
2025-05-20 19:53:42 +03:00
committed by GitHub
co-authored by Oliver Bähler
parent 7d0a4c58fd
commit a60ebfac5e
25 changed files with 895 additions and 293 deletions
+29
View File
@@ -88,3 +88,32 @@ func (in *AllowedListSpec) RegexMatch(value string) (ok bool) {
return
}
// +kubebuilder:object:generate=true
type SelectionListWithDefaultSpec struct {
SelectionListWithSpec `json:",inline"`
Default string `json:"default,omitempty"`
}
func (in *SelectionListWithDefaultSpec) MatchDefault(value string) bool {
return in.Default == value
}
// +kubebuilder:object:generate=true
type SelectionListWithSpec struct {
metav1.LabelSelector `json:",inline"`
}
func (in *SelectionListWithSpec) SelectorMatch(obj client.Object) bool {
if obj != nil {
selector, err := metav1.LabelSelectorAsSelector(&in.LabelSelector)
if err != nil {
return false
}
return selector.Matches(labels.Set(obj.GetLabels()))
}
return false
}
+32
View File
@@ -289,6 +289,38 @@ func (in *ResourceQuotaSpec) DeepCopy() *ResourceQuotaSpec {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelectionListWithDefaultSpec) DeepCopyInto(out *SelectionListWithDefaultSpec) {
*out = *in
in.SelectionListWithSpec.DeepCopyInto(&out.SelectionListWithSpec)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectionListWithDefaultSpec.
func (in *SelectionListWithDefaultSpec) DeepCopy() *SelectionListWithDefaultSpec {
if in == nil {
return nil
}
out := new(SelectionListWithDefaultSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelectionListWithSpec) DeepCopyInto(out *SelectionListWithSpec) {
*out = *in
in.LabelSelector.DeepCopyInto(&out.LabelSelector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectionListWithSpec.
func (in *SelectionListWithSpec) DeepCopy() *SelectionListWithSpec {
if in == nil {
return nil
}
out := new(SelectionListWithSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SelectorAllowedListSpec) DeepCopyInto(out *SelectorAllowedListSpec) {
*out = *in