mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
This patch extends the resource-selecting function of the webhook to also apply selectors to ingresses and services, like has been already done for secrets. The Cozystack resource definitions have been upgraded to contain two more fields: `ingresses` and `services` and populated with counterparts of the legacy selectors from the dashboard roles. ```release-note [controller, api] Enable marking ingresses and services as user-facing and implement selectors for existing CozystackResourceDefinitions. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
485 lines
15 KiB
Go
485 lines
15 KiB
Go
//go:build !ignore_autogenerated
|
|
|
|
/*
|
|
Copyright 2025 The Cozystack Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"k8s.io/apimachinery/pkg/api/resource"
|
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinition) DeepCopyInto(out *CozystackResourceDefinition) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinition.
|
|
func (in *CozystackResourceDefinition) DeepCopy() *CozystackResourceDefinition {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinition)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *CozystackResourceDefinition) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionApplication) DeepCopyInto(out *CozystackResourceDefinitionApplication) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionApplication.
|
|
func (in *CozystackResourceDefinitionApplication) DeepCopy() *CozystackResourceDefinitionApplication {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionApplication)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionChart) DeepCopyInto(out *CozystackResourceDefinitionChart) {
|
|
*out = *in
|
|
out.SourceRef = in.SourceRef
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionChart.
|
|
func (in *CozystackResourceDefinitionChart) DeepCopy() *CozystackResourceDefinitionChart {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionChart)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionDashboard) DeepCopyInto(out *CozystackResourceDefinitionDashboard) {
|
|
*out = *in
|
|
if in.Tags != nil {
|
|
in, out := &in.Tags, &out.Tags
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
if in.Tabs != nil {
|
|
in, out := &in.Tabs, &out.Tabs
|
|
*out = make([]DashboardTab, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
if in.KeysOrder != nil {
|
|
in, out := &in.KeysOrder, &out.KeysOrder
|
|
*out = make([][]string, len(*in))
|
|
for i := range *in {
|
|
if (*in)[i] != nil {
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionDashboard.
|
|
func (in *CozystackResourceDefinitionDashboard) DeepCopy() *CozystackResourceDefinitionDashboard {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionDashboard)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionList) DeepCopyInto(out *CozystackResourceDefinitionList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]CozystackResourceDefinition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionList.
|
|
func (in *CozystackResourceDefinitionList) DeepCopy() *CozystackResourceDefinitionList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *CozystackResourceDefinitionList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionRelease) DeepCopyInto(out *CozystackResourceDefinitionRelease) {
|
|
*out = *in
|
|
out.Chart = in.Chart
|
|
if in.Labels != nil {
|
|
in, out := &in.Labels, &out.Labels
|
|
*out = make(map[string]string, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionRelease.
|
|
func (in *CozystackResourceDefinitionRelease) DeepCopy() *CozystackResourceDefinitionRelease {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionRelease)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionResourceSelector) DeepCopyInto(out *CozystackResourceDefinitionResourceSelector) {
|
|
*out = *in
|
|
in.LabelSelector.DeepCopyInto(&out.LabelSelector)
|
|
if in.ResourceNames != nil {
|
|
in, out := &in.ResourceNames, &out.ResourceNames
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionResourceSelector.
|
|
func (in *CozystackResourceDefinitionResourceSelector) DeepCopy() *CozystackResourceDefinitionResourceSelector {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionResourceSelector)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionResources) DeepCopyInto(out *CozystackResourceDefinitionResources) {
|
|
*out = *in
|
|
if in.Exclude != nil {
|
|
in, out := &in.Exclude, &out.Exclude
|
|
*out = make([]*CozystackResourceDefinitionResourceSelector, len(*in))
|
|
for i := range *in {
|
|
if (*in)[i] != nil {
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
*out = new(CozystackResourceDefinitionResourceSelector)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
}
|
|
}
|
|
if in.Include != nil {
|
|
in, out := &in.Include, &out.Include
|
|
*out = make([]*CozystackResourceDefinitionResourceSelector, len(*in))
|
|
for i := range *in {
|
|
if (*in)[i] != nil {
|
|
in, out := &(*in)[i], &(*out)[i]
|
|
*out = new(CozystackResourceDefinitionResourceSelector)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionResources.
|
|
func (in *CozystackResourceDefinitionResources) DeepCopy() *CozystackResourceDefinitionResources {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionResources)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *CozystackResourceDefinitionSpec) DeepCopyInto(out *CozystackResourceDefinitionSpec) {
|
|
*out = *in
|
|
out.Application = in.Application
|
|
in.Release.DeepCopyInto(&out.Release)
|
|
in.Secrets.DeepCopyInto(&out.Secrets)
|
|
in.Services.DeepCopyInto(&out.Services)
|
|
in.Ingresses.DeepCopyInto(&out.Ingresses)
|
|
if in.Dashboard != nil {
|
|
in, out := &in.Dashboard, &out.Dashboard
|
|
*out = new(CozystackResourceDefinitionDashboard)
|
|
(*in).DeepCopyInto(*out)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CozystackResourceDefinitionSpec.
|
|
func (in *CozystackResourceDefinitionSpec) DeepCopy() *CozystackResourceDefinitionSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(CozystackResourceDefinitionSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in Selector) DeepCopyInto(out *Selector) {
|
|
{
|
|
in := &in
|
|
*out = make(Selector, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selector.
|
|
func (in Selector) DeepCopy() Selector {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Selector)
|
|
in.DeepCopyInto(out)
|
|
return *out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *SourceRef) DeepCopyInto(out *SourceRef) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceRef.
|
|
func (in *SourceRef) DeepCopy() *SourceRef {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(SourceRef)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *Workload) DeepCopyInto(out *Workload) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
|
|
func (in *Workload) DeepCopy() *Workload {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(Workload)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *Workload) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadList) DeepCopyInto(out *WorkloadList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]Workload, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
|
|
func (in *WorkloadList) DeepCopy() *WorkloadList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *WorkloadList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadMonitor) DeepCopyInto(out *WorkloadMonitor) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitor.
|
|
func (in *WorkloadMonitor) DeepCopy() *WorkloadMonitor {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadMonitor)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *WorkloadMonitor) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadMonitorList) DeepCopyInto(out *WorkloadMonitorList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]WorkloadMonitor, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorList.
|
|
func (in *WorkloadMonitorList) DeepCopy() *WorkloadMonitorList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadMonitorList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *WorkloadMonitorList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadMonitorSpec) DeepCopyInto(out *WorkloadMonitorSpec) {
|
|
*out = *in
|
|
if in.Selector != nil {
|
|
in, out := &in.Selector, &out.Selector
|
|
*out = make(map[string]string, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val
|
|
}
|
|
}
|
|
if in.MinReplicas != nil {
|
|
in, out := &in.MinReplicas, &out.MinReplicas
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
if in.Replicas != nil {
|
|
in, out := &in.Replicas, &out.Replicas
|
|
*out = new(int32)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorSpec.
|
|
func (in *WorkloadMonitorSpec) DeepCopy() *WorkloadMonitorSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadMonitorSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadMonitorStatus) DeepCopyInto(out *WorkloadMonitorStatus) {
|
|
*out = *in
|
|
if in.Operational != nil {
|
|
in, out := &in.Operational, &out.Operational
|
|
*out = new(bool)
|
|
**out = **in
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorStatus.
|
|
func (in *WorkloadMonitorStatus) DeepCopy() *WorkloadMonitorStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadMonitorStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus) {
|
|
*out = *in
|
|
if in.Resources != nil {
|
|
in, out := &in.Resources, &out.Resources
|
|
*out = make(map[string]resource.Quantity, len(*in))
|
|
for key, val := range *in {
|
|
(*out)[key] = val.DeepCopy()
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadStatus.
|
|
func (in *WorkloadStatus) DeepCopy() *WorkloadStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(WorkloadStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|