diff --git a/DockerfileAPIServer b/DockerfileAPIServer index 92f386ba..5789eaec 100644 --- a/DockerfileAPIServer +++ b/DockerfileAPIServer @@ -2,7 +2,7 @@ # Licensed under the Apache License 2.0 # SPDX-License-Identifier: Apache-2.0 # -FROM golang:1.24 AS builder +FROM golang:1.25 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/DockerfileController b/DockerfileController index 1c04a712..9a725e84 100644 --- a/DockerfileController +++ b/DockerfileController @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 # Build the manager binary -FROM golang:1.24 AS builder +FROM golang:1.25 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/Makefile b/Makefile index 9c994ce6..90a06f51 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,9 @@ genclients: -g openapi-gen \ -g defaulter-gen \ -g conversion-gen \ - --module $(REPO) \ + -g applyconfiguration-gen \ + --module $(REPO) + $(MAKE) fix-openapi-gvk .PHONY: genproto genproto: @@ -71,9 +73,17 @@ genproto: -g go-to-protobuf \ --module $(REPO) \ +.PHONY: fix-openapi-gvk +fix-openapi-gvk: + go run ./tools/fix-openapi-gvk/main.go \ + --file pkg/generated/openapi/zz_generated.openapi.go \ + --group config.sdcio.dev \ + --prefix config_server_apis_config_v1alpha1 + .PHONY: generate generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/inv/..." + $(MAKE) genclients .PHONY: manifests manifests: controller-gen crds artifacts ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. @@ -102,7 +112,7 @@ tidy: go mod tidy .PHONY: lint -lint: +lint: golangci-lint $(GOLANGCILINT) run ./... .PHONY: test @@ -133,7 +143,7 @@ $(KFORM): $(LOCALBIN) test -s $(LOCALBIN)/kform || GOBIN=$(LOCALBIN) go install github.com/kform-dev/kform/cmd/kform@$(KFORM_VERSION) .PHONY: golangci-lint -golangci-lint: $(GOLANGCILINT) ## Download kform locally if necessary. +golangci-lint: $(GOLANGCILINT) ## Download golangci locally if necessary. $(GOLANGCILINT): $(LOCALBIN) test -s $(LOCALBIN)/golangci-lint || GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCILINT_VERSION) diff --git a/PROTO.md b/PROTO.md index 123cbd88..43b7d859 100644 --- a/PROTO.md +++ b/PROTO.md @@ -1,3 +1,8 @@ protoc -I . -I ./vendor --gogo_opt=paths=source_relative --gogo_out=. apis/condition/v1alpha1/generated.proto -protoc -I . -I ./vendor -I ./apis/condition/v1alpha1 --gogo_opt=paths=source_relative --gogo_out=. apis/config/v1alpha1/generated.proto \ No newline at end of file +protoc -I . -I ./vendor -I ./apis/condition/v1alpha1 --gogo_opt=paths=source_relative --gogo_out=. apis/config/v1alpha1/generated.proto + + +go run ./tools/apiserver-runtime-gen \ + -g applyconfiguration-gen \ + --module github.com/sdcio/config-server \ No newline at end of file diff --git a/apis/condition/condition.go b/apis/condition/condition.go index d2d527a2..10ac7034 100644 --- a/apis/condition/condition.go +++ b/apis/condition/condition.go @@ -84,6 +84,11 @@ func NewConditionedStatus(c ...Condition) *ConditionedStatus { return r } +// HasCondition returns if the condition is set +func (r *ConditionedStatus) GetConditions() []Condition { + return r.Conditions +} + // HasCondition returns if the condition is set func (r *ConditionedStatus) HasCondition(t ConditionType) bool { for _, c := range r.Conditions { diff --git a/apis/condition/doc.go b/apis/condition/doc.go index 88e1f97a..8d621281 100644 --- a/apis/condition/doc.go +++ b/apis/condition/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // condition defines the condition api -package condition +package condition diff --git a/apis/condition/v1alpha1/generated.pb.go b/apis/condition/v1alpha1/generated.pb.go index ddb41232..dbc740da 100644 --- a/apis/condition/v1alpha1/generated.pb.go +++ b/apis/condition/v1alpha1/generated.pb.go @@ -22,146 +22,16 @@ import ( fmt "fmt" io "io" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" - - proto "github.com/gogo/protobuf/proto" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func (m *Condition) Reset() { *m = Condition{} } -func (*Condition) ProtoMessage() {} -func (*Condition) Descriptor() ([]byte, []int) { - return fileDescriptor_04bc400a18951c3b, []int{0} -} -func (m *Condition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Condition) XXX_Merge(src proto.Message) { - xxx_messageInfo_Condition.Merge(m, src) -} -func (m *Condition) XXX_Size() int { - return m.Size() -} -func (m *Condition) XXX_DiscardUnknown() { - xxx_messageInfo_Condition.DiscardUnknown(m) -} +func (m *Condition) Reset() { *m = Condition{} } -var xxx_messageInfo_Condition proto.InternalMessageInfo +func (m *ConditionedStatus) Reset() { *m = ConditionedStatus{} } -func (m *ConditionedStatus) Reset() { *m = ConditionedStatus{} } -func (*ConditionedStatus) ProtoMessage() {} -func (*ConditionedStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_04bc400a18951c3b, []int{1} -} -func (m *ConditionedStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConditionedStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConditionedStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConditionedStatus.Merge(m, src) -} -func (m *ConditionedStatus) XXX_Size() int { - return m.Size() -} -func (m *ConditionedStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ConditionedStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ConditionedStatus proto.InternalMessageInfo - -func (m *UnrecoverableMessage) Reset() { *m = UnrecoverableMessage{} } -func (*UnrecoverableMessage) ProtoMessage() {} -func (*UnrecoverableMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_04bc400a18951c3b, []int{2} -} -func (m *UnrecoverableMessage) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UnrecoverableMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *UnrecoverableMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnrecoverableMessage.Merge(m, src) -} -func (m *UnrecoverableMessage) XXX_Size() int { - return m.Size() -} -func (m *UnrecoverableMessage) XXX_DiscardUnknown() { - xxx_messageInfo_UnrecoverableMessage.DiscardUnknown(m) -} - -var xxx_messageInfo_UnrecoverableMessage proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Condition)(nil), "github.com.sdcio.config_server.apis.condition.v1alpha1.Condition") - proto.RegisterType((*ConditionedStatus)(nil), "github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus") - proto.RegisterType((*UnrecoverableMessage)(nil), "github.com.sdcio.config_server.apis.condition.v1alpha1.UnrecoverableMessage") -} - -func init() { - proto.RegisterFile("github.com/sdcio/config-server/apis/condition/v1alpha1/generated.proto", fileDescriptor_04bc400a18951c3b) -} - -var fileDescriptor_04bc400a18951c3b = []byte{ - // 379 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0xd2, 0x3f, 0x8f, 0xda, 0x30, - 0x18, 0x06, 0xf0, 0xb8, 0x1d, 0x10, 0x66, 0x40, 0x44, 0x95, 0x8a, 0x18, 0x0c, 0x62, 0xa2, 0x03, - 0xb6, 0x40, 0x15, 0xea, 0x0a, 0x95, 0xba, 0x75, 0x49, 0xd5, 0x0e, 0x55, 0xa5, 0xd6, 0x24, 0x2f, - 0xc6, 0x82, 0xc4, 0x91, 0x9d, 0x44, 0xea, 0xd6, 0xa1, 0xd3, 0x4d, 0xf7, 0xb1, 0x18, 0x19, 0x99, - 0xd0, 0x91, 0xfb, 0x22, 0xa7, 0xfc, 0x25, 0x77, 0xb7, 0xb1, 0xc5, 0x7e, 0xed, 0xdf, 0xf3, 0xc8, - 0x0a, 0xfe, 0x22, 0x64, 0xb4, 0x8d, 0xd7, 0xd4, 0x55, 0x3e, 0x33, 0x9e, 0x2b, 0x15, 0x73, 0x55, - 0xb0, 0x91, 0x62, 0x6a, 0x40, 0x27, 0xa0, 0x19, 0x0f, 0xa5, 0xc9, 0xb6, 0x3c, 0x19, 0x49, 0x15, - 0xb0, 0x64, 0xc6, 0xf7, 0xe1, 0x96, 0xcf, 0x98, 0x80, 0x00, 0x34, 0x8f, 0xc0, 0xa3, 0xa1, 0x56, - 0x91, 0xb2, 0x17, 0x57, 0x87, 0xe6, 0x0e, 0x2d, 0x9c, 0xdf, 0x85, 0x43, 0x33, 0x87, 0xd6, 0x0e, - 0xad, 0x9c, 0xc1, 0xb4, 0x91, 0x2f, 0x94, 0x50, 0x2c, 0xe7, 0xd6, 0xf1, 0x26, 0x5f, 0xe5, 0x8b, - 0xfc, 0xab, 0x88, 0x19, 0x7c, 0xdc, 0x7d, 0x32, 0x54, 0xaa, 0xac, 0x96, 0xcf, 0xdd, 0xad, 0x0c, - 0x40, 0xff, 0x65, 0xe1, 0x4e, 0x14, 0x3d, 0x7d, 0x88, 0x38, 0x4b, 0x5e, 0x95, 0x1b, 0xfb, 0xb8, - 0xfd, 0xb9, 0x8a, 0xb6, 0xff, 0xe0, 0x76, 0xdd, 0xa3, 0x8f, 0x46, 0x68, 0xd2, 0x99, 0x33, 0x5a, - 0xb0, 0xb4, 0xc9, 0xd2, 0x70, 0x27, 0x8a, 0xda, 0x19, 0x4b, 0x93, 0x19, 0xad, 0x8d, 0x55, 0xef, - 0x70, 0x1e, 0x5a, 0xe9, 0x79, 0x78, 0x65, 0x9d, 0x2b, 0x3a, 0xbe, 0x43, 0xb8, 0x57, 0x0f, 0xc0, - 0xfb, 0x16, 0xf1, 0x28, 0x36, 0x76, 0x8c, 0x71, 0x7d, 0xc4, 0xf4, 0xd1, 0xe8, 0xed, 0xa4, 0x33, - 0x5f, 0xd2, 0xdb, 0x9e, 0xad, 0x51, 0xc5, 0x2e, 0xab, 0xe0, 0x7a, 0xcb, 0x38, 0x8d, 0xa0, 0xf1, - 0x7f, 0x84, 0xdf, 0x7d, 0x0f, 0x34, 0xb8, 0x2a, 0x01, 0xcd, 0xd7, 0x7b, 0xf8, 0x0a, 0xc6, 0x70, - 0x01, 0xf6, 0x12, 0x77, 0x35, 0x18, 0x15, 0x6b, 0x17, 0x7e, 0x80, 0x36, 0xd5, 0x6b, 0xb4, 0x57, - 0xef, 0x4b, 0xb1, 0xeb, 0x3c, 0x1f, 0x3b, 0x2f, 0xcf, 0xdb, 0x1f, 0x70, 0xcb, 0x2f, 0xb4, 0xfe, - 0x9b, 0xfc, 0x6a, 0xb7, 0xbc, 0xda, 0x2a, 0x43, 0x9c, 0x6a, 0xbe, 0xfa, 0x75, 0xb8, 0x10, 0xeb, - 0x78, 0x21, 0xd6, 0xe9, 0x42, 0xac, 0x7f, 0x29, 0x41, 0x87, 0x94, 0xa0, 0x63, 0x4a, 0xd0, 0x29, - 0x25, 0xe8, 0x21, 0x25, 0xe8, 0xfe, 0x91, 0x58, 0x3f, 0x17, 0xb7, 0xfd, 0x8d, 0x4f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x88, 0x6b, 0xe8, 0xb6, 0xc6, 0x02, 0x00, 0x00, -} +func (m *UnrecoverableMessage) Reset() { *m = UnrecoverableMessage{} } func (m *Condition) Marshal() (dAtA []byte, err error) { size := m.Size() diff --git a/apis/condition/v1alpha1/generated.protomessage.pb.go b/apis/condition/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 00000000..45017bc2 --- /dev/null +++ b/apis/condition/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,28 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +Copyright 2024 Nokia. + +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*Condition) ProtoMessage() {} + +func (*ConditionedStatus) ProtoMessage() {} + +func (*UnrecoverableMessage) ProtoMessage() {} diff --git a/apis/config/condition.go b/apis/config/condition.go index abac2f12..15e15f95 100644 --- a/apis/config/condition.go +++ b/apis/config/condition.go @@ -27,20 +27,15 @@ const ( ) const ( + // Target relation conditions // ConditionTypeDiscoveryReady represents the resource discovery ready condition - ConditionTypeDiscoveryReady cond.ConditionType = "DiscoveryReady" + ConditionTypeTargetDiscoveryReady cond.ConditionType = "TargetDiscoveryReady" // ConditionTypeDatastoreReady represents the resource datastore ready condition - ConditionTypeDatastoreReady cond.ConditionType = "DatastoreReady" + ConditionTypeTargetDatastoreReady cond.ConditionType = "TargetDatastoreReady" // ConditionTypeConfigRecoveryReady represents the resource config recovery ready condition - ConditionTypeConfigRecoveryReady cond.ConditionType = "ConfigRecoveryReady" + ConditionTypeTargetConfigRecoveryReady cond.ConditionType = "TargetConfigRecoveryReady" // ConditionTypeTargetConnectionReady represents the resource target ready condition ConditionTypeTargetConnectionReady cond.ConditionType = "TargetConnectionReady" - - ConditionTypeConfigApply cond.ConditionType = "ConfigApply" - ConditionTypeConfigConfirm cond.ConditionType = "ConfigConfirm" - ConditionTypeConfigCancel cond.ConditionType = "ConfigCancel" - - ConditionTypeSchemaServerReady cond.ConditionType = "SchemaServerReady" ) // A ConditionReason represents the reason a resource is in a condition. diff --git a/apis/config/config_resource.go b/apis/config/config_resource.go index bc7fad0b..70c949d3 100644 --- a/apis/config/config_resource.go +++ b/apis/config/config_resource.go @@ -262,26 +262,17 @@ type ConfigFilter struct { } func (r *ConfigFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter o, ok := obj.(*Config) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *Config) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/config_types.go b/apis/config/config_types.go index 4f5eb6ce..5524b55a 100644 --- a/apis/config/config_types.go +++ b/apis/config/config_types.go @@ -19,9 +19,9 @@ package config import ( "reflect" + "github.com/sdcio/config-server/apis/condition" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "github.com/sdcio/config-server/apis/condition" ) // ConfigSpec defines the desired state of Config @@ -67,14 +67,13 @@ type ConfigStatusLastKnownGoodSchema struct { Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:resource:categories={sdc} -// Config defines the Schema for the Config API +// Config defines the Schema for the Config API type Config struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/apis/config/configblame_helpers.go b/apis/config/configblame_helpers.go index b6e22c31..c0a14d96 100644 --- a/apis/config/configblame_helpers.go +++ b/apis/config/configblame_helpers.go @@ -23,7 +23,7 @@ func BuildConfigBlame(meta metav1.ObjectMeta, spec ConfigBlameSpec, status Confi return &ConfigBlame{ TypeMeta: metav1.TypeMeta{ APIVersion: SchemeGroupVersion.Identifier(), - Kind: ConfigBlameKind, + Kind: ConfigBlameKind, }, ObjectMeta: meta, Spec: spec, @@ -38,4 +38,4 @@ func BuildEmptyConfigBlame() *ConfigBlame { Kind: ConfigBlameKind, }, } -} \ No newline at end of file +} diff --git a/apis/config/configblame_resource.go b/apis/config/configblame_resource.go index e7ab4341..bb2c1dee 100644 --- a/apis/config/configblame_resource.go +++ b/apis/config/configblame_resource.go @@ -201,26 +201,17 @@ type ConfigBlameFilter struct { } func (r *ConfigBlameFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter - o, ok := obj.(*Config) + o, ok := obj.(*ConfigBlame) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *ConfigBlame) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/configblame_types.go b/apis/config/configblame_types.go index 81c6b591..ffe93fc2 100644 --- a/apis/config/configblame_types.go +++ b/apis/config/configblame_types.go @@ -33,14 +33,13 @@ type ConfigBlameStatus struct { Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:resource:categories={sdc} -// ConfigBlame defines the Schema for the ConfigBlame API +// ConfigBlame defines the Schema for the ConfigBlame API type ConfigBlame struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/apis/config/configset_helpers.go b/apis/config/configset_helpers.go index e808b953..66abe023 100644 --- a/apis/config/configset_helpers.go +++ b/apis/config/configset_helpers.go @@ -39,4 +39,4 @@ func BuildEmptyConfigSet() *ConfigSet { Kind: ConfigSetKind, }, } -} \ No newline at end of file +} diff --git a/apis/config/configset_resource.go b/apis/config/configset_resource.go index 6c9ee821..b6270aeb 100644 --- a/apis/config/configset_resource.go +++ b/apis/config/configset_resource.go @@ -254,26 +254,17 @@ type ConfigSetFilter struct { } func (r *ConfigSetFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter - o, ok := obj.(*Config) + o, ok := obj.(*ConfigSet) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *ConfigSet) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/configset_types.go b/apis/config/configset_types.go index d1e5751b..afb8edd7 100644 --- a/apis/config/configset_types.go +++ b/apis/config/configset_types.go @@ -19,14 +19,14 @@ package config import ( "reflect" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/sdcio/config-server/apis/condition" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // ConfigSetSpec defines the desired state of Config type ConfigSetSpec struct { // Targets defines the targets on which this configSet applies - Target Target `json:"target" protobuf:"bytes,1,opt,name=target"` + Target ConfigSetTarget `json:"target" protobuf:"bytes,1,opt,name=target"` // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete // will follow Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,2,opt,name=lifecycle"` @@ -39,7 +39,7 @@ type ConfigSetSpec struct { Config []ConfigBlob `json:"config" protobuf:"bytes,5,rep,name=config"` } -type Target struct { +type ConfigSetTarget struct { // TargetSelector defines the selector used to select the targets to which the config applies TargetSelector *metav1.LabelSelector `json:"targetSelector,omitempty" protobuf:"bytes,1,opt,name=targetSelector"` } @@ -50,10 +50,10 @@ type ConfigSetStatus struct { // if the condition is true the other attributes in the status are meaningful condition.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // Targets defines the status of the configSet resource on the respective target - Targets []TargetStatus `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` + Targets []ConfigSetTargetStatus `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` } -type TargetStatus struct { +type ConfigSetTargetStatus struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // right now we assume the namespace of the config and target are aligned //NameSpace string `json:"namespace" protobuf:"bytes,2,opt,name=name"` @@ -61,7 +61,6 @@ type TargetStatus struct { condition.Condition `json:",inline" protobuf:"bytes,3,opt,name=condition"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion @@ -77,7 +76,6 @@ type ConfigSet struct { Status ConfigSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true diff --git a/apis/config/deviation_clear_types.go b/apis/config/deviation_clear_types.go new file mode 100644 index 00000000..dadb51a3 --- /dev/null +++ b/apis/config/deviation_clear_types.go @@ -0,0 +1,99 @@ +/* +Copyright 2026 Nokia. + +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. +*/ + +package config + +import ( + "reflect" + + "github.com/sdcio/config-server/apis/condition" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type DeviationClearType string + +const ( + DeviationClearType_TARGET DeviationClearType = "target" + DeviationClearType_CONFIG DeviationClearType = "config" + DeviationClearType_ALL_CONFIG DeviationClearType = "allConfig" + DeviationClearType_ALL DeviationClearType = "all" +) + +func (r DeviationClearType) String() string { + switch r { + case DeviationClearType_TARGET: + return "target" + case DeviationClearType_CONFIG: + return "config" + case DeviationClearType_ALL_CONFIG: + return "allConfig" + case DeviationClearType_ALL: + return "all" + default: + return "unknown" + } +} + +// DeviationSpec defines the desired state of Deviation +type DeviationClearSpec struct { + Items []DeviationClearItem `json:"items" protobuf:"bytes,1,rep,name=items"` +} + +type DeviationClearItem struct { + Type DeviationClearType `json:"type" protobuf:"bytes,1,opt,name=type"` + // Name of the config - mandatory if the type is config - not applicable for the other types + ConfigName *string `json:"configName,omitempty" protobuf:"bytes,2,opt,name=configName"` + // Paths of the respective type that should be cleared + Paths []string `json:"paths" protobuf:"bytes,3,rep,name=paths"` +} + +// DeviationStatus defines the observed state of Deviationgit +type DeviationClearStatus struct { + // ConditionedStatus provides the status of the Readiness using conditions + // if the condition is true the other attributes in the status are meaningful + condition.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:resource:categories={sdc} + +// DeviationClear is the Schema for the DeviationClear API +type DeviationClear struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec DeviationClearSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status DeviationClearStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true + +// DeviationClearList contains a list of DeviationClears +type DeviationClearList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []Deviation `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// DeviationClearKind type metadata. +var ( + DeviationClearKind = reflect.TypeOf(DeviationClear{}).Name() +) diff --git a/apis/config/deviation_helper.go b/apis/config/deviation_helper.go index 5beaef86..62b30cbb 100644 --- a/apis/config/deviation_helper.go +++ b/apis/config/deviation_helper.go @@ -102,4 +102,4 @@ func BuildEmptyDeviation() *Deviation { Kind: DeviationKind, }, } -} \ No newline at end of file +} diff --git a/apis/config/deviation_resource.go b/apis/config/deviation_resource.go index 6c5d7183..e8f16ac5 100644 --- a/apis/config/deviation_resource.go +++ b/apis/config/deviation_resource.go @@ -256,26 +256,17 @@ type DeviationFilter struct { } func (r *DeviationFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter o, ok := obj.(*Deviation) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *Deviation) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/deviation_types.go b/apis/config/deviation_types.go index 69cbfdde..1bfd0339 100644 --- a/apis/config/deviation_types.go +++ b/apis/config/deviation_types.go @@ -19,8 +19,8 @@ package config import ( "reflect" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/sdcio/config-server/apis/condition" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // DeviationSpec defines the desired state of Deviation @@ -33,8 +33,8 @@ type DeviationSpec struct { type DeviationType string const ( - DeviationType_TARGET DeviationType = "target" - DeviationType_CONFIG DeviationType = "config" + DeviationType_TARGET DeviationType = "target" + DeviationType_CONFIG DeviationType = "config" ) func (r DeviationType) String() string { @@ -53,9 +53,9 @@ type ConfigDeviation struct { Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` // DesiredValue is the desired value of the config belonging to the path DesiredValue *string `json:"desiredValue,omitempty" protobuf:"bytes,2,opt,name=desiredValue"` - // CurrentValue defines the current value of the config belonging to the path + // ActualValue defines the current value of the config belonging to the path // that is currently configured on the target - CurrentValue *string `json:"actualValue,omitempty" protobuf:"bytes,3,opt,name=actualValue"` + ActualValue *string `json:"actualValue,omitempty" protobuf:"bytes,3,opt,name=actualValue"` // Reason defines the reason of the deviation Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` } @@ -67,14 +67,13 @@ type DeviationStatus struct { condition.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:resource:categories={sdc} -// Deviation is the Schema for the Deviation API +// Deviation is the Schema for the Deviation API type Deviation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` @@ -83,7 +82,6 @@ type Deviation struct { Status DeviationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true diff --git a/apis/config/handlers/confighandler.go b/apis/config/handlers/confighandler.go index 3c7f945b..6f8266a6 100644 --- a/apis/config/handlers/confighandler.go +++ b/apis/config/handlers/confighandler.go @@ -1,23 +1,37 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + package handlers import ( "context" "fmt" - "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/sdcio/config-server/apis/config" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" sdcpb "github.com/sdcio/sdc-protos/sdcpb" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" ) - type ConfigStoreHandler struct { - Client client.Client + Client client.Client } func (r *ConfigStoreHandler) DryRunCreateFn(ctx context.Context, key types.NamespacedName, obj runtime.Object, dryrun bool) (runtime.Object, error) { @@ -25,17 +39,18 @@ func (r *ConfigStoreHandler) DryRunCreateFn(ctx context.Context, key types.Names if err != nil { return obj, err } - - updates, err := targetmanager.GetIntentUpdate(ctx, storebackend.KeyFromNSN(key), c, true) + + updates, err := config.GetIntentUpdate(c, true) if err != nil { return nil, err } intents := []*sdcpb.TransactionIntent{ { - Intent: targetmanager.GetGVKNSN(c), - Priority: int32(c.Spec.Priority), - Update: updates, + Intent: config.GetGVKNSN(c), + Priority: int32(c.Spec.Priority), + Update: updates, + // Dont set not Revertive }, } @@ -47,16 +62,17 @@ func (r *ConfigStoreHandler) DryRunUpdateFn(ctx context.Context, key types.Names return obj, err } - updates, err := targetmanager.GetIntentUpdate(ctx, storebackend.KeyFromNSN(key), c, true) + updates, err := config.GetIntentUpdate(c, true) if err != nil { return nil, err } intents := []*sdcpb.TransactionIntent{ { - Intent: targetmanager.GetGVKNSN(c), - Priority: int32(c.Spec.Priority), - Update: updates, + Intent: config.GetGVKNSN(c), + Priority: int32(c.Spec.Priority), + Update: updates, + // Dont set not Revertive }, } @@ -70,7 +86,7 @@ func (r *ConfigStoreHandler) DryRunDeleteFn(ctx context.Context, key types.Names intents := []*sdcpb.TransactionIntent{ { - Intent: targetmanager.GetGVKNSN(c), + Intent: config.GetGVKNSN(c), Delete: true, }, } @@ -78,14 +94,13 @@ func (r *ConfigStoreHandler) DryRunDeleteFn(ctx context.Context, key types.Names return targetmanager.RunDryRunTransaction(ctx, key, c, target, intents, dryrun) } - // prepareConfigAndTarget validates labels, casts the object, fetches the Target // and ensures it's ready. func (r *ConfigStoreHandler) prepareConfigAndTarget( ctx context.Context, key types.NamespacedName, obj runtime.Object, -) (*config.Config, *invv1alpha1.Target, error) { +) (*config.Config, *configv1alpha1.Target, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, nil, err @@ -100,7 +115,7 @@ func (r *ConfigStoreHandler) prepareConfigAndTarget( return nil, nil, fmt.Errorf("expected *config.Config, got %T", obj) } - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.Client.Get(ctx, key, target); err != nil { return nil, nil, err } @@ -110,4 +125,4 @@ func (r *ConfigStoreHandler) prepareConfigAndTarget( } return c, target, nil -} \ No newline at end of file +} diff --git a/apis/config/handlers/targethandler.go b/apis/config/handlers/targethandler.go new file mode 100644 index 00000000..59e15827 --- /dev/null +++ b/apis/config/handlers/targethandler.go @@ -0,0 +1,50 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package handlers + +import ( + "context" + + "github.com/sdcio/config-server/apis/config" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +func ListConfigsByTarget(ctx context.Context, c client.Client, targetNamespace, targetName, lookupNamespace string) (map[string]*config.Config, error) { + v1alpha1List := &configv1alpha1.ConfigList{} + if err := c.List(ctx, v1alpha1List, + client.InNamespace(lookupNamespace), + client.MatchingLabels{ + config.TargetNamespaceKey: targetNamespace, + config.TargetNameKey: targetName, + }, + ); err != nil { + return nil, err + } + + configList := &config.ConfigList{} + if err := configv1alpha1.Convert_v1alpha1_ConfigList_To_config_ConfigList(v1alpha1List, configList, nil); err != nil { + return nil, err + } + + result := make(map[string]*config.Config, len(configList.Items)) + for i := range configList.Items { + cfg := &configList.Items[i] + result[cfg.Name] = cfg + } + return result, nil +} diff --git a/apis/config/register.go b/apis/config/register.go index 927ae640..06433b53 100644 --- a/apis/config/register.go +++ b/apis/config/register.go @@ -52,6 +52,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &DeviationList{}, &ConfigBlame{}, &ConfigBlameList{}, + &Target{}, + &TargetList{}, + &TargetConfigBlame{}, + &TargetRunningConfig{}, + &TargetClearDeviation{}, + &TargetRunningConfigOptions{}, ) return nil } diff --git a/apis/config/running_config_helpers.go b/apis/config/running_config_helpers.go index 479ff6d3..2c38f41f 100644 --- a/apis/config/running_config_helpers.go +++ b/apis/config/running_config_helpers.go @@ -23,7 +23,7 @@ func BuildRunningConfig(meta metav1.ObjectMeta, spec RunningConfigSpec, status R return &RunningConfig{ TypeMeta: metav1.TypeMeta{ APIVersion: SchemeGroupVersion.Identifier(), - Kind: RunningConfigKind, + Kind: RunningConfigKind, }, ObjectMeta: meta, Spec: spec, @@ -38,4 +38,4 @@ func BuildEmptyRunningConfig() *RunningConfig { Kind: RunningConfigKind, }, } -} \ No newline at end of file +} diff --git a/apis/config/running_config_resource.go b/apis/config/running_config_resource.go index 45424af3..2390f57e 100644 --- a/apis/config/running_config_resource.go +++ b/apis/config/running_config_resource.go @@ -201,26 +201,17 @@ type RunningConfigFilter struct { } func (r *RunningConfigFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter - o, ok := obj.(*Config) + o, ok := obj.(*RunningConfig) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *RunningConfig) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/running_config_types.go b/apis/config/running_config_types.go index 56042eb7..59310021 100644 --- a/apis/config/running_config_types.go +++ b/apis/config/running_config_types.go @@ -33,14 +33,13 @@ type RunningConfigStatus struct { Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:resource:categories={sdc} -// RunningConfig defines the Schema for the RunningConfig API +// RunningConfig defines the Schema for the RunningConfig API type RunningConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/apis/config/sensitive_config_resource.go b/apis/config/sensitive_config_resource.go index cb7fb616..a85a3311 100644 --- a/apis/config/sensitive_config_resource.go +++ b/apis/config/sensitive_config_resource.go @@ -262,26 +262,17 @@ type SensitiveConfigFilter struct { } func (r *SensitiveConfigFilter) Filter(ctx context.Context, obj runtime.Object) bool { - f := false // result of the previous filter o, ok := obj.(*SensitiveConfig) if !ok { - return f + return true } - if r.Name != "" { - if o.GetName() == r.Name { - f = false - } else { - f = true - } + if r.Name != "" && o.GetName() != r.Name { + return true } - if r.Namespace != "" { - if o.GetNamespace() == r.Namespace { - f = false - } else { - f = true - } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true } - return f + return false } func (r *SensitiveConfig) PrepareForCreate(ctx context.Context, obj runtime.Object) { diff --git a/apis/config/sensitive_config_types.go b/apis/config/sensitive_config_types.go index 4a6c4a50..ec2b79f1 100644 --- a/apis/config/sensitive_config_types.go +++ b/apis/config/sensitive_config_types.go @@ -19,9 +19,9 @@ package config import ( "reflect" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1 "k8s.io/api/core/v1" "github.com/sdcio/config-server/apis/condition" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // SensitiveConfigSpec defines the desired state of SensitiveConfig @@ -57,14 +57,13 @@ type SensitiveConfigStatus struct { DeviationGeneration *int64 `json:"deviationGeneration,omitempty" protobuf:"bytes,4,opt,name=deviationGeneration"` } -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status // +kubebuilder:resource:categories={sdc} -// SensitiveConfig defines the Schema for the SensitiveConfig API +// SensitiveConfig defines the Schema for the SensitiveConfig API type SensitiveConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/apis/config/target_cleardeviation_resource.go b/apis/config/target_cleardeviation_resource.go new file mode 100644 index 00000000..0546cfbb --- /dev/null +++ b/apis/config/target_cleardeviation_resource.go @@ -0,0 +1,102 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "context" + "fmt" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +var _ resource.ArbitrarySubResource = &targetClearDeviationSubResource{} + +type targetClearDeviationSubResource struct { + client client.Client +} + +func NewTargetClearDeviationSubResource(c client.Client) *targetClearDeviationSubResource { + return &targetClearDeviationSubResource{client: c} +} + +func (r *targetClearDeviationSubResource) SubResourceName() string { + return "cleardeviation" +} + +func (r *targetClearDeviationSubResource) New() runtime.Object { + return &TargetClearDeviation{} +} + +func (r *targetClearDeviationSubResource) NewStorage(scheme *runtime.Scheme, parentStorage rest.Storage) (rest.Storage, error) { + return &targetClearDeviationREST{ + parentStore: parentStorage, + client: r.client, + }, nil +} + +// --- REST handler --- + +type targetClearDeviationREST struct { + parentStore rest.Storage + client client.Client +} + +func (r *targetClearDeviationREST) New() runtime.Object { + return &TargetClearDeviation{} +} + +func (r *targetClearDeviationREST) Destroy() {} + +// Create handles POST /apis/.../targets/{name}/cleardeviation +func (r *targetClearDeviationREST) Create( + ctx context.Context, + obj runtime.Object, + createValidation rest.ValidateObjectFunc, + options *metav1.CreateOptions, +) (runtime.Object, error) { + req, ok := obj.(*TargetClearDeviation) + if !ok { + return nil, apierrors.NewBadRequest( + fmt.Sprintf("expected *TargetClearDeviation, got %T", obj)) + } + + // Get the parent target + getter, ok := r.parentStore.(rest.Getter) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("parent store %T does not implement rest.Getter", r.parentStore)) + } + + // Get the parent target to validate it exists and is ready + parentObj, err := getter.Get(ctx, req.Name, &metav1.GetOptions{}) + if err != nil { + return nil, err + } + target, ok := parentObj.(*Target) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("expected *Target, got %T", parentObj)) + } + + return target.ClearDeviations(ctx, r.client, req) + +} diff --git a/apis/config/target_cleardeviation_types.go b/apis/config/target_cleardeviation_types.go new file mode 100644 index 00000000..879cbde6 --- /dev/null +++ b/apis/config/target_cleardeviation_types.go @@ -0,0 +1,74 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TargetClearDeviationSpec defines the desired state of Target +type TargetClearDeviationSpec struct { + // Config defines the clear deviations configs to applied on the taget + Config []TargetClearDeviationConfig `json:"config" protobuf:"bytes,1,rep,name=config"` +} + +type TargetClearDeviationConfig struct { + // Name of the config on which the paths should be cleared + Name string `json:"name" protobuf:"bytes,1,opt,name=paths"` + // Paths provide the path of the deviation to be cleared + Paths []string `json:"paths" protobuf:"bytes,2,rep,name=paths"` +} + +type TargetClearDeviationStatus struct { + // Message is a global message for the transaction + Message string `json:"message,omitempty" protobuf:"bytes,1,opt,name=message"` + // Warnings are global warnings from the transaction + Warnings []string `json:"warnings,omitempty" protobuf:"bytes,2,rep,name=warnings"` + // Results holds per-config outcomes, keyed by intent name + Results []TargetClearDeviationConfigResult `json:"results,omitempty" protobuf:"bytes,3,rep,name=results"` +} + +type TargetClearDeviationConfigResult struct { + // Name of the config on which the paths should be cleared + Name string `json:"name" protobuf:"bytes,1,rep,name=paths"` + // Success indicates whether the clear deviation was successful + Success bool `json:"success"` + // Message provides detail on the outcome + Message string `json:"message,omitempty"` + // Errors lists any errors for this specific config + Errors []string `json:"errors,omitempty"` + // Warnings lists any warnings for this specific config + Warnings []string `json:"warnings,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TargetClearDeviation is the Schema for the TargetClearDeviation API +// +k8s:openapi-gen=true +type TargetClearDeviation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec *TargetClearDeviationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status *TargetClearDeviationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +var ( + TargetClearDeviationKind = reflect.TypeOf(TargetClearDeviation{}).Name() +) diff --git a/apis/config/target_configblame_resource.go b/apis/config/target_configblame_resource.go new file mode 100644 index 00000000..49201fd7 --- /dev/null +++ b/apis/config/target_configblame_resource.go @@ -0,0 +1,76 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "context" + "fmt" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" +) + +var _ resource.ArbitrarySubResource = &TargetConfigBlame{} + +func (TargetConfigBlame) SubResourceName() string { + return "configblame" +} + +func (TargetConfigBlame) New() runtime.Object { + return &TargetConfigBlame{} // returns parent type — GET returns the full Target +} + +func (TargetConfigBlame) NewStorage(scheme *runtime.Scheme, parentStorage rest.Storage) (rest.Storage, error) { + return &targetConfigBlameREST{ + parentStore: parentStorage, + }, nil +} + +// targetBlameREST implements rest.Storage + rest.Getter +type targetConfigBlameREST struct { + parentStore rest.Storage +} + +func (r *targetConfigBlameREST) New() runtime.Object { + return &TargetConfigBlame{} +} + +func (r *targetConfigBlameREST) Destroy() {} + +func (r *targetConfigBlameREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + // Get the parent Target from the parent store + getter, ok := r.parentStore.(rest.Getter) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("parent store %T does not implement rest.Getter", r.parentStore)) + } + + obj, err := getter.Get(ctx, name, options) + if err != nil { + return nil, err + } + target, ok := obj.(*Target) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("expected *Target, got %T", obj)) + } + + return target.GetConfigBlame(ctx) +} diff --git a/apis/config/target_configblame_types.go b/apis/config/target_configblame_types.go new file mode 100644 index 00000000..48d97861 --- /dev/null +++ b/apis/config/target_configblame_types.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true + +// TargetConfigBlame is the Schema for the TargetConfigBlame API +type TargetConfigBlame struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + //+kubebuilder:pruning:PreserveUnknownFields + Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` +} + +var ( + TargetConfigBlameKind = reflect.TypeOf(TargetConfigBlame{}).Name() +) diff --git a/apis/config/target_helpers.go b/apis/config/target_helpers.go new file mode 100644 index 00000000..2937dfe2 --- /dev/null +++ b/apis/config/target_helpers.go @@ -0,0 +1,476 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "context" + "fmt" + + "github.com/google/uuid" + "github.com/henderiw/apiserver-store/pkg/storebackend" + "github.com/henderiw/logger/log" + "github.com/sdcio/config-server/apis/condition" + dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" + "github.com/sdcio/sdc-protos/sdcpb" + "google.golang.org/protobuf/encoding/protojson" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// GetCondition returns the condition based on the condition kind +func (r *Target) GetConditions() []condition.Condition { + return r.Status.GetConditions() +} + +// GetCondition returns the condition based on the condition kind +func (r *Target) GetCondition(t condition.ConditionType) condition.Condition { + return r.Status.GetCondition(t) +} + +// SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions +// to be set at once +func (r *Target) SetConditions(c ...condition.Condition) { + r.Status.SetConditions(c...) +} + +func (r *Target) IsConditionReady() bool { + return r.GetCondition(condition.ConditionTypeReady).Status == metav1.ConditionTrue +} + +func (r *TargetStatus) GetDiscoveryInfo() DiscoveryInfo { + if r.DiscoveryInfo != nil { + return *r.DiscoveryInfo + } + return DiscoveryInfo{} +} + +// BuildTarget returns a reource from a client Object a Spec/Status +func BuildTarget(meta metav1.ObjectMeta, spec TargetSpec) *Target { + return &Target{ + TypeMeta: metav1.TypeMeta{ + APIVersion: SchemeGroupVersion.Identifier(), + Kind: ConfigKind, + }, + ObjectMeta: meta, + Spec: spec, + } +} + +func BuildEmptyTarget() *Target { + return &Target{ + TypeMeta: metav1.TypeMeta{ + APIVersion: SchemeGroupVersion.Identifier(), + Kind: TargetKind, + }, + } +} + +func (r *Target) IsReady() bool { + return r.GetCondition(condition.ConditionTypeReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetDiscoveryReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetDatastoreReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetConnectionReady).Status == metav1.ConditionTrue +} + +func (r *Target) GetNamespacedName() types.NamespacedName { + return types.NamespacedName{Namespace: r.Namespace, Name: r.Name} +} + +func (r *Target) GetRunningConfig(ctx context.Context, opts *TargetRunningConfigOptions) (runtime.Object, error) { + targetKey := r.GetNamespacedName() + if !r.IsReady() { + return nil, apierrors.NewServiceUnavailable( + fmt.Sprintf("target %s is not ready: %s", targetKey, + r.GetCondition(condition.ConditionTypeReady).Message)) + } + + var format TargetFormat + if opts != nil { + format = ParseTargetFormat(opts.Format) + } + + cfg := &dsclient.Config{ + Address: dsclient.GetDataServerAddress(), + Insecure: true, + } + + dsclient, closeFn, err := dsclient.NewEphemeral(ctx, cfg) + if err != nil { + return nil, err + } + defer func() { + if err := closeFn(); err != nil { + log.FromContext(ctx).Error("failed to close connection", "Error", err) + } + }() + + rsp, err := dsclient.GetIntent(ctx, &sdcpb.GetIntentRequest{ + DatastoreName: storebackend.KeyFromNSN(targetKey).String(), + Intent: "running", + Format: FormatToProto(format), + }) + if err != nil { + return nil, err + } + + return &TargetRunningConfig{ + ObjectMeta: metav1.ObjectMeta{ + Name: r.Name, + Namespace: r.Namespace, + }, + Value: runtime.RawExtension{Raw: rsp.GetBlob()}, + }, nil +} + +func FormatToProto(f TargetFormat) sdcpb.Format { + switch f { + case Format_JSON_IETF: + return sdcpb.Format_Intent_Format_JSON_IETF + case Format_XML: + return sdcpb.Format_Intent_Format_XML + case Format_PROTO: + return sdcpb.Format_Intent_Format_PROTO + default: + return sdcpb.Format_Intent_Format_JSON + } +} + +func (r *Target) GetConfigBlame(ctx context.Context) (runtime.Object, error) { + targetKey := r.GetNamespacedName() + if !r.IsReady() { + return nil, apierrors.NewServiceUnavailable( + fmt.Sprintf("target %s is not ready: %s", targetKey, + r.GetCondition(condition.ConditionTypeReady).Message)) + } + + cfg := &dsclient.Config{ + Address: dsclient.GetDataServerAddress(), + Insecure: true, + } + + dsclient, closeFn, err := dsclient.NewEphemeral(ctx, cfg) + if err != nil { + return nil, err + } + defer func() { + if err := closeFn(); err != nil { + // You can use your preferred logging framework here + log.FromContext(ctx).Error("failed to close connection", "Error", err) + } + }() + + rsp, err := dsclient.BlameConfig(ctx, &sdcpb.BlameConfigRequest{ + DatastoreName: storebackend.KeyFromNSN(targetKey).String(), + IncludeDefaults: true, + }) + if err != nil { + return nil, err + } + + if rsp == nil || rsp.ConfigTree == nil { + return &TargetConfigBlame{ + ObjectMeta: metav1.ObjectMeta{ + Name: r.Name, + Namespace: r.Namespace, + }, + Value: runtime.RawExtension{Raw: nil}, + }, nil + } + + json, err := protojson.Marshal(rsp.ConfigTree) + if err != nil { + return nil, err + } + + return &TargetConfigBlame{ + ObjectMeta: metav1.ObjectMeta{ + Name: targetKey.Name, + Namespace: targetKey.Namespace, + }, + Value: runtime.RawExtension{Raw: json}, + }, nil +} + +func (r *Target) ClearDeviations(ctx context.Context, c client.Client, req *TargetClearDeviation) (runtime.Object, error) { + targetKey := r.GetNamespacedName() + if !r.IsReady() { + return nil, apierrors.NewServiceUnavailable( + fmt.Sprintf("target %s is not ready: %s", targetKey, + r.GetCondition(condition.ConditionTypeReady).Message)) + } + + spec := req.Spec + if spec == nil { + return nil, apierrors.NewBadRequest("spec is required") + } + + // Use spec namespace if provided, otherwise target's namespace + lookupNamespace := r.Namespace + + if configLister == nil { + return nil, apierrors.NewInternalError(fmt.Errorf("config lister not initialized")) + } + + // Fetch existing configs for the target + configsByName, err := configLister(ctx, c, r.Namespace, r.Name, lookupNamespace) + if err != nil { + return nil, err + } + + // Build the TransactionSetRequest + txReq, validationErrors := buildClearDeviationTxRequest(targetKey, spec, configsByName) + if len(validationErrors) > 0 { + return &TargetClearDeviation{ + ObjectMeta: metav1.ObjectMeta{Name: r.Name, Namespace: r.Namespace}, + Status: &TargetClearDeviationStatus{ + Message: "validation failed: unknown config names", + Results: validationErrors, + }, + }, nil + } + if len(txReq.Intents) == 0 { + return &TargetClearDeviation{ + ObjectMeta: metav1.ObjectMeta{Name: r.Name, Namespace: r.Namespace}, + Status: &TargetClearDeviationStatus{ + Message: "no configs to process", + }, + }, nil + } + + // Execute the transaction + rsp, txErr := executeClearDeviationTx(ctx, txReq) + + // Build the response + return &TargetClearDeviation{ + ObjectMeta: metav1.ObjectMeta{Name: r.Name, Namespace: r.Namespace}, + Status: buildClearDeviationStatus(spec.Config, configsByName, rsp, txErr), + }, nil +} + +// buildClearDeviationTxRequest constructs the TransactionSetRequest from +// the clear deviation configs. It validates that every requested config name +// exists as a known intent. Unknown names are returned as validation errors. +func buildClearDeviationTxRequest( + targetKey types.NamespacedName, + spec *TargetClearDeviationSpec, + configsByName map[string]*Config, +) (*sdcpb.TransactionSetRequest, []TargetClearDeviationConfigResult) { + + var validationErrors []TargetClearDeviationConfigResult + intents := make([]*sdcpb.TransactionIntent, 0, len(spec.Config)) + for _, clearCfg := range spec.Config { + cfg, found := configsByName[clearCfg.Name] + if !found { + validationErrors = append(validationErrors, TargetClearDeviationConfigResult{ + Name: clearCfg.Name, + Success: false, + Errors: []string{fmt.Sprintf("config %q not found for target %s", clearCfg.Name, targetKey.Name)}, + }) + continue + } + + if cfg.IsRevertive() { + validationErrors = append(validationErrors, TargetClearDeviationConfigResult{ + Name: clearCfg.Name, + Success: false, + Errors: []string{fmt.Sprintf("config %q is revertive for target %s, not expecting clearDeviations", clearCfg.Name, targetKey.Name)}, + }) + continue + } + + revertPaths := make([]*sdcpb.Path, 0, len(clearCfg.Paths)) + var pathErrors []string + for _, p := range clearCfg.Paths { + path, err := sdcpb.ParsePath(p) + if err != nil { + pathErrors = append(pathErrors, fmt.Sprintf("invalid path %q: %v", p, err)) + continue + } + revertPaths = append(revertPaths, path) + } + + if len(pathErrors) > 0 { + validationErrors = append(validationErrors, TargetClearDeviationConfigResult{ + Name: clearCfg.Name, + Success: false, + Errors: pathErrors, + }) + continue + } + update, err := GetIntentUpdate(cfg, true) + if err != nil { + validationErrors = append(validationErrors, TargetClearDeviationConfigResult{ + Name: clearCfg.Name, + Success: false, + Errors: []string{fmt.Sprintf("failed to build intent update for config %q: %v", clearCfg.Name, err)}, + }) + continue + } + + intents = append(intents, &sdcpb.TransactionIntent{ + Intent: GetGVKNSN(cfg), + Priority: int32(cfg.Spec.Priority), + RevertPaths: revertPaths, + Update: update, + NonRevertive: !cfg.IsRevertive(), + }) + } + + // Early exit on validation errors + if len(validationErrors) > 0 { + return nil, validationErrors + } + + return &sdcpb.TransactionSetRequest{ + TransactionId: uuid.New().String(), + DatastoreName: storebackend.KeyFromNSN(targetKey).String(), + DryRun: false, + Timeout: ptr.To(int32(60)), + Intents: intents, + }, nil +} + +func GetGVKNSN(obj client.Object) string { + return fmt.Sprintf("%s.%s", obj.GetNamespace(), obj.GetName()) +} + +// executeClearDeviationTx opens a connection to the dataserver, +// sends the TransactionSetRequest, and confirms on success. +func executeClearDeviationTx( + ctx context.Context, + txReq *sdcpb.TransactionSetRequest, +) (*sdcpb.TransactionSetResponse, error) { + cfg := &dsclient.Config{ + Address: dsclient.GetDataServerAddress(), + Insecure: true, + } + dsClient, closeFn, err := dsclient.NewEphemeral(ctx, cfg) + if err != nil { + return nil, err + } + defer func() { + if err := closeFn(); err != nil { + log.FromContext(ctx).Error("failed to close connection", "error", err) + } + }() + + rsp, err := dsClient.TransactionSet(ctx, txReq) + if err != nil { + return rsp, err + } + + // Confirm the transaction + if _, err := dsClient.TransactionConfirm(ctx, &sdcpb.TransactionConfirmRequest{ + DatastoreName: txReq.DatastoreName, + TransactionId: txReq.TransactionId, + }); err != nil { + return rsp, fmt.Errorf("transaction confirm failed: %w", err) + } + + return rsp, nil +} + +// buildClearDeviationStatus assembles the response status from the +// transaction response and any error. +func buildClearDeviationStatus( + clearConfigs []TargetClearDeviationConfig, + configsByName map[string]*Config, + rsp *sdcpb.TransactionSetResponse, + err error, +) *TargetClearDeviationStatus { + status := &TargetClearDeviationStatus{} + + if err != nil { + status.Message = err.Error() + } + + if rsp == nil { + for _, cfg := range clearConfigs { + status.Results = append(status.Results, TargetClearDeviationConfigResult{ + Name: cfg.Name, + Success: false, + Errors: []string{status.Message}, + }) + } + return status + } + + status.Warnings = rsp.Warnings + + // Map intent names (GVKNSN) back to config names for the response + intentToName := make(map[string]string, len(configsByName)) + for name, cfg := range configsByName { + intentToName[GetGVKNSN(cfg)] = name + } + + responded := make(map[string]bool, len(rsp.Intents)) + for intentKey, intent := range rsp.Intents { + name := intentKey + if mapped, ok := intentToName[intentKey]; ok { + name = mapped + } + responded[name] = true + status.Results = append(status.Results, TargetClearDeviationConfigResult{ + Name: name, + Success: len(intent.Errors) == 0, + Errors: intent.Errors, + }) + } + + // Configs not in response succeeded silently + for _, cfg := range clearConfigs { + if !responded[cfg.Name] { + status.Results = append(status.Results, TargetClearDeviationConfigResult{ + Name: cfg.Name, + Success: err == nil, + }) + } + } + + return status +} + +// useSpec indicates to use the spec as the confifSpec, typically set to true; when set to false it means we are recovering +// the config +func GetIntentUpdate(config *Config, useSpec bool) ([]*sdcpb.Update, error) { + update := make([]*sdcpb.Update, 0, len(config.Spec.Config)) + configSpec := config.Spec.Config + if !useSpec && config.Status.AppliedConfig != nil { + update = make([]*sdcpb.Update, 0, len(config.Status.AppliedConfig.Config)) + configSpec = config.Status.AppliedConfig.Config + } + + for _, config := range configSpec { + path, err := sdcpb.ParsePath(config.Path) + if err != nil { + return nil, err + } + update = append(update, &sdcpb.Update{ + Path: path, + Value: &sdcpb.TypedValue{ + Value: &sdcpb.TypedValue_JsonVal{ + JsonVal: config.Value.Raw, + }, + }, + }) + } + return update, nil +} diff --git a/apis/config/target_resource.go b/apis/config/target_resource.go new file mode 100644 index 00000000..0db7e980 --- /dev/null +++ b/apis/config/target_resource.go @@ -0,0 +1,335 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "context" + "fmt" + "strings" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + "github.com/henderiw/apiserver-store/pkg/generic/registry" + "github.com/sdcio/config-server/apis/condition" + apiequality "k8s.io/apimachinery/pkg/api/equality" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/validation/field" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/registry/rest" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const ( + TargetPlural = "targets" + TargetSingular = "target" +) + +var ( + TargetShortNames = []string{} + TargetCategories = []string{"sdc", "knet"} +) + +var subResourceClient client.Client + +// SetSubResourceClient is called once during server init to inject the client +func SetSubResourceClient(c client.Client) { + subResourceClient = c +} + +// ConfigListerFn lists configs for a target, returning them indexed by name. +type ConfigListerFn func(ctx context.Context, c client.Client, targetNamespace, targetName, lookupNamespace string) (map[string]*Config, error) + +var configLister ConfigListerFn + +func SetConfigLister(fn ConfigListerFn) { + configLister = fn +} + +// +k8s:deepcopy-gen=false +var _ resource.InternalObject = &Target{} +var _ resource.ObjectList = &TargetList{} +var _ resource.ObjectWithStatusSubResource = &Target{} +var _ resource.StatusSubResource = &TargetStatus{} + +var _ resource.ObjectWithArbitrarySubResource = &Target{} + +func (r *Target) GetArbitrarySubResources() []resource.ArbitrarySubResource { + return []resource.ArbitrarySubResource{ + &TargetRunningConfig{}, + NewTargetClearDeviationSubResource(subResourceClient), + &TargetConfigBlame{}, + } +} + +func (Target) GetGroupVersionResource() schema.GroupVersionResource { + return schema.GroupVersionResource{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Resource: TargetPlural, + } +} + +// IsStorageVersion returns true -- Target is used as the internal version. +// IsStorageVersion implements resource.Object +func (Target) IsStorageVersion() bool { + return true +} + +// NamespaceScoped returns true to indicate Fortune is a namespaced resource. +// NamespaceScoped implements resource.Object +func (Target) NamespaceScoped() bool { + return true +} + +// GetObjectMeta implements resource.Object +// GetObjectMeta implements resource.Object +func (r *Target) GetObjectMeta() *metav1.ObjectMeta { + return &r.ObjectMeta +} + +// GetSingularName returns the singular name of the resource +// GetSingularName implements resource.Object +func (Target) GetSingularName() string { + return TargetSingular +} + +// GetShortNames returns the shortnames for the resource +// GetShortNames implements resource.Object +func (Target) GetShortNames() []string { + return TargetShortNames +} + +// GetCategories return the categories of the resource +// GetCategories implements resource.Object +func (Target) GetCategories() []string { + return TargetCategories +} + +// New return an empty resource +// New implements resource.Object +func (Target) New() runtime.Object { + return &Target{} +} + +// NewList return an empty resourceList +// NewList implements resource.Object +func (Target) NewList() runtime.Object { + return &TargetList{} +} + +// IsEqual returns a bool indicating if the desired state of both resources is equal or not +func (r *Target) IsEqual(ctx context.Context, obj, old runtime.Object) bool { + newobj := obj.(*Target) + oldobj := old.(*Target) + + if !apiequality.Semantic.DeepEqual(oldobj.ObjectMeta, newobj.ObjectMeta) { + return false + } + // if equal we also test the spec + return apiequality.Semantic.DeepEqual(oldobj.Spec, newobj.Spec) +} + +// GetStatus return the resource.StatusSubResource interface +func (r *Target) GetStatus() resource.StatusSubResource { + return r.Status +} + +// IsStatusEqual returns a bool indicating if the status of both resources is equal or not +func (r *Target) IsStatusEqual(ctx context.Context, obj, old runtime.Object) bool { + newobj := obj.(*Target) + oldobj := old.(*Target) + return apiequality.Semantic.DeepEqual(oldobj.Status, newobj.Status) +} + +// PrepareForStatusUpdate prepares the status update +func (r *Target) PrepareForStatusUpdate(ctx context.Context, obj, old runtime.Object) { + newObj := obj.(*Target) + oldObj := old.(*Target) + newObj.Spec = oldObj.Spec + + // Status updates are for only for updating status, not objectmeta. + metav1.ResetObjectMetaForStatus(&newObj.ObjectMeta, &newObj.ObjectMeta) +} + +// ValidateStatusUpdate validates status updates +func (r *Target) ValidateStatusUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + var allErrs field.ErrorList + return allErrs +} + +// SubResourceName resturns the name of the subresource +// SubResourceName implements the resource.StatusSubResource +func (TargetStatus) SubResourceName() string { + return fmt.Sprintf("%s/%s", TargetPlural, "status") +} + +// CopyTo copies the content of the status subresource to a parent resource. +// CopyTo implements the resource.StatusSubResource +func (r TargetStatus) CopyTo(obj resource.ObjectWithStatusSubResource) { + parent, ok := obj.(*Target) + if ok { + parent.Status = r + } +} + +// GetListMeta returns the ListMeta +// GetListMeta implements the resource.ObjectList +func (r *TargetList) GetListMeta() *metav1.ListMeta { + return &r.ListMeta +} + +// TableConvertor return the table format of the resource +func (r *Target) TableConvertor() func(gr schema.GroupResource) rest.TableConvertor { + return func(gr schema.GroupResource) rest.TableConvertor { + return registry.NewTableConverter( + gr, + func(obj runtime.Object) []interface{} { + target, ok := obj.(*Target) + if !ok { + return nil + } + d := target.Status.GetDiscoveryInfo() + return []interface{}{ + fmt.Sprintf("%s.%s/%s", strings.ToLower(TargetKind), GroupName, target.Name), + target.GetCondition(condition.ConditionTypeReady).Status, + target.GetCondition(condition.ConditionTypeReady).Message, + target.Spec.Provider, + d.Version, + target.Spec.Address, + d.Platform, + d.SerialNumber, + d.MacAddress, + } + }, + []metav1.TableColumnDefinition{ + {Name: "NAME", Type: "string"}, + {Name: "READY", Type: "string"}, + {Name: "REASON", Type: "string"}, + {Name: "PROVIDER", Type: "string"}, + {Name: "VERSION", Type: "string"}, + {Name: "ADDRESS", Type: "string"}, + {Name: "PLATFORM", Type: "string"}, + {Name: "SERIALNUMBER", Type: "string"}, + {Name: "MACADDRESS", Type: "string"}, + }, + ) + } +} + +// FieldLabelConversion is the schema conversion function for normalizing the FieldSelector for the resource +func (r *Target) FieldLabelConversion() runtime.FieldLabelConversionFunc { + return func(label, value string) (internalLabel, internalValue string, err error) { + switch label { + case "metadata.name": + return label, value, nil + case "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("%q is not a known field selector", label) + } + } +} + +func (r *Target) FieldSelector() func(ctx context.Context, fieldSelector fields.Selector) (resource.Filter, error) { + return func(ctx context.Context, fieldSelector fields.Selector) (resource.Filter, error) { + filter := &TargetFilter{} + + if fieldSelector != nil { + for _, requirement := range fieldSelector.Requirements() { + switch requirement.Operator { + case selection.Equals, selection.DoesNotExist: + if requirement.Value == "" { + return filter, apierrors.NewBadRequest(fmt.Sprintf("unsupported fieldSelector value %q for field %q with operator %q", requirement.Value, requirement.Field, requirement.Operator)) + } + default: + return filter, apierrors.NewBadRequest(fmt.Sprintf("unsupported fieldSelector operator %q for field %q", requirement.Operator, requirement.Field)) + } + + switch requirement.Field { + case "metadata.name": + filter.Name = requirement.Value + case "metadata.namespace": + filter.Namespace = requirement.Value + default: + return filter, apierrors.NewBadRequest(fmt.Sprintf("unknown fieldSelector field %q", requirement.Field)) + } + } + } + // add namespace to the filter selector if specified + namespace, ok := genericapirequest.NamespaceFrom(ctx) + if ok { + if filter.Namespace == "" { + filter.Namespace = namespace + } + } + + return filter, nil + } + +} + +type TargetFilter struct { + // Name filters by the name of the objects + Name string `protobuf:"bytes,1,opt,name=name"` + + // Namespace filters by the namespace of the objects + Namespace string `protobuf:"bytes,2,opt,name=namespace"` +} + +func (r *TargetFilter) Filter(ctx context.Context, obj runtime.Object) bool { + o, ok := obj.(*Target) + if !ok { + return true + } + if r.Name != "" && o.GetName() != r.Name { + return true + } + if r.Namespace != "" && o.GetNamespace() != r.Namespace { + return true + } + return false +} + +func (r *Target) PrepareForCreate(ctx context.Context, obj runtime.Object) { + // status cannot be set upon create -> reset it + newobj := obj.(*Target) + newobj.Status = TargetStatus{} +} + +// ValidateCreate statically validates +func (r *Target) ValidateCreate(ctx context.Context, obj runtime.Object) field.ErrorList { + var allErrs field.ErrorList + + return allErrs +} + +func (r *Target) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + // ensure the status dont get updated + newobj := obj.(*Target) + oldObj := old.(*Target) + newobj.Status = oldObj.Status +} + +func (r *Target) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + var allErrs field.ErrorList + + return allErrs +} diff --git a/apis/config/target_runningconfig_resource.go b/apis/config/target_runningconfig_resource.go new file mode 100644 index 00000000..2823da2b --- /dev/null +++ b/apis/config/target_runningconfig_resource.go @@ -0,0 +1,108 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "context" + "fmt" + "net/url" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" +) + +var _ resource.ArbitrarySubResource = &TargetRunningConfig{} + +func (TargetRunningConfig) SubResourceName() string { + return "runningconfig" +} + +func (TargetRunningConfig) New() runtime.Object { + return &TargetRunningConfig{} // returns parent type — GET returns the full Target +} + +func (TargetRunningConfig) NewStorage(scheme *runtime.Scheme, parentStorage rest.Storage) (rest.Storage, error) { + return &targetRunningConfigREST{ + parentStore: parentStorage, + }, nil +} + +var _ resource.ArbitrarySubResourceWithOptions = &TargetRunningConfig{} + +func (TargetRunningConfig) NewGetOptions() runtime.Object { + return &TargetRunningConfigOptions{} +} + +var _ resource.ArbitrarySubResourceWithOptionsConverter = &TargetRunningConfig{} + +func (TargetRunningConfig) ConvertFromURLValues() func(a, b interface{}, scope conversion.Scope) error { + return func(a, b interface{}, scope conversion.Scope) error { + values := a.(*url.Values) + out := b.(*TargetRunningConfigOptions) + out.Path = values.Get("path") + out.Format = values.Get("format") + return nil + } +} + +// targetRunningREST implements rest.Storage + rest.Getter +type targetRunningConfigREST struct { + parentStore rest.Storage +} + +func (r *targetRunningConfigREST) New() runtime.Object { + return &TargetRunningConfig{} +} + +func (r *targetRunningConfigREST) Destroy() {} + +func (r *targetRunningConfigREST) NewGetOptions() (runtime.Object, bool, string) { + // Returns: (options object, decode from body?, single query param name) + return &TargetRunningConfigOptions{}, false, "" +} + +func (r *targetRunningConfigREST) Get(ctx context.Context, name string, options runtime.Object) (runtime.Object, error) { + opts, ok := options.(*TargetRunningConfigOptions) + if !ok { + return nil, apierrors.NewBadRequest( + fmt.Sprintf("expected TargetRunningConfigOptions, got %T", options)) + } + + // Get the parent Target from the parent store + // Get the parent Target from the parent store + getter, ok := r.parentStore.(rest.Getter) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("parent store %T does not implement rest.Getter", r.parentStore)) + } + obj, err := getter.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + return nil, err + } + target, ok := obj.(*Target) + if !ok { + return nil, apierrors.NewInternalError( + fmt.Errorf("expected *Target, got %T", obj)) + } + + return target.GetRunningConfig(ctx, opts) + +} diff --git a/apis/config/target_runningconfig_types.go b/apis/config/target_runningconfig_types.go new file mode 100644 index 00000000..28bf0e20 --- /dev/null +++ b/apis/config/target_runningconfig_types.go @@ -0,0 +1,75 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true + +// TargetRunningConfig is the Schema for the TargetRunning API +type TargetRunningConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + //+kubebuilder:pruning:PreserveUnknownFields + Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// TargetRunningOptions is the Option Parametsrs for the TargetRunningOptions QueryParamters +type TargetRunningConfigOptions struct { + metav1.TypeMeta `json:",inline"` + + // Path filters the running config to a subtree + Path string `json:"path,omitempty"` + // Format controls output format (json, json_ietf, xml, proto) + // +kubebuilder:validation:Enum=json;json_ietf;xml;proto + // +kubebuilder:default=json + Format string `json:"format,omitempty"` +} + +// Format defines the output encoding format for running config +// +enum +type TargetFormat string + +const ( + Format_JSON TargetFormat = "json" + Format_JSON_IETF TargetFormat = "json_ietf" + Format_XML TargetFormat = "xml" + Format_PROTO TargetFormat = "proto" +) + +// ParseTargetFormat converts a string to TargetFormat, defaulting to JSON for unknown values. +func ParseTargetFormat(s string) TargetFormat { + switch TargetFormat(s) { + case Format_JSON, Format_JSON_IETF, Format_XML, Format_PROTO: + return TargetFormat(s) + default: + return Format_JSON + } +} + +var ( + TargetRunningConfigKind = reflect.TypeOf(TargetRunningConfig{}).Name() +) diff --git a/apis/config/target_types.go b/apis/config/target_types.go new file mode 100644 index 00000000..143e2b27 --- /dev/null +++ b/apis/config/target_types.go @@ -0,0 +1,108 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package config + +import ( + "reflect" + + "github.com/sdcio/config-server/apis/condition" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// TargetSpec defines the desired state of Target +type TargetSpec struct { + // Provider specifies the provider using this target. + Provider string `json:"provider" protobuf:"bytes,1,opt,name=provider"` + // Address defines the address to connect to the target + Address string `json:"address" protobuf:"bytes,2,opt,name=address"` + // TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target + invv1alpha1.TargetProfile `json:",inline" protobuf:"bytes,3,opt,name=targetProfile"` +} + +// TargetStatus defines the observed state of Target +type TargetStatus struct { + // ConditionedStatus provides the status of the Target using conditions + condition.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` + // Discovery info defines the information retrieved during discovery + DiscoveryInfo *DiscoveryInfo `json:"discoveryInfo,omitempty" protobuf:"bytes,2,opt,name=discoveryInfo"` + // UsedReferences track the resource used to reconcile the cr + UsedReferences *TargetStatusUsedReferences `json:"usedReferences,omitempty" protobuf:"bytes,3,opt,name=usedReferences"` +} + +type DiscoveryInfo struct { + // Protocol used for discovery + Protocol string `json:"protocol,omitempty" protobuf:"bytes,1,opt,name=protocol"` + // Type associated with the target + Provider string `json:"provider,omitempty" protobuf:"bytes,2,opt,name=provider"` + // Version associated with the target + Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"` + // Hostname associated with the target + Hostname string `json:"hostname,omitempty" protobuf:"bytes,4,opt,name=hostname"` + // Platform associated with the target + Platform string `json:"platform,omitempty" protobuf:"bytes,5,opt,name=platform"` + // MacAddress associated with the target + MacAddress string `json:"macAddress,omitempty" protobuf:"bytes,6,opt,name=macAddress"` + // SerialNumber associated with the target + SerialNumber string `json:"serialNumber,omitempty" protobuf:"bytes,7,opt,name=serialNumber"` + // Supported Encodings of the target + // +listType=atomic + SupportedEncodings []string `json:"supportedEncodings,omitempty" protobuf:"bytes,8,rep,name=supportedEncodings"` + // Last discovery time + //LastSeen metav1.Time `json:"lastSeen,omitempty"` +} + +type TargetStatusUsedReferences struct { + SecretResourceVersion string `json:"secretResourceVersion,omitempty" protobuf:"bytes,1,opt,name=secretResourceVersion"` + TLSSecretResourceVersion string `json:"tlsSecretResourceVersion,omitempty" protobuf:"bytes,2,opt,name=tlsSecretResourceVersion"` + ConnectionProfileResourceVersion string `json:"connectionProfileResourceVersion" protobuf:"bytes,3,opt,name=connectionProfileResourceVersion"` + SyncProfileResourceVersion string `json:"syncProfileResourceVersion" protobuf:"bytes,4,opt,name=syncProfileResourceVersion"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:storageversion +// +kubebuilder:subresource:status +// +kubebuilder:resource:categories={sdc} + +// Target is the Schema for the Target API +// +k8s:openapi-gen=true +type Target struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec TargetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status TargetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true + +// TargetList contains a list of Targets +type TargetList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []Target `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +var ( + TargetKind = reflect.TypeOf(Target{}).Name() + TargetGroupKind = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetKind}.String() + TargetKindAPIVersion = TargetKind + "." + SchemeGroupVersion.String() + TargetGroupVersionKind = SchemeGroupVersion.WithKind(TargetKind) +) diff --git a/apis/config/v1alpha1/condition.go b/apis/config/v1alpha1/condition.go index de0a5de1..6b4d5c22 100644 --- a/apis/config/v1alpha1/condition.go +++ b/apis/config/v1alpha1/condition.go @@ -23,18 +23,25 @@ import ( // Condition Types. const ( - ConditionTypeConfigReady condv1alpha1.ConditionType = "ConfigReady" - ConditionTypeTargetReady condv1alpha1.ConditionType = "TargetReady" + // Config related conditions + ConditionTypeConfigReady condv1alpha1.ConditionType = "ConfigReady" + ConditionTypeTargetForConfigReady condv1alpha1.ConditionType = "TargetForConfigReady" + + // Target relation conditions + // ConditionTypeDiscoveryReady represents the resource discovery ready condition + ConditionTypeTargetDiscoveryReady condv1alpha1.ConditionType = "TargetDiscoveryReady" + // ConditionTypeDatastoreReady represents the resource datastore ready condition + ConditionTypeTargetDatastoreReady condv1alpha1.ConditionType = "TargetDatastoreReady" + // ConditionTypeConfigRecoveryReady represents the resource config recovery ready condition + ConditionTypeTargetConfigRecoveryReady condv1alpha1.ConditionType = "TargetConfigRecoveryReady" + // ConditionTypeTargetConnectionReady represents the resource target ready condition + ConditionTypeTargetConnectionReady condv1alpha1.ConditionType = "TargetConnectionReady" ) // Reasons a resource is ready or not const ( - //ConditionReasonDeleting condv1alpha1.ConditionReason = "deleting" ConditionReasonCreating condv1alpha1.ConditionReason = "creating" ConditionReasonUpdating condv1alpha1.ConditionReason = "updating" - //ConditionReasonTargetDeleted condv1alpha1.ConditionReason = "target Deleted" - ConditionReasonTargetNotReady condv1alpha1.ConditionReason = "target not ready" - ConditionReasonTargetNotFound condv1alpha1.ConditionReason = "target not found" ) // Creating returns a condition that indicates a create transaction @@ -61,7 +68,6 @@ func Updating() condv1alpha1.Condition { }} } - // ConfigReady return a condition that indicates the config // get re-applied when the target became ready func ConfigReady(msg string) condv1alpha1.Condition { @@ -86,12 +92,11 @@ func ConfigFailed(msg string) condv1alpha1.Condition { }} } - -// TargetReady return a condition that indicates +// TargetForConfigReady return a condition that indicates // the target became ready -func TargetReady(msg string) condv1alpha1.Condition { +func TargetForConfigReady(msg string) condv1alpha1.Condition { return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeTargetReady), + Type: string(ConditionTypeTargetForConfigReady), Status: metav1.ConditionTrue, LastTransitionTime: metav1.Now(), Reason: string(condv1alpha1.ConditionReasonReady), @@ -99,14 +104,132 @@ func TargetReady(msg string) condv1alpha1.Condition { }} } -// ConfigFailed returns a condition that indicates the config +// TargetForConfigFailed returns a condition that indicates the config // is in failed condition due to a dependency -func TargetFailed(msg string) condv1alpha1.Condition { +func TargetForConfigFailed(msg string) condv1alpha1.Condition { return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeTargetReady), + Type: string(ConditionTypeTargetForConfigReady), Status: metav1.ConditionFalse, LastTransitionTime: metav1.Now(), Reason: string(condv1alpha1.ConditionReasonFailed), Message: msg, }} -} \ No newline at end of file +} + +// Target related conditions + +// TargetDatastoreReady indicates the datastire is ready +func TargetDatastoreReady() condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetDatastoreReady), + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonReady), + }} +} + +// TargetDatastoreFailed returns a condition that indicates the datastore +// failed to get reconciled. +func TargetDatastoreFailed(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetDatastoreReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonFailed), + Message: msg, + }} +} + +// TargetDatastoreSchemaNotReady returns a condition that indicates the schema +// of the datastore is not ready. +func TargetDatastoreSchemaNotReady(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetDatastoreReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string("schema not ready"), + Message: msg, + }} +} + +// TargetConfigRecoveryReady return a condition that indicates the config +// get re-applied when the target became ready +func TargetConfigRecoveryReady(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetConfigRecoveryReady), + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonReady), + Message: msg, + }} +} + +// TargetConfigRecoveryFailed returns a condition that indicates the config +// is in failed condition due to a dependency +func TargetConfigRecoveryFailed(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetConfigRecoveryReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonFailed), + Message: msg, + }} +} + +// TargetConfigRecoveryReApplyFailed returns a condition that indicates the config +// we we reapplied to the target +func TargetConfigRecoveryReApplyFailed(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetConfigRecoveryReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string("recovery config transaction failed"), + Message: msg, + }} +} + +// TargetDiscoveryReady return a condition that indicates the discovery +// is ready +func TargetDiscoveryReady() condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetDiscoveryReady), + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonReady), + }} +} + +// TargetDiscoveryFailed returns a condition that indicates the discovery +// is in failed condition +func TargetDiscoveryFailed(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetDiscoveryReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonFailed), + Message: msg, + }} +} + +// TargetConnectionReady return a condition that indicates the target connection +// is ready +func TargetConnectionReady() condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetConnectionReady), + Status: metav1.ConditionTrue, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonReady), + }} +} + +// TargetConnectionFailed returns a condition that indicates the target connection +// is in failed condition +func TargetConnectionFailed(msg string) condv1alpha1.Condition { + return condv1alpha1.Condition{Condition: metav1.Condition{ + Type: string(ConditionTypeTargetConnectionReady), + Status: metav1.ConditionFalse, + LastTransitionTime: metav1.Now(), + Reason: string(condv1alpha1.ConditionReasonFailed), + Message: msg, + }} +} diff --git a/apis/config/v1alpha1/config_helpers.go b/apis/config/v1alpha1/config_helpers.go index 571636e4..c8cd2d98 100644 --- a/apis/config/v1alpha1/config_helpers.go +++ b/apis/config/v1alpha1/config_helpers.go @@ -275,13 +275,13 @@ func (r *Config) DeepObjectCopy() client.Object { func (r *Config) SetOverallStatus() { cfgC := r.GetCondition(ConditionTypeConfigReady) - tgtC := r.GetCondition(ConditionTypeTargetReady) + tgtC := r.GetCondition(ConditionTypeTargetForConfigReady) ready := cfgC.IsTrue() && tgtC.IsTrue() if ready { // important: only set overall Ready type, do not drop other conditions - r.Status.SetConditions(condv1alpha1.ReadyWithMsg("config applied and target ready")) + r.Status.SetConditions(condv1alpha1.ReadyWithMsg("")) return } @@ -306,3 +306,35 @@ func (r *Config) SetOverallStatus() { r.Status.SetConditions(condv1alpha1.Failed(msg)) } + +func GetOverallCondition(r *Config) condv1alpha1.Condition { + cfgC := r.GetCondition(ConditionTypeConfigReady) + tgtC := r.GetCondition(ConditionTypeTargetForConfigReady) + + ready := cfgC.IsTrue() && tgtC.IsTrue() + + if ready { + return condv1alpha1.ReadyWithMsg("applied") + } + + // pick a useful message + msg := "" + switch { + case !cfgC.IsTrue(): + if cfgC.Message != "" { + msg = cfgC.Message + } else { + msg = "config not applied" + } + case !tgtC.IsTrue(): + if tgtC.Message != "" { + msg = tgtC.Message + } else { + msg = "target not ready" + } + default: + msg = "not ready" + } + + return condv1alpha1.Failed(msg) +} diff --git a/apis/config/v1alpha1/config_types.go b/apis/config/v1alpha1/config_types.go index 04ec27f2..7d96f790 100644 --- a/apis/config/v1alpha1/config_types.go +++ b/apis/config/v1alpha1/config_types.go @@ -34,7 +34,8 @@ type ConfigSpec struct { // Revertive defines if this CR is enabled for revertive or non revertve operation Revertive *bool `json:"revertive,omitempty" protobuf:"varint,3,opt,name=revertive"` // Config defines the configuration to be applied to a target device - //+kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:pruning:PreserveUnknownFields + // +listType=atomic Config []ConfigBlob `json:"config" protobuf:"bytes,4,rep,name=config"` } diff --git a/apis/config/v1alpha1/configset_types.go b/apis/config/v1alpha1/configset_types.go index ad94968d..d3c3f409 100644 --- a/apis/config/v1alpha1/configset_types.go +++ b/apis/config/v1alpha1/configset_types.go @@ -26,7 +26,7 @@ import ( // ConfigSetSpec defines the desired state of Config type ConfigSetSpec struct { // Targets defines the targets on which this configSet applies - Target Target `json:"target" protobuf:"bytes,1,opt,name=target"` + Target ConfigSetTarget `json:"target" protobuf:"bytes,1,opt,name=target"` // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete // will follow Lifecycle *Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,2,opt,name=lifecycle"` @@ -36,10 +36,11 @@ type ConfigSetSpec struct { Revertive *bool `json:"revertive,omitempty" protobuf:"varint,4,opt,name=revertive"` // Config defines the configuration to be applied to a target device //+kubebuilder:pruning:PreserveUnknownFields + // +listType=atomic Config []ConfigBlob `json:"config" protobuf:"bytes,5,rep,name=config"` } -type Target struct { +type ConfigSetTarget struct { // TargetSelector defines the selector used to select the targets to which the config applies TargetSelector *metav1.LabelSelector `json:"targetSelector,omitempty" protobuf:"bytes,1,opt,name=targetSelector"` } @@ -50,10 +51,11 @@ type ConfigSetStatus struct { // if the condition is true the other attributes in the status are meaningful condv1alpha1.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // Targets defines the status of the configSet resource on the respective target - Targets []TargetStatus `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` + // +listType=atomic + Targets []ConfigSetTargetStatus `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` } -type TargetStatus struct { +type ConfigSetTargetStatus struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // right now we assume the namespace of the config and target are aligned //NameSpace string `json:"namespace" protobuf:"bytes,2,opt,name=name"` diff --git a/apis/config/v1alpha1/deviation_types.go b/apis/config/v1alpha1/deviation_types.go index cf30a468..9b604000 100644 --- a/apis/config/v1alpha1/deviation_types.go +++ b/apis/config/v1alpha1/deviation_types.go @@ -27,6 +27,7 @@ import ( type DeviationSpec struct { DeviationType *DeviationType `json:"deviationType,omitempty" protobuf:"bytes,1,opt,name=deviationType"` // Deviations identify the configuration deviation based on the last applied config CR + // +listType=atomic Deviations []ConfigDeviation `json:"deviations,omitempty" protobuf:"bytes,2,rep,name=deviations"` } @@ -53,9 +54,9 @@ type ConfigDeviation struct { Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"` // DesiredValue is the desired value of the config belonging to the path DesiredValue *string `json:"desiredValue,omitempty" protobuf:"bytes,2,opt,name=desiredValue"` - // CurrentValue defines the current value of the config belonging to the path + // ActualValue defines the current value of the config belonging to the path // that is currently configured on the target - CurrentValue *string `json:"actualValue,omitempty" protobuf:"bytes,3,opt,name=actualValue"` + ActualValue *string `json:"actualValue,omitempty" protobuf:"bytes,3,opt,name=actualValue"` // Reason defines the reason of the deviation Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` } diff --git a/apis/config/v1alpha1/generated.pb.go b/apis/config/v1alpha1/generated.pb.go index 131ffd7d..585f452f 100644 --- a/apis/config/v1alpha1/generated.pb.go +++ b/apis/config/v1alpha1/generated.pb.go @@ -23,888 +23,86 @@ import ( io "io" - proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -func (m *Config) Reset() { *m = Config{} } -func (*Config) ProtoMessage() {} -func (*Config) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{2} -} -func (m *Config) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Config) XXX_Merge(src proto.Message) { - xxx_messageInfo_Config.Merge(m, src) -} -func (m *Config) XXX_Size() int { - return m.Size() -} -func (m *Config) XXX_DiscardUnknown() { - xxx_messageInfo_Config.DiscardUnknown(m) -} - -var xxx_messageInfo_Config proto.InternalMessageInfo - -func (m *ConfigBlame) Reset() { *m = ConfigBlame{} } -func (*ConfigBlame) ProtoMessage() {} -func (*ConfigBlame) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{3} -} -func (m *ConfigBlame) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigBlame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigBlame) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigBlame.Merge(m, src) -} -func (m *ConfigBlame) XXX_Size() int { - return m.Size() -} -func (m *ConfigBlame) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigBlame.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigBlame proto.InternalMessageInfo - -func (m *ConfigBlameList) Reset() { *m = ConfigBlameList{} } -func (*ConfigBlameList) ProtoMessage() {} -func (*ConfigBlameList) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{4} -} -func (m *ConfigBlameList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigBlameList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigBlameList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigBlameList.Merge(m, src) -} -func (m *ConfigBlameList) XXX_Size() int { - return m.Size() -} -func (m *ConfigBlameList) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigBlameList.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigBlameList proto.InternalMessageInfo - -func (m *ConfigBlameSpec) Reset() { *m = ConfigBlameSpec{} } -func (*ConfigBlameSpec) ProtoMessage() {} -func (*ConfigBlameSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{5} -} -func (m *ConfigBlameSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigBlameSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigBlameSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigBlameSpec.Merge(m, src) -} -func (m *ConfigBlameSpec) XXX_Size() int { - return m.Size() -} -func (m *ConfigBlameSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigBlameSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigBlameSpec proto.InternalMessageInfo - -func (m *ConfigBlameStatus) Reset() { *m = ConfigBlameStatus{} } -func (*ConfigBlameStatus) ProtoMessage() {} -func (*ConfigBlameStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{6} -} -func (m *ConfigBlameStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigBlameStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigBlameStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigBlameStatus.Merge(m, src) -} -func (m *ConfigBlameStatus) XXX_Size() int { - return m.Size() -} -func (m *ConfigBlameStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigBlameStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigBlameStatus proto.InternalMessageInfo - -func (m *ConfigBlob) Reset() { *m = ConfigBlob{} } -func (*ConfigBlob) ProtoMessage() {} -func (*ConfigBlob) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{7} -} -func (m *ConfigBlob) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigBlob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigBlob) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigBlob.Merge(m, src) -} -func (m *ConfigBlob) XXX_Size() int { - return m.Size() -} -func (m *ConfigBlob) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigBlob.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigBlob proto.InternalMessageInfo - -func (m *ConfigDeviation) Reset() { *m = ConfigDeviation{} } -func (*ConfigDeviation) ProtoMessage() {} -func (*ConfigDeviation) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{8} -} -func (m *ConfigDeviation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigDeviation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigDeviation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigDeviation.Merge(m, src) -} -func (m *ConfigDeviation) XXX_Size() int { - return m.Size() -} -func (m *ConfigDeviation) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigDeviation.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigDeviation proto.InternalMessageInfo - -func (m *ConfigList) Reset() { *m = ConfigList{} } -func (*ConfigList) ProtoMessage() {} -func (*ConfigList) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{9} -} -func (m *ConfigList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigList.Merge(m, src) -} -func (m *ConfigList) XXX_Size() int { - return m.Size() -} -func (m *ConfigList) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigList.DiscardUnknown(m) -} +func (m *Config) Reset() { *m = Config{} } -var xxx_messageInfo_ConfigList proto.InternalMessageInfo +func (m *ConfigBlame) Reset() { *m = ConfigBlame{} } -func (m *ConfigSet) Reset() { *m = ConfigSet{} } -func (*ConfigSet) ProtoMessage() {} -func (*ConfigSet) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{10} -} -func (m *ConfigSet) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSet.Merge(m, src) -} -func (m *ConfigSet) XXX_Size() int { - return m.Size() -} -func (m *ConfigSet) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSet.DiscardUnknown(m) -} +func (m *ConfigBlameList) Reset() { *m = ConfigBlameList{} } -var xxx_messageInfo_ConfigSet proto.InternalMessageInfo +func (m *ConfigBlameSpec) Reset() { *m = ConfigBlameSpec{} } -func (m *ConfigSetList) Reset() { *m = ConfigSetList{} } -func (*ConfigSetList) ProtoMessage() {} -func (*ConfigSetList) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{11} -} -func (m *ConfigSetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigSetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSetList.Merge(m, src) -} -func (m *ConfigSetList) XXX_Size() int { - return m.Size() -} -func (m *ConfigSetList) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSetList.DiscardUnknown(m) -} +func (m *ConfigBlameStatus) Reset() { *m = ConfigBlameStatus{} } -var xxx_messageInfo_ConfigSetList proto.InternalMessageInfo +func (m *ConfigBlob) Reset() { *m = ConfigBlob{} } -func (m *ConfigSetSpec) Reset() { *m = ConfigSetSpec{} } -func (*ConfigSetSpec) ProtoMessage() {} -func (*ConfigSetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{12} -} -func (m *ConfigSetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigSetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSetSpec.Merge(m, src) -} -func (m *ConfigSetSpec) XXX_Size() int { - return m.Size() -} -func (m *ConfigSetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSetSpec.DiscardUnknown(m) -} +func (m *ConfigDeviation) Reset() { *m = ConfigDeviation{} } -var xxx_messageInfo_ConfigSetSpec proto.InternalMessageInfo +func (m *ConfigList) Reset() { *m = ConfigList{} } -func (m *ConfigSetStatus) Reset() { *m = ConfigSetStatus{} } -func (*ConfigSetStatus) ProtoMessage() {} -func (*ConfigSetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{13} -} -func (m *ConfigSetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigSetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSetStatus.Merge(m, src) -} -func (m *ConfigSetStatus) XXX_Size() int { - return m.Size() -} -func (m *ConfigSetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSetStatus.DiscardUnknown(m) -} +func (m *ConfigSet) Reset() { *m = ConfigSet{} } -var xxx_messageInfo_ConfigSetStatus proto.InternalMessageInfo +func (m *ConfigSetList) Reset() { *m = ConfigSetList{} } -func (m *ConfigSpec) Reset() { *m = ConfigSpec{} } -func (*ConfigSpec) ProtoMessage() {} -func (*ConfigSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{14} -} -func (m *ConfigSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigSpec.Merge(m, src) -} -func (m *ConfigSpec) XXX_Size() int { - return m.Size() -} -func (m *ConfigSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigSpec.DiscardUnknown(m) -} +func (m *ConfigSetSpec) Reset() { *m = ConfigSetSpec{} } -var xxx_messageInfo_ConfigSpec proto.InternalMessageInfo +func (m *ConfigSetStatus) Reset() { *m = ConfigSetStatus{} } -func (m *ConfigStatus) Reset() { *m = ConfigStatus{} } -func (*ConfigStatus) ProtoMessage() {} -func (*ConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{15} -} -func (m *ConfigStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigStatus.Merge(m, src) -} -func (m *ConfigStatus) XXX_Size() int { - return m.Size() -} -func (m *ConfigStatus) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigStatus.DiscardUnknown(m) -} +func (m *ConfigSetTarget) Reset() { *m = ConfigSetTarget{} } -var xxx_messageInfo_ConfigStatus proto.InternalMessageInfo +func (m *ConfigSetTargetStatus) Reset() { *m = ConfigSetTargetStatus{} } -func (m *ConfigStatusLastKnownGoodSchema) Reset() { *m = ConfigStatusLastKnownGoodSchema{} } -func (*ConfigStatusLastKnownGoodSchema) ProtoMessage() {} -func (*ConfigStatusLastKnownGoodSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{16} -} -func (m *ConfigStatusLastKnownGoodSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigStatusLastKnownGoodSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ConfigStatusLastKnownGoodSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigStatusLastKnownGoodSchema.Merge(m, src) -} -func (m *ConfigStatusLastKnownGoodSchema) XXX_Size() int { - return m.Size() -} -func (m *ConfigStatusLastKnownGoodSchema) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigStatusLastKnownGoodSchema.DiscardUnknown(m) -} +func (m *ConfigSpec) Reset() { *m = ConfigSpec{} } -var xxx_messageInfo_ConfigStatusLastKnownGoodSchema proto.InternalMessageInfo +func (m *ConfigStatus) Reset() { *m = ConfigStatus{} } -func (m *Deviation) Reset() { *m = Deviation{} } -func (*Deviation) ProtoMessage() {} -func (*Deviation) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{17} -} -func (m *Deviation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Deviation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Deviation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Deviation.Merge(m, src) -} -func (m *Deviation) XXX_Size() int { - return m.Size() -} -func (m *Deviation) XXX_DiscardUnknown() { - xxx_messageInfo_Deviation.DiscardUnknown(m) -} +func (m *ConfigStatusLastKnownGoodSchema) Reset() { *m = ConfigStatusLastKnownGoodSchema{} } -var xxx_messageInfo_Deviation proto.InternalMessageInfo +func (m *Deviation) Reset() { *m = Deviation{} } -func (m *DeviationList) Reset() { *m = DeviationList{} } -func (*DeviationList) ProtoMessage() {} -func (*DeviationList) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{18} -} -func (m *DeviationList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviationList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviationList.Merge(m, src) -} -func (m *DeviationList) XXX_Size() int { - return m.Size() -} -func (m *DeviationList) XXX_DiscardUnknown() { - xxx_messageInfo_DeviationList.DiscardUnknown(m) -} +func (m *DeviationList) Reset() { *m = DeviationList{} } -var xxx_messageInfo_DeviationList proto.InternalMessageInfo +func (m *DeviationSpec) Reset() { *m = DeviationSpec{} } -func (m *DeviationSpec) Reset() { *m = DeviationSpec{} } -func (*DeviationSpec) ProtoMessage() {} -func (*DeviationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{19} -} -func (m *DeviationSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviationSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviationSpec.Merge(m, src) -} -func (m *DeviationSpec) XXX_Size() int { - return m.Size() -} -func (m *DeviationSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DeviationSpec.DiscardUnknown(m) -} +func (m *DeviationStatus) Reset() { *m = DeviationStatus{} } -var xxx_messageInfo_DeviationSpec proto.InternalMessageInfo +func (m *DiscoveryInfo) Reset() { *m = DiscoveryInfo{} } -func (m *DeviationStatus) Reset() { *m = DeviationStatus{} } -func (*DeviationStatus) ProtoMessage() {} -func (*DeviationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{20} -} -func (m *DeviationStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DeviationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DeviationStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeviationStatus.Merge(m, src) -} -func (m *DeviationStatus) XXX_Size() int { - return m.Size() -} -func (m *DeviationStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DeviationStatus.DiscardUnknown(m) -} +func (m *Lifecycle) Reset() { *m = Lifecycle{} } -var xxx_messageInfo_DeviationStatus proto.InternalMessageInfo +func (m *RunningConfig) Reset() { *m = RunningConfig{} } -func (m *Lifecycle) Reset() { *m = Lifecycle{} } -func (*Lifecycle) ProtoMessage() {} -func (*Lifecycle) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{21} -} -func (m *Lifecycle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Lifecycle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Lifecycle) XXX_Merge(src proto.Message) { - xxx_messageInfo_Lifecycle.Merge(m, src) -} -func (m *Lifecycle) XXX_Size() int { - return m.Size() -} -func (m *Lifecycle) XXX_DiscardUnknown() { - xxx_messageInfo_Lifecycle.DiscardUnknown(m) -} +func (m *RunningConfigList) Reset() { *m = RunningConfigList{} } -var xxx_messageInfo_Lifecycle proto.InternalMessageInfo +func (m *RunningConfigSpec) Reset() { *m = RunningConfigSpec{} } -func (m *RunningConfig) Reset() { *m = RunningConfig{} } -func (*RunningConfig) ProtoMessage() {} -func (*RunningConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{22} -} -func (m *RunningConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RunningConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RunningConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunningConfig.Merge(m, src) -} -func (m *RunningConfig) XXX_Size() int { - return m.Size() -} -func (m *RunningConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RunningConfig.DiscardUnknown(m) -} +func (m *RunningConfigStatus) Reset() { *m = RunningConfigStatus{} } -var xxx_messageInfo_RunningConfig proto.InternalMessageInfo +func (m *SensitiveConfig) Reset() { *m = SensitiveConfig{} } -func (m *RunningConfigList) Reset() { *m = RunningConfigList{} } -func (*RunningConfigList) ProtoMessage() {} -func (*RunningConfigList) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{23} -} -func (m *RunningConfigList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RunningConfigList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RunningConfigList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunningConfigList.Merge(m, src) -} -func (m *RunningConfigList) XXX_Size() int { - return m.Size() -} -func (m *RunningConfigList) XXX_DiscardUnknown() { - xxx_messageInfo_RunningConfigList.DiscardUnknown(m) -} +func (m *SensitiveConfigData) Reset() { *m = SensitiveConfigData{} } -var xxx_messageInfo_RunningConfigList proto.InternalMessageInfo +func (m *SensitiveConfigList) Reset() { *m = SensitiveConfigList{} } -func (m *RunningConfigSpec) Reset() { *m = RunningConfigSpec{} } -func (*RunningConfigSpec) ProtoMessage() {} -func (*RunningConfigSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{24} -} -func (m *RunningConfigSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RunningConfigSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RunningConfigSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunningConfigSpec.Merge(m, src) -} -func (m *RunningConfigSpec) XXX_Size() int { - return m.Size() -} -func (m *RunningConfigSpec) XXX_DiscardUnknown() { - xxx_messageInfo_RunningConfigSpec.DiscardUnknown(m) -} +func (m *SensitiveConfigSpec) Reset() { *m = SensitiveConfigSpec{} } -var xxx_messageInfo_RunningConfigSpec proto.InternalMessageInfo +func (m *SensitiveConfigStatus) Reset() { *m = SensitiveConfigStatus{} } -func (m *RunningConfigStatus) Reset() { *m = RunningConfigStatus{} } -func (*RunningConfigStatus) ProtoMessage() {} -func (*RunningConfigStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{25} -} -func (m *RunningConfigStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RunningConfigStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RunningConfigStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RunningConfigStatus.Merge(m, src) -} -func (m *RunningConfigStatus) XXX_Size() int { - return m.Size() -} -func (m *RunningConfigStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RunningConfigStatus.DiscardUnknown(m) -} +func (m *Target) Reset() { *m = Target{} } -var xxx_messageInfo_RunningConfigStatus proto.InternalMessageInfo +func (m *TargetList) Reset() { *m = TargetList{} } -func (m *Target) Reset() { *m = Target{} } -func (*Target) ProtoMessage() {} -func (*Target) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{31} -} -func (m *Target) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Target) XXX_Merge(src proto.Message) { - xxx_messageInfo_Target.Merge(m, src) -} -func (m *Target) XXX_Size() int { - return m.Size() -} -func (m *Target) XXX_DiscardUnknown() { - xxx_messageInfo_Target.DiscardUnknown(m) -} +func (m *TargetSpec) Reset() { *m = TargetSpec{} } -var xxx_messageInfo_Target proto.InternalMessageInfo +func (m *TargetStatus) Reset() { *m = TargetStatus{} } -func (m *TargetStatus) Reset() { *m = TargetStatus{} } -func (*TargetStatus) ProtoMessage() {} -func (*TargetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_609f4c56ac31047c, []int{32} -} -func (m *TargetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TargetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetStatus.Merge(m, src) -} -func (m *TargetStatus) XXX_Size() int { - return m.Size() -} -func (m *TargetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_TargetStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_TargetStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Config)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.Config") - proto.RegisterType((*ConfigBlame)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigBlame") - proto.RegisterType((*ConfigBlameList)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigBlameList") - proto.RegisterType((*ConfigBlameSpec)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigBlameSpec") - proto.RegisterType((*ConfigBlameStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigBlameStatus") - proto.RegisterType((*ConfigBlob)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigBlob") - proto.RegisterType((*ConfigDeviation)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigDeviation") - proto.RegisterType((*ConfigList)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigList") - proto.RegisterType((*ConfigSet)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigSet") - proto.RegisterType((*ConfigSetList)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigSetList") - proto.RegisterType((*ConfigSetSpec)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigSetSpec") - proto.RegisterType((*ConfigSetStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigSetStatus") - proto.RegisterType((*ConfigSpec)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigSpec") - proto.RegisterType((*ConfigStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigStatus") - proto.RegisterType((*ConfigStatusLastKnownGoodSchema)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.ConfigStatusLastKnownGoodSchema") - proto.RegisterType((*Deviation)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.Deviation") - proto.RegisterType((*DeviationList)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.DeviationList") - proto.RegisterType((*DeviationSpec)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.DeviationSpec") - proto.RegisterType((*DeviationStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.DeviationStatus") - proto.RegisterType((*Lifecycle)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.Lifecycle") - proto.RegisterType((*RunningConfig)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.RunningConfig") - proto.RegisterType((*RunningConfigList)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.RunningConfigList") - proto.RegisterType((*RunningConfigSpec)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.RunningConfigSpec") - proto.RegisterType((*RunningConfigStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.RunningConfigStatus") - proto.RegisterType((*Target)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.Target") - proto.RegisterType((*TargetStatus)(nil), "github.com.sdcio.config_server.apis.config.v1alpha1.TargetStatus") -} - -func init() { - proto.RegisterFile("github.com/sdcio/config-server/apis/config/v1alpha1/generated.proto", fileDescriptor_609f4c56ac31047c) -} - -var fileDescriptor_609f4c56ac31047c = []byte{ - // 1580 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x49, 0x1a, 0x4f, 0x9c, 0xa4, 0x9e, 0x94, 0x12, 0x22, 0xb0, 0xa3, 0x15, 0x42, - 0x41, 0xd0, 0x35, 0x4d, 0xab, 0xaa, 0x12, 0x12, 0x25, 0x5b, 0xd3, 0x0f, 0x1a, 0x68, 0x34, 0x89, - 0x22, 0x81, 0x40, 0x74, 0xb2, 0x9e, 0xd8, 0xdb, 0xac, 0x77, 0x57, 0xbb, 0x63, 0xb7, 0xbe, 0xf5, - 0xc4, 0x81, 0x13, 0x42, 0x88, 0x0b, 0x48, 0x5c, 0x80, 0xbf, 0xa1, 0x17, 0x0e, 0x1c, 0x10, 0x3d, - 0x80, 0xa8, 0xa8, 0x84, 0x2a, 0x0e, 0x16, 0x35, 0xff, 0x45, 0x4f, 0x68, 0x67, 0x67, 0xbf, 0xbd, - 0x49, 0xea, 0x4d, 0xac, 0x16, 0x71, 0xcb, 0xbc, 0x99, 0xf7, 0x7b, 0x1f, 0xf3, 0x9b, 0xb7, 0x6f, - 0xc6, 0x01, 0x17, 0x1b, 0x2a, 0x6d, 0xb6, 0xb7, 0x25, 0xc5, 0x68, 0x55, 0xed, 0xba, 0xa2, 0x1a, - 0x55, 0xc5, 0xd0, 0x77, 0xd4, 0xc6, 0x29, 0x9b, 0x58, 0x1d, 0x62, 0x55, 0xb1, 0xa9, 0xda, 0x5c, - 0x54, 0xed, 0x9c, 0xc6, 0x9a, 0xd9, 0xc4, 0xa7, 0xab, 0x0d, 0xa2, 0x13, 0x0b, 0x53, 0x52, 0x97, - 0x4c, 0xcb, 0xa0, 0x06, 0x3c, 0x13, 0x80, 0x48, 0x0c, 0x44, 0x72, 0x35, 0x3e, 0x71, 0x41, 0x24, - 0x07, 0x84, 0x8b, 0x24, 0x0f, 0x64, 0xf1, 0x54, 0xc8, 0x72, 0xc3, 0x68, 0x18, 0x55, 0x86, 0xb5, - 0xdd, 0xde, 0x61, 0x23, 0x36, 0x60, 0x7f, 0xb9, 0x36, 0x16, 0x2f, 0x1d, 0xd0, 0xd1, 0xba, 0x4a, - 0x55, 0x43, 0x4f, 0xf5, 0x75, 0xf1, 0xec, 0xee, 0x79, 0x5b, 0x52, 0x0d, 0x67, 0x7d, 0x0b, 0x2b, - 0x4d, 0x55, 0x27, 0x56, 0xb7, 0x6a, 0xee, 0x36, 0x5c, 0x80, 0x16, 0xa1, 0xb8, 0xda, 0x49, 0x6a, - 0x55, 0xd3, 0xb4, 0xac, 0xb6, 0x4e, 0xd5, 0x16, 0x49, 0x28, 0x9c, 0xdb, 0x4f, 0xc1, 0x56, 0x9a, - 0xa4, 0x85, 0xe3, 0x7a, 0xe2, 0x79, 0x70, 0x62, 0xcd, 0x50, 0xb0, 0x76, 0x7d, 0xfb, 0x26, 0x51, - 0x28, 0x22, 0x3b, 0xc4, 0x22, 0xba, 0x42, 0xe0, 0x12, 0x18, 0xd7, 0x71, 0x8b, 0x2c, 0x08, 0x4b, - 0xc2, 0x72, 0x41, 0x2e, 0xde, 0xeb, 0x55, 0xc6, 0xfa, 0xbd, 0xca, 0xf8, 0xfb, 0xb8, 0x45, 0x10, - 0x9b, 0x11, 0x1f, 0x0b, 0xa0, 0xb4, 0x41, 0x14, 0x8b, 0xd0, 0x6b, 0xa4, 0xbb, 0x41, 0x34, 0xa2, - 0x50, 0xc3, 0x82, 0x5f, 0x0b, 0xe0, 0x84, 0x36, 0x00, 0x90, 0x01, 0x4d, 0xaf, 0x5c, 0x95, 0x86, - 0xd8, 0x3a, 0x69, 0x90, 0x87, 0xf2, 0x8b, 0xdc, 0xa7, 0x81, 0xfe, 0xa3, 0x81, 0x4e, 0xc0, 0x97, - 0x40, 0x7e, 0x97, 0x74, 0x17, 0x72, 0x2c, 0xa8, 0x69, 0x0e, 0x90, 0xbf, 0x46, 0xba, 0xc8, 0x91, - 0xc3, 0x65, 0x30, 0x65, 0x98, 0xce, 0x76, 0x62, 0x6d, 0x21, 0xbf, 0x24, 0x2c, 0x4f, 0xc9, 0xc5, - 0x7e, 0xaf, 0x32, 0x75, 0x9d, 0xcb, 0x90, 0x3f, 0x2b, 0xde, 0xcd, 0x81, 0xc9, 0x8b, 0xcc, 0x4b, - 0x78, 0x03, 0x4c, 0x39, 0xbb, 0x58, 0xc7, 0x14, 0xf3, 0x20, 0xdf, 0x90, 0xdc, 0xcd, 0x90, 0xc2, - 0x9b, 0x21, 0x99, 0xbb, 0x0d, 0x37, 0x3a, 0x67, 0xb5, 0xd4, 0x39, 0x2d, 0xb9, 0xce, 0xbd, 0x47, - 0x28, 0x96, 0x21, 0x77, 0x05, 0x04, 0x32, 0xe4, 0xa3, 0x42, 0x0c, 0xc6, 0x6d, 0x93, 0x28, 0xcc, - 0xed, 0xe9, 0x95, 0x0b, 0x43, 0xa5, 0xd0, 0x75, 0x76, 0xc3, 0x24, 0x4a, 0xb0, 0x99, 0xce, 0x08, - 0x31, 0x68, 0xa8, 0x82, 0x49, 0x9b, 0x62, 0xda, 0xb6, 0x59, 0xdc, 0xd3, 0x2b, 0xab, 0x59, 0x8c, - 0x30, 0x20, 0x79, 0x96, 0x9b, 0x99, 0x74, 0xc7, 0x88, 0x1b, 0x10, 0x7f, 0xc9, 0x81, 0x69, 0x77, - 0xa1, 0xac, 0xe1, 0x16, 0x19, 0x41, 0xfe, 0x76, 0x22, 0xf9, 0xab, 0x65, 0x08, 0x8d, 0x79, 0x9c, - 0x9a, 0x44, 0x3d, 0x96, 0xc4, 0x4b, 0x99, 0x2d, 0xed, 0x9d, 0xc9, 0x3f, 0x05, 0x30, 0x17, 0x5a, - 0xbd, 0xa6, 0xda, 0x14, 0x7e, 0x94, 0xc8, 0xa6, 0x74, 0xb0, 0x6c, 0x3a, 0xda, 0x2c, 0x97, 0xc7, - 0xb9, 0xb5, 0x29, 0x4f, 0x12, 0xca, 0x24, 0x01, 0x13, 0x2a, 0x25, 0x2d, 0x7b, 0x21, 0xb7, 0x94, - 0x5f, 0x9e, 0x5e, 0x79, 0x3b, 0x6b, 0x80, 0xf2, 0x0c, 0x37, 0x36, 0x71, 0xd5, 0x81, 0x45, 0x2e, - 0xba, 0x58, 0x8a, 0xc4, 0xe5, 0x64, 0x58, 0x6c, 0x80, 0x52, 0x22, 0x31, 0x10, 0x81, 0x89, 0x0e, - 0xd6, 0xda, 0x84, 0xef, 0xec, 0xa9, 0xd4, 0x48, 0x79, 0x11, 0x94, 0x10, 0xbe, 0xf5, 0xce, 0x6d, - 0x4a, 0x74, 0x5b, 0x35, 0xf4, 0xc0, 0xf6, 0x96, 0x83, 0x81, 0x5c, 0x28, 0xf1, 0x53, 0x01, 0x00, - 0xcf, 0x92, 0xb1, 0x0d, 0x5f, 0x06, 0x93, 0xae, 0xff, 0xf1, 0x4a, 0xb8, 0x8e, 0x69, 0x13, 0xf1, - 0xb9, 0x23, 0x71, 0xe4, 0x67, 0x7f, 0x77, 0x6b, 0xa4, 0xa3, 0x62, 0xa7, 0xf0, 0x38, 0x55, 0xd9, - 0xc4, 0xb4, 0x39, 0xd0, 0x17, 0x36, 0x03, 0xcf, 0x82, 0x62, 0x9d, 0xd8, 0xaa, 0x45, 0xea, 0x5b, - 0xbe, 0x43, 0x05, 0xf9, 0x78, 0xbf, 0x57, 0x29, 0xd6, 0x42, 0x72, 0x14, 0x59, 0x05, 0x57, 0xc0, - 0x34, 0x56, 0x68, 0x1b, 0x6b, 0xae, 0x52, 0x3e, 0x50, 0xba, 0xd8, 0xb6, 0x2c, 0xa2, 0x53, 0x57, - 0x29, 0xbc, 0x08, 0xbe, 0x02, 0x26, 0x2d, 0x82, 0x6d, 0x43, 0x5f, 0x18, 0x67, 0xcb, 0x7d, 0x96, - 0x22, 0x26, 0x45, 0x7c, 0x56, 0xfc, 0xd5, 0x4f, 0xe8, 0x08, 0x08, 0x7a, 0x23, 0x4a, 0xd0, 0x37, - 0xb3, 0x10, 0x74, 0x30, 0x37, 0x7f, 0xca, 0x81, 0x02, 0xaf, 0x73, 0x84, 0x8e, 0xa0, 0x78, 0xd5, - 0x23, 0xc5, 0x4b, 0xce, 0x52, 0x97, 0x09, 0x4d, 0x2d, 0x5d, 0x5a, 0xac, 0x74, 0xd5, 0x32, 0xda, - 0xd9, 0xbb, 0x70, 0xfd, 0x21, 0x80, 0x19, 0x7f, 0xed, 0x08, 0x58, 0xa1, 0x44, 0x59, 0xf1, 0x56, - 0xb6, 0xe0, 0x52, 0x88, 0xf1, 0x7d, 0x3e, 0x14, 0x94, 0x93, 0x5a, 0xa8, 0x80, 0x49, 0x8a, 0xad, - 0x06, 0xa1, 0x3c, 0xa4, 0xe1, 0xd8, 0xb8, 0xc9, 0x20, 0x82, 0x5c, 0xba, 0x63, 0xc4, 0xa1, 0xe1, - 0x2e, 0x28, 0x68, 0xea, 0x0e, 0x51, 0xba, 0x8a, 0xe6, 0x95, 0x9f, 0xe1, 0xe2, 0x5b, 0xf3, 0x50, - 0xe4, 0x99, 0x7e, 0xaf, 0x52, 0xf0, 0x87, 0x28, 0xc0, 0x87, 0xaf, 0x83, 0x29, 0xd3, 0x52, 0x0d, - 0x4b, 0xa5, 0x5d, 0x46, 0x94, 0x7c, 0x90, 0xf6, 0x75, 0x2e, 0x47, 0xfe, 0x0a, 0xf8, 0x1a, 0x28, - 0x58, 0xa4, 0x43, 0x2c, 0xaa, 0x76, 0x08, 0x2b, 0x12, 0x53, 0x2e, 0x34, 0xf2, 0x84, 0x28, 0x98, - 0x87, 0x0d, 0xbf, 0xd0, 0x4e, 0xb0, 0x4d, 0xba, 0x90, 0xe9, 0xdb, 0x62, 0x6c, 0x07, 0x09, 0x73, - 0x65, 0x5e, 0xad, 0x16, 0xbf, 0xcc, 0x79, 0x75, 0xd5, 0x27, 0x2a, 0xfc, 0x42, 0x00, 0x25, 0xbf, - 0x97, 0x27, 0x75, 0x57, 0xfa, 0xa4, 0x2d, 0xab, 0xab, 0x1d, 0xf1, 0x25, 0x0a, 0x28, 0xbf, 0xc0, - 0x5d, 0x2a, 0x25, 0xa6, 0x50, 0xd2, 0x3c, 0xd4, 0xc0, 0x31, 0x77, 0x8f, 0x3d, 0xde, 0xae, 0x66, - 0xe0, 0x0f, 0xf7, 0x60, 0x8e, 0x7b, 0x70, 0xcc, 0x95, 0xda, 0xc8, 0x33, 0x21, 0xfe, 0x98, 0xf3, - 0xca, 0x34, 0xe3, 0x6e, 0x84, 0x56, 0xc2, 0x08, 0x69, 0x95, 0x7b, 0x32, 0x5a, 0xe5, 0x0f, 0x4c, - 0xab, 0xf1, 0xa3, 0xa5, 0xd5, 0x67, 0xe3, 0xa0, 0x18, 0xee, 0x7f, 0x9f, 0x4e, 0x4e, 0x7d, 0x2b, - 0x80, 0x79, 0x0d, 0xdb, 0xf4, 0x9a, 0x6e, 0xdc, 0xd2, 0x2f, 0x1b, 0x46, 0x7d, 0x83, 0x5d, 0x0b, - 0x79, 0xe1, 0xd8, 0xcc, 0xdc, 0xf5, 0xaf, 0x25, 0xb1, 0xe5, 0xe7, 0xfb, 0xbd, 0xca, 0xfc, 0x80, - 0x09, 0x34, 0xc8, 0x13, 0x78, 0x1b, 0xcc, 0x60, 0xd3, 0xd4, 0x54, 0x52, 0x77, 0x71, 0xf9, 0x07, - 0x29, 0xf3, 0xad, 0xa7, 0xd4, 0xef, 0x55, 0x66, 0x56, 0xc3, 0xc8, 0x28, 0x6a, 0x08, 0x5e, 0x05, - 0xf3, 0x75, 0xaf, 0xd3, 0xba, 0xec, 0x5e, 0x93, 0x55, 0xde, 0xdd, 0xe4, 0xdd, 0x20, 0x6a, 0xc9, - 0x69, 0x34, 0x48, 0x47, 0xfc, 0x4a, 0x00, 0x95, 0x7d, 0xd2, 0xe2, 0xf4, 0x72, 0xb4, 0x6b, 0x26, - 0x6e, 0xd8, 0x9b, 0x5d, 0x93, 0x20, 0x36, 0xe3, 0x74, 0x58, 0x1d, 0xa2, 0xd7, 0x0d, 0x8b, 0x77, - 0x71, 0x3e, 0xf5, 0xb6, 0x98, 0x14, 0xf1, 0x59, 0xf8, 0x2a, 0x38, 0xd6, 0x21, 0x96, 0xd3, 0x4a, - 0xf2, 0xce, 0xcd, 0x3f, 0xe5, 0x5b, 0xae, 0x18, 0x79, 0xf3, 0xac, 0x7b, 0x09, 0xda, 0xc9, 0x67, - 0xa3, 0x7b, 0xf1, 0xfd, 0x3d, 0xe2, 0xee, 0x25, 0xb0, 0xb3, 0x7f, 0xf7, 0xe2, 0xaf, 0x7d, 0x56, - 0xba, 0x17, 0xdf, 0xe1, 0x94, 0xee, 0xe5, 0x41, 0x38, 0x28, 0xf6, 0x05, 0xb8, 0x02, 0x66, 0x7c, - 0x6a, 0x6f, 0x06, 0x44, 0x15, 0x9d, 0x73, 0x54, 0x0b, 0x4f, 0x3c, 0x8e, 0x0b, 0x50, 0x54, 0x11, - 0xde, 0x06, 0xc0, 0x17, 0x78, 0x51, 0x64, 0x69, 0x30, 0x83, 0x58, 0x7c, 0xf2, 0xf9, 0x22, 0x1b, - 0x85, 0x6c, 0x89, 0x3f, 0x08, 0x60, 0x2e, 0xb6, 0xad, 0x4f, 0x65, 0x5d, 0x16, 0x3f, 0x06, 0xc1, - 0x97, 0x11, 0xae, 0x83, 0xd9, 0x3a, 0xd1, 0x88, 0xb3, 0x60, 0xdd, 0xd0, 0x54, 0xa5, 0xcb, 0x53, - 0xbf, 0xcc, 0x21, 0x67, 0x6b, 0x91, 0xd9, 0xc7, 0x09, 0x09, 0x8a, 0xe9, 0x8b, 0xbf, 0xe5, 0xc0, - 0x0c, 0x6a, 0xeb, 0xba, 0xaa, 0x37, 0x46, 0xf6, 0x6a, 0xd5, 0x8c, 0x1c, 0xfd, 0xe1, 0xde, 0x42, - 0x22, 0x3e, 0xa7, 0x1e, 0x7f, 0x33, 0x76, 0xfc, 0xaf, 0x1c, 0x82, 0xad, 0xbd, 0x4b, 0xc0, 0x5f, - 0x02, 0x28, 0x45, 0xd6, 0x8f, 0xa0, 0x0c, 0x34, 0xa2, 0x65, 0x40, 0xce, 0x1e, 0x64, 0x4a, 0x29, - 0x98, 0x8f, 0xc5, 0xc6, 0xde, 0x5f, 0x54, 0x30, 0x3f, 0x20, 0x41, 0x47, 0xf2, 0xf0, 0xf1, 0x20, - 0x07, 0xe6, 0x36, 0x9c, 0x15, 0x4e, 0x03, 0x37, 0x32, 0xba, 0xde, 0x8c, 0xd0, 0x75, 0x38, 0x0a, - 0xc5, 0xbc, 0x4e, 0x25, 0xac, 0x15, 0x23, 0xec, 0xbb, 0x87, 0x62, 0x6d, 0x6f, 0xca, 0xde, 0x17, - 0xc0, 0x7c, 0x4c, 0xa3, 0xe6, 0xc4, 0x7d, 0x2e, 0x91, 0xec, 0x81, 0xaf, 0x4b, 0x89, 0x1d, 0xb9, - 0x23, 0x80, 0xa2, 0xed, 0x3d, 0xff, 0x23, 0xb2, 0x93, 0xe9, 0x9c, 0x27, 0x7e, 0x47, 0x90, 0x4f, - 0x70, 0xeb, 0xc5, 0x8d, 0x90, 0x0d, 0x14, 0xb1, 0x28, 0xf6, 0x92, 0x21, 0x8d, 0xe0, 0x1c, 0xaa, - 0xd1, 0x73, 0x58, 0x3b, 0x8c, 0xbd, 0x4b, 0x39, 0x89, 0xbf, 0xe7, 0x12, 0x01, 0xfe, 0xa7, 0x2e, - 0x67, 0x66, 0xec, 0x72, 0x76, 0x28, 0xa7, 0xce, 0x61, 0x75, 0xea, 0x2d, 0xed, 0xee, 0x38, 0x78, - 0x6e, 0xe0, 0xb9, 0xf9, 0xff, 0xba, 0x36, 0xdc, 0x75, 0xed, 0x1b, 0x01, 0x9c, 0xe4, 0xd7, 0xa8, - 0x78, 0x19, 0xc9, 0x1f, 0x72, 0x25, 0x5d, 0xec, 0xf7, 0x2a, 0x27, 0x57, 0x07, 0xda, 0x42, 0x29, - 0x3e, 0x1c, 0xe6, 0x9d, 0xae, 0x0b, 0xf8, 0xd3, 0x1b, 0x34, 0xc0, 0xac, 0xfb, 0x6a, 0xe2, 0x55, - 0x2b, 0x4e, 0x93, 0x33, 0x07, 0xac, 0x32, 0x78, 0x9b, 0x68, 0x7e, 0xa1, 0x83, 0x4e, 0x43, 0xb7, - 0x19, 0x81, 0x43, 0x31, 0x78, 0xf1, 0x3b, 0x01, 0x14, 0xc3, 0xcf, 0x38, 0xfb, 0xff, 0x3a, 0x0b, - 0x2d, 0x50, 0xf0, 0xe9, 0xf4, 0xa4, 0xbf, 0xe9, 0xa5, 0xb2, 0x58, 0x2e, 0x71, 0x4b, 0x05, 0x5f, - 0x84, 0x02, 0x33, 0xf2, 0x07, 0xf7, 0x1e, 0x95, 0xc7, 0xee, 0x3f, 0x2a, 0x8f, 0x3d, 0x7c, 0x54, - 0x1e, 0xbb, 0xd3, 0x2f, 0x0b, 0xf7, 0xfa, 0x65, 0xe1, 0x7e, 0xbf, 0x2c, 0x3c, 0xec, 0x97, 0x85, - 0xbf, 0xfb, 0x65, 0xe1, 0xf3, 0x7f, 0xca, 0x63, 0x1f, 0x9e, 0x19, 0xe2, 0x3f, 0x00, 0xfe, 0x0d, - 0x00, 0x00, 0xff, 0xff, 0x7d, 0x5c, 0xbd, 0xd2, 0x37, 0x20, 0x00, 0x00, -} +func (m *TargetStatusUsedReferences) Reset() { *m = TargetStatusUsedReferences{} } func (m *Config) Marshal() (dAtA []byte, err error) { size := m.Size() @@ -1178,10 +376,10 @@ func (m *ConfigDeviation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) i-- dAtA[i] = 0x22 - if m.CurrentValue != nil { - i -= len(*m.CurrentValue) - copy(dAtA[i:], *m.CurrentValue) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CurrentValue))) + if m.ActualValue != nil { + i -= len(*m.ActualValue) + copy(dAtA[i:], *m.ActualValue) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ActualValue))) i-- dAtA[i] = 0x1a } @@ -1466,7 +664,7 @@ func (m *ConfigSetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ConfigSpec) Marshal() (dAtA []byte, err error) { +func (m *ConfigSetTarget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1476,26 +674,99 @@ func (m *ConfigSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *ConfigSetTarget) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ConfigSetTarget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Config) > 0 { - for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if m.TargetSelector != nil { + { + size, err := m.TargetSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConfigSetTargetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConfigSetTargetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfigSetTargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Condition.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ConfigSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x22 } @@ -1805,6 +1076,73 @@ func (m *DeviationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DiscoveryInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DiscoveryInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DiscoveryInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SupportedEncodings) > 0 { + for iNdEx := len(m.SupportedEncodings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SupportedEncodings[iNdEx]) + copy(dAtA[i:], m.SupportedEncodings[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SupportedEncodings[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + i -= len(m.SerialNumber) + copy(dAtA[i:], m.SerialNumber) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SerialNumber))) + i-- + dAtA[i] = 0x3a + i -= len(m.MacAddress) + copy(dAtA[i:], m.MacAddress) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MacAddress))) + i-- + dAtA[i] = 0x32 + i -= len(m.Platform) + copy(dAtA[i:], m.Platform) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Platform))) + i-- + dAtA[i] = 0x2a + i -= len(m.Hostname) + copy(dAtA[i:], m.Hostname) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Hostname))) + i-- + dAtA[i] = 0x22 + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0x12 + i -= len(m.Protocol) + copy(dAtA[i:], m.Protocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *Lifecycle) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1989,7 +1327,7 @@ func (m *RunningConfigStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Target) Marshal() (dAtA []byte, err error) { +func (m *SensitiveConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1999,32 +1337,50 @@ func (m *Target) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Target) MarshalTo(dAtA []byte) (int, error) { +func (m *SensitiveConfig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SensitiveConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TargetSelector != nil { - { - size, err := m.TargetSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *TargetStatus) Marshal() (dAtA []byte, err error) { +func (m *SensitiveConfigData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2034,18 +1390,18 @@ func (m *TargetStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TargetStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *SensitiveConfigData) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SensitiveConfigData) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Condition.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SecretKeyRef.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2053,279 +1409,457 @@ func (m *TargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + dAtA[i] = 0x12 + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Config) Size() (n int) { - if m == nil { - return 0 +func (m *SensitiveConfigList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ConfigBlame) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n +func (m *SensitiveConfigList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfigBlameList) Size() (n int) { - if m == nil { - return 0 - } +func (m *SensitiveConfigList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } } - return n -} - -func (m *ConfigBlameSpec) Size() (n int) { - if m == nil { - return 0 + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - var l int - _ = l - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ConfigBlameStatus) Size() (n int) { - if m == nil { - return 0 +func (m *SensitiveConfigSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.Value.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ConfigBlob) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Value.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n +func (m *SensitiveConfigSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfigDeviation) Size() (n int) { - if m == nil { - return 0 - } +func (m *SensitiveConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - if m.DesiredValue != nil { - l = len(*m.DesiredValue) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CurrentValue != nil { - l = len(*m.CurrentValue) - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConfigList) Size() (n int) { - if m == nil { - return 0 + if m.Revertive != nil { + i-- + if *m.Revertive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i = encodeVarintGenerated(dAtA, i, uint64(m.Priority)) + i-- + dAtA[i] = 0x10 + if m.Lifecycle != nil { + { + size, err := m.Lifecycle.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *ConfigSet) Size() (n int) { - if m == nil { - return 0 +func (m *SensitiveConfigStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + return dAtA[:n], nil } -func (m *ConfigSetList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n +func (m *SensitiveConfigStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConfigSetSpec) Size() (n int) { - if m == nil { - return 0 - } +func (m *SensitiveConfigStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = m.Target.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Lifecycle != nil { - l = m.Lifecycle.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Priority)) - if m.Revertive != nil { - n += 2 + if m.DeviationGeneration != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.DeviationGeneration)) + i-- + dAtA[i] = 0x20 } - if len(m.Config) > 0 { - for _, e := range m.Config { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.AppliedSensitiveConfig != nil { + { + size, err := m.AppliedSensitiveConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a } - return n -} - -func (m *ConfigSetStatus) Size() (n int) { - if m == nil { - return 0 + if m.LastKnownGoodSchema != nil { + { + size, err := m.LastKnownGoodSchema.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - var l int - _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Targets) > 0 { - for _, e := range m.Targets { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ConfigSpec) Size() (n int) { - if m == nil { - return 0 +func (m *Target) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Target) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if m.Lifecycle != nil { - l = m.Lifecycle.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - n += 1 + sovGenerated(uint64(m.Priority)) - if m.Revertive != nil { - n += 2 + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if len(m.Config) > 0 { - for _, e := range m.Config { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *ConfigStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int +func (m *TargetList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TargetList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TargetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.LastKnownGoodSchema != nil { - l = m.LastKnownGoodSchema.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - if m.AppliedConfig != nil { - l = m.AppliedConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - if m.DeviationGeneration != nil { - n += 1 + sovGenerated(uint64(*m.DeviationGeneration)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *TargetSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *ConfigStatusLastKnownGoodSchema) Size() (n int) { +func (m *TargetSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TargetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.TargetProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *TargetStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TargetStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UsedReferences != nil { + { + size, err := m.UsedReferences.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.DiscoveryInfo != nil { + { + size, err := m.DiscoveryInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + { + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *TargetStatusUsedReferences) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TargetStatusUsedReferences) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TargetStatusUsedReferences) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.SyncProfileResourceVersion) + copy(dAtA[i:], m.SyncProfileResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SyncProfileResourceVersion))) + i-- + dAtA[i] = 0x22 + i -= len(m.ConnectionProfileResourceVersion) + copy(dAtA[i:], m.ConnectionProfileResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfileResourceVersion))) + i-- + dAtA[i] = 0x1a + i -= len(m.TLSSecretResourceVersion) + copy(dAtA[i:], m.TLSSecretResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.TLSSecretResourceVersion))) + i-- + dAtA[i] = 0x12 + i -= len(m.SecretResourceVersion) + copy(dAtA[i:], m.SecretResourceVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretResourceVersion))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *Config) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Type) + l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Vendor) + l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) + l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Deviation) Size() (n int) { +func (m *ConfigBlame) Size() (n int) { if m == nil { return 0 } @@ -2340,7 +1874,7 @@ func (m *Deviation) Size() (n int) { return n } -func (m *DeviationList) Size() (n int) { +func (m *ConfigBlameList) Size() (n int) { if m == nil { return 0 } @@ -2357,63 +1891,61 @@ func (m *DeviationList) Size() (n int) { return n } -func (m *DeviationSpec) Size() (n int) { +func (m *ConfigBlameSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.DeviationType != nil { - l = len(*m.DeviationType) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Deviations) > 0 { - for _, e := range m.Deviations { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } return n } -func (m *DeviationStatus) Size() (n int) { +func (m *ConfigBlameStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ConditionedStatus.Size() + l = m.Value.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Lifecycle) Size() (n int) { +func (m *ConfigBlob) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.DeletionPolicy) + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Value.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *RunningConfig) Size() (n int) { +func (m *ConfigDeviation) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() + l = len(m.Path) n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() + if m.DesiredValue != nil { + l = len(*m.DesiredValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ActualValue != nil { + l = len(*m.ActualValue) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Reason) n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *RunningConfigList) Size() (n int) { +func (m *ConfigList) Size() (n int) { if m == nil { return 0 } @@ -2430,41 +1962,95 @@ func (m *RunningConfigList) Size() (n int) { return n } -func (m *RunningConfigSpec) Size() (n int) { +func (m *ConfigSet) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *RunningConfigStatus) Size() (n int) { +func (m *ConfigSetList) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Value.Size() + l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } -func (m *Target) Size() (n int) { +func (m *ConfigSetSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.TargetSelector != nil { - l = m.TargetSelector.Size() + l = m.Target.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Lifecycle != nil { + l = m.Lifecycle.Size() n += 1 + l + sovGenerated(uint64(l)) } - return n -} - -func (m *TargetStatus) Size() (n int) { - if m == nil { + n += 1 + sovGenerated(uint64(m.Priority)) + if m.Revertive != nil { + n += 2 + } + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ConfigSetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Targets) > 0 { + for _, e := range m.Targets { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ConfigSetTarget) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TargetSelector != nil { + l = m.TargetSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ConfigSetTargetStatus) Size() (n int) { + if m == nil { return 0 } var l int @@ -2476,358 +2062,1857 @@ func (m *TargetStatus) Size() (n int) { return n } -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Config) String() string { - if this == nil { - return "nil" +func (m *ConfigSpec) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&Config{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigSpec", "ConfigSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigStatus", "ConfigStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigBlame) String() string { - if this == nil { - return "nil" + var l int + _ = l + if m.Lifecycle != nil { + l = m.Lifecycle.Size() + n += 1 + l + sovGenerated(uint64(l)) } - s := strings.Join([]string{`&ConfigBlame{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigBlameSpec", "ConfigBlameSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigBlameStatus", "ConfigBlameStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigBlameList) String() string { - if this == nil { - return "nil" + n += 1 + sovGenerated(uint64(m.Priority)) + if m.Revertive != nil { + n += 2 } - repeatedStringForItems := "[]ConfigBlame{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ConfigBlame", "ConfigBlame", 1), `&`, ``, 1) + "," + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ConfigBlameList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return n } -func (this *ConfigBlameSpec) String() string { - if this == nil { - return "nil" + +func (m *ConfigStatus) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigBlameSpec{`, - `}`, - }, "") - return s -} -func (this *ConfigBlameStatus) String() string { - if this == nil { - return "nil" + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.LastKnownGoodSchema != nil { + l = m.LastKnownGoodSchema.Size() + n += 1 + l + sovGenerated(uint64(l)) } - s := strings.Join([]string{`&ConfigBlameStatus{`, - `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + if m.AppliedConfig != nil { + l = m.AppliedConfig.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeviationGeneration != nil { + n += 1 + sovGenerated(uint64(*m.DeviationGeneration)) + } + return n } -func (this *ConfigBlob) String() string { - if this == nil { - return "nil" + +func (m *ConfigStatusLastKnownGoodSchema) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigBlob{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Vendor) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ConfigDeviation) String() string { - if this == nil { - return "nil" + +func (m *Deviation) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigDeviation{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `DesiredValue:` + valueToStringGenerated(this.DesiredValue) + `,`, - `CurrentValue:` + valueToStringGenerated(this.CurrentValue) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ConfigList) String() string { - if this == nil { - return "nil" + +func (m *DeviationList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]Config{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Config", "Config", 1), `&`, ``, 1) + "," + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ConfigList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return n } -func (this *ConfigSet) String() string { - if this == nil { - return "nil" + +func (m *DeviationSpec) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigSet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigSetSpec", "ConfigSetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigSetStatus", "ConfigSetStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigSetList) String() string { - if this == nil { - return "nil" + var l int + _ = l + if m.DeviationType != nil { + l = len(*m.DeviationType) + n += 1 + l + sovGenerated(uint64(l)) } - repeatedStringForItems := "[]ConfigSet{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ConfigSet", "ConfigSet", 1), `&`, ``, 1) + "," + if len(m.Deviations) > 0 { + for _, e := range m.Deviations { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ConfigSetList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + return n } -func (this *ConfigSetSpec) String() string { - if this == nil { - return "nil" + +func (m *DeviationStatus) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForConfig := "[]ConfigBlob{" - for _, f := range this.Config { - repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "ConfigBlob", "ConfigBlob", 1), `&`, ``, 1) + "," - } - repeatedStringForConfig += "}" - s := strings.Join([]string{`&ConfigSetSpec{`, - `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Target", "Target", 1), `&`, ``, 1) + `,`, - `Lifecycle:` + strings.Replace(this.Lifecycle.String(), "Lifecycle", "Lifecycle", 1) + `,`, - `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, - `Revertive:` + valueToStringGenerated(this.Revertive) + `,`, - `Config:` + repeatedStringForConfig + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ConfigSetStatus) String() string { - if this == nil { - return "nil" + +func (m *DiscoveryInfo) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForTargets := "[]TargetStatus{" - for _, f := range this.Targets { - repeatedStringForTargets += strings.Replace(strings.Replace(f.String(), "TargetStatus", "TargetStatus", 1), `&`, ``, 1) + "," + var l int + _ = l + l = len(m.Protocol) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Provider) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Hostname) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Platform) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.MacAddress) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SerialNumber) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.SupportedEncodings) > 0 { + for _, s := range m.SupportedEncodings { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForTargets += "}" - s := strings.Join([]string{`&ConfigSetStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `Targets:` + repeatedStringForTargets + `,`, - `}`, - }, "") - return s + return n } -func (this *ConfigSpec) String() string { - if this == nil { - return "nil" + +func (m *Lifecycle) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForConfig := "[]ConfigBlob{" - for _, f := range this.Config { - repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "ConfigBlob", "ConfigBlob", 1), `&`, ``, 1) + "," + var l int + _ = l + l = len(m.DeletionPolicy) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *RunningConfig) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForConfig += "}" - s := strings.Join([]string{`&ConfigSpec{`, - `Lifecycle:` + strings.Replace(this.Lifecycle.String(), "Lifecycle", "Lifecycle", 1) + `,`, - `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, - `Revertive:` + valueToStringGenerated(this.Revertive) + `,`, - `Config:` + repeatedStringForConfig + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *ConfigStatus) String() string { - if this == nil { - return "nil" + +func (m *RunningConfigList) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `LastKnownGoodSchema:` + strings.Replace(this.LastKnownGoodSchema.String(), "ConfigStatusLastKnownGoodSchema", "ConfigStatusLastKnownGoodSchema", 1) + `,`, - `AppliedConfig:` + strings.Replace(this.AppliedConfig.String(), "ConfigSpec", "ConfigSpec", 1) + `,`, - `DeviationGeneration:` + valueToStringGenerated(this.DeviationGeneration) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (this *ConfigStatusLastKnownGoodSchema) String() string { - if this == nil { - return "nil" + +func (m *RunningConfigSpec) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&ConfigStatusLastKnownGoodSchema{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Vendor:` + fmt.Sprintf("%v", this.Vendor) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `}`, - }, "") - return s + var l int + _ = l + return n } -func (this *Deviation) String() string { - if this == nil { - return "nil" + +func (m *RunningConfigStatus) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&Deviation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviationSpec", "DeviationSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeviationStatus", "DeviationStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = m.Value.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *DeviationList) String() string { - if this == nil { - return "nil" + +func (m *SensitiveConfig) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]Deviation{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Deviation", "Deviation", 1), `&`, ``, 1) + "," + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *SensitiveConfigData) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems += "}" - s := strings.Join([]string{`&DeviationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + l = m.SecretKeyRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (this *DeviationSpec) String() string { - if this == nil { - return "nil" + +func (m *SensitiveConfigList) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForDeviations := "[]ConfigDeviation{" - for _, f := range this.Deviations { - repeatedStringForDeviations += strings.Replace(strings.Replace(f.String(), "ConfigDeviation", "ConfigDeviation", 1), `&`, ``, 1) + "," + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - repeatedStringForDeviations += "}" - s := strings.Join([]string{`&DeviationSpec{`, - `DeviationType:` + valueToStringGenerated(this.DeviationType) + `,`, - `Deviations:` + repeatedStringForDeviations + `,`, - `}`, - }, "") - return s + return n } -func (this *DeviationStatus) String() string { - if this == nil { - return "nil" + +func (m *SensitiveConfigSpec) Size() (n int) { + if m == nil { + return 0 } - s := strings.Join([]string{`&DeviationStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Lifecycle) String() string { - if this == nil { - return "nil" + var l int + _ = l + if m.Lifecycle != nil { + l = m.Lifecycle.Size() + n += 1 + l + sovGenerated(uint64(l)) } - s := strings.Join([]string{`&Lifecycle{`, - `DeletionPolicy:` + fmt.Sprintf("%v", this.DeletionPolicy) + `,`, - `}`, - }, "") - return s -} -func (this *RunningConfig) String() string { - if this == nil { - return "nil" + n += 1 + sovGenerated(uint64(m.Priority)) + if m.Revertive != nil { + n += 2 } - s := strings.Join([]string{`&RunningConfig{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RunningConfigSpec", "RunningConfigSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RunningConfigStatus", "RunningConfigStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (this *RunningConfigList) String() string { - if this == nil { - return "nil" + +func (m *SensitiveConfigStatus) Size() (n int) { + if m == nil { + return 0 } - repeatedStringForItems := "[]RunningConfig{" + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.LastKnownGoodSchema != nil { + l = m.LastKnownGoodSchema.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.AppliedSensitiveConfig != nil { + l = m.AppliedSensitiveConfig.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeviationGeneration != nil { + n += 1 + sovGenerated(uint64(*m.DeviationGeneration)) + } + return n +} + +func (m *Target) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *TargetList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *TargetSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Provider) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Address) + n += 1 + l + sovGenerated(uint64(l)) + l = m.TargetProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *TargetStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DiscoveryInfo != nil { + l = m.DiscoveryInfo.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.UsedReferences != nil { + l = m.UsedReferences.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *TargetStatusUsedReferences) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SecretResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.TLSSecretResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ConnectionProfileResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SyncProfileResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Config) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Config{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigSpec", "ConfigSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigStatus", "ConfigStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigBlame) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigBlame{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigBlameSpec", "ConfigBlameSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigBlameStatus", "ConfigBlameStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigBlameList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]ConfigBlame{" for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RunningConfig", "RunningConfig", 1), `&`, ``, 1) + "," + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ConfigBlame", "ConfigBlame", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" - s := strings.Join([]string{`&RunningConfigList{`, + s := strings.Join([]string{`&ConfigBlameList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *RunningConfigSpec) String() string { +func (this *ConfigBlameSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RunningConfigSpec{`, + s := strings.Join([]string{`&ConfigBlameSpec{`, `}`, }, "") return s } -func (this *RunningConfigStatus) String() string { +func (this *ConfigBlameStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigBlameStatus{`, + `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigBlob) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigBlob{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigDeviation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigDeviation{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `DesiredValue:` + valueToStringGenerated(this.DesiredValue) + `,`, + `ActualValue:` + valueToStringGenerated(this.ActualValue) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Config{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Config", "Config", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ConfigList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigSet{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigSetSpec", "ConfigSetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigSetStatus", "ConfigSetStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSetList) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RunningConfigStatus{`, - `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Target) String() string { - if this == nil { - return "nil" + repeatedStringForItems := "[]ConfigSet{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ConfigSet", "ConfigSet", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&ConfigSetList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSetSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForConfig := "[]ConfigBlob{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "ConfigBlob", "ConfigBlob", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&ConfigSetSpec{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "ConfigSetTarget", "ConfigSetTarget", 1), `&`, ``, 1) + `,`, + `Lifecycle:` + strings.Replace(this.Lifecycle.String(), "Lifecycle", "Lifecycle", 1) + `,`, + `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, + `Revertive:` + valueToStringGenerated(this.Revertive) + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSetStatus) String() string { + if this == nil { + return "nil" + } + repeatedStringForTargets := "[]ConfigSetTargetStatus{" + for _, f := range this.Targets { + repeatedStringForTargets += strings.Replace(strings.Replace(f.String(), "ConfigSetTargetStatus", "ConfigSetTargetStatus", 1), `&`, ``, 1) + "," + } + repeatedStringForTargets += "}" + s := strings.Join([]string{`&ConfigSetStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `Targets:` + repeatedStringForTargets + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSetTarget) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigSetTarget{`, + `TargetSelector:` + strings.Replace(fmt.Sprintf("%v", this.TargetSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSetTargetStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigSetTargetStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Condition:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Condition), "Condition", "v1alpha1.Condition", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForConfig := "[]ConfigBlob{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "ConfigBlob", "ConfigBlob", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&ConfigSpec{`, + `Lifecycle:` + strings.Replace(this.Lifecycle.String(), "Lifecycle", "Lifecycle", 1) + `,`, + `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, + `Revertive:` + valueToStringGenerated(this.Revertive) + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *ConfigStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `LastKnownGoodSchema:` + strings.Replace(this.LastKnownGoodSchema.String(), "ConfigStatusLastKnownGoodSchema", "ConfigStatusLastKnownGoodSchema", 1) + `,`, + `AppliedConfig:` + strings.Replace(this.AppliedConfig.String(), "ConfigSpec", "ConfigSpec", 1) + `,`, + `DeviationGeneration:` + valueToStringGenerated(this.DeviationGeneration) + `,`, + `}`, + }, "") + return s +} +func (this *ConfigStatusLastKnownGoodSchema) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigStatusLastKnownGoodSchema{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Vendor:` + fmt.Sprintf("%v", this.Vendor) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s +} +func (this *Deviation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Deviation{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviationSpec", "DeviationSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeviationStatus", "DeviationStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviationList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Deviation{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Deviation", "Deviation", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&DeviationList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *DeviationSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForDeviations := "[]ConfigDeviation{" + for _, f := range this.Deviations { + repeatedStringForDeviations += strings.Replace(strings.Replace(f.String(), "ConfigDeviation", "ConfigDeviation", 1), `&`, ``, 1) + "," + } + repeatedStringForDeviations += "}" + s := strings.Join([]string{`&DeviationSpec{`, + `DeviationType:` + valueToStringGenerated(this.DeviationType) + `,`, + `Deviations:` + repeatedStringForDeviations + `,`, + `}`, + }, "") + return s +} +func (this *DeviationStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviationStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DiscoveryInfo{`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `Platform:` + fmt.Sprintf("%v", this.Platform) + `,`, + `MacAddress:` + fmt.Sprintf("%v", this.MacAddress) + `,`, + `SerialNumber:` + fmt.Sprintf("%v", this.SerialNumber) + `,`, + `SupportedEncodings:` + fmt.Sprintf("%v", this.SupportedEncodings) + `,`, + `}`, + }, "") + return s +} +func (this *Lifecycle) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Lifecycle{`, + `DeletionPolicy:` + fmt.Sprintf("%v", this.DeletionPolicy) + `,`, + `}`, + }, "") + return s +} +func (this *RunningConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunningConfig{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RunningConfigSpec", "RunningConfigSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RunningConfigStatus", "RunningConfigStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RunningConfigList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]RunningConfig{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RunningConfig", "RunningConfig", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&RunningConfigList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *RunningConfigSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunningConfigSpec{`, + `}`, + }, "") + return s +} +func (this *RunningConfigStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunningConfigStatus{`, + `Value:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Value), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SensitiveConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SensitiveConfig{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SensitiveConfigSpec", "SensitiveConfigSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SensitiveConfigStatus", "SensitiveConfigStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SensitiveConfigData) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SensitiveConfigData{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `SecretKeyRef:` + strings.Replace(strings.Replace(this.SecretKeyRef.String(), "SecretKeySelector", "SecretKeySelector", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SensitiveConfigList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]SensitiveConfig{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "SensitiveConfig", "SensitiveConfig", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&SensitiveConfigList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *SensitiveConfigSpec) String() string { + if this == nil { + return "nil" + } + repeatedStringForConfig := "[]SensitiveConfigData{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "SensitiveConfigData", "SensitiveConfigData", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&SensitiveConfigSpec{`, + `Lifecycle:` + strings.Replace(this.Lifecycle.String(), "Lifecycle", "Lifecycle", 1) + `,`, + `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, + `Revertive:` + valueToStringGenerated(this.Revertive) + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s +} +func (this *SensitiveConfigStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SensitiveConfigStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `LastKnownGoodSchema:` + strings.Replace(this.LastKnownGoodSchema.String(), "ConfigStatusLastKnownGoodSchema", "ConfigStatusLastKnownGoodSchema", 1) + `,`, + `AppliedSensitiveConfig:` + strings.Replace(this.AppliedSensitiveConfig.String(), "SensitiveConfigSpec", "SensitiveConfigSpec", 1) + `,`, + `DeviationGeneration:` + valueToStringGenerated(this.DeviationGeneration) + `,`, + `}`, + }, "") + return s +} +func (this *Target) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Target{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetSpec", "TargetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TargetStatus", "TargetStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *TargetList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Target{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Target", "Target", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&TargetList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *TargetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TargetSpec{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `Address:` + fmt.Sprintf("%v", this.Address) + `,`, + `TargetProfile:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TargetProfile), "TargetProfile", "v1alpha11.TargetProfile", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *TargetStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TargetStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `DiscoveryInfo:` + strings.Replace(this.DiscoveryInfo.String(), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `UsedReferences:` + strings.Replace(this.UsedReferences.String(), "TargetStatusUsedReferences", "TargetStatusUsedReferences", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TargetStatusUsedReferences) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TargetStatusUsedReferences{`, + `SecretResourceVersion:` + fmt.Sprintf("%v", this.SecretResourceVersion) + `,`, + `TLSSecretResourceVersion:` + fmt.Sprintf("%v", this.TLSSecretResourceVersion) + `,`, + `ConnectionProfileResourceVersion:` + fmt.Sprintf("%v", this.ConnectionProfileResourceVersion) + `,`, + `SyncProfileResourceVersion:` + fmt.Sprintf("%v", this.SyncProfileResourceVersion) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Config) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Config: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigBlame) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigBlame: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigBlame: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigBlameList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigBlameList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ConfigBlame{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigBlameSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigBlameSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigBlameSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigBlameStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigBlameStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigBlameStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigBlob) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigBlob: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigBlob: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigDeviation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigDeviation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DesiredValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.DesiredValue = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ActualValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ActualValue = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - s := strings.Join([]string{`&Target{`, - `TargetSelector:` + strings.Replace(fmt.Sprintf("%v", this.TargetSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `}`, - }, "") - return s + return nil } -func (this *TargetStatus) String() string { - if this == nil { - return "nil" +func (m *ConfigList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConfigList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Config{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&TargetStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Condition:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Condition), "Condition", "v1alpha1.Condition", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } -func (m *Config) Unmarshal(dAtA []byte) error { +func (m *ConfigSet) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2850,10 +3935,10 @@ func (m *Config) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Config: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2976,7 +4061,7 @@ func (m *Config) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigBlame) Unmarshal(dAtA []byte) error { +func (m *ConfigSetList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2999,15 +4084,15 @@ func (m *ConfigBlame) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigBlame: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSetList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigBlame: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3034,46 +4119,13 @@ func (m *ConfigBlame) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3100,7 +4152,8 @@ func (m *ConfigBlame) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ConfigSet{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3125,7 +4178,7 @@ func (m *ConfigBlame) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { +func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3148,15 +4201,48 @@ func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigBlameList: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSetSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigBlameList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3183,13 +4269,56 @@ func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Lifecycle == nil { + m.Lifecycle = &Lifecycle{} + } + if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Revertive = &b + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3216,8 +4345,8 @@ func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ConfigBlame{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, ConfigBlob{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3242,7 +4371,7 @@ func (m *ConfigBlameList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigBlameSpec) Unmarshal(dAtA []byte) error { +func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3265,65 +4394,48 @@ func (m *ConfigBlameSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigBlameSpec: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSetStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigBlameSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLengthGenerated } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigBlameStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigBlameStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigBlameStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3350,7 +4462,8 @@ func (m *ConfigBlameStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Targets = append(m.Targets, ConfigSetTargetStatus{}) + if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3375,7 +4488,7 @@ func (m *ConfigBlameStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigBlob) Unmarshal(dAtA []byte) error { +func (m *ConfigSetTarget) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3398,47 +4511,15 @@ func (m *ConfigBlob) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigBlob: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSetTarget: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigBlob: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSetTarget: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3465,7 +4546,10 @@ func (m *ConfigBlob) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetSelector == nil { + m.TargetSelector = &v1.LabelSelector{} + } + if err := m.TargetSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3490,7 +4574,7 @@ func (m *ConfigBlob) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { +func (m *ConfigSetTargetStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3513,80 +4597,15 @@ func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigDeviation: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSetTargetStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigDeviation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSetTargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.DesiredValue = &s - iNdEx = postIndex - case 3: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3614,14 +4633,13 @@ func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.CurrentValue = &s + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Condition", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3631,23 +4649,24 @@ func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Reason = string(dAtA[iNdEx:postIndex]) + if err := m.Condition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3670,7 +4689,7 @@ func (m *ConfigDeviation) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigList) Unmarshal(dAtA []byte) error { +func (m *ConfigSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3693,15 +4712,15 @@ func (m *ConfigList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigList: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3728,13 +4747,56 @@ func (m *ConfigList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Lifecycle == nil { + m.Lifecycle = &Lifecycle{} + } + if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Revertive = &b + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3761,8 +4823,8 @@ func (m *ConfigList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Config{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, ConfigBlob{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3787,7 +4849,7 @@ func (m *ConfigList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigSet) Unmarshal(dAtA []byte) error { +func (m *ConfigStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3810,15 +4872,15 @@ func (m *ConfigSet) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigSet: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3845,13 +4907,13 @@ func (m *ConfigSet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastKnownGoodSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3878,13 +4940,16 @@ func (m *ConfigSet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.LastKnownGoodSchema == nil { + m.LastKnownGoodSchema = &ConfigStatusLastKnownGoodSchema{} + } + if err := m.LastKnownGoodSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AppliedConfig", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3911,10 +4976,33 @@ func (m *ConfigSet) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.AppliedConfig == nil { + m.AppliedConfig = &ConfigSpec{} + } + if err := m.AppliedConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviationGeneration", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeviationGeneration = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3936,7 +5024,7 @@ func (m *ConfigSet) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigSetList) Unmarshal(dAtA []byte) error { +func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3959,17 +5047,17 @@ func (m *ConfigSetList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigSetList: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigStatusLastKnownGoodSchema: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSetList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigStatusLastKnownGoodSchema: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -3979,30 +5067,29 @@ func (m *ConfigSetList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vendor", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4012,25 +5099,55 @@ func (m *ConfigSetList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ConfigSet{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Vendor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4053,7 +5170,7 @@ func (m *ConfigSetList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { +func (m *Deviation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4076,15 +5193,15 @@ func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigSetSpec: wiretype end group for non-group") + return fmt.Errorf("proto: Deviation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Deviation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4111,13 +5228,13 @@ func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4135,65 +5252,22 @@ func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Lifecycle == nil { - m.Lifecycle = &Lifecycle{} - } - if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + return ErrInvalidLengthGenerated } - b := bool(v != 0) - m.Revertive = &b - case 5: + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4220,8 +5294,7 @@ func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, ConfigBlob{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4246,7 +5319,7 @@ func (m *ConfigSetSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { +func (m *DeviationList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4269,15 +5342,15 @@ func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigSetStatus: wiretype end group for non-group") + return fmt.Errorf("proto: DeviationList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviationList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4304,13 +5377,13 @@ func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4337,8 +5410,8 @@ func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Targets = append(m.Targets, TargetStatus{}) - if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, Deviation{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4363,7 +5436,7 @@ func (m *ConfigSetStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigSpec) Unmarshal(dAtA []byte) error { +func (m *DeviationSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4386,17 +5459,17 @@ func (m *ConfigSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigSpec: wiretype end group for non-group") + return fmt.Errorf("proto: DeviationSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviationSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviationType", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4406,33 +5479,30 @@ func (m *ConfigSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Lifecycle == nil { - m.Lifecycle = &Lifecycle{} - } - if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := DeviationType(dAtA[iNdEx:postIndex]) + m.DeviationType = &s iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deviations", wireType) } - m.Priority = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4442,35 +5512,79 @@ func (m *ConfigSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Priority |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) + if msglen < 0 { + return ErrInvalidLengthGenerated } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - b := bool(v != 0) - m.Revertive = &b - case 4: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deviations = append(m.Deviations, ConfigDeviation{}) + if err := m.Deviations[len(m.Deviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviationStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviationStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviationStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4497,8 +5611,7 @@ func (m *ConfigSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, ConfigBlob{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4523,7 +5636,7 @@ func (m *ConfigSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigStatus) Unmarshal(dAtA []byte) error { +func (m *DiscoveryInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4546,17 +5659,17 @@ func (m *ConfigStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigStatus: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4566,30 +5679,29 @@ func (m *ConfigStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Protocol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastKnownGoodSchema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4599,33 +5711,29 @@ func (m *ConfigStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.LastKnownGoodSchema == nil { - m.LastKnownGoodSchema = &ConfigStatusLastKnownGoodSchema{} - } - if err := m.LastKnownGoodSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Provider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppliedConfig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4635,33 +5743,29 @@ func (m *ConfigStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.AppliedConfig == nil { - m.AppliedConfig = &ConfigSpec{} - } - if err := m.AppliedConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviationGeneration", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) } - var v int64 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4671,65 +5775,59 @@ func (m *ConfigStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.DeviationGeneration = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthGenerated } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + m.Hostname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigStatusLastKnownGoodSchema: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigStatusLastKnownGoodSchema: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Platform = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MacAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4757,11 +5855,11 @@ func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.MacAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vendor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SerialNumber", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4789,11 +5887,11 @@ func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Vendor = string(dAtA[iNdEx:postIndex]) + m.SerialNumber = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SupportedEncodings", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4821,7 +5919,7 @@ func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.SupportedEncodings = append(m.SupportedEncodings, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -4844,7 +5942,7 @@ func (m *ConfigStatusLastKnownGoodSchema) Unmarshal(dAtA []byte) error { } return nil } -func (m *Deviation) Unmarshal(dAtA []byte) error { +func (m *Lifecycle) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4867,83 +5965,17 @@ func (m *Deviation) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Deviation: wiretype end group for non-group") + return fmt.Errorf("proto: Lifecycle: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Deviation: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Lifecycle: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeletionPolicy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -4953,24 +5985,23 @@ func (m *Deviation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.DeletionPolicy = DeletionPolicy(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4993,7 +6024,7 @@ func (m *Deviation) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviationList) Unmarshal(dAtA []byte) error { +func (m *RunningConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5016,15 +6047,15 @@ func (m *DeviationList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviationList: wiretype end group for non-group") + return fmt.Errorf("proto: RunningConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviationList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RunningConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5051,13 +6082,13 @@ func (m *DeviationList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5084,8 +6115,40 @@ func (m *DeviationList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Deviation{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5110,7 +6173,7 @@ func (m *DeviationList) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviationSpec) Unmarshal(dAtA []byte) error { +func (m *RunningConfigList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5133,17 +6196,17 @@ func (m *DeviationSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviationSpec: wiretype end group for non-group") + return fmt.Errorf("proto: RunningConfigList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviationSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RunningConfigList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviationType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5153,28 +6216,28 @@ func (m *DeviationSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := DeviationType(dAtA[iNdEx:postIndex]) - m.DeviationType = &s + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deviations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5201,8 +6264,8 @@ func (m *DeviationSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Deviations = append(m.Deviations, ConfigDeviation{}) - if err := m.Deviations[len(m.Deviations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, RunningConfig{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5227,7 +6290,7 @@ func (m *DeviationSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeviationStatus) Unmarshal(dAtA []byte) error { +func (m *RunningConfigSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5250,45 +6313,12 @@ func (m *DeviationStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeviationStatus: wiretype end group for non-group") + return fmt.Errorf("proto: RunningConfigSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeviationStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RunningConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5310,7 +6340,7 @@ func (m *DeviationStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *Lifecycle) Unmarshal(dAtA []byte) error { +func (m *RunningConfigStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5333,17 +6363,17 @@ func (m *Lifecycle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Lifecycle: wiretype end group for non-group") + return fmt.Errorf("proto: RunningConfigStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Lifecycle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RunningConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionPolicy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5353,23 +6383,24 @@ func (m *Lifecycle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.DeletionPolicy = DeletionPolicy(dAtA[iNdEx:postIndex]) + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -5392,7 +6423,7 @@ func (m *Lifecycle) Unmarshal(dAtA []byte) error { } return nil } -func (m *RunningConfig) Unmarshal(dAtA []byte) error { +func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5415,10 +6446,10 @@ func (m *RunningConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RunningConfig: wiretype end group for non-group") + return fmt.Errorf("proto: SensitiveConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RunningConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SensitiveConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5541,7 +6572,7 @@ func (m *RunningConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *RunningConfigList) Unmarshal(dAtA []byte) error { +func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5564,17 +6595,17 @@ func (m *RunningConfigList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RunningConfigList: wiretype end group for non-group") + return fmt.Errorf("proto: SensitiveConfigData: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RunningConfigList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SensitiveConfigData: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5584,28 +6615,27 @@ func (m *RunningConfigList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5632,8 +6662,7 @@ func (m *RunningConfigList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, RunningConfig{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5658,7 +6687,7 @@ func (m *RunningConfigList) Unmarshal(dAtA []byte) error { } return nil } -func (m *RunningConfigSpec) Unmarshal(dAtA []byte) error { +func (m *SensitiveConfigList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5681,12 +6710,79 @@ func (m *RunningConfigSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RunningConfigSpec: wiretype end group for non-group") + return fmt.Errorf("proto: SensitiveConfigList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RunningConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SensitiveConfigList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, SensitiveConfig{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5708,7 +6804,7 @@ func (m *RunningConfigSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *RunningConfigStatus) Unmarshal(dAtA []byte) error { +func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5731,15 +6827,91 @@ func (m *RunningConfigStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RunningConfigStatus: wiretype end group for non-group") + return fmt.Errorf("proto: SensitiveConfigSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RunningConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SensitiveConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Lifecycle == nil { + m.Lifecycle = &Lifecycle{} + } + if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + } + m.Priority = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Priority |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Revertive = &b + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5766,7 +6938,8 @@ func (m *RunningConfigStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, SensitiveConfigData{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5791,7 +6964,7 @@ func (m *RunningConfigStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { +func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5814,15 +6987,15 @@ func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SensitiveConfig: wiretype end group for non-group") + return fmt.Errorf("proto: SensitiveConfigStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SensitiveConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SensitiveConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5849,13 +7022,13 @@ func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastKnownGoodSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5882,13 +7055,16 @@ func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.LastKnownGoodSchema == nil { + m.LastKnownGoodSchema = &ConfigStatusLastKnownGoodSchema{} + } + if err := m.LastKnownGoodSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AppliedSensitiveConfig", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5915,10 +7091,33 @@ func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.AppliedSensitiveConfig == nil { + m.AppliedSensitiveConfig = &SensitiveConfigSpec{} + } + if err := m.AppliedSensitiveConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviationGeneration", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeviationGeneration = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -5940,7 +7139,7 @@ func (m *SensitiveConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { +func (m *Target) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5963,17 +7162,17 @@ func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SensitiveConfigData: wiretype end group for non-group") + return fmt.Errorf("proto: Target: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SensitiveConfigData: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5983,27 +7182,28 @@ func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Path = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretKeyRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6030,7 +7230,40 @@ func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.SecretKeyRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6055,7 +7288,7 @@ func (m *SensitiveConfigData) Unmarshal(dAtA []byte) error { } return nil } -func (m *SensitiveConfigList) Unmarshal(dAtA []byte) error { +func (m *TargetList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6078,10 +7311,10 @@ func (m *SensitiveConfigList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SensitiveConfigList: wiretype end group for non-group") + return fmt.Errorf("proto: TargetList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SensitiveConfigList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6146,7 +7379,7 @@ func (m *SensitiveConfigList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, SensitiveConfig{}) + m.Items = append(m.Items, Target{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6172,7 +7405,7 @@ func (m *SensitiveConfigList) Unmarshal(dAtA []byte) error { } return nil } -func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { +func (m *TargetSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6195,17 +7428,17 @@ func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SensitiveConfigSpec: wiretype end group for non-group") + return fmt.Errorf("proto: TargetSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SensitiveConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lifecycle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6215,33 +7448,29 @@ func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Lifecycle == nil { - m.Lifecycle = &Lifecycle{} - } - if err := m.Lifecycle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Provider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - m.Priority = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6251,35 +7480,27 @@ func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Priority |= int64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Revertive", wireType) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - b := bool(v != 0) - m.Revertive = &b - case 4: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetProfile", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6306,8 +7527,7 @@ func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Config = append(m.Config, SensitiveConfigData{}) - if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TargetProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6332,7 +7552,7 @@ func (m *SensitiveConfigSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { +func (m *TargetStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6355,10 +7575,10 @@ func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SensitiveConfigStatus: wiretype end group for non-group") + return fmt.Errorf("proto: TargetStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SensitiveConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6396,7 +7616,7 @@ func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastKnownGoodSchema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6423,16 +7643,16 @@ func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.LastKnownGoodSchema == nil { - m.LastKnownGoodSchema = &ConfigStatusLastKnownGoodSchema{} + if m.DiscoveryInfo == nil { + m.DiscoveryInfo = &DiscoveryInfo{} } - if err := m.LastKnownGoodSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DiscoveryInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppliedSensitiveConfig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UsedReferences", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6459,33 +7679,13 @@ func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.AppliedSensitiveConfig == nil { - m.AppliedSensitiveConfig = &SensitiveConfigSpec{} + if m.UsedReferences == nil { + m.UsedReferences = &TargetStatusUsedReferences{} } - if err := m.AppliedSensitiveConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.UsedReferences.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeviationGeneration", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DeviationGeneration = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6507,7 +7707,7 @@ func (m *SensitiveConfigStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *Target) Unmarshal(dAtA []byte) error { +func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6530,17 +7730,17 @@ func (m *Target) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Target: wiretype end group for non-group") + return fmt.Errorf("proto: TargetStatusUsedReferences: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetStatusUsedReferences: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecretResourceVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6550,81 +7750,59 @@ func (m *Target) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.TargetSelector == nil { - m.TargetSelector = &v1.LabelSelector{} - } - if err := m.TargetSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SecretResourceVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TLSSecretResourceVersion", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TargetStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TargetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.TLSSecretResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfileResourceVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6652,13 +7830,13 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.ConnectionProfileResourceVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Condition", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SyncProfileResourceVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6668,24 +7846,23 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Condition.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SyncProfileResourceVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/apis/config/v1alpha1/generated.proto b/apis/config/v1alpha1/generated.proto index 54e12e13..4f043868 100644 --- a/apis/config/v1alpha1/generated.proto +++ b/apis/config/v1alpha1/generated.proto @@ -20,6 +20,7 @@ syntax = "proto2"; package github.com.sdcio.config_server.apis.config.v1alpha1; import "github.com/sdcio/config-server/apis/condition/v1alpha1/generated.proto"; +import "github.com/sdcio/config-server/apis/inv/v1alpha1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -102,7 +103,7 @@ message ConfigDeviation { // DesiredValue is the desired value of the config belonging to the path optional string desiredValue = 2; - // CurrentValue defines the current value of the config belonging to the path + // ActualValue defines the current value of the config belonging to the path // that is currently configured on the target optional string actualValue = 3; @@ -136,7 +137,7 @@ message ConfigSetList { // ConfigSetSpec defines the desired state of Config message ConfigSetSpec { // Targets defines the targets on which this configSet applies - optional Target target = 1; + optional ConfigSetTarget target = 1; // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete // will follow @@ -150,6 +151,7 @@ message ConfigSetSpec { // Config defines the configuration to be applied to a target device // +kubebuilder:pruning:PreserveUnknownFields + // +listType=atomic repeated ConfigBlob config = 5; } @@ -160,7 +162,22 @@ message ConfigSetStatus { optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; // Targets defines the status of the configSet resource on the respective target - repeated TargetStatus targets = 2; + // +listType=atomic + repeated ConfigSetTargetStatus targets = 2; +} + +message ConfigSetTarget { + // TargetSelector defines the selector used to select the targets to which the config applies + optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector targetSelector = 1; +} + +message ConfigSetTargetStatus { + optional string name = 1; + + // right now we assume the namespace of the config and target are aligned + // NameSpace string `json:"namespace" protobuf:"bytes,2,opt,name=name"` + // Condition of the configCR status + optional .github.com.sdcio.config_server.apis.condition.v1alpha1.Condition condition = 3; } // ConfigSpec defines the desired state of Config @@ -177,6 +194,7 @@ message ConfigSpec { // Config defines the configuration to be applied to a target device // +kubebuilder:pruning:PreserveUnknownFields + // +listType=atomic repeated ConfigBlob config = 4; } @@ -228,6 +246,7 @@ message DeviationSpec { optional string deviationType = 1; // Deviations identify the configuration deviation based on the last applied config CR + // +listType=atomic repeated ConfigDeviation deviations = 2; } @@ -238,6 +257,33 @@ message DeviationStatus { optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; } +message DiscoveryInfo { + // Protocol used for discovery + optional string protocol = 1; + + // Type associated with the target + optional string provider = 2; + + // Version associated with the target + optional string version = 3; + + // Hostname associated with the target + optional string hostname = 4; + + // Platform associated with the target + optional string platform = 5; + + // MacAddress associated with the target + optional string macAddress = 6; + + // SerialNumber associated with the target + optional string serialNumber = 7; + + // Supported Encodings of the target + // +listType=atomic + repeated string supportedEncodings = 8; +} + message Lifecycle { // DeletionPolicy specifies what will happen to the underlying resource // when this resource is deleted - either "delete" or "orphan" the @@ -310,6 +356,7 @@ message SensitiveConfigSpec { optional bool revertive = 3; // SensitiveConfig defines the SensitiveConfiguration to be applied to a target device + // +listType=atomic repeated SensitiveConfigData config = 4; } @@ -329,17 +376,54 @@ message SensitiveConfigStatus { optional int64 deviationGeneration = 4; } +// Target is the Schema for the Target API +// +k8s:openapi-gen=true message Target { - // TargetSelector defines the selector used to select the targets to which the config applies - optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector targetSelector = 1; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + optional TargetSpec spec = 2; + + optional TargetStatus status = 3; +} + +// TargetList contains a list of Targets +message TargetList { + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Target items = 2; +} + +// TargetSpec defines the desired state of Target +message TargetSpec { + // Provider specifies the provider using this target. + optional string provider = 1; + + // Address defines the address to connect to the target + optional string address = 2; + + // TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target + optional .github.com.sdcio.config_server.apis.inv.v1alpha1.TargetProfile targetProfile = 3; } +// TargetStatus defines the observed state of Target message TargetStatus { - optional string name = 1; + // ConditionedStatus provides the status of the Target using conditions + optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; - // right now we assume the namespace of the config and target are aligned - // NameSpace string `json:"namespace" protobuf:"bytes,2,opt,name=name"` - // Condition of the configCR status - optional .github.com.sdcio.config_server.apis.condition.v1alpha1.Condition condition = 3; + // Discovery info defines the information retrieved during discovery + optional DiscoveryInfo discoveryInfo = 2; + + // UsedReferences track the resource used to reconcile the cr + optional TargetStatusUsedReferences usedReferences = 3; +} + +message TargetStatusUsedReferences { + optional string secretResourceVersion = 1; + + optional string tlsSecretResourceVersion = 2; + + optional string connectionProfileResourceVersion = 3; + + optional string syncProfileResourceVersion = 4; } diff --git a/apis/config/v1alpha1/generated.protomessage.pb.go b/apis/config/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 00000000..9f5cb55a --- /dev/null +++ b/apis/config/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,100 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +Copyright 2024 Nokia. + +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*LocalObjectReference) ProtoMessage() {} + +func (*SecretKeySelector) ProtoMessage() {} + +func (*Config) ProtoMessage() {} + +func (*ConfigBlame) ProtoMessage() {} + +func (*ConfigBlameList) ProtoMessage() {} + +func (*ConfigBlameSpec) ProtoMessage() {} + +func (*ConfigBlameStatus) ProtoMessage() {} + +func (*ConfigBlob) ProtoMessage() {} + +func (*ConfigDeviation) ProtoMessage() {} + +func (*ConfigList) ProtoMessage() {} + +func (*ConfigSet) ProtoMessage() {} + +func (*ConfigSetList) ProtoMessage() {} + +func (*ConfigSetSpec) ProtoMessage() {} + +func (*ConfigSetStatus) ProtoMessage() {} + +func (*ConfigSetTarget) ProtoMessage() {} + +func (*ConfigSetTargetStatus) ProtoMessage() {} + +func (*ConfigSpec) ProtoMessage() {} + +func (*ConfigStatus) ProtoMessage() {} + +func (*ConfigStatusLastKnownGoodSchema) ProtoMessage() {} + +func (*Deviation) ProtoMessage() {} + +func (*DeviationList) ProtoMessage() {} + +func (*DeviationSpec) ProtoMessage() {} + +func (*DeviationStatus) ProtoMessage() {} + +func (*DiscoveryInfo) ProtoMessage() {} + +func (*Lifecycle) ProtoMessage() {} + +func (*RunningConfig) ProtoMessage() {} + +func (*RunningConfigList) ProtoMessage() {} + +func (*RunningConfigSpec) ProtoMessage() {} + +func (*RunningConfigStatus) ProtoMessage() {} + +func (*SensitiveConfig) ProtoMessage() {} + +func (*SensitiveConfigData) ProtoMessage() {} + +func (*SensitiveConfigList) ProtoMessage() {} + +func (*SensitiveConfigSpec) ProtoMessage() {} + +func (*SensitiveConfigStatus) ProtoMessage() {} + +func (*Target) ProtoMessage() {} + +func (*TargetList) ProtoMessage() {} + +func (*TargetSpec) ProtoMessage() {} + +func (*TargetStatus) ProtoMessage() {} + +func (*TargetStatusUsedReferences) ProtoMessage() {} diff --git a/apis/config/v1alpha1/register.go b/apis/config/v1alpha1/register.go index ea196478..507dc7bd 100644 --- a/apis/config/v1alpha1/register.go +++ b/apis/config/v1alpha1/register.go @@ -63,6 +63,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &DeviationList{}, &ConfigBlame{}, &ConfigBlameList{}, + &Target{}, + &TargetList{}, + &TargetConfigBlame{}, + &TargetRunningConfig{}, + &TargetClearDeviation{}, + &TargetRunningConfigOptions{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/apis/config/v1alpha1/sensitive_config_types.go b/apis/config/v1alpha1/sensitive_config_types.go index bb824766..44bd1e6c 100644 --- a/apis/config/v1alpha1/sensitive_config_types.go +++ b/apis/config/v1alpha1/sensitive_config_types.go @@ -34,6 +34,7 @@ type SensitiveConfigSpec struct { // Revertive defines if this CR is enabled for revertive or non revertve operation Revertive *bool `json:"revertive,omitempty" protobuf:"varint,3,opt,name=revertive"` // SensitiveConfig defines the SensitiveConfiguration to be applied to a target device + // +listType=atomic Config []SensitiveConfigData `json:"config" protobuf:"bytes,4,rep,name=config"` } diff --git a/apis/config/v1alpha1/target_cleardeviation_resource.go b/apis/config/v1alpha1/target_cleardeviation_resource.go new file mode 100644 index 00000000..9ac6045c --- /dev/null +++ b/apis/config/v1alpha1/target_cleardeviation_resource.go @@ -0,0 +1,33 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "fmt" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" +) + +var _ resource.ArbitrarySubResource = &TargetClearDeviation{} + +func (TargetClearDeviation) SubResourceName() string { return "cleardeviation" } +func (TargetClearDeviation) New() runtime.Object { return &TargetClearDeviation{} } +func (TargetClearDeviation) NewStorage(_ *runtime.Scheme, _ rest.Storage) (rest.Storage, error) { + return nil, fmt.Errorf("not implemented on versioned type") +} diff --git a/apis/config/v1alpha1/target_cleardeviation_types.go b/apis/config/v1alpha1/target_cleardeviation_types.go new file mode 100644 index 00000000..79107efb --- /dev/null +++ b/apis/config/v1alpha1/target_cleardeviation_types.go @@ -0,0 +1,74 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TargetClearDeviationSpec defines the desired state of Target +type TargetClearDeviationSpec struct { + // Config defines the clear deviations configs to applied on the taget + Config []TargetClearDeviationConfig `json:"config" protobuf:"bytes,1,rep,name=config"` +} + +type TargetClearDeviationConfig struct { + // Name of the config on which the paths should be cleared + Name string `json:"name" protobuf:"bytes,1,opt,name=paths"` + // Paths provide the path of the deviation to be cleared + Paths []string `json:"paths" protobuf:"bytes,2,rep,name=paths"` +} + +type TargetClearDeviationStatus struct { + // Message is a global message for the transaction + Message string `json:"message,omitempty" protobuf:"bytes,1,opt,name=message"` + // Warnings are global warnings from the transaction + Warnings []string `json:"warnings,omitempty" protobuf:"bytes,2,rep,name=warnings"` + // Results holds per-config outcomes, keyed by intent name + Results []TargetClearDeviationConfigResult `json:"results,omitempty" protobuf:"bytes,3,rep,name=results"` +} + +type TargetClearDeviationConfigResult struct { + // Name of the config on which the paths should be cleared + Name string `json:"name" protobuf:"bytes,1,rep,name=paths"` + // Success indicates whether the clear deviation was successful + Success bool `json:"success"` + // Message provides detail on the outcome + Message string `json:"message,omitempty"` + // Errors lists any errors for this specific config + Errors []string `json:"errors,omitempty"` + // Warnings lists any warnings for this specific config + Warnings []string `json:"warnings,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// TargetClearDeviation is the Schema for the TargetClearDeviation API +// +k8s:openapi-gen=true +type TargetClearDeviation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Spec *TargetClearDeviationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status *TargetClearDeviationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` +} + +var ( + TargetClearDeviationKind = reflect.TypeOf(TargetClearDeviation{}).Name() +) diff --git a/apis/config/v1alpha1/target_configblame_resource.go b/apis/config/v1alpha1/target_configblame_resource.go new file mode 100644 index 00000000..2be75ae4 --- /dev/null +++ b/apis/config/v1alpha1/target_configblame_resource.go @@ -0,0 +1,33 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "fmt" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" +) + +var _ resource.ArbitrarySubResource = &TargetConfigBlame{} + +func (TargetConfigBlame) SubResourceName() string { return "configblame" } +func (TargetConfigBlame) New() runtime.Object { return &TargetConfigBlame{} } +func (TargetConfigBlame) NewStorage(_ *runtime.Scheme, _ rest.Storage) (rest.Storage, error) { + return nil, fmt.Errorf("not implemented on versioned type") +} diff --git a/apis/config/v1alpha1/target_configblame_types.go b/apis/config/v1alpha1/target_configblame_types.go new file mode 100644 index 00000000..c189215a --- /dev/null +++ b/apis/config/v1alpha1/target_configblame_types.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true + +// TargetConfigBlame is the Schema for the TargetConfigBlame API +type TargetConfigBlame struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + //+kubebuilder:pruning:PreserveUnknownFields + Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` +} + +var ( + TargetConfigBlameKind = reflect.TypeOf(TargetConfigBlame{}).Name() +) diff --git a/apis/inv/v1alpha1/target_helpers.go b/apis/config/v1alpha1/target_helpers.go similarity index 60% rename from apis/inv/v1alpha1/target_helpers.go rename to apis/config/v1alpha1/target_helpers.go index f136f426..2c29f2d9 100644 --- a/apis/inv/v1alpha1/target_helpers.go +++ b/apis/config/v1alpha1/target_helpers.go @@ -18,11 +18,12 @@ package v1alpha1 import ( "fmt" - strings "strings" + "strings" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -37,6 +38,20 @@ func (r *Target) SetConditions(c ...condv1alpha1.Condition) { r.Status.SetConditions(c...) } +func (r *Target) IsConditionReady() bool { + return r.GetCondition(condv1alpha1.ConditionTypeReady).Status == metav1.ConditionTrue +} + +func (r *Target) GetOwnerReference() metav1.OwnerReference { + return metav1.OwnerReference{ + APIVersion: r.APIVersion, + Kind: r.Kind, + Name: r.Name, + UID: r.UID, + Controller: ptr.To(true), + } +} + func (r *Target) GetNamespacedName() types.NamespacedName { return types.NamespacedName{Namespace: r.Namespace, Name: r.Name} } @@ -44,15 +59,15 @@ func (r *Target) GetNamespacedName() types.NamespacedName { func (r *Target) SetOverallStatus(target *Target) { ready := true msg := "target ready" - if ready && !target.GetCondition(ConditionTypeDiscoveryReady).IsTrue() { + if ready && !target.GetCondition(ConditionTypeTargetDiscoveryReady).IsTrue() { ready = false msg = "discovery not ready" // target.GetCondition(ConditionTypeDiscoveryReady).Message) } - if ready && !target.GetCondition(ConditionTypeDatastoreReady).IsTrue() { + if ready && !target.GetCondition(ConditionTypeTargetDatastoreReady).IsTrue() { ready = false msg = "datastore not ready" // target.GetCondition(ConditionTypeDatastoreReady).Message) } - if ready && !target.GetCondition(ConditionTypeConfigRecoveryReady).IsTrue() { + if ready && !target.GetCondition(ConditionTypeTargetConfigRecoveryReady).IsTrue() { ready = false msg = "config not ready" //, target.GetCondition(ConditionTypeConfigReady).Message) } @@ -67,16 +82,41 @@ func (r *Target) SetOverallStatus(target *Target) { } } +func GetOverallStatus(target *Target) condv1alpha1.Condition { + ready := true + msg := "target ready" + if ready && !target.GetCondition(ConditionTypeTargetDiscoveryReady).IsTrue() { + ready = false + msg = "discovery not ready" // target.GetCondition(ConditionTypeDiscoveryReady).Message) + } + if ready && !target.GetCondition(ConditionTypeTargetDatastoreReady).IsTrue() { + ready = false + msg = "datastore not ready" // target.GetCondition(ConditionTypeDatastoreReady).Message) + } + if ready && !target.GetCondition(ConditionTypeTargetConfigRecoveryReady).IsTrue() { + ready = false + msg = "config not ready" //, target.GetCondition(ConditionTypeConfigReady).Message) + } + if ready && !target.GetCondition(ConditionTypeTargetConnectionReady).IsTrue() { + ready = false + msg = "datastore connection not ready" // target.GetCondition(ConditionTypeTargetConnectionReady).Message) + } + if !ready { + return condv1alpha1.Failed(msg) + } + return condv1alpha1.Ready() +} + func (r *Target) IsDatastoreReady() bool { - return r.GetCondition(ConditionTypeDiscoveryReady).Status == metav1.ConditionTrue && - r.GetCondition(ConditionTypeDatastoreReady).Status == metav1.ConditionTrue && + return r.GetCondition(ConditionTypeTargetDiscoveryReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetDatastoreReady).Status == metav1.ConditionTrue && r.GetCondition(ConditionTypeTargetConnectionReady).Status == metav1.ConditionTrue } func (r *Target) IsReady() bool { return r.GetCondition(condv1alpha1.ConditionTypeReady).Status == metav1.ConditionTrue && - r.GetCondition(ConditionTypeDiscoveryReady).Status == metav1.ConditionTrue && - r.GetCondition(ConditionTypeDatastoreReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetDiscoveryReady).Status == metav1.ConditionTrue && + r.GetCondition(ConditionTypeTargetDatastoreReady).Status == metav1.ConditionTrue && r.GetCondition(ConditionTypeTargetConnectionReady).Status == metav1.ConditionTrue } @@ -91,9 +131,9 @@ func (r *Target) NotReadyReason() string { } } - check("DiscoveryReady", r.GetCondition(ConditionTypeDiscoveryReady)) - check("DatastoreReady", r.GetCondition(ConditionTypeDatastoreReady)) - check("ConfigReady", r.GetCondition(ConditionTypeConfigRecoveryReady)) + check("DiscoveryReady", r.GetCondition(ConditionTypeTargetDiscoveryReady)) + check("DatastoreReady", r.GetCondition(ConditionTypeTargetDatastoreReady)) + check("ConfigReady", r.GetCondition(ConditionTypeTargetConfigRecoveryReady)) check("ConnectionReady", r.GetCondition(ConditionTypeTargetConnectionReady)) if len(reasons) == 0 { @@ -116,7 +156,7 @@ func (r *TargetList) GetItems() []client.Object { func BuildTarget(meta metav1.ObjectMeta, spec TargetSpec, status TargetStatus) *Target { return &Target{ TypeMeta: metav1.TypeMeta{ - APIVersion: localSchemeBuilder.GroupVersion.Identifier(), + APIVersion: SchemeGroupVersion.Identifier(), Kind: TargetKind, }, ObjectMeta: meta, diff --git a/apis/config/v1alpha1/target_resource.go b/apis/config/v1alpha1/target_resource.go new file mode 100644 index 00000000..fe81a18b --- /dev/null +++ b/apis/config/v1alpha1/target_resource.go @@ -0,0 +1,89 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + "github.com/sdcio/config-server/apis/config" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// +k8s:deepcopy-gen=false +var _ resource.Object = &Target{} +var _ resource.ObjectList = &TargetList{} +var _ resource.MultiVersionObject = &Target{} + +var _ resource.ObjectWithArbitrarySubResource = &Target{} + +func (r *Target) GetArbitrarySubResources() []resource.ArbitrarySubResource { + return []resource.ArbitrarySubResource{ + &TargetRunningConfig{}, + &TargetClearDeviation{}, + &TargetConfigBlame{}, + } +} + +func (Target) GetGroupVersionResource() schema.GroupVersionResource { + return schema.GroupVersionResource{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Resource: config.TargetPlural, + } +} + +// IsStorageVersion returns false -- Target is used as the internal version. +// IsStorageVersion implements resource.Object +func (Target) IsStorageVersion() bool { + return false +} + +// NamespaceScoped returns true to indicate Target is a namespaced resource. +// NamespaceScoped implements resource.Object +func (Target) NamespaceScoped() bool { + return true +} + +// GetObjectMeta implements resource.Object +func (r *Target) GetObjectMeta() *metav1.ObjectMeta { + return &r.ObjectMeta +} + +// New return an empty resource +// New implements resource.Object +func (Target) New() runtime.Object { + return &Target{} +} + +// NewList return an empty resourceList +// NewList implements resource.Object +func (Target) NewList() runtime.Object { + return &TargetList{} +} + +// GetListMeta returns the ListMeta +// GetListMeta implements resource.ObjectList +func (r *TargetList) GetListMeta() *metav1.ListMeta { + return &r.ListMeta +} + +// RegisterConversions registers the conversions. +// RegisterConversions implements resource.MultiVersionObject +func (Target) RegisterConversions() func(s *runtime.Scheme) error { + return RegisterConversions +} diff --git a/apis/config/v1alpha1/target_runningconfig_resource.go b/apis/config/v1alpha1/target_runningconfig_resource.go new file mode 100644 index 00000000..23c47bf9 --- /dev/null +++ b/apis/config/v1alpha1/target_runningconfig_resource.go @@ -0,0 +1,75 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "fmt" + "net/url" + + "github.com/henderiw/apiserver-builder/pkg/builder/resource" + "github.com/sdcio/config-server/apis/config" + conversion "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" +) + +var _ resource.ArbitrarySubResource = &TargetRunningConfig{} + +func (TargetRunningConfig) SubResourceName() string { return "runningconfig" } +func (TargetRunningConfig) New() runtime.Object { return &TargetRunningConfig{} } +func (TargetRunningConfig) NewStorage(_ *runtime.Scheme, _ rest.Storage) (rest.Storage, error) { + return nil, fmt.Errorf("not implemented on versioned type") +} + +var _ resource.ArbitrarySubResourceWithOptions = &TargetRunningConfig{} + +func (TargetRunningConfig) NewGetOptions() runtime.Object { + return &TargetRunningConfigOptions{} +} + +var _ resource.ArbitrarySubResourceWithOptionsConverter = &TargetRunningConfig{} + +func (TargetRunningConfig) ConvertFromURLValues() func(a, b interface{}, scope conversion.Scope) error { + return func(a, b interface{}, scope conversion.Scope) error { + values := a.(*url.Values) + out := b.(*TargetRunningConfigOptions) + out.Path = values.Get("path") + out.Format = values.Get("format") + return nil + } +} + +var _ resource.ArbitrarySubResourceWithVersionConverter = &TargetRunningConfig{} + +func (TargetRunningConfig) ParameterSchemeConversions() []func(*runtime.Scheme) error { + return []func(*runtime.Scheme) error{ + func(s *runtime.Scheme) error { + return s.AddConversionFunc((*TargetRunningConfigOptions)(nil), (*config.TargetRunningConfigOptions)(nil), + func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions( + a.(*TargetRunningConfigOptions), b.(*config.TargetRunningConfigOptions), scope) + }) + }, + func(s *runtime.Scheme) error { + return s.AddConversionFunc((*config.TargetRunningConfigOptions)(nil), (*TargetRunningConfigOptions)(nil), + func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions( + a.(*config.TargetRunningConfigOptions), b.(*TargetRunningConfigOptions), scope) + }) + }, + } +} diff --git a/apis/config/v1alpha1/target_runningconfig_types.go b/apis/config/v1alpha1/target_runningconfig_types.go new file mode 100644 index 00000000..1aa5adc3 --- /dev/null +++ b/apis/config/v1alpha1/target_runningconfig_types.go @@ -0,0 +1,65 @@ +/* +Copyright 2024 Nokia. + +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. +*/ + +package v1alpha1 + +import ( + "reflect" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true + +// TargetRunningConfig is the Schema for the TargetRunningConfig API +type TargetRunningConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + //+kubebuilder:pruning:PreserveUnknownFields + Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:openapi-gen=true +// TargetRunningOptions is the Option Parametsrs for the TargetRunningOptions QueryParamters +type TargetRunningConfigOptions struct { + metav1.TypeMeta `json:",inline"` + + // Path filters the running config to a subtree + Path string `json:"path,omitempty"` + // Format controls output format (json, json_ietf, xml, proto) + // +kubebuilder:validation:Enum=json;json_ietf;xml;proto + // +kubebuilder:default=json + Format string `json:"format,omitempty"` +} + +// Format defines the output encoding format for running config +// +enum +type TargetFormat string + +const ( + Format_JSON TargetFormat = "json" + Format_JSON_IETF TargetFormat = "json_ietf" + Format_XML TargetFormat = "xml" + Format_PROTO TargetFormat = "proto" +) + +var ( + TargetRunningConfigKind = reflect.TypeOf(TargetRunningConfig{}).Name() +) diff --git a/apis/inv/v1alpha1/target_types.go b/apis/config/v1alpha1/target_types.go similarity index 63% rename from apis/inv/v1alpha1/target_types.go rename to apis/config/v1alpha1/target_types.go index 57630619..d2b90de0 100644 --- a/apis/inv/v1alpha1/target_types.go +++ b/apis/config/v1alpha1/target_types.go @@ -20,6 +20,7 @@ import ( "reflect" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -31,7 +32,7 @@ type TargetSpec struct { // Address defines the address to connect to the target Address string `json:"address" protobuf:"bytes,2,opt,name=address"` // TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target - TargetProfile `json:",inline" protobuf:"bytes,3,opt,name=targetProfile"` + invv1alpha1.TargetProfile `json:",inline" protobuf:"bytes,3,opt,name=targetProfile"` } // TargetStatus defines the observed state of Target @@ -51,8 +52,8 @@ type DiscoveryInfo struct { Provider string `json:"provider,omitempty" protobuf:"bytes,2,opt,name=provider"` // Version associated with the target Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"` - // HostName associated with the target - HostName string `json:"hostname,omitempty" protobuf:"bytes,4,opt,name=hostname"` + // Hostname associated with the target + Hostname string `json:"hostname,omitempty" protobuf:"bytes,4,opt,name=hostname"` // Platform associated with the target Platform string `json:"platform,omitempty" protobuf:"bytes,5,opt,name=platform"` // MacAddress associated with the target @@ -60,53 +61,44 @@ type DiscoveryInfo struct { // SerialNumber associated with the target SerialNumber string `json:"serialNumber,omitempty" protobuf:"bytes,7,opt,name=serialNumber"` // Supported Encodings of the target + // +listType=atomic SupportedEncodings []string `json:"supportedEncodings,omitempty" protobuf:"bytes,8,rep,name=supportedEncodings"` // Last discovery time //LastSeen metav1.Time `json:"lastSeen,omitempty"` } type TargetStatusUsedReferences struct { - SecretResourceVersion string `json:"secretResourceVersion,omitempty" yaml:"secretResourceVersion,omitempty" protobuf:"bytes,1,opt,name=secretResourceVersion"` - TLSSecretResourceVersion string `json:"tlsSecretResourceVersion,omitempty" yaml:"tlsSecretResourceVersion,omitempty" protobuf:"bytes,2,opt,name=tlsSecretResourceVersion"` - ConnectionProfileResourceVersion string `json:"connectionProfileResourceVersion" yaml:"connectionProfileResourceVersion" protobuf:"bytes,3,opt,name=connectionProfileResourceVersion"` - SyncProfileResourceVersion string `json:"syncProfileResourceVersion" yaml:"syncProfileResourceVersion" protobuf:"bytes,4,opt,name=syncProfileResourceVersion"` + SecretResourceVersion string `json:"secretResourceVersion,omitempty" protobuf:"bytes,1,opt,name=secretResourceVersion"` + TLSSecretResourceVersion string `json:"tlsSecretResourceVersion,omitempty" protobuf:"bytes,2,opt,name=tlsSecretResourceVersion"` + ConnectionProfileResourceVersion string `json:"connectionProfileResourceVersion" protobuf:"bytes,3,opt,name=connectionProfileResourceVersion"` + SyncProfileResourceVersion string `json:"syncProfileResourceVersion" protobuf:"bytes,4,opt,name=syncProfileResourceVersion"` } -// +kubebuilder:object:root=true // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true +// +kubebuilder:storageversion // +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="REASON",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" -// +kubebuilder:printcolumn:name="PROVIDER",type="string",JSONPath=".spec.provider" -// +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".status.discoveryInfo.version" -// +kubebuilder:printcolumn:name="ADDRESS",type="string",JSONPath=".spec.address" -// +kubebuilder:printcolumn:name="PLATFORM",type="string",JSONPath=".status.discoveryInfo.platform" -// +kubebuilder:printcolumn:name="SERIALNUMBER",type="string",JSONPath=".status.discoveryInfo.serialNumber" -// +kubebuilder:printcolumn:name="MACADDRESS",type="string",JSONPath=".status.discoveryInfo.macAddress" -// +kubebuilder:resource:categories={sdc,inv} +// +kubebuilder:resource:categories={sdc} + // Target is the Schema for the Target API // +k8s:openapi-gen=true type Target struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Spec TargetSpec `json:"spec,omitempty" yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - Status TargetStatus `json:"status,omitempty" yaml:"status,omitempty" protobuf:"bytes,3,opt,name=status"` + Spec TargetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status TargetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true + // TargetList contains a list of Targets -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type TargetList struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []Target `json:"items" yaml:"items" protobuf:"bytes,2,rep,name=items"` -} - -func init() { - localSchemeBuilder.Register(&Target{}, &TargetList{}) + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []Target `json:"items" protobuf:"bytes,2,rep,name=items"` } var ( diff --git a/apis/config/v1alpha1/zz_generated.conversion.go b/apis/config/v1alpha1/zz_generated.conversion.go index 62f3daf4..139a4c24 100644 --- a/apis/config/v1alpha1/zz_generated.conversion.go +++ b/apis/config/v1alpha1/zz_generated.conversion.go @@ -158,6 +158,26 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*ConfigSetTarget)(nil), (*config.ConfigSetTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget(a.(*ConfigSetTarget), b.(*config.ConfigSetTarget), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ConfigSetTarget)(nil), (*ConfigSetTarget)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget(a.(*config.ConfigSetTarget), b.(*ConfigSetTarget), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ConfigSetTargetStatus)(nil), (*config.ConfigSetTargetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus(a.(*ConfigSetTargetStatus), b.(*config.ConfigSetTargetStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ConfigSetTargetStatus)(nil), (*ConfigSetTargetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus(a.(*config.ConfigSetTargetStatus), b.(*ConfigSetTargetStatus), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*ConfigSpec)(nil), (*config.ConfigSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_ConfigSpec_To_config_ConfigSpec(a.(*ConfigSpec), b.(*config.ConfigSpec), scope) }); err != nil { @@ -228,6 +248,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*DiscoveryInfo)(nil), (*config.DiscoveryInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_DiscoveryInfo_To_config_DiscoveryInfo(a.(*DiscoveryInfo), b.(*config.DiscoveryInfo), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.DiscoveryInfo)(nil), (*DiscoveryInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_DiscoveryInfo_To_v1alpha1_DiscoveryInfo(a.(*config.DiscoveryInfo), b.(*DiscoveryInfo), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*Lifecycle)(nil), (*config.Lifecycle)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_Lifecycle_To_config_Lifecycle(a.(*Lifecycle), b.(*config.Lifecycle), scope) }); err != nil { @@ -338,6 +368,106 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*TargetClearDeviation)(nil), (*config.TargetClearDeviation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetClearDeviation_To_config_TargetClearDeviation(a.(*TargetClearDeviation), b.(*config.TargetClearDeviation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetClearDeviation)(nil), (*TargetClearDeviation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetClearDeviation_To_v1alpha1_TargetClearDeviation(a.(*config.TargetClearDeviation), b.(*TargetClearDeviation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetClearDeviationConfig)(nil), (*config.TargetClearDeviationConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetClearDeviationConfig_To_config_TargetClearDeviationConfig(a.(*TargetClearDeviationConfig), b.(*config.TargetClearDeviationConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetClearDeviationConfig)(nil), (*TargetClearDeviationConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetClearDeviationConfig_To_v1alpha1_TargetClearDeviationConfig(a.(*config.TargetClearDeviationConfig), b.(*TargetClearDeviationConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetClearDeviationConfigResult)(nil), (*config.TargetClearDeviationConfigResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetClearDeviationConfigResult_To_config_TargetClearDeviationConfigResult(a.(*TargetClearDeviationConfigResult), b.(*config.TargetClearDeviationConfigResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetClearDeviationConfigResult)(nil), (*TargetClearDeviationConfigResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetClearDeviationConfigResult_To_v1alpha1_TargetClearDeviationConfigResult(a.(*config.TargetClearDeviationConfigResult), b.(*TargetClearDeviationConfigResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetClearDeviationSpec)(nil), (*config.TargetClearDeviationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetClearDeviationSpec_To_config_TargetClearDeviationSpec(a.(*TargetClearDeviationSpec), b.(*config.TargetClearDeviationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetClearDeviationSpec)(nil), (*TargetClearDeviationSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetClearDeviationSpec_To_v1alpha1_TargetClearDeviationSpec(a.(*config.TargetClearDeviationSpec), b.(*TargetClearDeviationSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetClearDeviationStatus)(nil), (*config.TargetClearDeviationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetClearDeviationStatus_To_config_TargetClearDeviationStatus(a.(*TargetClearDeviationStatus), b.(*config.TargetClearDeviationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetClearDeviationStatus)(nil), (*TargetClearDeviationStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetClearDeviationStatus_To_v1alpha1_TargetClearDeviationStatus(a.(*config.TargetClearDeviationStatus), b.(*TargetClearDeviationStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetConfigBlame)(nil), (*config.TargetConfigBlame)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetConfigBlame_To_config_TargetConfigBlame(a.(*TargetConfigBlame), b.(*config.TargetConfigBlame), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetConfigBlame)(nil), (*TargetConfigBlame)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetConfigBlame_To_v1alpha1_TargetConfigBlame(a.(*config.TargetConfigBlame), b.(*TargetConfigBlame), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetList)(nil), (*config.TargetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetList_To_config_TargetList(a.(*TargetList), b.(*config.TargetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetList)(nil), (*TargetList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetList_To_v1alpha1_TargetList(a.(*config.TargetList), b.(*TargetList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetRunningConfig)(nil), (*config.TargetRunningConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetRunningConfig_To_config_TargetRunningConfig(a.(*TargetRunningConfig), b.(*config.TargetRunningConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetRunningConfig)(nil), (*TargetRunningConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetRunningConfig_To_v1alpha1_TargetRunningConfig(a.(*config.TargetRunningConfig), b.(*TargetRunningConfig), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetRunningConfigOptions)(nil), (*config.TargetRunningConfigOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions(a.(*TargetRunningConfigOptions), b.(*config.TargetRunningConfigOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetRunningConfigOptions)(nil), (*TargetRunningConfigOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions(a.(*config.TargetRunningConfigOptions), b.(*TargetRunningConfigOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TargetSpec)(nil), (*config.TargetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetSpec_To_config_TargetSpec(a.(*TargetSpec), b.(*config.TargetSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetSpec)(nil), (*TargetSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetSpec_To_v1alpha1_TargetSpec(a.(*config.TargetSpec), b.(*TargetSpec), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*TargetStatus)(nil), (*config.TargetStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_TargetStatus_To_config_TargetStatus(a.(*TargetStatus), b.(*config.TargetStatus), scope) }); err != nil { @@ -348,6 +478,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*TargetStatusUsedReferences)(nil), (*config.TargetStatusUsedReferences)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_TargetStatusUsedReferences_To_config_TargetStatusUsedReferences(a.(*TargetStatusUsedReferences), b.(*config.TargetStatusUsedReferences), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.TargetStatusUsedReferences)(nil), (*TargetStatusUsedReferences)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_TargetStatusUsedReferences_To_v1alpha1_TargetStatusUsedReferences(a.(*config.TargetStatusUsedReferences), b.(*TargetStatusUsedReferences), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*condition.Condition)(nil), (*conditionv1alpha1.Condition)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_condition_Condition_To_v1alpha1_Condition(a.(*condition.Condition), b.(*conditionv1alpha1.Condition), scope) }); err != nil { @@ -520,7 +660,7 @@ func Convert_config_ConfigBlob_To_v1alpha1_ConfigBlob(in *config.ConfigBlob, out func autoConvert_v1alpha1_ConfigDeviation_To_config_ConfigDeviation(in *ConfigDeviation, out *config.ConfigDeviation, s conversion.Scope) error { out.Path = in.Path out.DesiredValue = (*string)(unsafe.Pointer(in.DesiredValue)) - out.CurrentValue = (*string)(unsafe.Pointer(in.CurrentValue)) + out.ActualValue = (*string)(unsafe.Pointer(in.ActualValue)) out.Reason = in.Reason return nil } @@ -533,7 +673,7 @@ func Convert_v1alpha1_ConfigDeviation_To_config_ConfigDeviation(in *ConfigDeviat func autoConvert_config_ConfigDeviation_To_v1alpha1_ConfigDeviation(in *config.ConfigDeviation, out *ConfigDeviation, s conversion.Scope) error { out.Path = in.Path out.DesiredValue = (*string)(unsafe.Pointer(in.DesiredValue)) - out.CurrentValue = (*string)(unsafe.Pointer(in.CurrentValue)) + out.ActualValue = (*string)(unsafe.Pointer(in.ActualValue)) out.Reason = in.Reason return nil } @@ -660,7 +800,7 @@ func Convert_config_ConfigSetList_To_v1alpha1_ConfigSetList(in *config.ConfigSet } func autoConvert_v1alpha1_ConfigSetSpec_To_config_ConfigSetSpec(in *ConfigSetSpec, out *config.ConfigSetSpec, s conversion.Scope) error { - if err := Convert_v1alpha1_Target_To_config_Target(&in.Target, &out.Target, s); err != nil { + if err := Convert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget(&in.Target, &out.Target, s); err != nil { return err } out.Lifecycle = (*config.Lifecycle)(unsafe.Pointer(in.Lifecycle)) @@ -676,7 +816,7 @@ func Convert_v1alpha1_ConfigSetSpec_To_config_ConfigSetSpec(in *ConfigSetSpec, o } func autoConvert_config_ConfigSetSpec_To_v1alpha1_ConfigSetSpec(in *config.ConfigSetSpec, out *ConfigSetSpec, s conversion.Scope) error { - if err := Convert_config_Target_To_v1alpha1_Target(&in.Target, &out.Target, s); err != nil { + if err := Convert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget(&in.Target, &out.Target, s); err != nil { return err } out.Lifecycle = (*Lifecycle)(unsafe.Pointer(in.Lifecycle)) @@ -697,9 +837,9 @@ func autoConvert_v1alpha1_ConfigSetStatus_To_config_ConfigSetStatus(in *ConfigSe } if in.Targets != nil { in, out := &in.Targets, &out.Targets - *out = make([]config.TargetStatus, len(*in)) + *out = make([]config.ConfigSetTargetStatus, len(*in)) for i := range *in { - if err := Convert_v1alpha1_TargetStatus_To_config_TargetStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -720,9 +860,9 @@ func autoConvert_config_ConfigSetStatus_To_v1alpha1_ConfigSetStatus(in *config.C } if in.Targets != nil { in, out := &in.Targets, &out.Targets - *out = make([]TargetStatus, len(*in)) + *out = make([]ConfigSetTargetStatus, len(*in)) for i := range *in { - if err := Convert_config_TargetStatus_To_v1alpha1_TargetStatus(&(*in)[i], &(*out)[i], s); err != nil { + if err := Convert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus(&(*in)[i], &(*out)[i], s); err != nil { return err } } @@ -737,6 +877,52 @@ func Convert_config_ConfigSetStatus_To_v1alpha1_ConfigSetStatus(in *config.Confi return autoConvert_config_ConfigSetStatus_To_v1alpha1_ConfigSetStatus(in, out, s) } +func autoConvert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget(in *ConfigSetTarget, out *config.ConfigSetTarget, s conversion.Scope) error { + out.TargetSelector = (*v1.LabelSelector)(unsafe.Pointer(in.TargetSelector)) + return nil +} + +// Convert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget is an autogenerated conversion function. +func Convert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget(in *ConfigSetTarget, out *config.ConfigSetTarget, s conversion.Scope) error { + return autoConvert_v1alpha1_ConfigSetTarget_To_config_ConfigSetTarget(in, out, s) +} + +func autoConvert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget(in *config.ConfigSetTarget, out *ConfigSetTarget, s conversion.Scope) error { + out.TargetSelector = (*v1.LabelSelector)(unsafe.Pointer(in.TargetSelector)) + return nil +} + +// Convert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget is an autogenerated conversion function. +func Convert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget(in *config.ConfigSetTarget, out *ConfigSetTarget, s conversion.Scope) error { + return autoConvert_config_ConfigSetTarget_To_v1alpha1_ConfigSetTarget(in, out, s) +} + +func autoConvert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus(in *ConfigSetTargetStatus, out *config.ConfigSetTargetStatus, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1alpha1_Condition_To_condition_Condition(&in.Condition, &out.Condition, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus is an autogenerated conversion function. +func Convert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus(in *ConfigSetTargetStatus, out *config.ConfigSetTargetStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ConfigSetTargetStatus_To_config_ConfigSetTargetStatus(in, out, s) +} + +func autoConvert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus(in *config.ConfigSetTargetStatus, out *ConfigSetTargetStatus, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_condition_Condition_To_v1alpha1_Condition(&in.Condition, &out.Condition, s); err != nil { + return err + } + return nil +} + +// Convert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus is an autogenerated conversion function. +func Convert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus(in *config.ConfigSetTargetStatus, out *ConfigSetTargetStatus, s conversion.Scope) error { + return autoConvert_config_ConfigSetTargetStatus_To_v1alpha1_ConfigSetTargetStatus(in, out, s) +} + func autoConvert_v1alpha1_ConfigSpec_To_config_ConfigSpec(in *ConfigSpec, out *config.ConfigSpec, s conversion.Scope) error { out.Lifecycle = (*config.Lifecycle)(unsafe.Pointer(in.Lifecycle)) out.Priority = in.Priority @@ -937,6 +1123,40 @@ func Convert_config_DeviationStatus_To_v1alpha1_DeviationStatus(in *config.Devia return autoConvert_config_DeviationStatus_To_v1alpha1_DeviationStatus(in, out, s) } +func autoConvert_v1alpha1_DiscoveryInfo_To_config_DiscoveryInfo(in *DiscoveryInfo, out *config.DiscoveryInfo, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Provider = in.Provider + out.Version = in.Version + out.Hostname = in.Hostname + out.Platform = in.Platform + out.MacAddress = in.MacAddress + out.SerialNumber = in.SerialNumber + out.SupportedEncodings = *(*[]string)(unsafe.Pointer(&in.SupportedEncodings)) + return nil +} + +// Convert_v1alpha1_DiscoveryInfo_To_config_DiscoveryInfo is an autogenerated conversion function. +func Convert_v1alpha1_DiscoveryInfo_To_config_DiscoveryInfo(in *DiscoveryInfo, out *config.DiscoveryInfo, s conversion.Scope) error { + return autoConvert_v1alpha1_DiscoveryInfo_To_config_DiscoveryInfo(in, out, s) +} + +func autoConvert_config_DiscoveryInfo_To_v1alpha1_DiscoveryInfo(in *config.DiscoveryInfo, out *DiscoveryInfo, s conversion.Scope) error { + out.Protocol = in.Protocol + out.Provider = in.Provider + out.Version = in.Version + out.Hostname = in.Hostname + out.Platform = in.Platform + out.MacAddress = in.MacAddress + out.SerialNumber = in.SerialNumber + out.SupportedEncodings = *(*[]string)(unsafe.Pointer(&in.SupportedEncodings)) + return nil +} + +// Convert_config_DiscoveryInfo_To_v1alpha1_DiscoveryInfo is an autogenerated conversion function. +func Convert_config_DiscoveryInfo_To_v1alpha1_DiscoveryInfo(in *config.DiscoveryInfo, out *DiscoveryInfo, s conversion.Scope) error { + return autoConvert_config_DiscoveryInfo_To_v1alpha1_DiscoveryInfo(in, out, s) +} + func autoConvert_v1alpha1_Lifecycle_To_config_Lifecycle(in *Lifecycle, out *config.Lifecycle, s conversion.Scope) error { out.DeletionPolicy = config.DeletionPolicy(in.DeletionPolicy) return nil @@ -1202,7 +1422,13 @@ func Convert_config_SensitiveConfigStatus_To_v1alpha1_SensitiveConfigStatus(in * } func autoConvert_v1alpha1_Target_To_config_Target(in *Target, out *config.Target, s conversion.Scope) error { - out.TargetSelector = (*v1.LabelSelector)(unsafe.Pointer(in.TargetSelector)) + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_TargetSpec_To_config_TargetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_TargetStatus_To_config_TargetStatus(&in.Status, &out.Status, s); err != nil { + return err + } return nil } @@ -1212,7 +1438,13 @@ func Convert_v1alpha1_Target_To_config_Target(in *Target, out *config.Target, s } func autoConvert_config_Target_To_v1alpha1_Target(in *config.Target, out *Target, s conversion.Scope) error { - out.TargetSelector = (*v1.LabelSelector)(unsafe.Pointer(in.TargetSelector)) + out.ObjectMeta = in.ObjectMeta + if err := Convert_config_TargetSpec_To_v1alpha1_TargetSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_config_TargetStatus_To_v1alpha1_TargetStatus(&in.Status, &out.Status, s); err != nil { + return err + } return nil } @@ -1221,11 +1453,262 @@ func Convert_config_Target_To_v1alpha1_Target(in *config.Target, out *Target, s return autoConvert_config_Target_To_v1alpha1_Target(in, out, s) } -func autoConvert_v1alpha1_TargetStatus_To_config_TargetStatus(in *TargetStatus, out *config.TargetStatus, s conversion.Scope) error { +func autoConvert_v1alpha1_TargetClearDeviation_To_config_TargetClearDeviation(in *TargetClearDeviation, out *config.TargetClearDeviation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Spec = (*config.TargetClearDeviationSpec)(unsafe.Pointer(in.Spec)) + out.Status = (*config.TargetClearDeviationStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_v1alpha1_TargetClearDeviation_To_config_TargetClearDeviation is an autogenerated conversion function. +func Convert_v1alpha1_TargetClearDeviation_To_config_TargetClearDeviation(in *TargetClearDeviation, out *config.TargetClearDeviation, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetClearDeviation_To_config_TargetClearDeviation(in, out, s) +} + +func autoConvert_config_TargetClearDeviation_To_v1alpha1_TargetClearDeviation(in *config.TargetClearDeviation, out *TargetClearDeviation, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Spec = (*TargetClearDeviationSpec)(unsafe.Pointer(in.Spec)) + out.Status = (*TargetClearDeviationStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_config_TargetClearDeviation_To_v1alpha1_TargetClearDeviation is an autogenerated conversion function. +func Convert_config_TargetClearDeviation_To_v1alpha1_TargetClearDeviation(in *config.TargetClearDeviation, out *TargetClearDeviation, s conversion.Scope) error { + return autoConvert_config_TargetClearDeviation_To_v1alpha1_TargetClearDeviation(in, out, s) +} + +func autoConvert_v1alpha1_TargetClearDeviationConfig_To_config_TargetClearDeviationConfig(in *TargetClearDeviationConfig, out *config.TargetClearDeviationConfig, s conversion.Scope) error { out.Name = in.Name - if err := Convert_v1alpha1_Condition_To_condition_Condition(&in.Condition, &out.Condition, s); err != nil { + out.Paths = *(*[]string)(unsafe.Pointer(&in.Paths)) + return nil +} + +// Convert_v1alpha1_TargetClearDeviationConfig_To_config_TargetClearDeviationConfig is an autogenerated conversion function. +func Convert_v1alpha1_TargetClearDeviationConfig_To_config_TargetClearDeviationConfig(in *TargetClearDeviationConfig, out *config.TargetClearDeviationConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetClearDeviationConfig_To_config_TargetClearDeviationConfig(in, out, s) +} + +func autoConvert_config_TargetClearDeviationConfig_To_v1alpha1_TargetClearDeviationConfig(in *config.TargetClearDeviationConfig, out *TargetClearDeviationConfig, s conversion.Scope) error { + out.Name = in.Name + out.Paths = *(*[]string)(unsafe.Pointer(&in.Paths)) + return nil +} + +// Convert_config_TargetClearDeviationConfig_To_v1alpha1_TargetClearDeviationConfig is an autogenerated conversion function. +func Convert_config_TargetClearDeviationConfig_To_v1alpha1_TargetClearDeviationConfig(in *config.TargetClearDeviationConfig, out *TargetClearDeviationConfig, s conversion.Scope) error { + return autoConvert_config_TargetClearDeviationConfig_To_v1alpha1_TargetClearDeviationConfig(in, out, s) +} + +func autoConvert_v1alpha1_TargetClearDeviationConfigResult_To_config_TargetClearDeviationConfigResult(in *TargetClearDeviationConfigResult, out *config.TargetClearDeviationConfigResult, s conversion.Scope) error { + out.Name = in.Name + out.Success = in.Success + out.Message = in.Message + out.Errors = *(*[]string)(unsafe.Pointer(&in.Errors)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) + return nil +} + +// Convert_v1alpha1_TargetClearDeviationConfigResult_To_config_TargetClearDeviationConfigResult is an autogenerated conversion function. +func Convert_v1alpha1_TargetClearDeviationConfigResult_To_config_TargetClearDeviationConfigResult(in *TargetClearDeviationConfigResult, out *config.TargetClearDeviationConfigResult, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetClearDeviationConfigResult_To_config_TargetClearDeviationConfigResult(in, out, s) +} + +func autoConvert_config_TargetClearDeviationConfigResult_To_v1alpha1_TargetClearDeviationConfigResult(in *config.TargetClearDeviationConfigResult, out *TargetClearDeviationConfigResult, s conversion.Scope) error { + out.Name = in.Name + out.Success = in.Success + out.Message = in.Message + out.Errors = *(*[]string)(unsafe.Pointer(&in.Errors)) + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) + return nil +} + +// Convert_config_TargetClearDeviationConfigResult_To_v1alpha1_TargetClearDeviationConfigResult is an autogenerated conversion function. +func Convert_config_TargetClearDeviationConfigResult_To_v1alpha1_TargetClearDeviationConfigResult(in *config.TargetClearDeviationConfigResult, out *TargetClearDeviationConfigResult, s conversion.Scope) error { + return autoConvert_config_TargetClearDeviationConfigResult_To_v1alpha1_TargetClearDeviationConfigResult(in, out, s) +} + +func autoConvert_v1alpha1_TargetClearDeviationSpec_To_config_TargetClearDeviationSpec(in *TargetClearDeviationSpec, out *config.TargetClearDeviationSpec, s conversion.Scope) error { + out.Config = *(*[]config.TargetClearDeviationConfig)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_v1alpha1_TargetClearDeviationSpec_To_config_TargetClearDeviationSpec is an autogenerated conversion function. +func Convert_v1alpha1_TargetClearDeviationSpec_To_config_TargetClearDeviationSpec(in *TargetClearDeviationSpec, out *config.TargetClearDeviationSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetClearDeviationSpec_To_config_TargetClearDeviationSpec(in, out, s) +} + +func autoConvert_config_TargetClearDeviationSpec_To_v1alpha1_TargetClearDeviationSpec(in *config.TargetClearDeviationSpec, out *TargetClearDeviationSpec, s conversion.Scope) error { + out.Config = *(*[]TargetClearDeviationConfig)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_config_TargetClearDeviationSpec_To_v1alpha1_TargetClearDeviationSpec is an autogenerated conversion function. +func Convert_config_TargetClearDeviationSpec_To_v1alpha1_TargetClearDeviationSpec(in *config.TargetClearDeviationSpec, out *TargetClearDeviationSpec, s conversion.Scope) error { + return autoConvert_config_TargetClearDeviationSpec_To_v1alpha1_TargetClearDeviationSpec(in, out, s) +} + +func autoConvert_v1alpha1_TargetClearDeviationStatus_To_config_TargetClearDeviationStatus(in *TargetClearDeviationStatus, out *config.TargetClearDeviationStatus, s conversion.Scope) error { + out.Message = in.Message + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) + out.Results = *(*[]config.TargetClearDeviationConfigResult)(unsafe.Pointer(&in.Results)) + return nil +} + +// Convert_v1alpha1_TargetClearDeviationStatus_To_config_TargetClearDeviationStatus is an autogenerated conversion function. +func Convert_v1alpha1_TargetClearDeviationStatus_To_config_TargetClearDeviationStatus(in *TargetClearDeviationStatus, out *config.TargetClearDeviationStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetClearDeviationStatus_To_config_TargetClearDeviationStatus(in, out, s) +} + +func autoConvert_config_TargetClearDeviationStatus_To_v1alpha1_TargetClearDeviationStatus(in *config.TargetClearDeviationStatus, out *TargetClearDeviationStatus, s conversion.Scope) error { + out.Message = in.Message + out.Warnings = *(*[]string)(unsafe.Pointer(&in.Warnings)) + out.Results = *(*[]TargetClearDeviationConfigResult)(unsafe.Pointer(&in.Results)) + return nil +} + +// Convert_config_TargetClearDeviationStatus_To_v1alpha1_TargetClearDeviationStatus is an autogenerated conversion function. +func Convert_config_TargetClearDeviationStatus_To_v1alpha1_TargetClearDeviationStatus(in *config.TargetClearDeviationStatus, out *TargetClearDeviationStatus, s conversion.Scope) error { + return autoConvert_config_TargetClearDeviationStatus_To_v1alpha1_TargetClearDeviationStatus(in, out, s) +} + +func autoConvert_v1alpha1_TargetConfigBlame_To_config_TargetConfigBlame(in *TargetConfigBlame, out *config.TargetConfigBlame, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Value = in.Value + return nil +} + +// Convert_v1alpha1_TargetConfigBlame_To_config_TargetConfigBlame is an autogenerated conversion function. +func Convert_v1alpha1_TargetConfigBlame_To_config_TargetConfigBlame(in *TargetConfigBlame, out *config.TargetConfigBlame, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetConfigBlame_To_config_TargetConfigBlame(in, out, s) +} + +func autoConvert_config_TargetConfigBlame_To_v1alpha1_TargetConfigBlame(in *config.TargetConfigBlame, out *TargetConfigBlame, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Value = in.Value + return nil +} + +// Convert_config_TargetConfigBlame_To_v1alpha1_TargetConfigBlame is an autogenerated conversion function. +func Convert_config_TargetConfigBlame_To_v1alpha1_TargetConfigBlame(in *config.TargetConfigBlame, out *TargetConfigBlame, s conversion.Scope) error { + return autoConvert_config_TargetConfigBlame_To_v1alpha1_TargetConfigBlame(in, out, s) +} + +func autoConvert_v1alpha1_TargetList_To_config_TargetList(in *TargetList, out *config.TargetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]config.Target, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_Target_To_config_Target(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha1_TargetList_To_config_TargetList is an autogenerated conversion function. +func Convert_v1alpha1_TargetList_To_config_TargetList(in *TargetList, out *config.TargetList, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetList_To_config_TargetList(in, out, s) +} + +func autoConvert_config_TargetList_To_v1alpha1_TargetList(in *config.TargetList, out *TargetList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Target, len(*in)) + for i := range *in { + if err := Convert_config_Target_To_v1alpha1_Target(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_config_TargetList_To_v1alpha1_TargetList is an autogenerated conversion function. +func Convert_config_TargetList_To_v1alpha1_TargetList(in *config.TargetList, out *TargetList, s conversion.Scope) error { + return autoConvert_config_TargetList_To_v1alpha1_TargetList(in, out, s) +} + +func autoConvert_v1alpha1_TargetRunningConfig_To_config_TargetRunningConfig(in *TargetRunningConfig, out *config.TargetRunningConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Value = in.Value + return nil +} + +// Convert_v1alpha1_TargetRunningConfig_To_config_TargetRunningConfig is an autogenerated conversion function. +func Convert_v1alpha1_TargetRunningConfig_To_config_TargetRunningConfig(in *TargetRunningConfig, out *config.TargetRunningConfig, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetRunningConfig_To_config_TargetRunningConfig(in, out, s) +} + +func autoConvert_config_TargetRunningConfig_To_v1alpha1_TargetRunningConfig(in *config.TargetRunningConfig, out *TargetRunningConfig, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Value = in.Value + return nil +} + +// Convert_config_TargetRunningConfig_To_v1alpha1_TargetRunningConfig is an autogenerated conversion function. +func Convert_config_TargetRunningConfig_To_v1alpha1_TargetRunningConfig(in *config.TargetRunningConfig, out *TargetRunningConfig, s conversion.Scope) error { + return autoConvert_config_TargetRunningConfig_To_v1alpha1_TargetRunningConfig(in, out, s) +} + +func autoConvert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions(in *TargetRunningConfigOptions, out *config.TargetRunningConfigOptions, s conversion.Scope) error { + out.Path = in.Path + out.Format = in.Format + return nil +} + +// Convert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions is an autogenerated conversion function. +func Convert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions(in *TargetRunningConfigOptions, out *config.TargetRunningConfigOptions, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetRunningConfigOptions_To_config_TargetRunningConfigOptions(in, out, s) +} + +func autoConvert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions(in *config.TargetRunningConfigOptions, out *TargetRunningConfigOptions, s conversion.Scope) error { + out.Path = in.Path + out.Format = in.Format + return nil +} + +// Convert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions is an autogenerated conversion function. +func Convert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions(in *config.TargetRunningConfigOptions, out *TargetRunningConfigOptions, s conversion.Scope) error { + return autoConvert_config_TargetRunningConfigOptions_To_v1alpha1_TargetRunningConfigOptions(in, out, s) +} + +func autoConvert_v1alpha1_TargetSpec_To_config_TargetSpec(in *TargetSpec, out *config.TargetSpec, s conversion.Scope) error { + out.Provider = in.Provider + out.Address = in.Address + out.TargetProfile = in.TargetProfile + return nil +} + +// Convert_v1alpha1_TargetSpec_To_config_TargetSpec is an autogenerated conversion function. +func Convert_v1alpha1_TargetSpec_To_config_TargetSpec(in *TargetSpec, out *config.TargetSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetSpec_To_config_TargetSpec(in, out, s) +} + +func autoConvert_config_TargetSpec_To_v1alpha1_TargetSpec(in *config.TargetSpec, out *TargetSpec, s conversion.Scope) error { + out.Provider = in.Provider + out.Address = in.Address + out.TargetProfile = in.TargetProfile + return nil +} + +// Convert_config_TargetSpec_To_v1alpha1_TargetSpec is an autogenerated conversion function. +func Convert_config_TargetSpec_To_v1alpha1_TargetSpec(in *config.TargetSpec, out *TargetSpec, s conversion.Scope) error { + return autoConvert_config_TargetSpec_To_v1alpha1_TargetSpec(in, out, s) +} + +func autoConvert_v1alpha1_TargetStatus_To_config_TargetStatus(in *TargetStatus, out *config.TargetStatus, s conversion.Scope) error { + if err := Convert_v1alpha1_ConditionedStatus_To_condition_ConditionedStatus(&in.ConditionedStatus, &out.ConditionedStatus, s); err != nil { return err } + out.DiscoveryInfo = (*config.DiscoveryInfo)(unsafe.Pointer(in.DiscoveryInfo)) + out.UsedReferences = (*config.TargetStatusUsedReferences)(unsafe.Pointer(in.UsedReferences)) return nil } @@ -1235,10 +1718,11 @@ func Convert_v1alpha1_TargetStatus_To_config_TargetStatus(in *TargetStatus, out } func autoConvert_config_TargetStatus_To_v1alpha1_TargetStatus(in *config.TargetStatus, out *TargetStatus, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_condition_Condition_To_v1alpha1_Condition(&in.Condition, &out.Condition, s); err != nil { + if err := Convert_condition_ConditionedStatus_To_v1alpha1_ConditionedStatus(&in.ConditionedStatus, &out.ConditionedStatus, s); err != nil { return err } + out.DiscoveryInfo = (*DiscoveryInfo)(unsafe.Pointer(in.DiscoveryInfo)) + out.UsedReferences = (*TargetStatusUsedReferences)(unsafe.Pointer(in.UsedReferences)) return nil } @@ -1246,3 +1730,29 @@ func autoConvert_config_TargetStatus_To_v1alpha1_TargetStatus(in *config.TargetS func Convert_config_TargetStatus_To_v1alpha1_TargetStatus(in *config.TargetStatus, out *TargetStatus, s conversion.Scope) error { return autoConvert_config_TargetStatus_To_v1alpha1_TargetStatus(in, out, s) } + +func autoConvert_v1alpha1_TargetStatusUsedReferences_To_config_TargetStatusUsedReferences(in *TargetStatusUsedReferences, out *config.TargetStatusUsedReferences, s conversion.Scope) error { + out.SecretResourceVersion = in.SecretResourceVersion + out.TLSSecretResourceVersion = in.TLSSecretResourceVersion + out.ConnectionProfileResourceVersion = in.ConnectionProfileResourceVersion + out.SyncProfileResourceVersion = in.SyncProfileResourceVersion + return nil +} + +// Convert_v1alpha1_TargetStatusUsedReferences_To_config_TargetStatusUsedReferences is an autogenerated conversion function. +func Convert_v1alpha1_TargetStatusUsedReferences_To_config_TargetStatusUsedReferences(in *TargetStatusUsedReferences, out *config.TargetStatusUsedReferences, s conversion.Scope) error { + return autoConvert_v1alpha1_TargetStatusUsedReferences_To_config_TargetStatusUsedReferences(in, out, s) +} + +func autoConvert_config_TargetStatusUsedReferences_To_v1alpha1_TargetStatusUsedReferences(in *config.TargetStatusUsedReferences, out *TargetStatusUsedReferences, s conversion.Scope) error { + out.SecretResourceVersion = in.SecretResourceVersion + out.TLSSecretResourceVersion = in.TLSSecretResourceVersion + out.ConnectionProfileResourceVersion = in.ConnectionProfileResourceVersion + out.SyncProfileResourceVersion = in.SyncProfileResourceVersion + return nil +} + +// Convert_config_TargetStatusUsedReferences_To_v1alpha1_TargetStatusUsedReferences is an autogenerated conversion function. +func Convert_config_TargetStatusUsedReferences_To_v1alpha1_TargetStatusUsedReferences(in *config.TargetStatusUsedReferences, out *TargetStatusUsedReferences, s conversion.Scope) error { + return autoConvert_config_TargetStatusUsedReferences_To_v1alpha1_TargetStatusUsedReferences(in, out, s) +} diff --git a/apis/config/v1alpha1/zz_generated.deepcopy.go b/apis/config/v1alpha1/zz_generated.deepcopy.go index 45ce882a..4a61c239 100644 --- a/apis/config/v1alpha1/zz_generated.deepcopy.go +++ b/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -172,8 +172,8 @@ func (in *ConfigDeviation) DeepCopyInto(out *ConfigDeviation) { *out = new(string) **out = **in } - if in.CurrentValue != nil { - in, out := &in.CurrentValue, &out.CurrentValue + if in.ActualValue != nil { + in, out := &in.ActualValue, &out.ActualValue *out = new(string) **out = **in } @@ -324,7 +324,7 @@ func (in *ConfigSetStatus) DeepCopyInto(out *ConfigSetStatus) { in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) if in.Targets != nil { in, out := &in.Targets, &out.Targets - *out = make([]TargetStatus, len(*in)) + *out = make([]ConfigSetTargetStatus, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -342,6 +342,44 @@ func (in *ConfigSetStatus) DeepCopy() *ConfigSetStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSetTarget) DeepCopyInto(out *ConfigSetTarget) { + *out = *in + if in.TargetSelector != nil { + in, out := &in.TargetSelector, &out.TargetSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSetTarget. +func (in *ConfigSetTarget) DeepCopy() *ConfigSetTarget { + if in == nil { + return nil + } + out := new(ConfigSetTarget) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSetTargetStatus) DeepCopyInto(out *ConfigSetTargetStatus) { + *out = *in + in.Condition.DeepCopyInto(&out.Condition) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSetTargetStatus. +func (in *ConfigSetTargetStatus) DeepCopy() *ConfigSetTargetStatus { + if in == nil { + return nil + } + out := new(ConfigSetTargetStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) { *out = *in @@ -529,6 +567,27 @@ func (in *DeviationStatus) DeepCopy() *DeviationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiscoveryInfo) DeepCopyInto(out *DiscoveryInfo) { + *out = *in + if in.SupportedEncodings != nil { + in, out := &in.SupportedEncodings, &out.SupportedEncodings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryInfo. +func (in *DiscoveryInfo) DeepCopy() *DiscoveryInfo { + if in == nil { + return nil + } + out := new(DiscoveryInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { *out = *in @@ -785,11 +844,10 @@ func (in *SensitiveConfigStatus) DeepCopy() *SensitiveConfigStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Target) DeepCopyInto(out *Target) { *out = *in - if in.TargetSelector != nil { - in, out := &in.TargetSelector, &out.TargetSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } @@ -803,10 +861,291 @@ func (in *Target) DeepCopy() *Target { return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Target) 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 *TargetClearDeviation) DeepCopyInto(out *TargetClearDeviation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(TargetClearDeviationSpec) + (*in).DeepCopyInto(*out) + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TargetClearDeviationStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviation. +func (in *TargetClearDeviation) DeepCopy() *TargetClearDeviation { + if in == nil { + return nil + } + out := new(TargetClearDeviation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetClearDeviation) 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 *TargetClearDeviationConfig) DeepCopyInto(out *TargetClearDeviationConfig) { + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationConfig. +func (in *TargetClearDeviationConfig) DeepCopy() *TargetClearDeviationConfig { + if in == nil { + return nil + } + out := new(TargetClearDeviationConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationConfigResult) DeepCopyInto(out *TargetClearDeviationConfigResult) { + *out = *in + if in.Errors != nil { + in, out := &in.Errors, &out.Errors + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationConfigResult. +func (in *TargetClearDeviationConfigResult) DeepCopy() *TargetClearDeviationConfigResult { + if in == nil { + return nil + } + out := new(TargetClearDeviationConfigResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationSpec) DeepCopyInto(out *TargetClearDeviationSpec) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]TargetClearDeviationConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationSpec. +func (in *TargetClearDeviationSpec) DeepCopy() *TargetClearDeviationSpec { + if in == nil { + return nil + } + out := new(TargetClearDeviationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationStatus) DeepCopyInto(out *TargetClearDeviationStatus) { + *out = *in + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]TargetClearDeviationConfigResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationStatus. +func (in *TargetClearDeviationStatus) DeepCopy() *TargetClearDeviationStatus { + if in == nil { + return nil + } + out := new(TargetClearDeviationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetConfigBlame) DeepCopyInto(out *TargetConfigBlame) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Value.DeepCopyInto(&out.Value) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConfigBlame. +func (in *TargetConfigBlame) DeepCopy() *TargetConfigBlame { + if in == nil { + return nil + } + out := new(TargetConfigBlame) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetConfigBlame) 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 *TargetList) DeepCopyInto(out *TargetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Target, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetList. +func (in *TargetList) DeepCopy() *TargetList { + if in == nil { + return nil + } + out := new(TargetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetList) 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 *TargetRunningConfig) DeepCopyInto(out *TargetRunningConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Value.DeepCopyInto(&out.Value) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRunningConfig. +func (in *TargetRunningConfig) DeepCopy() *TargetRunningConfig { + if in == nil { + return nil + } + out := new(TargetRunningConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetRunningConfig) 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 *TargetRunningConfigOptions) DeepCopyInto(out *TargetRunningConfigOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRunningConfigOptions. +func (in *TargetRunningConfigOptions) DeepCopy() *TargetRunningConfigOptions { + if in == nil { + return nil + } + out := new(TargetRunningConfigOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetRunningConfigOptions) 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 *TargetSpec) DeepCopyInto(out *TargetSpec) { + *out = *in + in.TargetProfile.DeepCopyInto(&out.TargetProfile) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec. +func (in *TargetSpec) DeepCopy() *TargetSpec { + if in == nil { + return nil + } + out := new(TargetSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TargetStatus) DeepCopyInto(out *TargetStatus) { *out = *in - in.Condition.DeepCopyInto(&out.Condition) + in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) + if in.DiscoveryInfo != nil { + in, out := &in.DiscoveryInfo, &out.DiscoveryInfo + *out = new(DiscoveryInfo) + (*in).DeepCopyInto(*out) + } + if in.UsedReferences != nil { + in, out := &in.UsedReferences, &out.UsedReferences + *out = new(TargetStatusUsedReferences) + **out = **in + } return } @@ -819,3 +1158,19 @@ func (in *TargetStatus) DeepCopy() *TargetStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetStatusUsedReferences) DeepCopyInto(out *TargetStatusUsedReferences) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatusUsedReferences. +func (in *TargetStatusUsedReferences) DeepCopy() *TargetStatusUsedReferences { + if in == nil { + return nil + } + out := new(TargetStatusUsedReferences) + in.DeepCopyInto(out) + return out +} diff --git a/apis/config/zz_generated.deepcopy.go b/apis/config/zz_generated.deepcopy.go index 3a7efcbb..471474a0 100644 --- a/apis/config/zz_generated.deepcopy.go +++ b/apis/config/zz_generated.deepcopy.go @@ -188,8 +188,8 @@ func (in *ConfigDeviation) DeepCopyInto(out *ConfigDeviation) { *out = new(string) **out = **in } - if in.CurrentValue != nil { - in, out := &in.CurrentValue, &out.CurrentValue + if in.ActualValue != nil { + in, out := &in.ActualValue, &out.ActualValue *out = new(string) **out = **in } @@ -372,7 +372,7 @@ func (in *ConfigSetStatus) DeepCopyInto(out *ConfigSetStatus) { in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) if in.Targets != nil { in, out := &in.Targets, &out.Targets - *out = make([]TargetStatus, len(*in)) + *out = make([]ConfigSetTargetStatus, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -390,6 +390,44 @@ func (in *ConfigSetStatus) DeepCopy() *ConfigSetStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSetTarget) DeepCopyInto(out *ConfigSetTarget) { + *out = *in + if in.TargetSelector != nil { + in, out := &in.TargetSelector, &out.TargetSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSetTarget. +func (in *ConfigSetTarget) DeepCopy() *ConfigSetTarget { + if in == nil { + return nil + } + out := new(ConfigSetTarget) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigSetTargetStatus) DeepCopyInto(out *ConfigSetTargetStatus) { + *out = *in + in.Condition.DeepCopyInto(&out.Condition) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSetTargetStatus. +func (in *ConfigSetTargetStatus) DeepCopy() *ConfigSetTargetStatus { + if in == nil { + return nil + } + out := new(ConfigSetTargetStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec) { *out = *in @@ -499,6 +537,133 @@ func (in *Deviation) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviationClear) DeepCopyInto(out *DeviationClear) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviationClear. +func (in *DeviationClear) DeepCopy() *DeviationClear { + if in == nil { + return nil + } + out := new(DeviationClear) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviationClear) 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 *DeviationClearItem) DeepCopyInto(out *DeviationClearItem) { + *out = *in + if in.ConfigName != nil { + in, out := &in.ConfigName, &out.ConfigName + *out = new(string) + **out = **in + } + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviationClearItem. +func (in *DeviationClearItem) DeepCopy() *DeviationClearItem { + if in == nil { + return nil + } + out := new(DeviationClearItem) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviationClearList) DeepCopyInto(out *DeviationClearList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Deviation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviationClearList. +func (in *DeviationClearList) DeepCopy() *DeviationClearList { + if in == nil { + return nil + } + out := new(DeviationClearList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviationClearList) 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 *DeviationClearSpec) DeepCopyInto(out *DeviationClearSpec) { + *out = *in + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DeviationClearItem, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviationClearSpec. +func (in *DeviationClearSpec) DeepCopy() *DeviationClearSpec { + if in == nil { + return nil + } + out := new(DeviationClearSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviationClearStatus) DeepCopyInto(out *DeviationClearStatus) { + *out = *in + in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviationClearStatus. +func (in *DeviationClearStatus) DeepCopy() *DeviationClearStatus { + if in == nil { + return nil + } + out := new(DeviationClearStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeviationFilter) DeepCopyInto(out *DeviationFilter) { *out = *in @@ -593,6 +758,27 @@ func (in *DeviationStatus) DeepCopy() *DeviationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DiscoveryInfo) DeepCopyInto(out *DiscoveryInfo) { + *out = *in + if in.SupportedEncodings != nil { + in, out := &in.SupportedEncodings, &out.SupportedEncodings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryInfo. +func (in *DiscoveryInfo) DeepCopy() *DiscoveryInfo { + if in == nil { + return nil + } + out := new(DiscoveryInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { *out = *in @@ -917,11 +1103,10 @@ func (in *SensitiveConfigStatus) DeepCopy() *SensitiveConfigStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Target) DeepCopyInto(out *Target) { *out = *in - if in.TargetSelector != nil { - in, out := &in.TargetSelector, &out.TargetSelector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } @@ -935,10 +1120,307 @@ func (in *Target) DeepCopy() *Target { return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Target) 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 *TargetClearDeviation) DeepCopyInto(out *TargetClearDeviation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(TargetClearDeviationSpec) + (*in).DeepCopyInto(*out) + } + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(TargetClearDeviationStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviation. +func (in *TargetClearDeviation) DeepCopy() *TargetClearDeviation { + if in == nil { + return nil + } + out := new(TargetClearDeviation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetClearDeviation) 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 *TargetClearDeviationConfig) DeepCopyInto(out *TargetClearDeviationConfig) { + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationConfig. +func (in *TargetClearDeviationConfig) DeepCopy() *TargetClearDeviationConfig { + if in == nil { + return nil + } + out := new(TargetClearDeviationConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationConfigResult) DeepCopyInto(out *TargetClearDeviationConfigResult) { + *out = *in + if in.Errors != nil { + in, out := &in.Errors, &out.Errors + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationConfigResult. +func (in *TargetClearDeviationConfigResult) DeepCopy() *TargetClearDeviationConfigResult { + if in == nil { + return nil + } + out := new(TargetClearDeviationConfigResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationSpec) DeepCopyInto(out *TargetClearDeviationSpec) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]TargetClearDeviationConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationSpec. +func (in *TargetClearDeviationSpec) DeepCopy() *TargetClearDeviationSpec { + if in == nil { + return nil + } + out := new(TargetClearDeviationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetClearDeviationStatus) DeepCopyInto(out *TargetClearDeviationStatus) { + *out = *in + if in.Warnings != nil { + in, out := &in.Warnings, &out.Warnings + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]TargetClearDeviationConfigResult, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetClearDeviationStatus. +func (in *TargetClearDeviationStatus) DeepCopy() *TargetClearDeviationStatus { + if in == nil { + return nil + } + out := new(TargetClearDeviationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetConfigBlame) DeepCopyInto(out *TargetConfigBlame) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Value.DeepCopyInto(&out.Value) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConfigBlame. +func (in *TargetConfigBlame) DeepCopy() *TargetConfigBlame { + if in == nil { + return nil + } + out := new(TargetConfigBlame) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetConfigBlame) 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 *TargetFilter) DeepCopyInto(out *TargetFilter) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetFilter. +func (in *TargetFilter) DeepCopy() *TargetFilter { + if in == nil { + return nil + } + out := new(TargetFilter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetList) DeepCopyInto(out *TargetList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Target, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetList. +func (in *TargetList) DeepCopy() *TargetList { + if in == nil { + return nil + } + out := new(TargetList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetList) 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 *TargetRunningConfig) DeepCopyInto(out *TargetRunningConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Value.DeepCopyInto(&out.Value) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRunningConfig. +func (in *TargetRunningConfig) DeepCopy() *TargetRunningConfig { + if in == nil { + return nil + } + out := new(TargetRunningConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetRunningConfig) 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 *TargetRunningConfigOptions) DeepCopyInto(out *TargetRunningConfigOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRunningConfigOptions. +func (in *TargetRunningConfigOptions) DeepCopy() *TargetRunningConfigOptions { + if in == nil { + return nil + } + out := new(TargetRunningConfigOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TargetRunningConfigOptions) 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 *TargetSpec) DeepCopyInto(out *TargetSpec) { + *out = *in + in.TargetProfile.DeepCopyInto(&out.TargetProfile) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec. +func (in *TargetSpec) DeepCopy() *TargetSpec { + if in == nil { + return nil + } + out := new(TargetSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TargetStatus) DeepCopyInto(out *TargetStatus) { *out = *in - in.Condition.DeepCopyInto(&out.Condition) + in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) + if in.DiscoveryInfo != nil { + in, out := &in.DiscoveryInfo, &out.DiscoveryInfo + *out = new(DiscoveryInfo) + (*in).DeepCopyInto(*out) + } + if in.UsedReferences != nil { + in, out := &in.UsedReferences, &out.UsedReferences + *out = new(TargetStatusUsedReferences) + **out = **in + } return } @@ -951,3 +1433,19 @@ func (in *TargetStatus) DeepCopy() *TargetStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TargetStatusUsedReferences) DeepCopyInto(out *TargetStatusUsedReferences) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatusUsedReferences. +func (in *TargetStatusUsedReferences) DeepCopy() *TargetStatusUsedReferences { + if in == nil { + return nil + } + out := new(TargetStatusUsedReferences) + in.DeepCopyInto(out) + return out +} diff --git a/apis/inv/doc.go b/apis/inv/doc.go index a4f1bbfb..44805679 100644 --- a/apis/inv/doc.go +++ b/apis/inv/doc.go @@ -17,4 +17,4 @@ limitations under the License. // +k8s:deepcopy-gen=package,register // condition defines the condition api -package inv +package inv diff --git a/apis/inv/v1alpha1/condition.go b/apis/inv/v1alpha1/condition.go index 711ca605..8091189a 100644 --- a/apis/inv/v1alpha1/condition.go +++ b/apis/inv/v1alpha1/condition.go @@ -23,19 +23,23 @@ import ( // Condition Types. const ( - // ConditionTypeDiscoveryReady represents the resource discovery ready condition - ConditionTypeDiscoveryReady condv1alpha1.ConditionType = "DiscoveryReady" - // ConditionTypeDatastoreReady represents the resource datastore ready condition - ConditionTypeDatastoreReady condv1alpha1.ConditionType = "DatastoreReady" - // ConditionTypeConfigRecoveryReady represents the resource config recovery ready condition - ConditionTypeConfigRecoveryReady condv1alpha1.ConditionType = "ConfigRecoveryReady" - // ConditionTypeTargetConnectionReady represents the resource target ready condition - ConditionTypeTargetConnectionReady condv1alpha1.ConditionType = "TargetConnectionReady" - + /* + // ConditionTypeDiscoveryReady represents the resource discovery ready condition + ConditionTypeDiscoveryReady condv1alpha1.ConditionType = "DiscoveryReady" + // ConditionTypeDatastoreReady represents the resource datastore ready condition + ConditionTypeDatastoreReady condv1alpha1.ConditionType = "DatastoreReady" + // ConditionTypeConfigRecoveryReady represents the resource config recovery ready condition + ConditionTypeConfigRecoveryReady condv1alpha1.ConditionType = "ConfigRecoveryReady" + // ConditionTypeTargetConnectionReady represents the resource target ready condition + ConditionTypeTargetConnectionReady condv1alpha1.ConditionType = "TargetConnectionReady" + */ + + // Rollout Conditions ConditionTypeConfigApply condv1alpha1.ConditionType = "ConfigApply" ConditionTypeConfigConfirm condv1alpha1.ConditionType = "ConfigConfirm" ConditionTypeConfigCancel condv1alpha1.ConditionType = "ConfigCancel" + // Schema Conditions ConditionTypeSchemaServerReady condv1alpha1.ConditionType = "SchemaServerReady" ) @@ -89,125 +93,7 @@ func Loading() condv1alpha1.Condition { }} } -// DatastoreReady indicates the datastire is ready -func DatastoreReady() condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeDatastoreReady), - Status: metav1.ConditionTrue, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonReady), - }} -} - -// DatastoreFailed returns a condition that indicates the datastore -// failed to get reconciled. -func DatastoreFailed(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeDatastoreReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonFailed), - Message: msg, - }} -} - -// DatastoreSchemaNotReady returns a condition that indicates the schema -// of the datastore is not ready. -func DatastoreSchemaNotReady(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeDatastoreReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(ConditionReasonSchemaNotReady), - Message: msg, - }} -} - -// ConfigReady return a condition that indicates the config -// get re-applied when the target became ready -func ConfigReady(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeConfigRecoveryReady), - Status: metav1.ConditionTrue, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonReady), - Message: msg, - }} -} - -// ConfigFailed returns a condition that indicates the config -// is in failed condition due to a dependency -func ConfigFailed(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeConfigRecoveryReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonFailed), - Message: msg, - }} -} - -// ConfigReApplyFailed returns a condition that indicates the config -// we we reapplied to the target -func ConfigReApplyFailed(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeConfigRecoveryReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(ConditionReasonReApplyFailed), - Message: msg, - }} -} - -// DiscoveryReady return a condition that indicates the discovery -// is ready -func DiscoveryReady() condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeDiscoveryReady), - Status: metav1.ConditionTrue, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonReady), - }} -} - -// DiscoveryFailed returns a condition that indicates the discovery -// is in failed condition -func DiscoveryFailed(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeDiscoveryReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonFailed), - Message: msg, - }} -} - -// TargetConnectionReady return a condition that indicates the target connection -// is ready -func TargetConnectionReady() condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeTargetConnectionReady), - Status: metav1.ConditionTrue, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonReady), - }} -} - -// TargetConnectionFailed returns a condition that indicates the target connection -// is in failed condition -func TargetConnectionFailed(msg string) condv1alpha1.Condition { - return condv1alpha1.Condition{Condition: metav1.Condition{ - Type: string(ConditionTypeTargetConnectionReady), - Status: metav1.ConditionFalse, - LastTransitionTime: metav1.Now(), - Reason: string(condv1alpha1.ConditionReasonFailed), - Message: msg, - }} -} - -// TargetConnectionFailed returns a condition that indicates the target connection -// is in failed condition - +// Config Rollout Conditions func ConfigApplyReady() condv1alpha1.Condition { return condv1alpha1.Condition{Condition: metav1.Condition{ Type: string(ConditionTypeConfigApply), @@ -284,6 +170,7 @@ func ConfigCancelFailed(msg string) condv1alpha1.Condition { }} } +// Schema server conditions func SchemaServerReady() condv1alpha1.Condition { return condv1alpha1.Condition{Condition: metav1.Condition{ Type: string(ConditionTypeSchemaServerReady), diff --git a/apis/inv/v1alpha1/discoveryrule_types.go b/apis/inv/v1alpha1/discoveryrule_types.go index e0a30065..25fbab97 100644 --- a/apis/inv/v1alpha1/discoveryrule_types.go +++ b/apis/inv/v1alpha1/discoveryrule_types.go @@ -37,90 +37,95 @@ const ( // DiscoveryRuleSpec defines the desired state of DiscoveryRule type DiscoveryRuleSpec struct { // IP Prefixes for which this discovery rule applies - Prefixes []DiscoveryRulePrefix `json:"prefixes,omitempty" yaml:"prefixes,omitempty" protobuf:"bytes,1,rep,name=prefixes"` + // +listType=atomic + Prefixes []DiscoveryRulePrefix `json:"prefixes,omitempty" protobuf:"bytes,1,rep,name=prefixes"` // IP Prefixes for which this discovery rule applies - Addresses []DiscoveryRuleAddress `json:"addresses,omitempty" yaml:"addresses,omitempty" protobuf:"bytes,2,rep,name=addresses"` + // +listType=atomic + Addresses []DiscoveryRuleAddress `json:"addresses,omitempty" protobuf:"bytes,2,rep,name=addresses"` // PodSelector defines the pod selector for which this discovery rule applies - PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" yaml:"podSelector,omitempty" protobuf:"bytes,3,opt,name=podSelector"` + PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,3,opt,name=podSelector"` // ServiceSelector defines the service selector for which this discovery rule applies - ServiceSelector *metav1.LabelSelector `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty" protobuf:"bytes,4,opt,name=serviceSelector"` + ServiceSelector *metav1.LabelSelector `json:"serviceSelector,omitempty" protobuf:"bytes,4,opt,name=serviceSelector"` // ServiceDomain defines the service domain of the cluster, used by svc discovery to identify the // domain name in the k8s cluster where the service reside. - ServiceDomain string `json:"serviceDomain,omitempty" yaml:"serviceDomain,omitempty" protobuf:"bytes,5,opt,name=serviceDomain"` + ServiceDomain string `json:"serviceDomain,omitempty" protobuf:"bytes,5,opt,name=serviceDomain"` // Discovery defines the generic parameters of the discovery rule - DiscoveryParameters `json:",inline" yaml:",inline" protobuf:"bytes,6,opt,name=discoveryParameters"` + DiscoveryParameters `json:",inline" protobuf:"bytes,6,opt,name=discoveryParameters"` } type DiscoveryParameters struct { // DefaultSchema define the default schema used to connect to a target // Indicates that discovery is disable; cannot be used for prefix based discovery rules - DefaultSchema *SchemaKey `json:"defaultSchema,omitempty" yaml:"defaultSchema,omitempty" protobuf:"bytes,1,opt,name=defaultSchema"` + DefaultSchema *SchemaKey `json:"defaultSchema,omitempty" protobuf:"bytes,1,opt,name=defaultSchema"` // DiscoveryProfile define the profiles the discovery controller uses to discover targets - DiscoveryProfile *DiscoveryProfile `json:"discoveryProfile,omitempty" yaml:"discoveryProfile,omitempty" protobuf:"bytes,2,opt,name=discoveryProfile"` + DiscoveryProfile *DiscoveryProfile `json:"discoveryProfile,omitempty" protobuf:"bytes,2,opt,name=discoveryProfile"` // TargetConnectionProfiles define the profile the discovery controller uses to create targets // once discovered - TargetConnectionProfiles []TargetProfile `json:"targetConnectionProfiles" yaml:"targetConnectionProfiles" protobuf:"bytes,3,rep,name=targetConnectionProfiles"` + // +listType=atomic + TargetConnectionProfiles []TargetProfile `json:"targetConnectionProfiles" protobuf:"bytes,3,rep,name=targetConnectionProfiles"` // TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery - TargetTemplate *TargetTemplate `json:"targetTemplate,omitempty" yaml:"targetTemplate,omitempty" protobuf:"bytes,4,opt,name=targetTemplate"` + TargetTemplate *TargetTemplate `json:"targetTemplate,omitempty" protobuf:"bytes,4,opt,name=targetTemplate"` // Period defines the wait period between discovery rule runs - Period metav1.Duration `json:"period,omitempty" yaml:"period,omitempty" protobuf:"bytes,5,opt,name=period"` + Period metav1.Duration `json:"period,omitempty" protobuf:"bytes,5,opt,name=period"` // number of concurrent IP scan - ConcurrentScans int64 `json:"concurrentScans,omitempty" yaml:"concurrentScans,omitempty" protobuf:"varint,6,opt,name=concurrentScans"` + ConcurrentScans int64 `json:"concurrentScans,omitempty" protobuf:"varint,6,opt,name=concurrentScans"` } type DiscoveryRulePrefix struct { // Prefix of the target/target(s) - Prefix string `json:"prefix" yaml:"prefix" protobuf:"bytes,1,opt,name=prefix"` + Prefix string `json:"prefix" protobuf:"bytes,1,opt,name=prefix"` // IP Prefixes to be excluded - Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty" protobuf:"bytes,2,rep,name=excludes"` + // +listType=atomic + Excludes []string `json:"excludes,omitempty" protobuf:"bytes,2,rep,name=excludes"` } type DiscoveryRuleAddress struct { // Address (specified as IP or DNS name) of the target/target(s) - Address string `json:"address" yaml:"address" protobuf:"bytes,1,opt,name=address"` + Address string `json:"address" protobuf:"bytes,1,opt,name=address"` // HostName of the ip prefix; used for /32 or /128 addresses with discovery disabled - HostName string `json:"hostName,omitempty" yaml:"hostName,omitempty" protobuf:"bytes,2,opt,name=hostName"` + HostName string `json:"hostName,omitempty" protobuf:"bytes,2,opt,name=hostName"` } type DiscoveryProfile struct { // Credentials defines the name of the secret that holds the credentials to connect to the target - Credentials string `json:"credentials" yaml:"credentials" protobuf:"bytes,1,opt,name=credentials"` + Credentials string `json:"credentials" protobuf:"bytes,1,opt,name=credentials"` // TLSSecret defines the name of the TLS secret to connect to the target if mtls is used - TLSSecret *string `json:"tlsSecret,omitempty" yaml:"tlsSecret,omitempty" protobuf:"bytes,2,opt,name=tlsSecret"` + TLSSecret *string `json:"tlsSecret,omitempty" protobuf:"bytes,2,opt,name=tlsSecret"` // ConnectionProfiles define the list of profiles the discovery controller uses to discover the target. // The order in which they are specified is the order in which discovery is executed. - ConnectionProfiles []string `json:"connectionProfiles" yaml:"connectionProfiles" protobuf:"bytes,3,rep,name=connectionProfiles"` + // +listType=atomic + ConnectionProfiles []string `json:"connectionProfiles" protobuf:"bytes,3,rep,name=connectionProfiles"` } type TargetProfile struct { // Credentials defines the name of the secret that holds the credentials to connect to the target - Credentials string `json:"credentials" yaml:"credentials" protobuf:"bytes,1,opt,name=credentials"` + Credentials string `json:"credentials" protobuf:"bytes,1,opt,name=credentials"` // TLSSecret defines the name of the TLS secret to connect to the target if mtls is used - TLSSecret *string `json:"tlsSecret,omitempty" yaml:"tlsSecret,omitempty" protobuf:"bytes,2,opt,name=tlsSecret"` + TLSSecret *string `json:"tlsSecret,omitempty" protobuf:"bytes,2,opt,name=tlsSecret"` // ConnectionProfile define the profile used to connect to the target once discovered - ConnectionProfile string `json:"connectionProfile" yaml:"connectionProfile" protobuf:"bytes,3,opt,name=connectionProfile"` + ConnectionProfile string `json:"connectionProfile" protobuf:"bytes,3,opt,name=connectionProfile"` // SyncProfile define the profile used to sync to the target config once discovered - SyncProfile *string `json:"syncProfile,omitempty" yaml:"syncProfile,omitempty" protobuf:"bytes,4,opt,name=syncProfile"` + SyncProfile *string `json:"syncProfile,omitempty" protobuf:"bytes,4,opt,name=syncProfile"` } // TargetTemplate defines the template of the target type TargetTemplate struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="nameTemplate is immutable" // target name template - NameTemplate string `json:"nameTemplate,omitempty" yaml:"nameTemplate,omitempty" protobuf:"bytes,1,opt,name=nameTemplate"` + NameTemplate string `json:"nameTemplate,omitempty" protobuf:"bytes,1,opt,name=nameTemplate"` // Annotations is a key value map to be copied to the target CR. // +optional - Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"` + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"` // Labels is a key value map to be copied to the target CR. // +optional - Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" protobuf:"bytes,3,rep,name=labels"` + Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,3,rep,name=labels"` } type SchemaKey struct { // Provider specifies the provider of the schema. - Provider string `json:"provider" yaml:"provider" protobuf:"bytes,1,opt,name=provider"` + Provider string `json:"provider" protobuf:"bytes,1,opt,name=provider"` // Version defines the version of the schema - Version string `json:"version" yaml:"version" protobuf:"bytes,2,opt,name=version"` + Version string `json:"version" protobuf:"bytes,2,opt,name=version"` } // DiscoveryRuleStatus defines the observed state of DiscoveryRule @@ -130,9 +135,9 @@ type DiscoveryRuleStatus struct { // - a condition for the reconcilation status // - a condition for the ready status // if both are true the other attributes in the status are meaningful - condv1alpha1.ConditionedStatus `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` + condv1alpha1.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // StartTime identifies when the dr got started - StartTime *metav1.Time `json:"startTime,omitempty" yaml:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` + StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` } // +kubebuilder:object:root=true @@ -145,20 +150,20 @@ type DiscoveryRuleStatus struct { // DiscoveryRule is the Schema for the DiscoveryRule API // +k8s:openapi-gen=true type DiscoveryRule struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Spec DiscoveryRuleSpec `json:"spec,omitempty" yaml:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - Status DiscoveryRuleStatus `json:"status,omitempty" yaml:"status,omitempty" protobuf:"bytes,3,opt,name=status"` + Spec DiscoveryRuleSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Status DiscoveryRuleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +kubebuilder:object:root=true // DiscoveryRuleList contains a list of DiscoveryRules // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type DiscoveryRuleList struct { - metav1.TypeMeta `json:",inline" yaml:",inline"` - metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []DiscoveryRule `json:"items" yaml:"items" protobuf:"bytes,2,rep,name=items"` + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []DiscoveryRule `json:"items" protobuf:"bytes,2,rep,name=items"` } func init() { diff --git a/apis/inv/v1alpha1/discoveryvendorprofile_types.go b/apis/inv/v1alpha1/discoveryvendorprofile_types.go index a8cdaad2..aa392df7 100644 --- a/apis/inv/v1alpha1/discoveryvendorprofile_types.go +++ b/apis/inv/v1alpha1/discoveryvendorprofile_types.go @@ -32,6 +32,7 @@ type GnmiDiscoveryVendorProfileParameters struct { Organization string `json:"organization" protobuf:"bytes,1,opt,name=organization"` ModelMatch *string `json:"modelMatch,omitempty" protobuf:"bytes,2,opt,name=modelMatch"` //Paths DiscoveryPaths `json:"paths" protobuf:"bytes,3,opt,name=paths"` + // +listType=atomic Paths []DiscoveryPathDefinition `json:"paths" protobuf:"bytes,3,rep,name=paths"` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="encoding is immutable" // +kubebuilder:validation:Enum=UNKNOWN;JSON;JSON_IETF;PROTO;ASCII; diff --git a/apis/inv/v1alpha1/generated.pb.go b/apis/inv/v1alpha1/generated.pb.go index 04c3b85a..5b7dea38 100644 --- a/apis/inv/v1alpha1/generated.pb.go +++ b/apis/inv/v1alpha1/generated.pb.go @@ -22,1819 +22,684 @@ import ( fmt "fmt" io "io" + "sort" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (m *DiscoveryParameters) Reset() { *m = DiscoveryParameters{} } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +func (m *DiscoveryPathDefinition) Reset() { *m = DiscoveryPathDefinition{} } -func (m *DiscoveryInfo) Reset() { *m = DiscoveryInfo{} } -func (*DiscoveryInfo) ProtoMessage() {} -func (*DiscoveryInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{0} -} -func (m *DiscoveryInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryInfo.Merge(m, src) -} -func (m *DiscoveryInfo) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryInfo) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryInfo.DiscardUnknown(m) -} +func (m *DiscoveryProfile) Reset() { *m = DiscoveryProfile{} } -var xxx_messageInfo_DiscoveryInfo proto.InternalMessageInfo +func (m *DiscoveryRule) Reset() { *m = DiscoveryRule{} } -func (m *DiscoveryParameters) Reset() { *m = DiscoveryParameters{} } -func (*DiscoveryParameters) ProtoMessage() {} -func (*DiscoveryParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{1} -} -func (m *DiscoveryParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryParameters.Merge(m, src) -} -func (m *DiscoveryParameters) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryParameters) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryParameters.DiscardUnknown(m) -} +func (m *DiscoveryRuleAddress) Reset() { *m = DiscoveryRuleAddress{} } -var xxx_messageInfo_DiscoveryParameters proto.InternalMessageInfo +func (m *DiscoveryRuleList) Reset() { *m = DiscoveryRuleList{} } -func (m *DiscoveryPathDefinition) Reset() { *m = DiscoveryPathDefinition{} } -func (*DiscoveryPathDefinition) ProtoMessage() {} -func (*DiscoveryPathDefinition) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{2} -} -func (m *DiscoveryPathDefinition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryPathDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryPathDefinition) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryPathDefinition.Merge(m, src) -} -func (m *DiscoveryPathDefinition) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryPathDefinition) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryPathDefinition.DiscardUnknown(m) -} +func (m *DiscoveryRulePrefix) Reset() { *m = DiscoveryRulePrefix{} } -var xxx_messageInfo_DiscoveryPathDefinition proto.InternalMessageInfo +func (m *DiscoveryRuleSpec) Reset() { *m = DiscoveryRuleSpec{} } -func (m *DiscoveryProfile) Reset() { *m = DiscoveryProfile{} } -func (*DiscoveryProfile) ProtoMessage() {} -func (*DiscoveryProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{3} -} -func (m *DiscoveryProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryProfile.Merge(m, src) -} -func (m *DiscoveryProfile) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryProfile) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryProfile.DiscardUnknown(m) -} +func (m *DiscoveryRuleStatus) Reset() { *m = DiscoveryRuleStatus{} } -var xxx_messageInfo_DiscoveryProfile proto.InternalMessageInfo +func (m *DiscoveryVendorProfile) Reset() { *m = DiscoveryVendorProfile{} } -func (m *DiscoveryRule) Reset() { *m = DiscoveryRule{} } -func (*DiscoveryRule) ProtoMessage() {} -func (*DiscoveryRule) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{4} -} -func (m *DiscoveryRule) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRule) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRule.Merge(m, src) -} -func (m *DiscoveryRule) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRule) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRule.DiscardUnknown(m) -} +func (m *DiscoveryVendorProfileList) Reset() { *m = DiscoveryVendorProfileList{} } -var xxx_messageInfo_DiscoveryRule proto.InternalMessageInfo +func (m *DiscoveryVendorProfileSpec) Reset() { *m = DiscoveryVendorProfileSpec{} } -func (m *DiscoveryRuleAddress) Reset() { *m = DiscoveryRuleAddress{} } -func (*DiscoveryRuleAddress) ProtoMessage() {} -func (*DiscoveryRuleAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{5} -} -func (m *DiscoveryRuleAddress) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRuleAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRuleAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRuleAddress.Merge(m, src) -} -func (m *DiscoveryRuleAddress) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRuleAddress) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRuleAddress.DiscardUnknown(m) -} +func (m *GnmiDiscoveryVendorProfileParameters) Reset() { *m = GnmiDiscoveryVendorProfileParameters{} } -var xxx_messageInfo_DiscoveryRuleAddress proto.InternalMessageInfo +func (m *Proxy) Reset() { *m = Proxy{} } -func (m *DiscoveryRuleList) Reset() { *m = DiscoveryRuleList{} } -func (*DiscoveryRuleList) ProtoMessage() {} -func (*DiscoveryRuleList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{6} -} -func (m *DiscoveryRuleList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRuleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRuleList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRuleList.Merge(m, src) -} -func (m *DiscoveryRuleList) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRuleList) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRuleList.DiscardUnknown(m) -} +func (m *Repository) Reset() { *m = Repository{} } -var xxx_messageInfo_DiscoveryRuleList proto.InternalMessageInfo +func (m *Rollout) Reset() { *m = Rollout{} } -func (m *DiscoveryRulePrefix) Reset() { *m = DiscoveryRulePrefix{} } -func (*DiscoveryRulePrefix) ProtoMessage() {} -func (*DiscoveryRulePrefix) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{7} -} -func (m *DiscoveryRulePrefix) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRulePrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRulePrefix) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRulePrefix.Merge(m, src) -} -func (m *DiscoveryRulePrefix) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRulePrefix) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRulePrefix.DiscardUnknown(m) -} +func (m *RolloutList) Reset() { *m = RolloutList{} } -var xxx_messageInfo_DiscoveryRulePrefix proto.InternalMessageInfo +func (m *RolloutSpec) Reset() { *m = RolloutSpec{} } -func (m *DiscoveryRuleSpec) Reset() { *m = DiscoveryRuleSpec{} } -func (*DiscoveryRuleSpec) ProtoMessage() {} -func (*DiscoveryRuleSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{8} -} -func (m *DiscoveryRuleSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRuleSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRuleSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRuleSpec.Merge(m, src) -} -func (m *DiscoveryRuleSpec) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRuleSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRuleSpec.DiscardUnknown(m) -} +func (m *RolloutStatus) Reset() { *m = RolloutStatus{} } -var xxx_messageInfo_DiscoveryRuleSpec proto.InternalMessageInfo +func (m *RolloutTargetStatus) Reset() { *m = RolloutTargetStatus{} } -func (m *DiscoveryRuleStatus) Reset() { *m = DiscoveryRuleStatus{} } -func (*DiscoveryRuleStatus) ProtoMessage() {} -func (*DiscoveryRuleStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{9} -} -func (m *DiscoveryRuleStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryRuleStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryRuleStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryRuleStatus.Merge(m, src) -} -func (m *DiscoveryRuleStatus) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryRuleStatus) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryRuleStatus.DiscardUnknown(m) -} +func (m *Schema) Reset() { *m = Schema{} } -var xxx_messageInfo_DiscoveryRuleStatus proto.InternalMessageInfo +func (m *SchemaKey) Reset() { *m = SchemaKey{} } -func (m *DiscoveryVendorProfile) Reset() { *m = DiscoveryVendorProfile{} } -func (*DiscoveryVendorProfile) ProtoMessage() {} -func (*DiscoveryVendorProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{10} -} -func (m *DiscoveryVendorProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryVendorProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryVendorProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryVendorProfile.Merge(m, src) -} -func (m *DiscoveryVendorProfile) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryVendorProfile) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryVendorProfile.DiscardUnknown(m) -} +func (m *SchemaList) Reset() { *m = SchemaList{} } -var xxx_messageInfo_DiscoveryVendorProfile proto.InternalMessageInfo +func (m *SchemaRepositoryStatus) Reset() { *m = SchemaRepositoryStatus{} } -func (m *DiscoveryVendorProfileList) Reset() { *m = DiscoveryVendorProfileList{} } -func (*DiscoveryVendorProfileList) ProtoMessage() {} -func (*DiscoveryVendorProfileList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{11} -} -func (m *DiscoveryVendorProfileList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryVendorProfileList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryVendorProfileList) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryVendorProfileList.Merge(m, src) -} -func (m *DiscoveryVendorProfileList) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryVendorProfileList) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryVendorProfileList.DiscardUnknown(m) -} +func (m *SchemaSpec) Reset() { *m = SchemaSpec{} } -var xxx_messageInfo_DiscoveryVendorProfileList proto.InternalMessageInfo +func (m *SchemaSpecRepository) Reset() { *m = SchemaSpecRepository{} } -func (m *DiscoveryVendorProfileSpec) Reset() { *m = DiscoveryVendorProfileSpec{} } -func (*DiscoveryVendorProfileSpec) ProtoMessage() {} -func (*DiscoveryVendorProfileSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{12} -} -func (m *DiscoveryVendorProfileSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DiscoveryVendorProfileSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *DiscoveryVendorProfileSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiscoveryVendorProfileSpec.Merge(m, src) -} -func (m *DiscoveryVendorProfileSpec) XXX_Size() int { - return m.Size() -} -func (m *DiscoveryVendorProfileSpec) XXX_DiscardUnknown() { - xxx_messageInfo_DiscoveryVendorProfileSpec.DiscardUnknown(m) -} +func (m *SchemaSpecSchema) Reset() { *m = SchemaSpecSchema{} } -var xxx_messageInfo_DiscoveryVendorProfileSpec proto.InternalMessageInfo +func (m *SchemaStatus) Reset() { *m = SchemaStatus{} } -func (m *GnmiDiscoveryVendorProfileParameters) Reset() { *m = GnmiDiscoveryVendorProfileParameters{} } -func (*GnmiDiscoveryVendorProfileParameters) ProtoMessage() {} -func (*GnmiDiscoveryVendorProfileParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{13} -} -func (m *GnmiDiscoveryVendorProfileParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GnmiDiscoveryVendorProfileParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *GnmiDiscoveryVendorProfileParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_GnmiDiscoveryVendorProfileParameters.Merge(m, src) -} -func (m *GnmiDiscoveryVendorProfileParameters) XXX_Size() int { - return m.Size() -} -func (m *GnmiDiscoveryVendorProfileParameters) XXX_DiscardUnknown() { - xxx_messageInfo_GnmiDiscoveryVendorProfileParameters.DiscardUnknown(m) -} +func (m *SrcDstPath) Reset() { *m = SrcDstPath{} } -var xxx_messageInfo_GnmiDiscoveryVendorProfileParameters proto.InternalMessageInfo +func (m *Subscription) Reset() { *m = Subscription{} } -func (m *Proxy) Reset() { *m = Proxy{} } -func (*Proxy) ProtoMessage() {} -func (*Proxy) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{14} -} -func (m *Proxy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Proxy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Proxy) XXX_Merge(src proto.Message) { - xxx_messageInfo_Proxy.Merge(m, src) -} -func (m *Proxy) XXX_Size() int { - return m.Size() -} -func (m *Proxy) XXX_DiscardUnknown() { - xxx_messageInfo_Proxy.DiscardUnknown(m) -} +func (m *SubscriptionList) Reset() { *m = SubscriptionList{} } -var xxx_messageInfo_Proxy proto.InternalMessageInfo +func (m *SubscriptionParameters) Reset() { *m = SubscriptionParameters{} } -func (m *Repository) Reset() { *m = Repository{} } -func (*Repository) ProtoMessage() {} -func (*Repository) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{15} -} -func (m *Repository) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Repository) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Repository) XXX_Merge(src proto.Message) { - xxx_messageInfo_Repository.Merge(m, src) -} -func (m *Repository) XXX_Size() int { - return m.Size() -} -func (m *Repository) XXX_DiscardUnknown() { - xxx_messageInfo_Repository.DiscardUnknown(m) -} +func (m *SubscriptionSpec) Reset() { *m = SubscriptionSpec{} } -var xxx_messageInfo_Repository proto.InternalMessageInfo +func (m *SubscriptionStatus) Reset() { *m = SubscriptionStatus{} } -func (m *Rollout) Reset() { *m = Rollout{} } -func (*Rollout) ProtoMessage() {} -func (*Rollout) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{16} -} -func (m *Rollout) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rollout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Rollout) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rollout.Merge(m, src) -} -func (m *Rollout) XXX_Size() int { - return m.Size() -} -func (m *Rollout) XXX_DiscardUnknown() { - xxx_messageInfo_Rollout.DiscardUnknown(m) -} +func (m *SubscriptionTarget) Reset() { *m = SubscriptionTarget{} } -var xxx_messageInfo_Rollout proto.InternalMessageInfo +func (m *TargetConnectionProfile) Reset() { *m = TargetConnectionProfile{} } -func (m *RolloutList) Reset() { *m = RolloutList{} } -func (*RolloutList) ProtoMessage() {} -func (*RolloutList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{17} -} -func (m *RolloutList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RolloutList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RolloutList) XXX_Merge(src proto.Message) { - xxx_messageInfo_RolloutList.Merge(m, src) -} -func (m *RolloutList) XXX_Size() int { - return m.Size() -} -func (m *RolloutList) XXX_DiscardUnknown() { - xxx_messageInfo_RolloutList.DiscardUnknown(m) -} +func (m *TargetConnectionProfileList) Reset() { *m = TargetConnectionProfileList{} } -var xxx_messageInfo_RolloutList proto.InternalMessageInfo +func (m *TargetConnectionProfileSpec) Reset() { *m = TargetConnectionProfileSpec{} } -func (m *RolloutSpec) Reset() { *m = RolloutSpec{} } -func (*RolloutSpec) ProtoMessage() {} -func (*RolloutSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{18} -} -func (m *RolloutSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RolloutSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RolloutSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_RolloutSpec.Merge(m, src) -} -func (m *RolloutSpec) XXX_Size() int { - return m.Size() -} -func (m *RolloutSpec) XXX_DiscardUnknown() { - xxx_messageInfo_RolloutSpec.DiscardUnknown(m) -} +func (m *TargetProfile) Reset() { *m = TargetProfile{} } -var xxx_messageInfo_RolloutSpec proto.InternalMessageInfo +func (m *TargetSyncProfile) Reset() { *m = TargetSyncProfile{} } -func (m *RolloutStatus) Reset() { *m = RolloutStatus{} } -func (*RolloutStatus) ProtoMessage() {} -func (*RolloutStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{19} -} -func (m *RolloutStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RolloutStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RolloutStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RolloutStatus.Merge(m, src) -} -func (m *RolloutStatus) XXX_Size() int { - return m.Size() -} -func (m *RolloutStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RolloutStatus.DiscardUnknown(m) -} +func (m *TargetSyncProfileList) Reset() { *m = TargetSyncProfileList{} } -var xxx_messageInfo_RolloutStatus proto.InternalMessageInfo +func (m *TargetSyncProfileSpec) Reset() { *m = TargetSyncProfileSpec{} } -func (m *RolloutTargetStatus) Reset() { *m = RolloutTargetStatus{} } -func (*RolloutTargetStatus) ProtoMessage() {} -func (*RolloutTargetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{20} -} -func (m *RolloutTargetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RolloutTargetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *RolloutTargetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_RolloutTargetStatus.Merge(m, src) -} -func (m *RolloutTargetStatus) XXX_Size() int { - return m.Size() -} -func (m *RolloutTargetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_RolloutTargetStatus.DiscardUnknown(m) -} +func (m *TargetSyncProfileSync) Reset() { *m = TargetSyncProfileSync{} } -var xxx_messageInfo_RolloutTargetStatus proto.InternalMessageInfo +func (m *TargetTemplate) Reset() { *m = TargetTemplate{} } -func (m *Schema) Reset() { *m = Schema{} } -func (*Schema) ProtoMessage() {} -func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{21} -} -func (m *Schema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Schema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Schema) XXX_Merge(src proto.Message) { - xxx_messageInfo_Schema.Merge(m, src) -} -func (m *Schema) XXX_Size() int { - return m.Size() -} -func (m *Schema) XXX_DiscardUnknown() { - xxx_messageInfo_Schema.DiscardUnknown(m) -} +func (m *Workspace) Reset() { *m = Workspace{} } -var xxx_messageInfo_Schema proto.InternalMessageInfo +func (m *WorkspaceList) Reset() { *m = WorkspaceList{} } -func (m *SchemaKey) Reset() { *m = SchemaKey{} } -func (*SchemaKey) ProtoMessage() {} -func (*SchemaKey) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{22} -} -func (m *SchemaKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SchemaKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaKey.Merge(m, src) -} -func (m *SchemaKey) XXX_Size() int { - return m.Size() -} -func (m *SchemaKey) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaKey.DiscardUnknown(m) -} +func (m *WorkspaceSpec) Reset() { *m = WorkspaceSpec{} } -var xxx_messageInfo_SchemaKey proto.InternalMessageInfo +func (m *WorkspaceStatus) Reset() { *m = WorkspaceStatus{} } -func (m *SchemaList) Reset() { *m = SchemaList{} } -func (*SchemaList) ProtoMessage() {} -func (*SchemaList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{23} -} -func (m *SchemaList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SchemaList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaList.Merge(m, src) -} -func (m *SchemaList) XXX_Size() int { - return m.Size() -} -func (m *SchemaList) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaList.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SchemaList proto.InternalMessageInfo - -func (m *SchemaRepositoryStatus) Reset() { *m = SchemaRepositoryStatus{} } -func (*SchemaRepositoryStatus) ProtoMessage() {} -func (*SchemaRepositoryStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{24} -} -func (m *SchemaRepositoryStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaRepositoryStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SchemaRepositoryStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaRepositoryStatus.Merge(m, src) -} -func (m *SchemaRepositoryStatus) XXX_Size() int { - return m.Size() -} -func (m *SchemaRepositoryStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaRepositoryStatus.DiscardUnknown(m) +func (m *DiscoveryParameters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_SchemaRepositoryStatus proto.InternalMessageInfo - -func (m *SchemaSpec) Reset() { *m = SchemaSpec{} } -func (*SchemaSpec) ProtoMessage() {} -func (*SchemaSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{25} -} -func (m *SchemaSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *DiscoveryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i = encodeVarintGenerated(dAtA, i, uint64(m.ConcurrentScans)) + i-- + dAtA[i] = 0x30 + { + size, err := m.Period.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *SchemaSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaSpec.Merge(m, src) -} -func (m *SchemaSpec) XXX_Size() int { - return m.Size() -} -func (m *SchemaSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SchemaSpec proto.InternalMessageInfo - -func (m *SchemaSpecRepository) Reset() { *m = SchemaSpecRepository{} } -func (*SchemaSpecRepository) ProtoMessage() {} -func (*SchemaSpecRepository) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{26} -} -func (m *SchemaSpecRepository) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaSpecRepository) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + i-- + dAtA[i] = 0x2a + if m.TargetTemplate != nil { + { + size, err := m.TargetTemplate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - return b[:n], nil -} -func (m *SchemaSpecRepository) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaSpecRepository.Merge(m, src) -} -func (m *SchemaSpecRepository) XXX_Size() int { - return m.Size() -} -func (m *SchemaSpecRepository) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaSpecRepository.DiscardUnknown(m) + if len(m.TargetConnectionProfiles) > 0 { + for iNdEx := len(m.TargetConnectionProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TargetConnectionProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.DiscoveryProfile != nil { + { + size, err := m.DiscoveryProfile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.DefaultSchema != nil { + { + size, err := m.DefaultSchema.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -var xxx_messageInfo_SchemaSpecRepository proto.InternalMessageInfo - -func (m *SchemaSpecSchema) Reset() { *m = SchemaSpecSchema{} } -func (*SchemaSpecSchema) ProtoMessage() {} -func (*SchemaSpecSchema) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{27} -} -func (m *SchemaSpecSchema) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SchemaSpecSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryPathDefinition) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SchemaSpecSchema) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaSpecSchema.Merge(m, src) -} -func (m *SchemaSpecSchema) XXX_Size() int { - return m.Size() -} -func (m *SchemaSpecSchema) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaSpecSchema.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SchemaSpecSchema proto.InternalMessageInfo - -func (m *SchemaStatus) Reset() { *m = SchemaStatus{} } -func (*SchemaStatus) ProtoMessage() {} -func (*SchemaStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{28} -} -func (m *SchemaStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryPathDefinition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryPathDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Regex != nil { + i -= len(*m.Regex) + copy(dAtA[i:], *m.Regex) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Regex))) + i-- + dAtA[i] = 0x22 } - return b[:n], nil -} -func (m *SchemaStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SchemaStatus.Merge(m, src) -} -func (m *SchemaStatus) XXX_Size() int { - return m.Size() -} -func (m *SchemaStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SchemaStatus.DiscardUnknown(m) + if m.Script != nil { + i -= len(*m.Script) + copy(dAtA[i:], *m.Script) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Script))) + i-- + dAtA[i] = 0x1a + } + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x12 + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_SchemaStatus proto.InternalMessageInfo - -func (m *SrcDstPath) Reset() { *m = SrcDstPath{} } -func (*SrcDstPath) ProtoMessage() {} -func (*SrcDstPath) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{29} -} -func (m *SrcDstPath) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SrcDstPath) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SrcDstPath) XXX_Merge(src proto.Message) { - xxx_messageInfo_SrcDstPath.Merge(m, src) -} -func (m *SrcDstPath) XXX_Size() int { - return m.Size() -} -func (m *SrcDstPath) XXX_DiscardUnknown() { - xxx_messageInfo_SrcDstPath.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SrcDstPath proto.InternalMessageInfo - -func (m *Subscription) Reset() { *m = Subscription{} } -func (*Subscription) ProtoMessage() {} -func (*Subscription) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{30} -} -func (m *Subscription) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryProfile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionProfiles) > 0 { + for iNdEx := len(m.ConnectionProfiles) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ConnectionProfiles[iNdEx]) + copy(dAtA[i:], m.ConnectionProfiles[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfiles[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } - return b[:n], nil -} -func (m *Subscription) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subscription.Merge(m, src) -} -func (m *Subscription) XXX_Size() int { - return m.Size() -} -func (m *Subscription) XXX_DiscardUnknown() { - xxx_messageInfo_Subscription.DiscardUnknown(m) + if m.TLSSecret != nil { + i -= len(*m.TLSSecret) + copy(dAtA[i:], *m.TLSSecret) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TLSSecret))) + i-- + dAtA[i] = 0x12 + } + i -= len(m.Credentials) + copy(dAtA[i:], m.Credentials) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_Subscription proto.InternalMessageInfo - -func (m *SubscriptionList) Reset() { *m = SubscriptionList{} } -func (*SubscriptionList) ProtoMessage() {} -func (*SubscriptionList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{31} -} -func (m *SubscriptionList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubscriptionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryRule) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SubscriptionList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscriptionList.Merge(m, src) -} -func (m *SubscriptionList) XXX_Size() int { - return m.Size() -} -func (m *SubscriptionList) XXX_DiscardUnknown() { - xxx_messageInfo_SubscriptionList.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SubscriptionList proto.InternalMessageInfo - -func (m *SubscriptionParameters) Reset() { *m = SubscriptionParameters{} } -func (*SubscriptionParameters) ProtoMessage() {} -func (*SubscriptionParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{32} -} -func (m *SubscriptionParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryRule) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *SubscriptionParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscriptionParameters.Merge(m, src) -} -func (m *SubscriptionParameters) XXX_Size() int { - return m.Size() -} -func (m *SubscriptionParameters) XXX_DiscardUnknown() { - xxx_messageInfo_SubscriptionParameters.DiscardUnknown(m) + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_SubscriptionParameters proto.InternalMessageInfo - -func (m *SubscriptionSpec) Reset() { *m = SubscriptionSpec{} } -func (*SubscriptionSpec) ProtoMessage() {} -func (*SubscriptionSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{33} -} -func (m *SubscriptionSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubscriptionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryRuleAddress) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SubscriptionSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscriptionSpec.Merge(m, src) -} -func (m *SubscriptionSpec) XXX_Size() int { - return m.Size() -} -func (m *SubscriptionSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SubscriptionSpec.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SubscriptionSpec proto.InternalMessageInfo - -func (m *SubscriptionStatus) Reset() { *m = SubscriptionStatus{} } -func (*SubscriptionStatus) ProtoMessage() {} -func (*SubscriptionStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{34} +func (m *DiscoveryRuleAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +func (m *DiscoveryRuleAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.HostName) + copy(dAtA[i:], m.HostName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostName))) + i-- + dAtA[i] = 0x12 + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *SubscriptionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + +func (m *DiscoveryRuleList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *SubscriptionStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscriptionStatus.Merge(m, src) -} -func (m *SubscriptionStatus) XXX_Size() int { - return m.Size() -} -func (m *SubscriptionStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SubscriptionStatus.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_SubscriptionStatus proto.InternalMessageInfo - -func (m *SubscriptionTarget) Reset() { *m = SubscriptionTarget{} } -func (*SubscriptionTarget) ProtoMessage() {} -func (*SubscriptionTarget) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{35} -} -func (m *SubscriptionTarget) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SubscriptionTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *SubscriptionTarget) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubscriptionTarget.Merge(m, src) -} -func (m *SubscriptionTarget) XXX_Size() int { - return m.Size() -} -func (m *SubscriptionTarget) XXX_DiscardUnknown() { - xxx_messageInfo_SubscriptionTarget.DiscardUnknown(m) +func (m *DiscoveryRuleList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_SubscriptionTarget proto.InternalMessageInfo - -func (m *Target) Reset() { *m = Target{} } -func (*Target) ProtoMessage() {} -func (*Target) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{36} -} -func (m *Target) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *DiscoveryRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return b[:n], nil -} -func (m *Target) XXX_Merge(src proto.Message) { - xxx_messageInfo_Target.Merge(m, src) -} -func (m *Target) XXX_Size() int { - return m.Size() -} -func (m *Target) XXX_DiscardUnknown() { - xxx_messageInfo_Target.DiscardUnknown(m) -} - -var xxx_messageInfo_Target proto.InternalMessageInfo - -func (m *TargetConnectionProfile) Reset() { *m = TargetConnectionProfile{} } -func (*TargetConnectionProfile) ProtoMessage() {} -func (*TargetConnectionProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{37} -} -func (m *TargetConnectionProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetConnectionProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *TargetConnectionProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetConnectionProfile.Merge(m, src) -} -func (m *TargetConnectionProfile) XXX_Size() int { - return m.Size() -} -func (m *TargetConnectionProfile) XXX_DiscardUnknown() { - xxx_messageInfo_TargetConnectionProfile.DiscardUnknown(m) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_TargetConnectionProfile proto.InternalMessageInfo - -func (m *TargetConnectionProfileList) Reset() { *m = TargetConnectionProfileList{} } -func (*TargetConnectionProfileList) ProtoMessage() {} -func (*TargetConnectionProfileList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{38} -} -func (m *TargetConnectionProfileList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetConnectionProfileList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryRulePrefix) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *TargetConnectionProfileList) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetConnectionProfileList.Merge(m, src) -} -func (m *TargetConnectionProfileList) XXX_Size() int { - return m.Size() -} -func (m *TargetConnectionProfileList) XXX_DiscardUnknown() { - xxx_messageInfo_TargetConnectionProfileList.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_TargetConnectionProfileList proto.InternalMessageInfo - -func (m *TargetConnectionProfileSpec) Reset() { *m = TargetConnectionProfileSpec{} } -func (*TargetConnectionProfileSpec) ProtoMessage() {} -func (*TargetConnectionProfileSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{39} -} -func (m *TargetConnectionProfileSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryRulePrefix) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetConnectionProfileSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryRulePrefix) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Excludes) > 0 { + for iNdEx := len(m.Excludes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Excludes[iNdEx]) + copy(dAtA[i:], m.Excludes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Excludes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - return b[:n], nil -} -func (m *TargetConnectionProfileSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetConnectionProfileSpec.Merge(m, src) -} -func (m *TargetConnectionProfileSpec) XXX_Size() int { - return m.Size() -} -func (m *TargetConnectionProfileSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TargetConnectionProfileSpec.DiscardUnknown(m) + i -= len(m.Prefix) + copy(dAtA[i:], m.Prefix) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Prefix))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_TargetConnectionProfileSpec proto.InternalMessageInfo - -func (m *TargetList) Reset() { *m = TargetList{} } -func (*TargetList) ProtoMessage() {} -func (*TargetList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{40} -} -func (m *TargetList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryRuleSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *TargetList) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetList.Merge(m, src) -} -func (m *TargetList) XXX_Size() int { - return m.Size() -} -func (m *TargetList) XXX_DiscardUnknown() { - xxx_messageInfo_TargetList.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_TargetList proto.InternalMessageInfo - -func (m *TargetProfile) Reset() { *m = TargetProfile{} } -func (*TargetProfile) ProtoMessage() {} -func (*TargetProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{41} -} -func (m *TargetProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryRuleSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.DiscoveryParameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *TargetProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetProfile.Merge(m, src) -} -func (m *TargetProfile) XXX_Size() int { - return m.Size() -} -func (m *TargetProfile) XXX_DiscardUnknown() { - xxx_messageInfo_TargetProfile.DiscardUnknown(m) + i-- + dAtA[i] = 0x32 + i -= len(m.ServiceDomain) + copy(dAtA[i:], m.ServiceDomain) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceDomain))) + i-- + dAtA[i] = 0x2a + if m.ServiceSelector != nil { + { + size, err := m.ServiceSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.PodSelector != nil { + { + size, err := m.PodSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Prefixes) > 0 { + for iNdEx := len(m.Prefixes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Prefixes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -var xxx_messageInfo_TargetProfile proto.InternalMessageInfo - -func (m *TargetSpec) Reset() { *m = TargetSpec{} } -func (*TargetSpec) ProtoMessage() {} -func (*TargetSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{42} -} -func (m *TargetSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryRuleStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *TargetSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetSpec.Merge(m, src) -} -func (m *TargetSpec) XXX_Size() int { - return m.Size() -} -func (m *TargetSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TargetSpec.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_TargetSpec proto.InternalMessageInfo - -func (m *TargetStatus) Reset() { *m = TargetStatus{} } -func (*TargetStatus) ProtoMessage() {} -func (*TargetStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{43} -} -func (m *TargetStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *DiscoveryRuleStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *DiscoveryRuleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StartTime != nil { + { + size, err := m.StartTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - return b[:n], nil -} -func (m *TargetStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetStatus.Merge(m, src) -} -func (m *TargetStatus) XXX_Size() int { - return m.Size() -} -func (m *TargetStatus) XXX_DiscardUnknown() { - xxx_messageInfo_TargetStatus.DiscardUnknown(m) + { + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_TargetStatus proto.InternalMessageInfo - -func (m *TargetStatusUsedReferences) Reset() { *m = TargetStatusUsedReferences{} } -func (*TargetStatusUsedReferences) ProtoMessage() {} -func (*TargetStatusUsedReferences) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{44} -} -func (m *TargetStatusUsedReferences) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetStatusUsedReferences) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryVendorProfile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *TargetStatusUsedReferences) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetStatusUsedReferences.Merge(m, src) -} -func (m *TargetStatusUsedReferences) XXX_Size() int { - return m.Size() -} -func (m *TargetStatusUsedReferences) XXX_DiscardUnknown() { - xxx_messageInfo_TargetStatusUsedReferences.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_TargetStatusUsedReferences proto.InternalMessageInfo - -func (m *TargetSyncProfile) Reset() { *m = TargetSyncProfile{} } -func (*TargetSyncProfile) ProtoMessage() {} -func (*TargetSyncProfile) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{45} +func (m *DiscoveryVendorProfile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetSyncProfile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetSyncProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TargetSyncProfile) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetSyncProfile.Merge(m, src) -} -func (m *TargetSyncProfile) XXX_Size() int { - return m.Size() -} -func (m *TargetSyncProfile) XXX_DiscardUnknown() { - xxx_messageInfo_TargetSyncProfile.DiscardUnknown(m) -} - -var xxx_messageInfo_TargetSyncProfile proto.InternalMessageInfo - -func (m *TargetSyncProfileList) Reset() { *m = TargetSyncProfileList{} } -func (*TargetSyncProfileList) ProtoMessage() {} -func (*TargetSyncProfileList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{46} -} -func (m *TargetSyncProfileList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetSyncProfileList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *TargetSyncProfileList) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetSyncProfileList.Merge(m, src) -} -func (m *TargetSyncProfileList) XXX_Size() int { - return m.Size() -} -func (m *TargetSyncProfileList) XXX_DiscardUnknown() { - xxx_messageInfo_TargetSyncProfileList.DiscardUnknown(m) -} - -var xxx_messageInfo_TargetSyncProfileList proto.InternalMessageInfo -func (m *TargetSyncProfileSpec) Reset() { *m = TargetSyncProfileSpec{} } -func (*TargetSyncProfileSpec) ProtoMessage() {} -func (*TargetSyncProfileSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{47} -} -func (m *TargetSyncProfileSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetSyncProfileSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *DiscoveryVendorProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *TargetSyncProfileSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetSyncProfileSpec.Merge(m, src) -} -func (m *TargetSyncProfileSpec) XXX_Size() int { - return m.Size() -} -func (m *TargetSyncProfileSpec) XXX_DiscardUnknown() { - xxx_messageInfo_TargetSyncProfileSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_TargetSyncProfileSpec proto.InternalMessageInfo - -func (m *TargetSyncProfileSync) Reset() { *m = TargetSyncProfileSync{} } -func (*TargetSyncProfileSync) ProtoMessage() {} -func (*TargetSyncProfileSync) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{48} -} -func (m *TargetSyncProfileSync) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetSyncProfileSync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *TargetSyncProfileSync) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetSyncProfileSync.Merge(m, src) -} -func (m *TargetSyncProfileSync) XXX_Size() int { - return m.Size() -} -func (m *TargetSyncProfileSync) XXX_DiscardUnknown() { - xxx_messageInfo_TargetSyncProfileSync.DiscardUnknown(m) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_TargetSyncProfileSync proto.InternalMessageInfo - -func (m *TargetTemplate) Reset() { *m = TargetTemplate{} } -func (*TargetTemplate) ProtoMessage() {} -func (*TargetTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{49} -} -func (m *TargetTemplate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TargetTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) +func (m *DiscoveryVendorProfileList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil -} -func (m *TargetTemplate) XXX_Merge(src proto.Message) { - xxx_messageInfo_TargetTemplate.Merge(m, src) -} -func (m *TargetTemplate) XXX_Size() int { - return m.Size() -} -func (m *TargetTemplate) XXX_DiscardUnknown() { - xxx_messageInfo_TargetTemplate.DiscardUnknown(m) + return dAtA[:n], nil } -var xxx_messageInfo_TargetTemplate proto.InternalMessageInfo - -func (m *Workspace) Reset() { *m = Workspace{} } -func (*Workspace) ProtoMessage() {} -func (*Workspace) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{50} -} -func (m *Workspace) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Workspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *Workspace) XXX_Merge(src proto.Message) { - xxx_messageInfo_Workspace.Merge(m, src) -} -func (m *Workspace) XXX_Size() int { - return m.Size() -} -func (m *Workspace) XXX_DiscardUnknown() { - xxx_messageInfo_Workspace.DiscardUnknown(m) +func (m *DiscoveryVendorProfileList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_Workspace proto.InternalMessageInfo - -func (m *WorkspaceList) Reset() { *m = WorkspaceList{} } -func (*WorkspaceList) ProtoMessage() {} -func (*WorkspaceList) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{51} -} -func (m *WorkspaceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WorkspaceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *DiscoveryVendorProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } } - return b[:n], nil -} -func (m *WorkspaceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_WorkspaceList.Merge(m, src) -} -func (m *WorkspaceList) XXX_Size() int { - return m.Size() -} -func (m *WorkspaceList) XXX_DiscardUnknown() { - xxx_messageInfo_WorkspaceList.DiscardUnknown(m) -} - -var xxx_messageInfo_WorkspaceList proto.InternalMessageInfo - -func (m *WorkspaceSpec) Reset() { *m = WorkspaceSpec{} } -func (*WorkspaceSpec) ProtoMessage() {} -func (*WorkspaceSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{52} -} -func (m *WorkspaceSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WorkspaceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *WorkspaceSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_WorkspaceSpec.Merge(m, src) -} -func (m *WorkspaceSpec) XXX_Size() int { - return m.Size() -} -func (m *WorkspaceSpec) XXX_DiscardUnknown() { - xxx_messageInfo_WorkspaceSpec.DiscardUnknown(m) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -var xxx_messageInfo_WorkspaceSpec proto.InternalMessageInfo - -func (m *WorkspaceStatus) Reset() { *m = WorkspaceStatus{} } -func (*WorkspaceStatus) ProtoMessage() {} -func (*WorkspaceStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c428ff1fee4945a0, []int{53} -} -func (m *WorkspaceStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *WorkspaceStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *WorkspaceStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_WorkspaceStatus.Merge(m, src) -} -func (m *WorkspaceStatus) XXX_Size() int { - return m.Size() -} -func (m *WorkspaceStatus) XXX_DiscardUnknown() { - xxx_messageInfo_WorkspaceStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_WorkspaceStatus proto.InternalMessageInfo - -func init() { - proto.RegisterType((*DiscoveryInfo)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryInfo") - proto.RegisterType((*DiscoveryParameters)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryParameters") - proto.RegisterType((*DiscoveryPathDefinition)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryPathDefinition") - proto.RegisterType((*DiscoveryProfile)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryProfile") - proto.RegisterType((*DiscoveryRule)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRule") - proto.RegisterType((*DiscoveryRuleAddress)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRuleAddress") - proto.RegisterType((*DiscoveryRuleList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRuleList") - proto.RegisterType((*DiscoveryRulePrefix)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRulePrefix") - proto.RegisterType((*DiscoveryRuleSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRuleSpec") - proto.RegisterType((*DiscoveryRuleStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryRuleStatus") - proto.RegisterType((*DiscoveryVendorProfile)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryVendorProfile") - proto.RegisterType((*DiscoveryVendorProfileList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryVendorProfileList") - proto.RegisterType((*DiscoveryVendorProfileSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.DiscoveryVendorProfileSpec") - proto.RegisterType((*GnmiDiscoveryVendorProfileParameters)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.GnmiDiscoveryVendorProfileParameters") - proto.RegisterType((*Proxy)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Proxy") - proto.RegisterType((*Repository)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Repository") - proto.RegisterType((*Rollout)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Rollout") - proto.RegisterType((*RolloutList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.RolloutList") - proto.RegisterType((*RolloutSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.RolloutSpec") - proto.RegisterType((*RolloutStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.RolloutStatus") - proto.RegisterType((*RolloutTargetStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.RolloutTargetStatus") - proto.RegisterType((*Schema)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Schema") - proto.RegisterType((*SchemaKey)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaKey") - proto.RegisterType((*SchemaList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaList") - proto.RegisterType((*SchemaRepositoryStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaRepositoryStatus") - proto.RegisterType((*SchemaSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaSpec") - proto.RegisterType((*SchemaSpecRepository)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaSpecRepository") - proto.RegisterType((*SchemaSpecSchema)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaSpecSchema") - proto.RegisterType((*SchemaStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SchemaStatus") - proto.RegisterType((*SrcDstPath)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SrcDstPath") - proto.RegisterType((*Subscription)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Subscription") - proto.RegisterType((*SubscriptionList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionList") - proto.RegisterType((*SubscriptionParameters)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionParameters") - proto.RegisterMapType((map[string]string)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionParameters.LabelsEntry") - proto.RegisterType((*SubscriptionSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionSpec") - proto.RegisterType((*SubscriptionStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionStatus") - proto.RegisterType((*SubscriptionTarget)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.SubscriptionTarget") - proto.RegisterType((*Target)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Target") - proto.RegisterType((*TargetConnectionProfile)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetConnectionProfile") - proto.RegisterType((*TargetConnectionProfileList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetConnectionProfileList") - proto.RegisterType((*TargetConnectionProfileSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetConnectionProfileSpec") - proto.RegisterType((*TargetList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetList") - proto.RegisterType((*TargetProfile)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetProfile") - proto.RegisterType((*TargetSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetSpec") - proto.RegisterType((*TargetStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetStatus") - proto.RegisterType((*TargetStatusUsedReferences)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetStatusUsedReferences") - proto.RegisterType((*TargetSyncProfile)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetSyncProfile") - proto.RegisterType((*TargetSyncProfileList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetSyncProfileList") - proto.RegisterType((*TargetSyncProfileSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetSyncProfileSpec") - proto.RegisterType((*TargetSyncProfileSync)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetSyncProfileSync") - proto.RegisterType((*TargetTemplate)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetTemplate") - proto.RegisterMapType((map[string]string)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetTemplate.AnnotationsEntry") - proto.RegisterMapType((map[string]string)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.TargetTemplate.LabelsEntry") - proto.RegisterType((*Workspace)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.Workspace") - proto.RegisterType((*WorkspaceList)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.WorkspaceList") - proto.RegisterType((*WorkspaceSpec)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.WorkspaceSpec") - proto.RegisterType((*WorkspaceStatus)(nil), "github.com.sdcio.config_server.apis.inv.v1alpha1.WorkspaceStatus") -} - -func init() { - proto.RegisterFile("github.com/sdcio/config-server/apis/inv/v1alpha1/generated.proto", fileDescriptor_c428ff1fee4945a0) -} - -var fileDescriptor_c428ff1fee4945a0 = []byte{ - // 3350 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1b, 0x4b, 0x8c, 0x23, 0x47, - 0x75, 0xdb, 0xf6, 0x7c, 0xfc, 0x3c, 0xde, 0xd9, 0xad, 0xfd, 0x39, 0x93, 0x64, 0x3c, 0x6a, 0x20, - 0xda, 0x90, 0xc4, 0x93, 0x5d, 0x02, 0x6c, 0xc8, 0x77, 0x3d, 0xb3, 0x9b, 0x2c, 0xd9, 0xcf, 0x50, - 0x9e, 0x9d, 0x04, 0x14, 0x92, 0xf4, 0x74, 0x97, 0x3d, 0x9d, 0xb1, 0xbb, 0xad, 0xea, 0xb6, 0xb3, - 0x46, 0x7b, 0x00, 0x42, 0xa4, 0x08, 0x09, 0x09, 0x10, 0xca, 0x01, 0x09, 0xc1, 0x31, 0x1c, 0x41, - 0xe2, 0x84, 0xc4, 0x09, 0x41, 0x50, 0x90, 0xc8, 0x01, 0x44, 0x24, 0xa4, 0x21, 0x71, 0x4e, 0x7c, - 0x24, 0xae, 0x68, 0xb9, 0xa0, 0xfa, 0x74, 0xf5, 0xc7, 0xee, 0xd9, 0xb1, 0xbd, 0x3b, 0xd9, 0xdc, - 0xec, 0xf7, 0x5e, 0xbd, 0xf7, 0xaa, 0xea, 0xd5, 0xfb, 0x55, 0x35, 0x3c, 0xdd, 0xb0, 0xfd, 0xad, - 0xce, 0x66, 0xc5, 0x74, 0x5b, 0xcb, 0x9e, 0x65, 0xda, 0xee, 0xb2, 0xe9, 0x3a, 0x75, 0xbb, 0xf1, - 0x90, 0x47, 0x68, 0x97, 0xd0, 0x65, 0xa3, 0x6d, 0x7b, 0xcb, 0xb6, 0xd3, 0x5d, 0xee, 0x9e, 0x32, - 0x9a, 0xed, 0x2d, 0xe3, 0xd4, 0x72, 0x83, 0x38, 0x84, 0x1a, 0x3e, 0xb1, 0x2a, 0x6d, 0xea, 0xfa, - 0x2e, 0x7a, 0x38, 0xe4, 0x50, 0xe1, 0x1c, 0x2a, 0x82, 0xc3, 0xcb, 0x82, 0x43, 0x85, 0x71, 0xa8, - 0xd8, 0x4e, 0xb7, 0x12, 0x70, 0x58, 0x78, 0x28, 0x22, 0xb3, 0xe1, 0x36, 0xdc, 0x65, 0xce, 0x68, - 0xb3, 0x53, 0xe7, 0xff, 0xf8, 0x1f, 0xfe, 0x4b, 0x08, 0x58, 0x38, 0xbf, 0x17, 0x15, 0x4d, 0xd7, - 0xb1, 0x6c, 0xdf, 0x76, 0x9d, 0x54, 0x45, 0x17, 0x1e, 0xd9, 0x3e, 0xe3, 0x55, 0x6c, 0x97, 0xd1, - 0xb7, 0x0c, 0x73, 0xcb, 0x76, 0x08, 0xed, 0x2d, 0xb7, 0xb7, 0x1b, 0x82, 0x41, 0x8b, 0xf8, 0xc6, - 0x72, 0x77, 0x70, 0xd4, 0x17, 0xd2, 0x46, 0xd1, 0x8e, 0xe3, 0xdb, 0x2d, 0xb2, 0xec, 0x99, 0x5b, - 0xa4, 0x65, 0x24, 0xc7, 0xe9, 0x6f, 0x67, 0xa1, 0xb8, 0x6a, 0x7b, 0xa6, 0xdb, 0x25, 0xb4, 0x77, - 0xc1, 0xa9, 0xbb, 0xe8, 0x41, 0x98, 0xe5, 0x28, 0xd3, 0x6d, 0x96, 0xb4, 0x25, 0xed, 0x64, 0xbe, - 0x7a, 0xe8, 0x9d, 0x9d, 0xf2, 0x81, 0xfe, 0x4e, 0x79, 0x76, 0x4d, 0xc2, 0xb1, 0xa2, 0x90, 0xd4, - 0x5d, 0xdb, 0x22, 0xb4, 0x94, 0x19, 0xa0, 0xe6, 0x70, 0xac, 0x28, 0xd0, 0xfd, 0x30, 0xd3, 0x25, - 0xd4, 0xb3, 0x5d, 0xa7, 0x94, 0xe5, 0xc4, 0xf3, 0x92, 0x78, 0x66, 0x43, 0x80, 0x71, 0x80, 0x67, - 0x8c, 0xb7, 0x5c, 0xcf, 0x77, 0x8c, 0x16, 0x29, 0xe5, 0xe2, 0x8c, 0x9f, 0x75, 0x3d, 0xff, 0xb2, - 0xd1, 0x22, 0x58, 0x51, 0x70, 0x35, 0x9a, 0x86, 0x5f, 0x77, 0x69, 0xab, 0x34, 0x95, 0x50, 0x43, - 0xc2, 0xb1, 0xa2, 0x40, 0xa7, 0x01, 0x5a, 0x86, 0x79, 0xd6, 0xb2, 0x28, 0xf1, 0xbc, 0xd2, 0x34, - 0xa7, 0x47, 0x92, 0x1e, 0x2e, 0x29, 0x0c, 0x8e, 0x50, 0xa1, 0x33, 0x30, 0xe7, 0x11, 0x6a, 0x1b, - 0xcd, 0xcb, 0x9d, 0xd6, 0x26, 0xa1, 0xa5, 0x19, 0x3e, 0xea, 0xa8, 0x1c, 0x35, 0x57, 0x8b, 0xe0, - 0x70, 0x8c, 0x12, 0x9d, 0x07, 0xe4, 0x75, 0xda, 0x6d, 0x97, 0xfa, 0xc4, 0x3a, 0xe7, 0x98, 0xae, - 0x65, 0x3b, 0x0d, 0xaf, 0x34, 0xbb, 0x94, 0x3d, 0x99, 0xaf, 0x1e, 0xef, 0xef, 0x94, 0x51, 0x6d, - 0x00, 0x8b, 0x87, 0x8c, 0xd0, 0xdf, 0x9d, 0x82, 0x23, 0x6a, 0xab, 0xd6, 0x0c, 0x6a, 0xb4, 0x88, - 0x4f, 0xa8, 0x87, 0x7c, 0x28, 0x5a, 0xa4, 0x6e, 0x74, 0x9a, 0x7e, 0x8d, 0xef, 0x31, 0xdf, 0xb5, - 0xc2, 0xe9, 0xc7, 0x2a, 0xa3, 0x5a, 0x7c, 0x45, 0x8c, 0x7f, 0x8e, 0xf4, 0xaa, 0x87, 0xfb, 0x3b, - 0xe5, 0xe2, 0x6a, 0x94, 0x2b, 0x8e, 0x0b, 0x41, 0xdf, 0xd1, 0xe0, 0x90, 0xa5, 0xb4, 0xa1, 0x6e, - 0xdd, 0x6e, 0x12, 0x6e, 0x01, 0x85, 0xd3, 0xd5, 0xd1, 0x25, 0xaf, 0x26, 0x38, 0x55, 0x8f, 0xf6, - 0x77, 0xca, 0x87, 0x92, 0x50, 0x3c, 0x20, 0x11, 0xfd, 0x44, 0x83, 0x92, 0x6f, 0xd0, 0x06, 0xf1, - 0x57, 0x5c, 0xc7, 0x21, 0x26, 0x3b, 0x5b, 0x12, 0xe7, 0x95, 0xb2, 0x4b, 0xd9, 0x93, 0x85, 0xd3, - 0x4f, 0x8d, 0xae, 0xce, 0x3a, 0xe7, 0x18, 0xe8, 0xb2, 0x24, 0x37, 0xb9, 0xb4, 0x9e, 0x22, 0x08, - 0xa7, 0xaa, 0x80, 0xae, 0xc3, 0x41, 0x81, 0x5b, 0x27, 0x2d, 0x66, 0x7f, 0xc2, 0x98, 0x0b, 0xa7, - 0x9f, 0x1e, 0x57, 0xa9, 0x80, 0x4f, 0x15, 0xf5, 0x77, 0xca, 0x07, 0xe3, 0x30, 0x9c, 0x90, 0x85, - 0x36, 0x60, 0xba, 0x4d, 0xa8, 0xed, 0x5a, 0xfc, 0x50, 0x14, 0x4e, 0x57, 0x2a, 0xc2, 0x4d, 0x54, - 0xa2, 0x6e, 0xa2, 0xd2, 0xde, 0x6e, 0x08, 0x71, 0xcc, 0xb9, 0x54, 0xba, 0xa7, 0x2a, 0xab, 0x1d, - 0x6a, 0xb0, 0x59, 0x54, 0x0f, 0xca, 0x99, 0x4f, 0xaf, 0x71, 0x2e, 0x58, 0x72, 0x43, 0x67, 0x61, - 0xde, 0x74, 0x1d, 0xb3, 0x43, 0x29, 0x71, 0xfc, 0x9a, 0x69, 0x38, 0xe2, 0x14, 0x65, 0xab, 0x27, - 0xe4, 0x80, 0xf9, 0x95, 0x38, 0x1a, 0x27, 0xe9, 0xf5, 0x9f, 0x6a, 0x70, 0x22, 0x62, 0xcd, 0xfe, - 0xd6, 0x2a, 0xa9, 0xdb, 0x0e, 0xf7, 0x8d, 0xe8, 0x5e, 0xc8, 0x6e, 0x93, 0x9e, 0xf4, 0x3e, 0x05, - 0xc9, 0x32, 0xfb, 0x1c, 0xe9, 0x61, 0x06, 0x47, 0x4b, 0x90, 0x6b, 0x1b, 0xfe, 0x96, 0xf4, 0x37, - 0x73, 0x12, 0x9f, 0x63, 0x4c, 0x30, 0xc7, 0x20, 0x1d, 0xa6, 0x3d, 0x93, 0xda, 0x6d, 0x5f, 0xba, - 0x19, 0x60, 0x73, 0xa8, 0x71, 0x08, 0x96, 0x18, 0x54, 0x86, 0x29, 0x4a, 0x1a, 0xe4, 0x9a, 0xf4, - 0x2e, 0xf9, 0xfe, 0x4e, 0x79, 0x0a, 0x33, 0x00, 0x16, 0x70, 0xfd, 0x37, 0x1a, 0x0c, 0x58, 0x20, - 0xfa, 0x3c, 0x14, 0x4c, 0x4a, 0x2c, 0xe2, 0xf8, 0xb6, 0xd1, 0xf4, 0xa4, 0x8a, 0x47, 0xa4, 0x0a, - 0x85, 0x95, 0x10, 0x85, 0xa3, 0x74, 0xe8, 0x01, 0xc8, 0xfb, 0x4d, 0xaf, 0x46, 0x4c, 0x4a, 0x7c, - 0xa9, 0x77, 0xb1, 0xbf, 0x53, 0xce, 0xaf, 0x5f, 0xac, 0x09, 0x20, 0x0e, 0xf1, 0xcc, 0x61, 0x98, - 0xc3, 0x8d, 0x59, 0x3a, 0x8c, 0x21, 0x16, 0x38, 0x64, 0x84, 0xfe, 0xfb, 0x4c, 0xc4, 0xb7, 0xe3, - 0x4e, 0x93, 0xa0, 0x57, 0x60, 0x96, 0xed, 0xb1, 0x65, 0xf8, 0x81, 0x97, 0x78, 0x78, 0x6f, 0x16, - 0x71, 0x65, 0xf3, 0x55, 0x62, 0xfa, 0x97, 0x88, 0x6f, 0x84, 0x8e, 0x32, 0x84, 0x61, 0xc5, 0x15, - 0x11, 0xc8, 0x79, 0x6d, 0x62, 0x4a, 0x4f, 0xb0, 0x32, 0x81, 0x27, 0x60, 0x0a, 0xd7, 0xda, 0xc4, - 0x0c, 0x37, 0x98, 0xfd, 0xc3, 0x9c, 0x3d, 0x6a, 0xc1, 0xb4, 0xe7, 0x1b, 0x7e, 0xc7, 0xe3, 0x1b, - 0x5c, 0x38, 0x7d, 0x6e, 0x52, 0x41, 0x9c, 0x59, 0x68, 0xef, 0xe2, 0x3f, 0x96, 0x42, 0x74, 0x17, - 0x8e, 0xc6, 0xc8, 0x83, 0xa0, 0x70, 0x3f, 0xcc, 0x18, 0x32, 0x8a, 0x68, 0xf1, 0x78, 0x16, 0x84, - 0x90, 0x00, 0x1f, 0xc4, 0x33, 0x16, 0xb7, 0x92, 0x81, 0x32, 0x1e, 0xcf, 0xd8, 0x2f, 0xfd, 0xaf, - 0x1a, 0x1c, 0x8e, 0x49, 0xbc, 0x68, 0x7b, 0x3e, 0x7a, 0x71, 0x60, 0xfb, 0xf6, 0x78, 0xa0, 0xd9, - 0x68, 0xbe, 0x79, 0x4a, 0x66, 0x00, 0x89, 0x6c, 0x9d, 0x05, 0x53, 0xb6, 0x4f, 0x5a, 0x5e, 0x29, - 0x33, 0xae, 0xdb, 0x8c, 0x69, 0x5c, 0x2d, 0x4a, 0x59, 0x53, 0x17, 0x18, 0x57, 0x2c, 0x98, 0xeb, - 0x8d, 0x48, 0x10, 0x63, 0x64, 0x6b, 0x94, 0xd4, 0xed, 0x6b, 0xe8, 0x3e, 0x98, 0x6e, 0xf3, 0x5f, - 0x72, 0x21, 0x43, 0xcf, 0xc3, 0xa1, 0x58, 0x62, 0xd1, 0x49, 0x98, 0x25, 0xd7, 0xcc, 0x66, 0xc7, - 0x22, 0x42, 0xcf, 0x7c, 0x75, 0x8e, 0x4d, 0xe7, 0x9c, 0x84, 0x61, 0x85, 0xd5, 0x7f, 0x31, 0x95, - 0x58, 0x42, 0x66, 0x3e, 0xc8, 0x63, 0xf9, 0x0a, 0xe3, 0x44, 0xd8, 0x96, 0x65, 0x6f, 0x81, 0xe9, - 0x08, 0x05, 0xa3, 0x69, 0x8f, 0x60, 0x8f, 0x95, 0x20, 0xf4, 0x1a, 0xe4, 0xa5, 0x19, 0x90, 0x60, - 0x75, 0xcf, 0x4f, 0x28, 0x55, 0xda, 0x57, 0xf5, 0xb0, 0x14, 0x9b, 0x3f, 0x1b, 0x08, 0xc0, 0xa1, - 0x2c, 0x54, 0x87, 0x42, 0xdb, 0xb5, 0x6a, 0xa4, 0x49, 0x4c, 0xdf, 0xa5, 0xf2, 0xac, 0x7c, 0x6e, - 0x8f, 0x36, 0x63, 0x6c, 0x92, 0x66, 0x30, 0xb4, 0x3a, 0xcf, 0xdc, 0xdb, 0x5a, 0xc8, 0x0b, 0x47, - 0x19, 0x23, 0x0a, 0xf3, 0x4c, 0x6d, 0xdb, 0x24, 0x4a, 0x56, 0x6e, 0x7c, 0x59, 0x47, 0x58, 0x00, - 0xa9, 0xc5, 0xf9, 0xe1, 0xa4, 0x00, 0xf4, 0x18, 0x14, 0x25, 0x68, 0xd5, 0x6d, 0x19, 0xb6, 0x23, - 0xf3, 0xbe, 0x63, 0x72, 0x41, 0x8a, 0xb5, 0x28, 0x12, 0xc7, 0x69, 0xd1, 0x8f, 0x34, 0x38, 0x62, - 0x0d, 0xe6, 0x52, 0x3c, 0x8a, 0x4d, 0x66, 0x12, 0x21, 0xb3, 0xea, 0xdd, 0x52, 0x95, 0x61, 0x59, - 0x1b, 0x1e, 0x26, 0x5e, 0x7f, 0x3d, 0x93, 0x38, 0x1d, 0xc2, 0x0f, 0xa1, 0x1f, 0x6a, 0x70, 0x58, - 0x95, 0x0e, 0xc4, 0x12, 0x50, 0xe9, 0x02, 0x2e, 0xec, 0x49, 0x59, 0x35, 0x3a, 0x54, 0x79, 0x25, - 0xc9, 0xb0, 0x7a, 0x97, 0x54, 0xf8, 0xf0, 0x00, 0x0a, 0x0f, 0x8a, 0x47, 0xcf, 0x43, 0xde, 0xf3, - 0x0d, 0xea, 0xaf, 0xdb, 0xad, 0x20, 0xf3, 0xfb, 0xec, 0xde, 0xb6, 0x9b, 0x8d, 0x10, 0xf1, 0xaf, - 0x16, 0x30, 0xc0, 0x21, 0x2f, 0xfd, 0x9f, 0x1a, 0x1c, 0x57, 0xab, 0xb0, 0x41, 0x1c, 0xcb, 0xa5, - 0x41, 0xf8, 0xbd, 0xfd, 0x01, 0xcc, 0x89, 0x05, 0xb0, 0x8b, 0x13, 0x58, 0x42, 0x4c, 0xf3, 0xb4, - 0x48, 0xa6, 0xff, 0x43, 0x83, 0x85, 0xe1, 0x43, 0xf6, 0xc1, 0xe5, 0xb7, 0xe2, 0x2e, 0xff, 0xd9, - 0x5b, 0x35, 0xdb, 0x14, 0xdf, 0xff, 0x56, 0xea, 0x5c, 0xb9, 0x6f, 0xbe, 0x06, 0xb9, 0x86, 0xd3, - 0xb2, 0xe5, 0x3c, 0x37, 0x46, 0x57, 0xe6, 0x19, 0xa7, 0x65, 0x0f, 0xe7, 0x1f, 0x39, 0x95, 0x6a, - 0x13, 0x18, 0x35, 0xe6, 0x12, 0xf5, 0xff, 0x65, 0xe0, 0xd3, 0x7b, 0x19, 0xcc, 0xaa, 0x40, 0x97, - 0x36, 0x0c, 0xc7, 0xfe, 0x06, 0x4f, 0x90, 0x65, 0xb0, 0x52, 0x55, 0xe0, 0x95, 0x08, 0x0e, 0xc7, - 0x28, 0x51, 0x05, 0xa0, 0xe5, 0x5a, 0xa4, 0x79, 0xc9, 0xf0, 0xcd, 0x20, 0x75, 0x3d, 0xc8, 0xeb, - 0x4d, 0x05, 0xc5, 0x11, 0x0a, 0xe4, 0xc0, 0x14, 0x4b, 0x65, 0x83, 0x22, 0xe6, 0xc2, 0x44, 0x2e, - 0x29, 0x9a, 0x5d, 0x87, 0x7b, 0xc3, 0xe0, 0x1e, 0x16, 0x62, 0xd0, 0x23, 0x30, 0x4b, 0x64, 0xa9, - 0x29, 0x33, 0xe2, 0x12, 0x0f, 0xac, 0x12, 0x76, 0x23, 0xf2, 0x1b, 0x2b, 0x4a, 0xb4, 0x02, 0x87, - 0xdb, 0x94, 0x70, 0x15, 0x58, 0xde, 0xe2, 0xb5, 0x0d, 0x93, 0x70, 0x47, 0x3c, 0x5b, 0x3d, 0xc6, - 0x1c, 0xc9, 0x5a, 0x12, 0x89, 0x07, 0xe9, 0xf5, 0x0d, 0x98, 0x5a, 0xa3, 0xee, 0xb5, 0x1e, 0x3a, - 0x0e, 0xd9, 0xab, 0xf8, 0xa2, 0x5c, 0xd4, 0x1c, 0x53, 0x13, 0x33, 0x40, 0x32, 0xe9, 0xce, 0xec, - 0x2d, 0xe9, 0xd6, 0x7f, 0x96, 0x01, 0xc0, 0xa4, 0xed, 0x7a, 0xb6, 0xef, 0xd2, 0x1e, 0x5a, 0x86, - 0x19, 0x4a, 0xda, 0x6e, 0x28, 0x41, 0x85, 0x8a, 0x90, 0xe8, 0x2a, 0xbe, 0x88, 0x03, 0xaa, 0x31, - 0xc5, 0xa2, 0x17, 0x60, 0xaa, 0xcd, 0xa6, 0x23, 0xc3, 0xed, 0x17, 0x47, 0xdf, 0x39, 0xbe, 0x1a, - 0xa2, 0x22, 0xe1, 0x3f, 0xb1, 0x60, 0x88, 0x4e, 0x41, 0x6e, 0xdb, 0x76, 0x2c, 0xb9, 0x3f, 0xf7, - 0x06, 0x86, 0xfc, 0x9c, 0xed, 0x58, 0x37, 0x76, 0xca, 0xc5, 0x2a, 0x35, 0x1c, 0x73, 0x6b, 0xdd, - 0x68, 0x30, 0x00, 0xe6, 0xa4, 0xac, 0x94, 0xa2, 0xa4, 0x2e, 0x63, 0xa3, 0x2a, 0xa5, 0x30, 0xa9, - 0x63, 0x06, 0xd7, 0x7f, 0x95, 0x81, 0x19, 0xec, 0x36, 0x9b, 0x6e, 0xc7, 0xdf, 0x07, 0xdf, 0xfa, - 0x72, 0xcc, 0xb7, 0x3e, 0x31, 0xfa, 0xc2, 0x48, 0x55, 0x53, 0xcb, 0x82, 0x46, 0xa2, 0x2c, 0x78, - 0x6a, 0x7c, 0x11, 0xbb, 0x17, 0x04, 0xef, 0x6a, 0x50, 0x90, 0x94, 0xfb, 0xe0, 0xa6, 0x5f, 0x8a, - 0xbb, 0xe9, 0x47, 0xc7, 0x9e, 0x55, 0x8a, 0x5f, 0xfe, 0x41, 0x46, 0xcd, 0x86, 0x3b, 0xe2, 0x36, - 0x00, 0x55, 0x47, 0x42, 0xce, 0xe7, 0xf1, 0x31, 0x84, 0x2a, 0x1e, 0xa1, 0x5d, 0x84, 0x30, 0x1c, - 0x91, 0x81, 0x9e, 0x82, 0x59, 0xcf, 0xa7, 0x86, 0x4f, 0x1a, 0x3d, 0x79, 0xce, 0x3e, 0x15, 0xac, - 0x47, 0x4d, 0xc2, 0x6f, 0xec, 0x94, 0xe7, 0xd5, 0xe6, 0x08, 0x10, 0x56, 0x83, 0xd0, 0x15, 0x38, - 0xe6, 0x6d, 0xdb, 0xed, 0xab, 0x8e, 0xd1, 0x35, 0xec, 0xa6, 0xb1, 0xd9, 0x24, 0xa2, 0x35, 0xc2, - 0x0d, 0x61, 0xb6, 0x7a, 0x57, 0x7f, 0xa7, 0x7c, 0xac, 0x36, 0x8c, 0x00, 0x0f, 0x1f, 0xa7, 0xbf, - 0x95, 0x81, 0x62, 0xcc, 0x16, 0xee, 0xcc, 0x24, 0xac, 0x0d, 0x33, 0xa2, 0xe7, 0x13, 0x18, 0xc7, - 0xb9, 0xb1, 0x8d, 0x43, 0x4c, 0x5c, 0x6a, 0xa1, 0x0a, 0x59, 0x01, 0xf5, 0x70, 0x20, 0x46, 0xff, - 0xa3, 0x06, 0x47, 0x86, 0x8c, 0x40, 0x4b, 0x90, 0xe3, 0xcd, 0x5a, 0x2d, 0xde, 0x95, 0xe1, 0x85, - 0x2d, 0xc7, 0xa4, 0x2c, 0x60, 0xe6, 0x63, 0x5d, 0x40, 0xfd, 0x97, 0x19, 0x98, 0x96, 0x2d, 0xcd, - 0xdb, 0xef, 0x00, 0x5f, 0x8a, 0x39, 0xc0, 0xc7, 0xc7, 0xed, 0xd0, 0xa6, 0xfa, 0xbf, 0x7a, 0xc2, - 0xff, 0x3d, 0x39, 0xb6, 0x84, 0xdd, 0xdd, 0x9f, 0x05, 0x79, 0xd5, 0x2b, 0x8e, 0x5d, 0x01, 0x68, - 0xa3, 0x5c, 0x01, 0x64, 0x76, 0xbf, 0x02, 0xd0, 0xff, 0xa0, 0x01, 0x08, 0x31, 0xfb, 0xe0, 0x63, - 0xbf, 0x1e, 0xf7, 0xb1, 0x67, 0xc6, 0x5d, 0xb9, 0x14, 0x17, 0xeb, 0xc3, 0x71, 0xd9, 0x47, 0x57, - 0x4e, 0x4f, 0x9e, 0x9b, 0xfb, 0x93, 0x69, 0x89, 0x5a, 0x10, 0x2c, 0xc0, 0x61, 0x42, 0xb2, 0x0c, - 0x79, 0x4a, 0xea, 0x84, 0x12, 0xc7, 0x0c, 0x9a, 0x48, 0xaa, 0xfe, 0xc7, 0x01, 0x02, 0x87, 0x34, - 0xfa, 0x47, 0x6a, 0x05, 0xb9, 0x5f, 0xbf, 0x5d, 0x3b, 0x85, 0xae, 0xc3, 0x9c, 0x72, 0xe6, 0xb6, - 0x6a, 0xbc, 0x9f, 0x9f, 0xc4, 0xbe, 0x23, 0xc1, 0xe3, 0x10, 0x4b, 0xad, 0x71, 0x84, 0x3f, 0x8e, - 0x49, 0xd3, 0xff, 0x9c, 0x81, 0xa3, 0xc3, 0x06, 0x26, 0xe2, 0xd8, 0xec, 0x3e, 0xc4, 0xb1, 0x97, - 0x20, 0x67, 0xd9, 0xbc, 0x8f, 0x90, 0x1d, 0xf3, 0x80, 0x53, 0x73, 0xd5, 0xf3, 0x59, 0x66, 0x1e, - 0x1e, 0xf0, 0x55, 0x9b, 0x7a, 0x98, 0xf3, 0x45, 0xaf, 0xc2, 0xb4, 0xb8, 0xc8, 0xe3, 0xf7, 0x4f, - 0x63, 0x5d, 0xb5, 0x84, 0x2b, 0x25, 0x0d, 0x36, 0x3c, 0xe4, 0xc2, 0x40, 0xa5, 0x04, 0xfd, 0xbb, - 0x1a, 0x1c, 0x4a, 0x12, 0x23, 0x1d, 0xa6, 0x79, 0x91, 0x22, 0xba, 0x67, 0xb2, 0xb3, 0xce, 0x4b, - 0x18, 0x0f, 0x4b, 0x0c, 0x3a, 0x09, 0xb3, 0xb6, 0x33, 0xd8, 0xa3, 0xbb, 0xe0, 0x04, 0x3d, 0xba, - 0x00, 0x1b, 0xeb, 0xe6, 0x65, 0x77, 0xed, 0xe6, 0xbd, 0x9d, 0x81, 0xb9, 0xa8, 0x6b, 0xba, 0x33, - 0xa3, 0xf1, 0xb7, 0xb5, 0xc4, 0x41, 0x18, 0xbb, 0xae, 0x1e, 0xee, 0x2c, 0xc2, 0x4a, 0x73, 0x97, - 0xe3, 0xf0, 0x65, 0x80, 0xd0, 0x8a, 0x58, 0x01, 0xe0, 0x51, 0x33, 0x79, 0x97, 0x52, 0xa3, 0x26, - 0x66, 0x70, 0x86, 0xb6, 0xbc, 0xe0, 0x4a, 0x42, 0xa1, 0x57, 0x3d, 0x1f, 0x33, 0xb8, 0xfe, 0x5b, - 0xb6, 0xec, 0x9d, 0x4d, 0x71, 0x65, 0xc2, 0x4e, 0xfa, 0xed, 0x8f, 0x91, 0x56, 0x2c, 0x46, 0x8e, - 0x63, 0xe0, 0x11, 0x7d, 0x53, 0x23, 0x65, 0x33, 0x11, 0x29, 0x57, 0x27, 0x94, 0xb3, 0x7b, 0xbc, - 0xfc, 0x0b, 0x3b, 0x4a, 0x11, 0xf2, 0x7d, 0x88, 0x67, 0x66, 0x3c, 0x9e, 0x3d, 0x39, 0xd9, 0xfc, - 0x52, 0xa2, 0xda, 0xf7, 0x72, 0x70, 0x3c, 0x4a, 0x16, 0xe9, 0x94, 0xdc, 0x3c, 0x1d, 0x3c, 0x05, - 0x05, 0x8b, 0xa8, 0xa1, 0x41, 0x8c, 0x61, 0xa5, 0xf5, 0x6a, 0x08, 0xc6, 0x51, 0x1a, 0x74, 0x1d, - 0xa6, 0x9b, 0xc6, 0x26, 0xf3, 0x3e, 0x22, 0xc2, 0xac, 0x4f, 0x36, 0xab, 0x50, 0x5d, 0xd1, 0x81, - 0xf6, 0xce, 0x39, 0x3e, 0xed, 0x85, 0xbb, 0x28, 0x80, 0x58, 0xca, 0x44, 0x8f, 0x03, 0x18, 0x56, - 0xcb, 0xe6, 0x9b, 0x1d, 0x3c, 0x4a, 0xb8, 0x87, 0xd9, 0xf1, 0x59, 0x05, 0xbd, 0x11, 0xfb, 0x87, - 0x23, 0xf4, 0xe8, 0x41, 0xc8, 0x31, 0xff, 0x28, 0x4b, 0xf1, 0x52, 0xb0, 0x20, 0xcc, 0x77, 0xde, - 0x60, 0x65, 0x4e, 0xcf, 0x31, 0xd9, 0x6f, 0xcc, 0xa9, 0xd0, 0x0b, 0xcc, 0x87, 0xfa, 0x84, 0x76, - 0x8d, 0xa6, 0x6c, 0x4a, 0x8f, 0x7a, 0x77, 0x2b, 0x7d, 0xae, 0xe0, 0x81, 0x15, 0x37, 0x54, 0x0e, - 0x1a, 0x4b, 0x33, 0xdc, 0xe1, 0xe6, 0x93, 0x9d, 0xa0, 0x85, 0x47, 0xa1, 0x10, 0x59, 0x0d, 0x74, - 0x28, 0x72, 0x19, 0x2b, 0xee, 0x5f, 0x8f, 0xc2, 0x54, 0xd7, 0x68, 0x76, 0x64, 0x0a, 0x82, 0xc5, - 0x9f, 0x2f, 0x65, 0xce, 0x68, 0xfa, 0x8f, 0xb3, 0x71, 0x3b, 0xaf, 0xc9, 0xa3, 0x26, 0x6a, 0x07, - 0x69, 0xe5, 0x13, 0x1e, 0x35, 0x51, 0x74, 0x84, 0x9b, 0x24, 0xcb, 0x38, 0x29, 0x03, 0x9d, 0x89, - 0x3c, 0x5f, 0x11, 0x26, 0x75, 0x4f, 0xf2, 0xf9, 0xca, 0x8d, 0xe1, 0x4f, 0x59, 0x96, 0x20, 0xd7, - 0x76, 0xa9, 0xa8, 0x18, 0x8b, 0x91, 0x6b, 0x65, 0x97, 0xfa, 0x98, 0x63, 0xc6, 0xec, 0x91, 0xbd, - 0xa1, 0x41, 0xd1, 0x8b, 0x4c, 0xc0, 0x2b, 0x4d, 0x8d, 0x1d, 0x15, 0x86, 0x1a, 0x6f, 0xe4, 0xce, - 0x23, 0x2a, 0x06, 0xc7, 0xa5, 0xea, 0xef, 0x69, 0x80, 0x06, 0x7d, 0xd6, 0x9d, 0x19, 0x48, 0x3f, - 0x13, 0x2f, 0x6b, 0xf3, 0xd5, 0xc2, 0xd0, 0x5a, 0xf4, 0x8d, 0xc4, 0x94, 0x04, 0x01, 0x72, 0x83, - 0x47, 0x17, 0xea, 0x36, 0x4a, 0x1b, 0xff, 0x36, 0x2a, 0xf2, 0xce, 0x42, 0x5d, 0x46, 0x25, 0xd8, - 0xf3, 0x22, 0x52, 0xca, 0xfe, 0x04, 0x14, 0x91, 0x72, 0x32, 0xb7, 0xb1, 0x88, 0x8c, 0xb5, 0x12, - 0xd2, 0x82, 0xe2, 0xbf, 0x35, 0x38, 0x91, 0xf2, 0xa2, 0x66, 0x1f, 0x56, 0xd1, 0x8d, 0xad, 0xe2, - 0xa5, 0x71, 0xe7, 0x38, 0xa0, 0x7a, 0xea, 0x45, 0xcf, 0xbf, 0x34, 0xb8, 0x3b, 0x65, 0xcc, 0x3e, - 0xa4, 0x03, 0x4e, 0x3c, 0x1d, 0xb8, 0x70, 0xcb, 0xe6, 0x9b, 0x92, 0x19, 0xfc, 0x6d, 0x3a, 0x75, - 0xb6, 0x3c, 0x28, 0x6c, 0xc1, 0x9c, 0x7c, 0xb1, 0x82, 0x89, 0xaf, 0x9a, 0x8c, 0xa3, 0xc6, 0x38, - 0x95, 0x0e, 0xaf, 0x44, 0x78, 0xe1, 0x18, 0x67, 0xf4, 0x55, 0x98, 0xf1, 0xed, 0x16, 0x71, 0x3b, - 0xbe, 0xdc, 0xeb, 0x51, 0x85, 0x84, 0xad, 0x30, 0xc1, 0x06, 0x07, 0xfc, 0x62, 0xb1, 0x26, 0x3b, - 0x56, 0xac, 0xc9, 0xed, 0x29, 0xd6, 0x4c, 0xed, 0x39, 0xd6, 0x5c, 0x85, 0x13, 0x6d, 0x5e, 0xfe, - 0x53, 0x62, 0x5d, 0x26, 0x3e, 0xdb, 0x53, 0x59, 0xac, 0xcb, 0x67, 0x8e, 0x77, 0xf7, 0x77, 0xca, - 0x27, 0xd6, 0x86, 0x93, 0xe0, 0xb4, 0xb1, 0xa2, 0xa2, 0xf3, 0x88, 0xd9, 0xa1, 0x84, 0x17, 0x9e, - 0xb3, 0x41, 0x76, 0x21, 0x60, 0x58, 0x61, 0x51, 0x05, 0xc0, 0xdb, 0xb6, 0xdb, 0x1b, 0x84, 0xda, - 0x75, 0x51, 0x72, 0xcf, 0x8a, 0x6b, 0xae, 0x9a, 0x82, 0xe2, 0x08, 0x05, 0x7a, 0x00, 0xf2, 0xb2, - 0x1a, 0xbc, 0x5c, 0x2b, 0xe5, 0x39, 0x39, 0xbf, 0x18, 0xbe, 0x10, 0x00, 0x71, 0x88, 0x47, 0x4f, - 0xc0, 0xbc, 0xdb, 0x26, 0x62, 0x5b, 0x9e, 0xb7, 0xfd, 0xad, 0xcb, 0xb5, 0x12, 0xf0, 0x21, 0xfc, - 0xc5, 0xc0, 0x95, 0x38, 0x0a, 0x27, 0x69, 0xd1, 0x79, 0x40, 0x1d, 0x8f, 0x28, 0x32, 0x4c, 0x5a, - 0x6e, 0x97, 0x94, 0x0a, 0x9c, 0x03, 0x7f, 0x57, 0x75, 0x75, 0x00, 0x8b, 0x87, 0x8c, 0x40, 0x6b, - 0x30, 0x6f, 0xba, 0xad, 0x96, 0xed, 0xaf, 0x18, 0x8e, 0x65, 0x5b, 0x2c, 0x19, 0x9c, 0xe3, 0x8b, - 0x7b, 0x9f, 0x78, 0xf9, 0x16, 0x43, 0xdd, 0x18, 0x04, 0xe1, 0xe4, 0x70, 0xb6, 0x6a, 0x22, 0xa2, - 0xf0, 0xe7, 0x41, 0xc5, 0xf0, 0x72, 0x70, 0x5d, 0x41, 0x71, 0x84, 0x82, 0x77, 0xc6, 0x04, 0xea, - 0x13, 0xd1, 0x19, 0x93, 0x29, 0xdb, 0x70, 0x4f, 0xf1, 0x1f, 0x0d, 0x8a, 0xb1, 0xf7, 0x96, 0xfb, - 0xf2, 0xc6, 0xee, 0x19, 0x9e, 0xf4, 0xc4, 0x1d, 0x93, 0x3c, 0xc3, 0xd1, 0x4c, 0x25, 0x4e, 0x80, - 0x07, 0xc7, 0xb0, 0x2a, 0xc6, 0xeb, 0x39, 0x66, 0xc0, 0x22, 0x17, 0x56, 0x31, 0xb5, 0x10, 0x8c, - 0xa3, 0x34, 0xbc, 0x2b, 0x17, 0xc6, 0xe0, 0xd1, 0xbb, 0x72, 0xc1, 0x93, 0xb3, 0xcc, 0x4d, 0x9e, - 0x9c, 0x5d, 0x87, 0xa2, 0x1f, 0x5d, 0xd8, 0xf1, 0x2f, 0xc5, 0xe2, 0xef, 0x61, 0x55, 0xba, 0x19, - 0x03, 0xe3, 0xb8, 0x30, 0xfd, 0xed, 0x2c, 0xcc, 0xc5, 0x2e, 0x08, 0xee, 0xc8, 0x44, 0xf3, 0x1a, - 0x14, 0xad, 0xe8, 0xf3, 0x77, 0x19, 0x23, 0x26, 0x79, 0xfc, 0xc6, 0xd8, 0xc8, 0x07, 0xd4, 0x51, - 0x10, 0x8e, 0x0b, 0x42, 0x6f, 0x6a, 0x70, 0xb0, 0xe3, 0x11, 0x4b, 0x35, 0x6e, 0x83, 0x7c, 0xeb, - 0xe2, 0x64, 0xf9, 0xd6, 0xd5, 0x18, 0x4f, 0x91, 0xbe, 0xc6, 0x61, 0x38, 0x21, 0x57, 0xff, 0x79, - 0x16, 0x16, 0xd2, 0x59, 0xa0, 0x1a, 0x1c, 0xf3, 0xc4, 0x01, 0x22, 0x9e, 0xdb, 0xa1, 0x26, 0x09, - 0x42, 0x8a, 0x16, 0xbb, 0x87, 0x3e, 0x56, 0x1b, 0x46, 0x84, 0x87, 0x8f, 0x45, 0x2f, 0x42, 0x49, - 0x9d, 0xc6, 0x24, 0x5f, 0x61, 0xd8, 0xe1, 0xb3, 0x6b, 0x75, 0x80, 0x13, 0xac, 0x53, 0x39, 0x20, - 0x1f, 0x96, 0x06, 0x8e, 0x6a, 0x52, 0x8a, 0x38, 0xed, 0x27, 0xa5, 0x94, 0xa5, 0x95, 0x9b, 0xd0, - 0xe3, 0x9b, 0x72, 0x44, 0x9b, 0xb0, 0x10, 0x39, 0xe7, 0x49, 0x79, 0xc2, 0x35, 0xe8, 0x52, 0xde, - 0x42, 0x2d, 0x95, 0x12, 0xef, 0xc2, 0x45, 0xff, 0x40, 0x83, 0xc3, 0x72, 0xaf, 0x42, 0xa2, 0x7d, - 0xc8, 0x97, 0xed, 0x58, 0xbe, 0xfc, 0xcc, 0xd8, 0x36, 0x1a, 0x2a, 0x9d, 0x9a, 0x29, 0xff, 0x5d, - 0x83, 0x63, 0x03, 0xd4, 0xfb, 0x10, 0xe8, 0xb6, 0xe2, 0x81, 0x6e, 0xe5, 0x16, 0xcc, 0x31, 0x25, - 0xe6, 0xbd, 0x9e, 0x19, 0x32, 0xc3, 0x20, 0x18, 0x74, 0x8d, 0xa6, 0x48, 0x2a, 0x34, 0x9e, 0x99, - 0x28, 0x8d, 0x37, 0x24, 0x1c, 0x2b, 0x0a, 0x74, 0x1f, 0x4c, 0x6f, 0x76, 0xea, 0x75, 0xf9, 0xed, - 0x4d, 0x36, 0x2c, 0xb5, 0xaa, 0x1c, 0x8a, 0x25, 0x96, 0x05, 0x8d, 0xd7, 0x5c, 0xba, 0x4d, 0xa8, - 0xf0, 0x31, 0xd9, 0x30, 0x68, 0x3c, 0x2f, 0xc0, 0x38, 0xc0, 0xf3, 0x7d, 0xee, 0x39, 0x66, 0x29, - 0xc7, 0xd7, 0xe0, 0x96, 0xec, 0x73, 0xcf, 0x89, 0xee, 0x73, 0xcf, 0x61, 0xfb, 0xdc, 0x73, 0x4c, - 0xfd, 0xbf, 0x43, 0x57, 0xa1, 0xe7, 0x98, 0x7b, 0x68, 0x1e, 0xde, 0xce, 0x36, 0x8f, 0xea, 0x90, - 0xe5, 0x86, 0x77, 0xc8, 0x46, 0x6c, 0xe5, 0x45, 0x33, 0xf9, 0xe9, 0x3d, 0x67, 0xf2, 0x2f, 0x46, - 0x1a, 0x80, 0x33, 0x63, 0xd5, 0x2d, 0xca, 0x70, 0x06, 0x9b, 0x80, 0xfa, 0xef, 0xb2, 0x90, 0xf8, - 0x76, 0x04, 0x9d, 0x81, 0x39, 0xb6, 0xb2, 0xea, 0x3b, 0x95, 0xc4, 0xd3, 0xb6, 0xcb, 0x11, 0x1c, - 0x8e, 0x51, 0xb2, 0x48, 0x56, 0x30, 0x1c, 0xc7, 0xf5, 0x0d, 0xd1, 0xde, 0x12, 0xc7, 0xe7, 0x2b, - 0x93, 0x7e, 0xe1, 0x52, 0x39, 0x1b, 0xf2, 0x14, 0x8d, 0x59, 0x95, 0x03, 0x46, 0x30, 0x38, 0x2a, - 0x1a, 0xf9, 0x89, 0x06, 0xf1, 0xc5, 0x89, 0x95, 0xd8, 0x43, 0x63, 0x78, 0xe1, 0x49, 0x38, 0x94, - 0xd4, 0x75, 0x94, 0xb6, 0xe9, 0x24, 0x1d, 0xd7, 0x5f, 0x67, 0x20, 0xcf, 0xce, 0x30, 0x7f, 0x49, - 0xb7, 0x0f, 0x61, 0xc0, 0x88, 0x85, 0x81, 0x31, 0xd2, 0x24, 0xa5, 0x6c, 0x6a, 0xff, 0xc9, 0x4e, - 0xf4, 0x9f, 0xce, 0x4e, 0x22, 0x64, 0xf7, 0x16, 0xd4, 0x9f, 0x34, 0x28, 0x2a, 0xda, 0x7d, 0x88, - 0x30, 0xaf, 0xc4, 0x23, 0xcc, 0x63, 0x13, 0xcc, 0x2c, 0x25, 0xb2, 0x7c, 0x2b, 0x3a, 0xa3, 0x8f, - 0xe7, 0x31, 0x97, 0xfe, 0x66, 0x06, 0xe6, 0x13, 0x3b, 0x70, 0x67, 0x26, 0xff, 0x0f, 0xc9, 0xf7, - 0x94, 0x22, 0x80, 0xdc, 0x75, 0xb3, 0xb7, 0x94, 0xfc, 0xc2, 0xaa, 0xdd, 0x74, 0x7b, 0x3c, 0x3b, - 0x0e, 0xbe, 0x60, 0x15, 0x17, 0x56, 0x0a, 0x8c, 0xa3, 0x34, 0xd5, 0x8d, 0x77, 0x3e, 0x5c, 0x3c, - 0xf0, 0xde, 0x87, 0x8b, 0x07, 0xde, 0xff, 0x70, 0xf1, 0xc0, 0x37, 0xfb, 0x8b, 0xda, 0x3b, 0xfd, - 0x45, 0xed, 0xbd, 0xfe, 0xa2, 0xf6, 0x7e, 0x7f, 0x51, 0xfb, 0xa0, 0xbf, 0xa8, 0x7d, 0xff, 0xa3, - 0xc5, 0x03, 0x5f, 0x7b, 0x78, 0xd4, 0xaf, 0x9b, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x04, 0xb4, - 0xca, 0x6d, 0x10, 0x3d, 0x00, 0x00, -} - -func (m *DiscoveryInfo) Marshal() (dAtA []byte, err error) { +func (m *DiscoveryVendorProfileSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1844,64 +709,30 @@ func (m *DiscoveryInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *DiscoveryVendorProfileSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DiscoveryVendorProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.SupportedEncodings) > 0 { - for iNdEx := len(m.SupportedEncodings) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SupportedEncodings[iNdEx]) - copy(dAtA[i:], m.SupportedEncodings[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SupportedEncodings[iNdEx]))) - i-- - dAtA[i] = 0x42 + { + size, err := m.Gnmi.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.SerialNumber) - copy(dAtA[i:], m.SerialNumber) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SerialNumber))) - i-- - dAtA[i] = 0x3a - i -= len(m.MacAddress) - copy(dAtA[i:], m.MacAddress) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MacAddress))) - i-- - dAtA[i] = 0x32 - i -= len(m.Platform) - copy(dAtA[i:], m.Platform) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Platform))) - i-- - dAtA[i] = 0x2a - i -= len(m.HostName) - copy(dAtA[i:], m.HostName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostName))) - i-- - dAtA[i] = 0x22 - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - i -= len(m.Provider) - copy(dAtA[i:], m.Provider) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) - i-- - dAtA[i] = 0x12 - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryParameters) Marshal() (dAtA []byte, err error) { +func (m *GnmiDiscoveryVendorProfileParameters) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1911,45 +742,37 @@ func (m *DiscoveryParameters) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryParameters) MarshalTo(dAtA []byte) (int, error) { +func (m *GnmiDiscoveryVendorProfileParameters) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GnmiDiscoveryVendorProfileParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ConcurrentScans)) - i-- - dAtA[i] = 0x30 - { - size, err := m.Period.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.PreserveNamespace != nil { + i-- + if *m.PreserveNamespace { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x28 } - i-- - dAtA[i] = 0x2a - if m.TargetTemplate != nil { - { - size, err := m.TargetTemplate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if m.Encoding != nil { + i -= len(*m.Encoding) + copy(dAtA[i:], *m.Encoding) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) i-- dAtA[i] = 0x22 } - if len(m.TargetConnectionProfiles) > 0 { - for iNdEx := len(m.TargetConnectionProfiles) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TargetConnectionProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Paths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1960,34 +783,22 @@ func (m *DiscoveryParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - if m.DiscoveryProfile != nil { - { - size, err := m.DiscoveryProfile.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if m.ModelMatch != nil { + i -= len(*m.ModelMatch) + copy(dAtA[i:], *m.ModelMatch) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ModelMatch))) i-- dAtA[i] = 0x12 } - if m.DefaultSchema != nil { - { - size, err := m.DefaultSchema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + i -= len(m.Organization) + copy(dAtA[i:], m.Organization) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Organization))) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryPathDefinition) Marshal() (dAtA []byte, err error) { +func (m *Proxy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1997,44 +808,30 @@ func (m *DiscoveryPathDefinition) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryPathDefinition) MarshalTo(dAtA []byte) (int, error) { +func (m *Proxy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryPathDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Proxy) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Regex != nil { - i -= len(*m.Regex) - copy(dAtA[i:], *m.Regex) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Regex))) - i-- - dAtA[i] = 0x22 - } - if m.Script != nil { - i -= len(*m.Script) - copy(dAtA[i:], *m.Script) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Script))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i -= len(m.Credentials) + copy(dAtA[i:], m.Credentials) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) i-- dAtA[i] = 0x12 - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i -= len(m.URL) + copy(dAtA[i:], m.URL) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryProfile) Marshal() (dAtA []byte, err error) { +func (m *Repository) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2044,41 +841,52 @@ func (m *DiscoveryProfile) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryProfile) MarshalTo(dAtA []byte) (int, error) { +func (m *Repository) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Repository) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.ConnectionProfiles) > 0 { - for iNdEx := len(m.ConnectionProfiles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConnectionProfiles[iNdEx]) - copy(dAtA[i:], m.ConnectionProfiles[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfiles[iNdEx]))) - i-- - dAtA[i] = 0x1a + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x2a + i -= len(m.Kind) + copy(dAtA[i:], m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i-- + dAtA[i] = 0x22 + if m.Proxy != nil { + { + size, err := m.Proxy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - } - if m.TLSSecret != nil { - i -= len(*m.TLSSecret) - copy(dAtA[i:], *m.TLSSecret) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TLSSecret))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } i -= len(m.Credentials) copy(dAtA[i:], m.Credentials) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) i-- + dAtA[i] = 0x12 + i -= len(m.RepoURL) + copy(dAtA[i:], m.RepoURL) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.RepoURL))) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryRule) Marshal() (dAtA []byte, err error) { +func (m *Rollout) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2088,12 +896,12 @@ func (m *DiscoveryRule) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryRule) MarshalTo(dAtA []byte) (int, error) { +func (m *Rollout) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Rollout) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2131,40 +939,7 @@ func (m *DiscoveryRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiscoveryRuleAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DiscoveryRuleAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DiscoveryRuleAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.HostName) - copy(dAtA[i:], m.HostName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostName))) - i-- - dAtA[i] = 0x12 - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DiscoveryRuleList) Marshal() (dAtA []byte, err error) { +func (m *RolloutList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2174,12 +949,12 @@ func (m *DiscoveryRuleList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryRuleList) MarshalTo(dAtA []byte) (int, error) { +func (m *RolloutList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RolloutList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2211,7 +986,7 @@ func (m *DiscoveryRuleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *DiscoveryRulePrefix) Marshal() (dAtA []byte, err error) { +func (m *RolloutSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2221,34 +996,45 @@ func (m *DiscoveryRulePrefix) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryRulePrefix) MarshalTo(dAtA []byte) (int, error) { +func (m *RolloutSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryRulePrefix) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RolloutSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Excludes) > 0 { - for iNdEx := len(m.Excludes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Excludes[iNdEx]) - copy(dAtA[i:], m.Excludes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Excludes[iNdEx]))) - i-- - dAtA[i] = 0x12 + if m.SkipUnavailableTarget != nil { + i-- + if *m.SkipUnavailableTarget { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + i -= len(m.Strategy) + copy(dAtA[i:], m.Strategy) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) + i-- + dAtA[i] = 0x12 + { + size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.Prefix) - copy(dAtA[i:], m.Prefix) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Prefix))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryRuleSpec) Marshal() (dAtA []byte, err error) { +func (m *RolloutStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2258,59 +1044,20 @@ func (m *DiscoveryRuleSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryRuleSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *RolloutStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RolloutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.DiscoveryParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - i -= len(m.ServiceDomain) - copy(dAtA[i:], m.ServiceDomain) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceDomain))) - i-- - dAtA[i] = 0x2a - if m.ServiceSelector != nil { - { - size, err := m.ServiceSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.PodSelector != nil { - { - size, err := m.PodSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Targets) > 0 { + for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Targets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2321,24 +1068,20 @@ func (m *DiscoveryRuleSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if len(m.Prefixes) > 0 { - for iNdEx := len(m.Prefixes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Prefixes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryRuleStatus) Marshal() (dAtA []byte, err error) { +func (m *RolloutTargetStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2348,28 +1091,16 @@ func (m *DiscoveryRuleStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryRuleStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *RolloutTargetStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryRuleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RolloutTargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.StartTime != nil { - { - size, err := m.StartTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } { size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -2379,11 +1110,16 @@ func (m *DiscoveryRuleStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DiscoveryVendorProfile) Marshal() (dAtA []byte, err error) { +func (m *Schema) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2393,16 +1129,26 @@ func (m *DiscoveryVendorProfile) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryVendorProfile) MarshalTo(dAtA []byte) (int, error) { +func (m *Schema) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryVendorProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -2426,7 +1172,7 @@ func (m *DiscoveryVendorProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *DiscoveryVendorProfileList) Marshal() (dAtA []byte, err error) { +func (m *SchemaKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2436,12 +1182,45 @@ func (m *DiscoveryVendorProfileList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryVendorProfileList) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaKey) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryVendorProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *SchemaList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SchemaList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SchemaList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2473,7 +1252,7 @@ func (m *DiscoveryVendorProfileList) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *DiscoveryVendorProfileSpec) Marshal() (dAtA []byte, err error) { +func (m *SchemaRepositoryStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2483,30 +1262,30 @@ func (m *DiscoveryVendorProfileSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DiscoveryVendorProfileSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaRepositoryStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DiscoveryVendorProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaRepositoryStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Gnmi.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Reference) + copy(dAtA[i:], m.Reference) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reference))) + i-- + dAtA[i] = 0x12 + i -= len(m.RepoURL) + copy(dAtA[i:], m.RepoURL) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.RepoURL))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *GnmiDiscoveryVendorProfileParameters) Marshal() (dAtA []byte, err error) { +func (m *SchemaSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2516,37 +1295,20 @@ func (m *GnmiDiscoveryVendorProfileParameters) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *GnmiDiscoveryVendorProfileParameters) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GnmiDiscoveryVendorProfileParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.PreserveNamespace != nil { - i-- - if *m.PreserveNamespace { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Encoding != nil { - i -= len(*m.Encoding) - copy(dAtA[i:], *m.Encoding) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) - i-- - dAtA[i] = 0x22 - } - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Repositories) > 0 { + for iNdEx := len(m.Repositories) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Paths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Repositories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2557,22 +1319,20 @@ func (m *GnmiDiscoveryVendorProfileParameters) MarshalToSizedBuffer(dAtA []byte) dAtA[i] = 0x1a } } - if m.ModelMatch != nil { - i -= len(*m.ModelMatch) - copy(dAtA[i:], *m.ModelMatch) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ModelMatch))) - i-- - dAtA[i] = 0x12 - } - i -= len(m.Organization) - copy(dAtA[i:], m.Organization) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Organization))) + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + i -= len(m.Provider) + copy(dAtA[i:], m.Provider) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *Proxy) Marshal() (dAtA []byte, err error) { +func (m *SchemaSpecRepository) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2582,30 +1342,54 @@ func (m *Proxy) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Proxy) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaSpecRepository) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Proxy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaSpecRepository) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Credentials) - copy(dAtA[i:], m.Credentials) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) + { + size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x12 - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) + dAtA[i] = 0x42 + { + size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0xa + dAtA[i] = 0x3a + if len(m.Dirs) > 0 { + for iNdEx := len(m.Dirs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Dirs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } return len(dAtA) - i, nil } -func (m *Repository) Marshal() (dAtA []byte, err error) { +func (m *SchemaSpecSchema) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2615,52 +1399,47 @@ func (m *Repository) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Repository) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaSpecSchema) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Repository) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaSpecSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Ref) - copy(dAtA[i:], m.Ref) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Ref))) - i-- - dAtA[i] = 0x2a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x22 - if m.Proxy != nil { - { - size, err := m.Proxy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if len(m.Excludes) > 0 { + for iNdEx := len(m.Excludes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Excludes[iNdEx]) + copy(dAtA[i:], m.Excludes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Excludes[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Includes) > 0 { + for iNdEx := len(m.Includes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Includes[iNdEx]) + copy(dAtA[i:], m.Includes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Includes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Models) > 0 { + for iNdEx := len(m.Models) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Models[iNdEx]) + copy(dAtA[i:], m.Models[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Models[iNdEx]))) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x1a } - i -= len(m.Credentials) - copy(dAtA[i:], m.Credentials) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) - i-- - dAtA[i] = 0x12 - i -= len(m.RepositoryURL) - copy(dAtA[i:], m.RepositoryURL) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RepositoryURL))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *Rollout) Marshal() (dAtA []byte, err error) { +func (m *SchemaStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2670,38 +1449,32 @@ func (m *Rollout) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Rollout) MarshalTo(dAtA []byte) (int, error) { +func (m *SchemaStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Rollout) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SchemaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Repositories) > 0 { + for iNdEx := len(m.Repositories) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Repositories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2713,7 +1486,7 @@ func (m *Rollout) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RolloutList) Marshal() (dAtA []byte, err error) { +func (m *SrcDstPath) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2723,44 +1496,30 @@ func (m *RolloutList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RolloutList) MarshalTo(dAtA []byte) (int, error) { +func (m *SrcDstPath) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RolloutList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SrcDstPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Dst) + copy(dAtA[i:], m.Dst) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Dst))) + i-- + dAtA[i] = 0x12 + i -= len(m.Src) + copy(dAtA[i:], m.Src) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Src))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *RolloutSpec) Marshal() (dAtA []byte, err error) { +func (m *Subscription) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2770,33 +1529,38 @@ func (m *RolloutSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RolloutSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *Subscription) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RolloutSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.SkipUnavailableTarget != nil { - i-- - if *m.SkipUnavailableTarget { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x18 + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.Strategy) - copy(dAtA[i:], m.Strategy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) i-- dAtA[i] = 0x12 { - size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2808,7 +1572,7 @@ func (m *RolloutSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RolloutStatus) Marshal() (dAtA []byte, err error) { +func (m *SubscriptionList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2818,20 +1582,20 @@ func (m *RolloutStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RolloutStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *SubscriptionList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RolloutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SubscriptionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Targets) > 0 { - for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Targets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2843,7 +1607,7 @@ func (m *RolloutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2855,7 +1619,7 @@ func (m *RolloutStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RolloutTargetStatus) Marshal() (dAtA []byte, err error) { +func (m *SubscriptionParameters) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2865,26 +1629,80 @@ func (m *RolloutTargetStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RolloutTargetStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *SubscriptionParameters) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RolloutTargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SubscriptionParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Paths[iNdEx]) + copy(dAtA[i:], m.Paths[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Paths[iNdEx]))) + i-- + dAtA[i] = 0x3a } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } + if m.Interval != nil { + { + size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + i -= len(m.Mode) + copy(dAtA[i:], m.Mode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x2a + if m.AdminState != nil { + i -= len(*m.AdminState) + copy(dAtA[i:], *m.AdminState) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.AdminState))) + i-- + dAtA[i] = 0x22 + } + if len(m.Labels) > 0 { + keysForLabels := make([]string, 0, len(m.Labels)) + for k := range m.Labels { + keysForLabels = append(keysForLabels, string(k)) + } + sort.Strings(keysForLabels) + for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { + v := m.Labels[string(keysForLabels[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForLabels[iNdEx]) + copy(dAtA[i:], keysForLabels[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForLabels[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if m.Description != nil { + i -= len(*m.Description) + copy(dAtA[i:], *m.Description) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Description))) + i-- + dAtA[i] = 0x12 + } i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) @@ -2893,7 +1711,7 @@ func (m *RolloutTargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Schema) Marshal() (dAtA []byte, err error) { +func (m *SubscriptionSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2903,38 +1721,47 @@ func (m *Schema) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Schema) MarshalTo(dAtA []byte) (int, error) { +func (m *SubscriptionSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SubscriptionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Subscriptions) > 0 { + for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.Encoding != nil { + i -= len(*m.Encoding) + copy(dAtA[i:], *m.Encoding) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) + i-- + dAtA[i] = 0x22 } + i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x18 + i -= len(m.Protocol) + copy(dAtA[i:], m.Protocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) i-- dAtA[i] = 0x12 { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2946,40 +1773,7 @@ func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SchemaKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SchemaKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SchemaKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - i -= len(m.Provider) - copy(dAtA[i:], m.Provider) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SchemaList) Marshal() (dAtA []byte, err error) { +func (m *SubscriptionStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2989,32 +1783,27 @@ func (m *SchemaList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SchemaList) MarshalTo(dAtA []byte) (int, error) { +func (m *SubscriptionStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SubscriptionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if len(m.Targets) > 0 { + for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Targets[iNdEx]) + copy(dAtA[i:], m.Targets[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Targets[iNdEx]))) i-- dAtA[i] = 0x12 } } { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3026,7 +1815,7 @@ func (m *SchemaList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SchemaRepositoryStatus) Marshal() (dAtA []byte, err error) { +func (m *SubscriptionTarget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3036,77 +1825,32 @@ func (m *SchemaRepositoryStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SchemaRepositoryStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SchemaRepositoryStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Reference) - copy(dAtA[i:], m.Reference) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reference))) - i-- - dAtA[i] = 0x12 - i -= len(m.RepoURL) - copy(dAtA[i:], m.RepoURL) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RepoURL))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SchemaSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SchemaSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *SubscriptionTarget) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *SubscriptionTarget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Repositories) > 0 { - for iNdEx := len(m.Repositories) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Repositories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.TargetSelector != nil { + { + size, err := m.TargetSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa } - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - i -= len(m.Provider) - copy(dAtA[i:], m.Provider) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *SchemaSpecRepository) Marshal() (dAtA []byte, err error) { +func (m *TargetConnectionProfile) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3116,18 +1860,18 @@ func (m *SchemaSpecRepository) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SchemaSpecRepository) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetConnectionProfile) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaSpecRepository) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetConnectionProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3135,9 +1879,9 @@ func (m *SchemaSpecRepository) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 + dAtA[i] = 0x12 { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3145,25 +1889,11 @@ func (m *SchemaSpecRepository) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a - if len(m.Dirs) > 0 { - for iNdEx := len(m.Dirs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Dirs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *SchemaSpecSchema) Marshal() (dAtA []byte, err error) { +func (m *TargetConnectionProfileList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3173,47 +1903,44 @@ func (m *SchemaSpecSchema) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SchemaSpecSchema) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetConnectionProfileList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaSpecSchema) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetConnectionProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Excludes) > 0 { - for iNdEx := len(m.Excludes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Excludes[iNdEx]) - copy(dAtA[i:], m.Excludes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Excludes[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Includes) > 0 { - for iNdEx := len(m.Includes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Includes[iNdEx]) - copy(dAtA[i:], m.Includes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Includes[iNdEx]))) + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } } - if len(m.Models) > 0 { - for iNdEx := len(m.Models) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Models[iNdEx]) - copy(dAtA[i:], m.Models[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Models[iNdEx]))) - i-- - dAtA[i] = 0xa + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *SchemaStatus) Marshal() (dAtA []byte, err error) { +func (m *TargetConnectionProfileSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3223,32 +1950,114 @@ func (m *SchemaStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SchemaStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetConnectionProfileSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SchemaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetConnectionProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Repositories) > 0 { - for iNdEx := len(m.Repositories) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Repositories[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if m.TargetName != nil { + i -= len(*m.TargetName) + copy(dAtA[i:], *m.TargetName) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TargetName))) + i-- + dAtA[i] = 0x6a + } + if m.CommitCandidate != nil { + i -= len(*m.CommitCandidate) + copy(dAtA[i:], *m.CommitCandidate) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CommitCandidate))) + i-- + dAtA[i] = 0x62 + } + if m.UseOperationRemove != nil { + i-- + if *m.UseOperationRemove { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.OperationWithNS != nil { + i-- + if *m.OperationWithNS { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.IncludeNS != nil { + i-- + if *m.IncludeNS { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.SkipVerify != nil { + i-- + if *m.SkipVerify { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.Insecure != nil { + i-- + if *m.Insecure { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.PreferredNetconfVersion != nil { + i -= len(*m.PreferredNetconfVersion) + copy(dAtA[i:], *m.PreferredNetconfVersion) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreferredNetconfVersion))) + i-- + dAtA[i] = 0x32 + } + if m.Encoding != nil { + i -= len(*m.Encoding) + copy(dAtA[i:], *m.Encoding) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) + i-- + dAtA[i] = 0x2a + } + i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) + i-- + dAtA[i] = 0x20 + i -= len(m.Protocol) + copy(dAtA[i:], m.Protocol) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) + i-- + dAtA[i] = 0x1a + { + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ConnectRetry.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3260,7 +2069,7 @@ func (m *SchemaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SrcDstPath) Marshal() (dAtA []byte, err error) { +func (m *TargetProfile) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3270,30 +2079,44 @@ func (m *SrcDstPath) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SrcDstPath) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetProfile) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SrcDstPath) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Dst) - copy(dAtA[i:], m.Dst) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Dst))) + if m.SyncProfile != nil { + i -= len(*m.SyncProfile) + copy(dAtA[i:], *m.SyncProfile) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SyncProfile))) + i-- + dAtA[i] = 0x22 + } + i -= len(m.ConnectionProfile) + copy(dAtA[i:], m.ConnectionProfile) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfile))) i-- - dAtA[i] = 0x12 - i -= len(m.Src) - copy(dAtA[i:], m.Src) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Src))) + dAtA[i] = 0x1a + if m.TLSSecret != nil { + i -= len(*m.TLSSecret) + copy(dAtA[i:], *m.TLSSecret) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TLSSecret))) + i-- + dAtA[i] = 0x12 + } + i -= len(m.Credentials) + copy(dAtA[i:], m.Credentials) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *Subscription) Marshal() (dAtA []byte, err error) { +func (m *TargetSyncProfile) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3303,26 +2126,16 @@ func (m *Subscription) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Subscription) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetSyncProfile) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetSyncProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3346,7 +2159,7 @@ func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SubscriptionList) Marshal() (dAtA []byte, err error) { +func (m *TargetSyncProfileList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3356,12 +2169,12 @@ func (m *SubscriptionList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubscriptionList) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetSyncProfileList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetSyncProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3393,7 +2206,7 @@ func (m *SubscriptionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *SubscriptionParameters) Marshal() (dAtA []byte, err error) { +func (m *TargetSyncProfileSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3403,89 +2216,48 @@ func (m *SubscriptionParameters) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubscriptionParameters) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetSyncProfileSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetSyncProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if m.Interval != nil { - { - size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Sync) > 0 { + for iNdEx := len(m.Sync) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sync[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0x2a - if m.AdminState != nil { - i -= len(*m.AdminState) - copy(dAtA[i:], *m.AdminState) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.AdminState))) - i-- - dAtA[i] = 0x22 - } - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { - v := m.Labels[string(keysForLabels[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) i-- - dAtA[i] = 0x12 - i -= len(keysForLabels[iNdEx]) - copy(dAtA[i:], keysForLabels[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForLabels[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } } - if m.Description != nil { - i -= len(*m.Description) - copy(dAtA[i:], *m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Description))) - i-- - dAtA[i] = 0x12 + i = encodeVarintGenerated(dAtA, i, uint64(m.Workers)) + i-- + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Buffer)) + i-- + dAtA[i] = 0x10 + i-- + if m.Validate { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 return len(dAtA) - i, nil } -func (m *SubscriptionSpec) Marshal() (dAtA []byte, err error) { +func (m *TargetSyncProfileSync) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3495,36 +2267,46 @@ func (m *SubscriptionSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubscriptionSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetSyncProfileSync) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetSyncProfileSync) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Subscriptions) > 0 { - for iNdEx := len(m.Subscriptions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subscriptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a + { + size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a if m.Encoding != nil { i -= len(*m.Encoding) copy(dAtA[i:], *m.Encoding) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 + } + i -= len(m.Mode) + copy(dAtA[i:], m.Mode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) + i-- + dAtA[i] = 0x2a + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Paths[iNdEx]) + copy(dAtA[i:], m.Paths[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Paths[iNdEx]))) + i-- + dAtA[i] = 0x22 + } } i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) i-- @@ -3534,20 +2316,15 @@ func (m *SubscriptionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) i-- dAtA[i] = 0x12 - { - size, err := m.Target.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *SubscriptionStatus) Marshal() (dAtA []byte, err error) { +func (m *TargetTemplate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3557,74 +2334,73 @@ func (m *SubscriptionStatus) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubscriptionStatus) MarshalTo(dAtA []byte) (int, error) { +func (m *TargetTemplate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SubscriptionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TargetTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Targets) > 0 { - for iNdEx := len(m.Targets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Targets[iNdEx]) - copy(dAtA[i:], m.Targets[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Targets[iNdEx]))) + if len(m.Labels) > 0 { + keysForLabels := make([]string, 0, len(m.Labels)) + for k := range m.Labels { + keysForLabels = append(keysForLabels, string(k)) + } + sort.Strings(keysForLabels) + for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { + v := m.Labels[string(keysForLabels[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 + i -= len(keysForLabels[iNdEx]) + copy(dAtA[i:], keysForLabels[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForLabels[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a } } - { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Annotations) > 0 { + keysForAnnotations := make([]string, 0, len(m.Annotations)) + for k := range m.Annotations { + keysForAnnotations = append(keysForAnnotations, string(k)) + } + sort.Strings(keysForAnnotations) + for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { + v := m.Annotations[string(keysForAnnotations[iNdEx])] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(keysForAnnotations[iNdEx]) + copy(dAtA[i:], keysForAnnotations[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SubscriptionTarget) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubscriptionTarget) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubscriptionTarget) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TargetSelector != nil { - { - size, err := m.TargetSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa } + i -= len(m.NameTemplate) + copy(dAtA[i:], m.NameTemplate) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NameTemplate))) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *Target) Marshal() (dAtA []byte, err error) { +func (m *Workspace) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3634,12 +2410,12 @@ func (m *Target) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Target) MarshalTo(dAtA []byte) (int, error) { +func (m *Workspace) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Workspace) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3677,50 +2453,7 @@ func (m *Target) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TargetConnectionProfile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TargetConnectionProfile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TargetConnectionProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TargetConnectionProfileList) Marshal() (dAtA []byte, err error) { +func (m *WorkspaceList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3730,12 +2463,12 @@ func (m *TargetConnectionProfileList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TargetConnectionProfileList) MarshalTo(dAtA []byte) (int, error) { +func (m *WorkspaceList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetConnectionProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WorkspaceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3767,7 +2500,7 @@ func (m *TargetConnectionProfileList) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *TargetConnectionProfileSpec) Marshal() (dAtA []byte, err error) { +func (m *WorkspaceSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3777,114 +2510,18 @@ func (m *TargetConnectionProfileSpec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TargetConnectionProfileSpec) MarshalTo(dAtA []byte) (int, error) { +func (m *WorkspaceSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetConnectionProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WorkspaceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TargetName != nil { - i -= len(*m.TargetName) - copy(dAtA[i:], *m.TargetName) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TargetName))) - i-- - dAtA[i] = 0x6a - } - if m.CommitCandidate != nil { - i -= len(*m.CommitCandidate) - copy(dAtA[i:], *m.CommitCandidate) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CommitCandidate))) - i-- - dAtA[i] = 0x62 - } - if m.UseOperationRemove != nil { - i-- - if *m.UseOperationRemove { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.OperationWithNS != nil { - i-- - if *m.OperationWithNS { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.IncludeNS != nil { - i-- - if *m.IncludeNS { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.SkipVerify != nil { - i-- - if *m.SkipVerify { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.Insecure != nil { - i-- - if *m.Insecure { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.PreferredNetconfVersion != nil { - i -= len(*m.PreferredNetconfVersion) - copy(dAtA[i:], *m.PreferredNetconfVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreferredNetconfVersion))) - i-- - dAtA[i] = 0x32 - } - if m.Encoding != nil { - i -= len(*m.Encoding) - copy(dAtA[i:], *m.Encoding) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) - i-- - dAtA[i] = 0x2a - } - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x20 - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x1a - { - size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 { - size, err := m.ConnectRetry.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3896,7 +2533,7 @@ func (m *TargetConnectionProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *TargetList) Marshal() (dAtA []byte, err error) { +func (m *WorkspaceStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3906,32 +2543,32 @@ func (m *TargetList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TargetList) MarshalTo(dAtA []byte) (int, error) { +func (m *WorkspaceStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TargetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WorkspaceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + if m.DeployedRef != nil { + i -= len(*m.DeployedRef) + copy(dAtA[i:], *m.DeployedRef) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeployedRef))) + i-- + dAtA[i] = 0x1a + } + if m.Kind != nil { + i -= len(*m.Kind) + copy(dAtA[i:], *m.Kind) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Kind))) + i-- + dAtA[i] = 0x12 } { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3943,765 +2580,638 @@ func (m *TargetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TargetProfile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *TargetProfile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *TargetProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryParameters) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.SyncProfile != nil { - i -= len(*m.SyncProfile) - copy(dAtA[i:], *m.SyncProfile) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SyncProfile))) - i-- - dAtA[i] = 0x22 + if m.DefaultSchema != nil { + l = m.DefaultSchema.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= len(m.ConnectionProfile) - copy(dAtA[i:], m.ConnectionProfile) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfile))) - i-- - dAtA[i] = 0x1a - if m.TLSSecret != nil { - i -= len(*m.TLSSecret) - copy(dAtA[i:], *m.TLSSecret) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.TLSSecret))) - i-- - dAtA[i] = 0x12 + if m.DiscoveryProfile != nil { + l = m.DiscoveryProfile.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= len(m.Credentials) - copy(dAtA[i:], m.Credentials) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Credentials))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TargetSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.TargetConnectionProfiles) > 0 { + for _, e := range m.TargetConnectionProfiles { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } - return dAtA[:n], nil -} - -func (m *TargetSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if m.TargetTemplate != nil { + l = m.TargetTemplate.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.Period.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.ConcurrentScans)) + return n } -func (m *TargetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryPathDefinition) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.TargetProfile.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + if m.Script != nil { + l = len(*m.Script) + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0x1a - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - i -= len(m.Provider) - copy(dAtA[i:], m.Provider) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Provider))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TargetStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Regex != nil { + l = len(*m.Regex) + n += 1 + l + sovGenerated(uint64(l)) } - return dAtA[:n], nil -} - -func (m *TargetStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } -func (m *TargetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryProfile) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.UsedReferences != nil { - { - size, err := m.UsedReferences.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.DiscoveryInfo != nil { - { - size, err := m.DiscoveryInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + l = len(m.Credentials) + n += 1 + l + sovGenerated(uint64(l)) + if m.TLSSecret != nil { + l = len(*m.TLSSecret) + n += 1 + l + sovGenerated(uint64(l)) } - { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ConnectionProfiles) > 0 { + for _, s := range m.ConnectionProfiles { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *TargetStatusUsedReferences) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DiscoveryRule) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *TargetStatusUsedReferences) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetStatusUsedReferences) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryRuleAddress) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - i -= len(m.SyncProfileResourceVersion) - copy(dAtA[i:], m.SyncProfileResourceVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SyncProfileResourceVersion))) - i-- - dAtA[i] = 0x22 - i -= len(m.ConnectionProfileResourceVersion) - copy(dAtA[i:], m.ConnectionProfileResourceVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConnectionProfileResourceVersion))) - i-- - dAtA[i] = 0x1a - i -= len(m.TLSSecretResourceVersion) - copy(dAtA[i:], m.TLSSecretResourceVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.TLSSecretResourceVersion))) - i-- - dAtA[i] = 0x12 - i -= len(m.SecretResourceVersion) - copy(dAtA[i:], m.SecretResourceVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SecretResourceVersion))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = len(m.Address) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.HostName) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DiscoveryRuleList) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *TargetSyncProfile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DiscoveryRulePrefix) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Prefix) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Excludes) > 0 { + for _, s := range m.Excludes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *TargetSyncProfile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryRuleSpec) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Prefixes) > 0 { + for _, e := range m.Prefixes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Addresses) > 0 { + for _, e := range m.Addresses { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + if m.PodSelector != nil { + l = m.PodSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ServiceSelector != nil { + l = m.ServiceSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.ServiceDomain) + n += 1 + l + sovGenerated(uint64(l)) + l = m.DiscoveryParameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfileList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DiscoveryRuleStatus) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.StartTime != nil { + l = m.StartTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *TargetSyncProfileList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DiscoveryVendorProfile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfileList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DiscoveryVendorProfileList) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + return n +} + +func (m *DiscoveryVendorProfileSpec) Size() (n int) { + if m == nil { + return 0 } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + var l int + _ = l + l = m.Gnmi.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfileSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *GnmiDiscoveryVendorProfileParameters) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.Organization) + n += 1 + l + sovGenerated(uint64(l)) + if m.ModelMatch != nil { + l = len(*m.ModelMatch) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Paths) > 0 { + for _, e := range m.Paths { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Encoding != nil { + l = len(*m.Encoding) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.PreserveNamespace != nil { + n += 2 + } + return n } -func (m *TargetSyncProfileSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Proxy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.URL) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Credentials) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfileSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Repository) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Sync) > 0 { - for iNdEx := len(m.Sync) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sync[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + l = len(m.RepoURL) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Credentials) + n += 1 + l + sovGenerated(uint64(l)) + if m.Proxy != nil { + l = m.Proxy.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i = encodeVarintGenerated(dAtA, i, uint64(m.Workers)) - i-- - dAtA[i] = 0x18 - i = encodeVarintGenerated(dAtA, i, uint64(m.Buffer)) - i-- - dAtA[i] = 0x10 - i-- - if m.Validate { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Ref) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Rollout) Size() (n int) { + if m == nil { + return 0 } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetSyncProfileSync) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *RolloutList) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *TargetSyncProfileSync) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *RolloutSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Repository.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Strategy) + n += 1 + l + sovGenerated(uint64(l)) + if m.SkipUnavailableTarget != nil { + n += 2 + } + return n } -func (m *TargetSyncProfileSync) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *RolloutStatus) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Interval.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Targets) > 0 { + for _, e := range m.Targets { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x3a - if m.Encoding != nil { - i -= len(*m.Encoding) - copy(dAtA[i:], *m.Encoding) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Encoding))) - i-- - dAtA[i] = 0x32 - } - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0x2a - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0x22 - } + return n +} + +func (m *RolloutTargetStatus) Size() (n int) { + if m == nil { + return 0 } - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x18 - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetTemplate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Schema) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetTemplate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *SchemaKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Provider) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *TargetTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *SchemaList) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { - v := m.Labels[string(keysForLabels[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForLabels[iNdEx]) - copy(dAtA[i:], keysForLabels[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForLabels[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } } - if len(m.Annotations) > 0 { - keysForAnnotations := make([]string, 0, len(m.Annotations)) - for k := range m.Annotations { - keysForAnnotations = append(keysForAnnotations, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.Annotations[string(keysForAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAnnotations[iNdEx]) - copy(dAtA[i:], keysForAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } + return n +} + +func (m *SchemaRepositoryStatus) Size() (n int) { + if m == nil { + return 0 } - i -= len(m.NameTemplate) - copy(dAtA[i:], m.NameTemplate) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NameTemplate))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + var l int + _ = l + l = len(m.RepoURL) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reference) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *Workspace) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SchemaSpec) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.Provider) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Repositories) > 0 { + for _, e := range m.Repositories { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *Workspace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *SchemaSpecRepository) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Dirs) > 0 { + for _, e := range m.Dirs { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.Schema.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Repository.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *Workspace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *SchemaSpecSchema) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Models) > 0 { + for _, s := range m.Models { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Includes) > 0 { + for _, s := range m.Includes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Excludes) > 0 { + for _, s := range m.Excludes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *WorkspaceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SchemaStatus) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *WorkspaceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WorkspaceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + l = m.ConditionedStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Repositories) > 0 { + for _, e := range m.Repositories { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *WorkspaceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *SrcDstPath) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *WorkspaceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WorkspaceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - { - size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = len(m.Src) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Dst) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *WorkspaceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Subscription) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *WorkspaceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WorkspaceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.DeployedRef != nil { - i -= len(*m.DeployedRef) - copy(dAtA[i:], *m.DeployedRef) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeployedRef))) - i-- - dAtA[i] = 0x1a - } - if m.Kind != nil { - i -= len(*m.Kind) - copy(dAtA[i:], *m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Kind))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ConditionedStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DiscoveryInfo) Size() (n int) { +func (m *SubscriptionList) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Provider) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.HostName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Platform) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.MacAddress) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SerialNumber) + l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.SupportedEncodings) > 0 { - for _, s := range m.SupportedEncodings { - l = len(s) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } -func (m *DiscoveryParameters) Size() (n int) { +func (m *SubscriptionParameters) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.DefaultSchema != nil { - l = m.DefaultSchema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.DiscoveryProfile != nil { - l = m.DiscoveryProfile.Size() + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Description != nil { + l = len(*m.Description) n += 1 + l + sovGenerated(uint64(l)) } - if len(m.TargetConnectionProfiles) > 0 { - for _, e := range m.TargetConnectionProfiles { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } - if m.TargetTemplate != nil { - l = m.TargetTemplate.Size() + if m.AdminState != nil { + l = len(*m.AdminState) n += 1 + l + sovGenerated(uint64(l)) } - l = m.Period.Size() + l = len(m.Mode) n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ConcurrentScans)) + if m.Interval != nil { + l = m.Interval.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } -func (m *DiscoveryPathDefinition) Size() (n int) { +func (m *SubscriptionSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Key) + l = m.Target.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Path) + l = len(m.Protocol) n += 1 + l + sovGenerated(uint64(l)) - if m.Script != nil { - l = len(*m.Script) + n += 1 + sovGenerated(uint64(m.Port)) + if m.Encoding != nil { + l = len(*m.Encoding) n += 1 + l + sovGenerated(uint64(l)) } - if m.Regex != nil { - l = len(*m.Regex) - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Subscriptions) > 0 { + for _, e := range m.Subscriptions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } } return n } -func (m *DiscoveryProfile) Size() (n int) { +func (m *SubscriptionStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Credentials) + l = m.ConditionedStatus.Size() n += 1 + l + sovGenerated(uint64(l)) - if m.TLSSecret != nil { - l = len(*m.TLSSecret) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ConnectionProfiles) > 0 { - for _, s := range m.ConnectionProfiles { + if len(m.Targets) > 0 { + for _, s := range m.Targets { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } @@ -4709,35 +3219,33 @@ func (m *DiscoveryProfile) Size() (n int) { return n } -func (m *DiscoveryRule) Size() (n int) { +func (m *SubscriptionTarget) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) + if m.TargetSelector != nil { + l = m.TargetSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } -func (m *DiscoveryRuleAddress) Size() (n int) { +func (m *TargetConnectionProfile) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Address) + l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.HostName) + l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *DiscoveryRuleList) Size() (n int) { +func (m *TargetConnectionProfileList) Size() (n int) { if m == nil { return 0 } @@ -4754,72 +3262,75 @@ func (m *DiscoveryRuleList) Size() (n int) { return n } -func (m *DiscoveryRulePrefix) Size() (n int) { +func (m *TargetConnectionProfileSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Prefix) + l = m.ConnectRetry.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Excludes) > 0 { - for _, s := range m.Excludes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DiscoveryRuleSpec) Size() (n int) { - if m == nil { - return 0 + l = m.Timeout.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Protocol) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Port)) + if m.Encoding != nil { + l = len(*m.Encoding) + n += 1 + l + sovGenerated(uint64(l)) } - var l int - _ = l - if len(m.Prefixes) > 0 { - for _, e := range m.Prefixes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + if m.PreferredNetconfVersion != nil { + l = len(*m.PreferredNetconfVersion) + n += 1 + l + sovGenerated(uint64(l)) } - if len(m.Addresses) > 0 { - for _, e := range m.Addresses { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + if m.Insecure != nil { + n += 2 } - if m.PodSelector != nil { - l = m.PodSelector.Size() + if m.SkipVerify != nil { + n += 2 + } + if m.IncludeNS != nil { + n += 2 + } + if m.OperationWithNS != nil { + n += 2 + } + if m.UseOperationRemove != nil { + n += 2 + } + if m.CommitCandidate != nil { + l = len(*m.CommitCandidate) n += 1 + l + sovGenerated(uint64(l)) } - if m.ServiceSelector != nil { - l = m.ServiceSelector.Size() + if m.TargetName != nil { + l = len(*m.TargetName) n += 1 + l + sovGenerated(uint64(l)) } - l = len(m.ServiceDomain) - n += 1 + l + sovGenerated(uint64(l)) - l = m.DiscoveryParameters.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *DiscoveryRuleStatus) Size() (n int) { +func (m *TargetProfile) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ConditionedStatus.Size() + l = len(m.Credentials) n += 1 + l + sovGenerated(uint64(l)) - if m.StartTime != nil { - l = m.StartTime.Size() + if m.TLSSecret != nil { + l = len(*m.TLSSecret) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.ConnectionProfile) + n += 1 + l + sovGenerated(uint64(l)) + if m.SyncProfile != nil { + l = len(*m.SyncProfile) n += 1 + l + sovGenerated(uint64(l)) } return n } -func (m *DiscoveryVendorProfile) Size() (n int) { +func (m *TargetSyncProfile) Size() (n int) { if m == nil { return 0 } @@ -4832,7 +3343,7 @@ func (m *DiscoveryVendorProfile) Size() (n int) { return n } -func (m *DiscoveryVendorProfileList) Size() (n int) { +func (m *TargetSyncProfileList) Size() (n int) { if m == nil { return 0 } @@ -4849,80 +3360,80 @@ func (m *DiscoveryVendorProfileList) Size() (n int) { return n } -func (m *DiscoveryVendorProfileSpec) Size() (n int) { +func (m *TargetSyncProfileSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Gnmi.Size() - n += 1 + l + sovGenerated(uint64(l)) + n += 2 + n += 1 + sovGenerated(uint64(m.Buffer)) + n += 1 + sovGenerated(uint64(m.Workers)) + if len(m.Sync) > 0 { + for _, e := range m.Sync { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } -func (m *GnmiDiscoveryVendorProfileParameters) Size() (n int) { +func (m *TargetSyncProfileSync) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Organization) + l = len(m.Name) n += 1 + l + sovGenerated(uint64(l)) - if m.ModelMatch != nil { - l = len(*m.ModelMatch) - n += 1 + l + sovGenerated(uint64(l)) - } + l = len(m.Protocol) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Port)) if len(m.Paths) > 0 { - for _, e := range m.Paths { - l = e.Size() + for _, s := range m.Paths { + l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } + l = len(m.Mode) + n += 1 + l + sovGenerated(uint64(l)) if m.Encoding != nil { l = len(*m.Encoding) n += 1 + l + sovGenerated(uint64(l)) } - if m.PreserveNamespace != nil { - n += 2 - } - return n -} - -func (m *Proxy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URL) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Credentials) + l = m.Interval.Size() n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Repository) Size() (n int) { +func (m *TargetTemplate) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.RepositoryURL) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Credentials) + l = len(m.NameTemplate) n += 1 + l + sovGenerated(uint64(l)) - if m.Proxy != nil { - l = m.Proxy.Size() - n += 1 + l + sovGenerated(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } } - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Ref) - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Rollout) Size() (n int) { +func (m *Workspace) Size() (n int) { if m == nil { return 0 } @@ -4937,7 +3448,7 @@ func (m *Rollout) Size() (n int) { return n } -func (m *RolloutList) Size() (n int) { +func (m *WorkspaceList) Size() (n int) { if m == nil { return 0 } @@ -4954,7 +3465,7 @@ func (m *RolloutList) Size() (n int) { return n } -func (m *RolloutSpec) Size() (n int) { +func (m *WorkspaceSpec) Size() (n int) { if m == nil { return 0 } @@ -4962,15 +3473,10 @@ func (m *RolloutSpec) Size() (n int) { _ = l l = m.Repository.Size() n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Strategy) - n += 1 + l + sovGenerated(uint64(l)) - if m.SkipUnavailableTarget != nil { - n += 2 - } return n } -func (m *RolloutStatus) Size() (n int) { +func (m *WorkspaceStatus) Size() (n int) { if m == nil { return 0 } @@ -4978,2327 +3484,733 @@ func (m *RolloutStatus) Size() (n int) { _ = l l = m.ConditionedStatus.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Targets) > 0 { - for _, e := range m.Targets { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + if m.Kind != nil { + l = len(*m.Kind) + n += 1 + l + sovGenerated(uint64(l)) } - return n -} - -func (m *RolloutTargetStatus) Size() (n int) { - if m == nil { - return 0 + if m.DeployedRef != nil { + l = len(*m.DeployedRef) + n += 1 + l + sovGenerated(uint64(l)) } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *Schema) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } - -func (m *SchemaKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Provider) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - return n +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - -func (m *SchemaList) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryParameters) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForTargetConnectionProfiles := "[]TargetProfile{" + for _, f := range this.TargetConnectionProfiles { + repeatedStringForTargetConnectionProfiles += strings.Replace(strings.Replace(f.String(), "TargetProfile", "TargetProfile", 1), `&`, ``, 1) + "," } - return n + repeatedStringForTargetConnectionProfiles += "}" + s := strings.Join([]string{`&DiscoveryParameters{`, + `DefaultSchema:` + strings.Replace(this.DefaultSchema.String(), "SchemaKey", "SchemaKey", 1) + `,`, + `DiscoveryProfile:` + strings.Replace(this.DiscoveryProfile.String(), "DiscoveryProfile", "DiscoveryProfile", 1) + `,`, + `TargetConnectionProfiles:` + repeatedStringForTargetConnectionProfiles + `,`, + `TargetTemplate:` + strings.Replace(this.TargetTemplate.String(), "TargetTemplate", "TargetTemplate", 1) + `,`, + `Period:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Period), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, + `ConcurrentScans:` + fmt.Sprintf("%v", this.ConcurrentScans) + `,`, + `}`, + }, "") + return s } - -func (m *SchemaRepositoryStatus) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryPathDefinition) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.RepoURL) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reference) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SchemaSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Provider) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Repositories) > 0 { - for _, e := range m.Repositories { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n + s := strings.Join([]string{`&DiscoveryPathDefinition{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Script:` + valueToStringGenerated(this.Script) + `,`, + `Regex:` + valueToStringGenerated(this.Regex) + `,`, + `}`, + }, "") + return s } - -func (m *SchemaSpecRepository) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryProfile) String() string { + if this == nil { + return "nil" } - var l int - _ = l - if len(m.Dirs) > 0 { - for _, e := range m.Dirs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + s := strings.Join([]string{`&DiscoveryProfile{`, + `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, + `TLSSecret:` + valueToStringGenerated(this.TLSSecret) + `,`, + `ConnectionProfiles:` + fmt.Sprintf("%v", this.ConnectionProfiles) + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryRule) String() string { + if this == nil { + return "nil" } - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Repository.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DiscoveryRule{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DiscoveryRuleSpec", "DiscoveryRuleSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DiscoveryRuleStatus", "DiscoveryRuleStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *SchemaSpecSchema) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryRuleAddress) String() string { + if this == nil { + return "nil" } - var l int - _ = l - if len(m.Models) > 0 { - for _, s := range m.Models { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + s := strings.Join([]string{`&DiscoveryRuleAddress{`, + `Address:` + fmt.Sprintf("%v", this.Address) + `,`, + `HostName:` + fmt.Sprintf("%v", this.HostName) + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryRuleList) String() string { + if this == nil { + return "nil" } - if len(m.Includes) > 0 { - for _, s := range m.Includes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems := "[]DiscoveryRule{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DiscoveryRule", "DiscoveryRule", 1), `&`, ``, 1) + "," } - if len(m.Excludes) > 0 { - for _, s := range m.Excludes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems += "}" + s := strings.Join([]string{`&DiscoveryRuleList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryRulePrefix) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&DiscoveryRulePrefix{`, + `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, + `Excludes:` + fmt.Sprintf("%v", this.Excludes) + `,`, + `}`, + }, "") + return s } - -func (m *SchemaStatus) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryRuleSpec) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Repositories) > 0 { - for _, e := range m.Repositories { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForPrefixes := "[]DiscoveryRulePrefix{" + for _, f := range this.Prefixes { + repeatedStringForPrefixes += strings.Replace(strings.Replace(f.String(), "DiscoveryRulePrefix", "DiscoveryRulePrefix", 1), `&`, ``, 1) + "," } - return n + repeatedStringForPrefixes += "}" + repeatedStringForAddresses := "[]DiscoveryRuleAddress{" + for _, f := range this.Addresses { + repeatedStringForAddresses += strings.Replace(strings.Replace(f.String(), "DiscoveryRuleAddress", "DiscoveryRuleAddress", 1), `&`, ``, 1) + "," + } + repeatedStringForAddresses += "}" + s := strings.Join([]string{`&DiscoveryRuleSpec{`, + `Prefixes:` + repeatedStringForPrefixes + `,`, + `Addresses:` + repeatedStringForAddresses + `,`, + `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ServiceSelector:` + strings.Replace(fmt.Sprintf("%v", this.ServiceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `ServiceDomain:` + fmt.Sprintf("%v", this.ServiceDomain) + `,`, + `DiscoveryParameters:` + strings.Replace(strings.Replace(this.DiscoveryParameters.String(), "DiscoveryParameters", "DiscoveryParameters", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *SrcDstPath) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryRuleStatus) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Src) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Dst) - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DiscoveryRuleStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "v1.Time", 1) + `,`, + `}`, + }, "") + return s } - -func (m *Subscription) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryVendorProfile) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DiscoveryVendorProfile{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DiscoveryVendorProfileSpec", "DiscoveryVendorProfileSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *SubscriptionList) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryVendorProfileList) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems := "[]DiscoveryVendorProfile{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DiscoveryVendorProfile", "DiscoveryVendorProfile", 1), `&`, ``, 1) + "," } - return n + repeatedStringForItems += "}" + s := strings.Join([]string{`&DiscoveryVendorProfileList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } - -func (m *SubscriptionParameters) Size() (n int) { - if m == nil { - return 0 +func (this *DiscoveryVendorProfileSpec) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Description != nil { - l = len(*m.Description) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&DiscoveryVendorProfileSpec{`, + `Gnmi:` + strings.Replace(strings.Replace(this.Gnmi.String(), "GnmiDiscoveryVendorProfileParameters", "GnmiDiscoveryVendorProfileParameters", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *GnmiDiscoveryVendorProfileParameters) String() string { + if this == nil { + return "nil" } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } + repeatedStringForPaths := "[]DiscoveryPathDefinition{" + for _, f := range this.Paths { + repeatedStringForPaths += strings.Replace(strings.Replace(f.String(), "DiscoveryPathDefinition", "DiscoveryPathDefinition", 1), `&`, ``, 1) + "," } - if m.AdminState != nil { - l = len(*m.AdminState) - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForPaths += "}" + s := strings.Join([]string{`&GnmiDiscoveryVendorProfileParameters{`, + `Organization:` + fmt.Sprintf("%v", this.Organization) + `,`, + `ModelMatch:` + valueToStringGenerated(this.ModelMatch) + `,`, + `Paths:` + repeatedStringForPaths + `,`, + `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, + `PreserveNamespace:` + valueToStringGenerated(this.PreserveNamespace) + `,`, + `}`, + }, "") + return s +} +func (this *Proxy) String() string { + if this == nil { + return "nil" } - l = len(m.Mode) - n += 1 + l + sovGenerated(uint64(l)) - if m.Interval != nil { - l = m.Interval.Size() - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&Proxy{`, + `URL:` + fmt.Sprintf("%v", this.URL) + `,`, + `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, + `}`, + }, "") + return s +} +func (this *Repository) String() string { + if this == nil { + return "nil" } - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + s := strings.Join([]string{`&Repository{`, + `RepoURL:` + fmt.Sprintf("%v", this.RepoURL) + `,`, + `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, + `Proxy:` + strings.Replace(this.Proxy.String(), "Proxy", "Proxy", 1) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, + `}`, + }, "") + return s +} +func (this *Rollout) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&Rollout{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RolloutSpec", "RolloutSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RolloutStatus", "RolloutStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *SubscriptionSpec) Size() (n int) { - if m == nil { - return 0 +func (this *RolloutList) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.Target.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - if m.Encoding != nil { - l = len(*m.Encoding) - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForItems := "[]Rollout{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Rollout", "Rollout", 1), `&`, ``, 1) + "," } - if len(m.Subscriptions) > 0 { - for _, e := range m.Subscriptions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems += "}" + s := strings.Join([]string{`&RolloutList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *RolloutSpec) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&RolloutSpec{`, + `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, + `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, + `SkipUnavailableTarget:` + valueToStringGenerated(this.SkipUnavailableTarget) + `,`, + `}`, + }, "") + return s } - -func (m *SubscriptionStatus) Size() (n int) { - if m == nil { - return 0 +func (this *RolloutStatus) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Targets) > 0 { - for _, s := range m.Targets { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForTargets := "[]RolloutTargetStatus{" + for _, f := range this.Targets { + repeatedStringForTargets += strings.Replace(strings.Replace(f.String(), "RolloutTargetStatus", "RolloutTargetStatus", 1), `&`, ``, 1) + "," } - return n + repeatedStringForTargets += "}" + s := strings.Join([]string{`&RolloutStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `Targets:` + repeatedStringForTargets + `,`, + `}`, + }, "") + return s } - -func (m *SubscriptionTarget) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TargetSelector != nil { - l = m.TargetSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) +func (this *RolloutTargetStatus) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&RolloutTargetStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *Target) Size() (n int) { - if m == nil { - return 0 +func (this *Schema) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&Schema{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SchemaSpec", "SchemaSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SchemaStatus", "SchemaStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *TargetConnectionProfile) Size() (n int) { - if m == nil { - return 0 +func (this *SchemaKey) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&SchemaKey{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s } - -func (m *TargetConnectionProfileList) Size() (n int) { - if m == nil { - return 0 +func (this *SchemaList) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems := "[]Schema{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Schema", "Schema", 1), `&`, ``, 1) + "," } - return n + repeatedStringForItems += "}" + s := strings.Join([]string{`&SchemaList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } - -func (m *TargetConnectionProfileSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConnectRetry.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Timeout.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - if m.Encoding != nil { - l = len(*m.Encoding) - n += 1 + l + sovGenerated(uint64(l)) +func (this *SchemaRepositoryStatus) String() string { + if this == nil { + return "nil" } - if m.PreferredNetconfVersion != nil { - l = len(*m.PreferredNetconfVersion) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&SchemaRepositoryStatus{`, + `RepoURL:` + fmt.Sprintf("%v", this.RepoURL) + `,`, + `Reference:` + fmt.Sprintf("%v", this.Reference) + `,`, + `}`, + }, "") + return s +} +func (this *SchemaSpec) String() string { + if this == nil { + return "nil" } - if m.Insecure != nil { - n += 2 + repeatedStringForRepositories := "[]*SchemaSpecRepository{" + for _, f := range this.Repositories { + repeatedStringForRepositories += strings.Replace(f.String(), "SchemaSpecRepository", "SchemaSpecRepository", 1) + "," } - if m.SkipVerify != nil { - n += 2 - } - if m.IncludeNS != nil { - n += 2 + repeatedStringForRepositories += "}" + s := strings.Join([]string{`&SchemaSpec{`, + `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `Repositories:` + repeatedStringForRepositories + `,`, + `}`, + }, "") + return s +} +func (this *SchemaSpecRepository) String() string { + if this == nil { + return "nil" } - if m.OperationWithNS != nil { - n += 2 + repeatedStringForDirs := "[]SrcDstPath{" + for _, f := range this.Dirs { + repeatedStringForDirs += strings.Replace(strings.Replace(f.String(), "SrcDstPath", "SrcDstPath", 1), `&`, ``, 1) + "," } - if m.UseOperationRemove != nil { - n += 2 + repeatedStringForDirs += "}" + s := strings.Join([]string{`&SchemaSpecRepository{`, + `Dirs:` + repeatedStringForDirs + `,`, + `Schema:` + strings.Replace(strings.Replace(this.Schema.String(), "SchemaSpecSchema", "SchemaSpecSchema", 1), `&`, ``, 1) + `,`, + `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SchemaSpecSchema) String() string { + if this == nil { + return "nil" } - if m.CommitCandidate != nil { - l = len(*m.CommitCandidate) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&SchemaSpecSchema{`, + `Models:` + fmt.Sprintf("%v", this.Models) + `,`, + `Includes:` + fmt.Sprintf("%v", this.Includes) + `,`, + `Excludes:` + fmt.Sprintf("%v", this.Excludes) + `,`, + `}`, + }, "") + return s +} +func (this *SchemaStatus) String() string { + if this == nil { + return "nil" } - if m.TargetName != nil { - l = len(*m.TargetName) - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForRepositories := "[]SchemaRepositoryStatus{" + for _, f := range this.Repositories { + repeatedStringForRepositories += strings.Replace(strings.Replace(f.String(), "SchemaRepositoryStatus", "SchemaRepositoryStatus", 1), `&`, ``, 1) + "," } - return n + repeatedStringForRepositories += "}" + s := strings.Join([]string{`&SchemaStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `Repositories:` + repeatedStringForRepositories + `,`, + `}`, + }, "") + return s } - -func (m *TargetList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } +func (this *SrcDstPath) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&SrcDstPath{`, + `Src:` + fmt.Sprintf("%v", this.Src) + `,`, + `Dst:` + fmt.Sprintf("%v", this.Dst) + `,`, + `}`, + }, "") + return s } - -func (m *TargetProfile) Size() (n int) { - if m == nil { - return 0 +func (this *Subscription) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Credentials) - n += 1 + l + sovGenerated(uint64(l)) - if m.TLSSecret != nil { - l = len(*m.TLSSecret) - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&Subscription{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubscriptionSpec", "SubscriptionSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubscriptionStatus", "SubscriptionStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SubscriptionList) String() string { + if this == nil { + return "nil" } - l = len(m.ConnectionProfile) - n += 1 + l + sovGenerated(uint64(l)) - if m.SyncProfile != nil { - l = len(*m.SyncProfile) - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForItems := "[]Subscription{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Subscription", "Subscription", 1), `&`, ``, 1) + "," } - return n + repeatedStringForItems += "}" + s := strings.Join([]string{`&SubscriptionList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } - -func (m *TargetSpec) Size() (n int) { - if m == nil { - return 0 +func (this *SubscriptionParameters) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Provider) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Address) - n += 1 + l + sovGenerated(uint64(l)) - l = m.TargetProfile.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + sort.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + s := strings.Join([]string{`&SubscriptionParameters{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Description:` + valueToStringGenerated(this.Description) + `,`, + `Labels:` + mapStringForLabels + `,`, + `AdminState:` + valueToStringGenerated(this.AdminState) + `,`, + `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, + `Interval:` + strings.Replace(fmt.Sprintf("%v", this.Interval), "Duration", "v1.Duration", 1) + `,`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `}`, + }, "") + return s } - -func (m *TargetStatus) Size() (n int) { - if m == nil { - return 0 +func (this *SubscriptionSpec) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.DiscoveryInfo != nil { - l = m.DiscoveryInfo.Size() - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForSubscriptions := "[]SubscriptionParameters{" + for _, f := range this.Subscriptions { + repeatedStringForSubscriptions += strings.Replace(strings.Replace(f.String(), "SubscriptionParameters", "SubscriptionParameters", 1), `&`, ``, 1) + "," } - if m.UsedReferences != nil { - l = m.UsedReferences.Size() - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForSubscriptions += "}" + s := strings.Join([]string{`&SubscriptionSpec{`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "SubscriptionTarget", "SubscriptionTarget", 1), `&`, ``, 1) + `,`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, + `Subscriptions:` + repeatedStringForSubscriptions + `,`, + `}`, + }, "") + return s +} +func (this *SubscriptionStatus) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&SubscriptionStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `Targets:` + fmt.Sprintf("%v", this.Targets) + `,`, + `}`, + }, "") + return s } - -func (m *TargetStatusUsedReferences) Size() (n int) { - if m == nil { - return 0 +func (this *SubscriptionTarget) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.SecretResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.TLSSecretResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ConnectionProfileResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SyncProfileResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&SubscriptionTarget{`, + `TargetSelector:` + strings.Replace(fmt.Sprintf("%v", this.TargetSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, + `}`, + }, "") + return s } - -func (m *TargetSyncProfile) Size() (n int) { - if m == nil { - return 0 +func (this *TargetConnectionProfile) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&TargetConnectionProfile{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetConnectionProfileSpec", "TargetConnectionProfileSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *TargetSyncProfileList) Size() (n int) { - if m == nil { - return 0 +func (this *TargetConnectionProfileList) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForItems := "[]TargetConnectionProfile{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TargetConnectionProfile", "TargetConnectionProfile", 1), `&`, ``, 1) + "," } - return n -} - -func (m *TargetSyncProfileSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - n += 1 + sovGenerated(uint64(m.Buffer)) - n += 1 + sovGenerated(uint64(m.Workers)) - if len(m.Sync) > 0 { - for _, e := range m.Sync { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *TargetSyncProfileSync) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Mode) - n += 1 + l + sovGenerated(uint64(l)) - if m.Encoding != nil { - l = len(*m.Encoding) - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Interval.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TargetTemplate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.NameTemplate) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *Workspace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *WorkspaceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *WorkspaceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Repository.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *WorkspaceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConditionedStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Kind != nil { - l = len(*m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.DeployedRef != nil { - l = len(*m.DeployedRef) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *DiscoveryInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryInfo{`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `HostName:` + fmt.Sprintf("%v", this.HostName) + `,`, - `Platform:` + fmt.Sprintf("%v", this.Platform) + `,`, - `MacAddress:` + fmt.Sprintf("%v", this.MacAddress) + `,`, - `SerialNumber:` + fmt.Sprintf("%v", this.SerialNumber) + `,`, - `SupportedEncodings:` + fmt.Sprintf("%v", this.SupportedEncodings) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryParameters) String() string { - if this == nil { - return "nil" - } - repeatedStringForTargetConnectionProfiles := "[]TargetProfile{" - for _, f := range this.TargetConnectionProfiles { - repeatedStringForTargetConnectionProfiles += strings.Replace(strings.Replace(f.String(), "TargetProfile", "TargetProfile", 1), `&`, ``, 1) + "," - } - repeatedStringForTargetConnectionProfiles += "}" - s := strings.Join([]string{`&DiscoveryParameters{`, - `DefaultSchema:` + strings.Replace(this.DefaultSchema.String(), "SchemaKey", "SchemaKey", 1) + `,`, - `DiscoveryProfile:` + strings.Replace(this.DiscoveryProfile.String(), "DiscoveryProfile", "DiscoveryProfile", 1) + `,`, - `TargetConnectionProfiles:` + repeatedStringForTargetConnectionProfiles + `,`, - `TargetTemplate:` + strings.Replace(this.TargetTemplate.String(), "TargetTemplate", "TargetTemplate", 1) + `,`, - `Period:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Period), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, - `ConcurrentScans:` + fmt.Sprintf("%v", this.ConcurrentScans) + `,`, + repeatedStringForItems += "}" + s := strings.Join([]string{`&TargetConnectionProfileList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *DiscoveryPathDefinition) String() string { +func (this *TargetConnectionProfileSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DiscoveryPathDefinition{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Script:` + valueToStringGenerated(this.Script) + `,`, - `Regex:` + valueToStringGenerated(this.Regex) + `,`, + s := strings.Join([]string{`&TargetConnectionProfileSpec{`, + `ConnectRetry:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConnectRetry), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, + `Timeout:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timeout), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, + `PreferredNetconfVersion:` + valueToStringGenerated(this.PreferredNetconfVersion) + `,`, + `Insecure:` + valueToStringGenerated(this.Insecure) + `,`, + `SkipVerify:` + valueToStringGenerated(this.SkipVerify) + `,`, + `IncludeNS:` + valueToStringGenerated(this.IncludeNS) + `,`, + `OperationWithNS:` + valueToStringGenerated(this.OperationWithNS) + `,`, + `UseOperationRemove:` + valueToStringGenerated(this.UseOperationRemove) + `,`, + `CommitCandidate:` + valueToStringGenerated(this.CommitCandidate) + `,`, + `TargetName:` + valueToStringGenerated(this.TargetName) + `,`, `}`, }, "") return s } -func (this *DiscoveryProfile) String() string { +func (this *TargetProfile) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DiscoveryProfile{`, + s := strings.Join([]string{`&TargetProfile{`, `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, `TLSSecret:` + valueToStringGenerated(this.TLSSecret) + `,`, - `ConnectionProfiles:` + fmt.Sprintf("%v", this.ConnectionProfiles) + `,`, + `ConnectionProfile:` + fmt.Sprintf("%v", this.ConnectionProfile) + `,`, + `SyncProfile:` + valueToStringGenerated(this.SyncProfile) + `,`, `}`, }, "") return s } -func (this *DiscoveryRule) String() string { +func (this *TargetSyncProfile) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DiscoveryRule{`, + s := strings.Join([]string{`&TargetSyncProfile{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DiscoveryRuleSpec", "DiscoveryRuleSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DiscoveryRuleStatus", "DiscoveryRuleStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryRuleAddress) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryRuleAddress{`, - `Address:` + fmt.Sprintf("%v", this.Address) + `,`, - `HostName:` + fmt.Sprintf("%v", this.HostName) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetSyncProfileSpec", "TargetSyncProfileSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *DiscoveryRuleList) String() string { +func (this *TargetSyncProfileList) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]DiscoveryRule{" + repeatedStringForItems := "[]TargetSyncProfile{" for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DiscoveryRule", "DiscoveryRule", 1), `&`, ``, 1) + "," + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TargetSyncProfile", "TargetSyncProfile", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" - s := strings.Join([]string{`&DiscoveryRuleList{`, + s := strings.Join([]string{`&TargetSyncProfileList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } -func (this *DiscoveryRulePrefix) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryRulePrefix{`, - `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, - `Excludes:` + fmt.Sprintf("%v", this.Excludes) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryRuleSpec) String() string { +func (this *TargetSyncProfileSpec) String() string { if this == nil { return "nil" } - repeatedStringForPrefixes := "[]DiscoveryRulePrefix{" - for _, f := range this.Prefixes { - repeatedStringForPrefixes += strings.Replace(strings.Replace(f.String(), "DiscoveryRulePrefix", "DiscoveryRulePrefix", 1), `&`, ``, 1) + "," - } - repeatedStringForPrefixes += "}" - repeatedStringForAddresses := "[]DiscoveryRuleAddress{" - for _, f := range this.Addresses { - repeatedStringForAddresses += strings.Replace(strings.Replace(f.String(), "DiscoveryRuleAddress", "DiscoveryRuleAddress", 1), `&`, ``, 1) + "," - } - repeatedStringForAddresses += "}" - s := strings.Join([]string{`&DiscoveryRuleSpec{`, - `Prefixes:` + repeatedStringForPrefixes + `,`, - `Addresses:` + repeatedStringForAddresses + `,`, - `PodSelector:` + strings.Replace(fmt.Sprintf("%v", this.PodSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `ServiceSelector:` + strings.Replace(fmt.Sprintf("%v", this.ServiceSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `ServiceDomain:` + fmt.Sprintf("%v", this.ServiceDomain) + `,`, - `DiscoveryParameters:` + strings.Replace(strings.Replace(this.DiscoveryParameters.String(), "DiscoveryParameters", "DiscoveryParameters", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryRuleStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryRuleStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `StartTime:` + strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "v1.Time", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryVendorProfile) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryVendorProfile{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DiscoveryVendorProfileSpec", "DiscoveryVendorProfileSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryVendorProfileList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]DiscoveryVendorProfile{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DiscoveryVendorProfile", "DiscoveryVendorProfile", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&DiscoveryVendorProfileList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *DiscoveryVendorProfileSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DiscoveryVendorProfileSpec{`, - `Gnmi:` + strings.Replace(strings.Replace(this.Gnmi.String(), "GnmiDiscoveryVendorProfileParameters", "GnmiDiscoveryVendorProfileParameters", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GnmiDiscoveryVendorProfileParameters) String() string { - if this == nil { - return "nil" - } - repeatedStringForPaths := "[]DiscoveryPathDefinition{" - for _, f := range this.Paths { - repeatedStringForPaths += strings.Replace(strings.Replace(f.String(), "DiscoveryPathDefinition", "DiscoveryPathDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForPaths += "}" - s := strings.Join([]string{`&GnmiDiscoveryVendorProfileParameters{`, - `Organization:` + fmt.Sprintf("%v", this.Organization) + `,`, - `ModelMatch:` + valueToStringGenerated(this.ModelMatch) + `,`, - `Paths:` + repeatedStringForPaths + `,`, - `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, - `PreserveNamespace:` + valueToStringGenerated(this.PreserveNamespace) + `,`, - `}`, - }, "") - return s -} -func (this *Proxy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Proxy{`, - `URL:` + fmt.Sprintf("%v", this.URL) + `,`, - `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, - `}`, - }, "") - return s -} -func (this *Repository) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Repository{`, - `RepositoryURL:` + fmt.Sprintf("%v", this.RepositoryURL) + `,`, - `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, - `Proxy:` + strings.Replace(this.Proxy.String(), "Proxy", "Proxy", 1) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, - `}`, - }, "") - return s -} -func (this *Rollout) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Rollout{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RolloutSpec", "RolloutSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RolloutStatus", "RolloutStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RolloutList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Rollout{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Rollout", "Rollout", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RolloutList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *RolloutSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RolloutSpec{`, - `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, - `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, - `SkipUnavailableTarget:` + valueToStringGenerated(this.SkipUnavailableTarget) + `,`, - `}`, - }, "") - return s -} -func (this *RolloutStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForTargets := "[]RolloutTargetStatus{" - for _, f := range this.Targets { - repeatedStringForTargets += strings.Replace(strings.Replace(f.String(), "RolloutTargetStatus", "RolloutTargetStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForTargets += "}" - s := strings.Join([]string{`&RolloutStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `Targets:` + repeatedStringForTargets + `,`, - `}`, - }, "") - return s -} -func (this *RolloutTargetStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RolloutTargetStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Schema) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Schema{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SchemaSpec", "SchemaSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SchemaStatus", "SchemaStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SchemaKey) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SchemaKey{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `}`, - }, "") - return s -} -func (this *SchemaList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Schema{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Schema", "Schema", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&SchemaList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *SchemaRepositoryStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SchemaRepositoryStatus{`, - `RepoURL:` + fmt.Sprintf("%v", this.RepoURL) + `,`, - `Reference:` + fmt.Sprintf("%v", this.Reference) + `,`, - `}`, - }, "") - return s -} -func (this *SchemaSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForRepositories := "[]*SchemaSpecRepository{" - for _, f := range this.Repositories { - repeatedStringForRepositories += strings.Replace(f.String(), "SchemaSpecRepository", "SchemaSpecRepository", 1) + "," - } - repeatedStringForRepositories += "}" - s := strings.Join([]string{`&SchemaSpec{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `Repositories:` + repeatedStringForRepositories + `,`, - `}`, - }, "") - return s -} -func (this *SchemaSpecRepository) String() string { - if this == nil { - return "nil" - } - repeatedStringForDirs := "[]SrcDstPath{" - for _, f := range this.Dirs { - repeatedStringForDirs += strings.Replace(strings.Replace(f.String(), "SrcDstPath", "SrcDstPath", 1), `&`, ``, 1) + "," - } - repeatedStringForDirs += "}" - s := strings.Join([]string{`&SchemaSpecRepository{`, - `Dirs:` + repeatedStringForDirs + `,`, - `Schema:` + strings.Replace(strings.Replace(this.Schema.String(), "SchemaSpecSchema", "SchemaSpecSchema", 1), `&`, ``, 1) + `,`, - `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SchemaSpecSchema) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SchemaSpecSchema{`, - `Models:` + fmt.Sprintf("%v", this.Models) + `,`, - `Includes:` + fmt.Sprintf("%v", this.Includes) + `,`, - `Excludes:` + fmt.Sprintf("%v", this.Excludes) + `,`, - `}`, - }, "") - return s -} -func (this *SchemaStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForRepositories := "[]SchemaRepositoryStatus{" - for _, f := range this.Repositories { - repeatedStringForRepositories += strings.Replace(strings.Replace(f.String(), "SchemaRepositoryStatus", "SchemaRepositoryStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForRepositories += "}" - s := strings.Join([]string{`&SchemaStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `Repositories:` + repeatedStringForRepositories + `,`, - `}`, - }, "") - return s -} -func (this *SrcDstPath) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SrcDstPath{`, - `Src:` + fmt.Sprintf("%v", this.Src) + `,`, - `Dst:` + fmt.Sprintf("%v", this.Dst) + `,`, - `}`, - }, "") - return s -} -func (this *Subscription) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Subscription{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubscriptionSpec", "SubscriptionSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubscriptionStatus", "SubscriptionStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SubscriptionList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Subscription{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Subscription", "Subscription", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&SubscriptionList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *SubscriptionParameters) String() string { - if this == nil { - return "nil" - } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) - } - mapStringForLabels += "}" - s := strings.Join([]string{`&SubscriptionParameters{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Description:` + valueToStringGenerated(this.Description) + `,`, - `Labels:` + mapStringForLabels + `,`, - `AdminState:` + valueToStringGenerated(this.AdminState) + `,`, - `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, - `Interval:` + strings.Replace(fmt.Sprintf("%v", this.Interval), "Duration", "v1.Duration", 1) + `,`, - `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, - `}`, - }, "") - return s -} -func (this *SubscriptionSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForSubscriptions := "[]SubscriptionParameters{" - for _, f := range this.Subscriptions { - repeatedStringForSubscriptions += strings.Replace(strings.Replace(f.String(), "SubscriptionParameters", "SubscriptionParameters", 1), `&`, ``, 1) + "," - } - repeatedStringForSubscriptions += "}" - s := strings.Join([]string{`&SubscriptionSpec{`, - `Target:` + strings.Replace(strings.Replace(this.Target.String(), "SubscriptionTarget", "SubscriptionTarget", 1), `&`, ``, 1) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, - `Subscriptions:` + repeatedStringForSubscriptions + `,`, - `}`, - }, "") - return s -} -func (this *SubscriptionStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubscriptionStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `Targets:` + fmt.Sprintf("%v", this.Targets) + `,`, - `}`, - }, "") - return s -} -func (this *SubscriptionTarget) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubscriptionTarget{`, - `TargetSelector:` + strings.Replace(fmt.Sprintf("%v", this.TargetSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Target) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Target{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetSpec", "TargetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TargetStatus", "TargetStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetConnectionProfile) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetConnectionProfile{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetConnectionProfileSpec", "TargetConnectionProfileSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetConnectionProfileList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]TargetConnectionProfile{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TargetConnectionProfile", "TargetConnectionProfile", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&TargetConnectionProfileList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *TargetConnectionProfileSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetConnectionProfileSpec{`, - `ConnectRetry:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConnectRetry), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, - `Timeout:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timeout), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, - `PreferredNetconfVersion:` + valueToStringGenerated(this.PreferredNetconfVersion) + `,`, - `Insecure:` + valueToStringGenerated(this.Insecure) + `,`, - `SkipVerify:` + valueToStringGenerated(this.SkipVerify) + `,`, - `IncludeNS:` + valueToStringGenerated(this.IncludeNS) + `,`, - `OperationWithNS:` + valueToStringGenerated(this.OperationWithNS) + `,`, - `UseOperationRemove:` + valueToStringGenerated(this.UseOperationRemove) + `,`, - `CommitCandidate:` + valueToStringGenerated(this.CommitCandidate) + `,`, - `TargetName:` + valueToStringGenerated(this.TargetName) + `,`, - `}`, - }, "") - return s -} -func (this *TargetList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Target{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Target", "Target", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&TargetList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *TargetProfile) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetProfile{`, - `Credentials:` + fmt.Sprintf("%v", this.Credentials) + `,`, - `TLSSecret:` + valueToStringGenerated(this.TLSSecret) + `,`, - `ConnectionProfile:` + fmt.Sprintf("%v", this.ConnectionProfile) + `,`, - `SyncProfile:` + valueToStringGenerated(this.SyncProfile) + `,`, - `}`, - }, "") - return s -} -func (this *TargetSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetSpec{`, - `Provider:` + fmt.Sprintf("%v", this.Provider) + `,`, - `Address:` + fmt.Sprintf("%v", this.Address) + `,`, - `TargetProfile:` + strings.Replace(strings.Replace(this.TargetProfile.String(), "TargetProfile", "TargetProfile", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `DiscoveryInfo:` + strings.Replace(this.DiscoveryInfo.String(), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, - `UsedReferences:` + strings.Replace(this.UsedReferences.String(), "TargetStatusUsedReferences", "TargetStatusUsedReferences", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetStatusUsedReferences) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetStatusUsedReferences{`, - `SecretResourceVersion:` + fmt.Sprintf("%v", this.SecretResourceVersion) + `,`, - `TLSSecretResourceVersion:` + fmt.Sprintf("%v", this.TLSSecretResourceVersion) + `,`, - `ConnectionProfileResourceVersion:` + fmt.Sprintf("%v", this.ConnectionProfileResourceVersion) + `,`, - `SyncProfileResourceVersion:` + fmt.Sprintf("%v", this.SyncProfileResourceVersion) + `,`, - `}`, - }, "") - return s -} -func (this *TargetSyncProfile) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetSyncProfile{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TargetSyncProfileSpec", "TargetSyncProfileSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetSyncProfileList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]TargetSyncProfile{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TargetSyncProfile", "TargetSyncProfile", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&TargetSyncProfileList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *TargetSyncProfileSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForSync := "[]TargetSyncProfileSync{" - for _, f := range this.Sync { - repeatedStringForSync += strings.Replace(strings.Replace(f.String(), "TargetSyncProfileSync", "TargetSyncProfileSync", 1), `&`, ``, 1) + "," - } - repeatedStringForSync += "}" - s := strings.Join([]string{`&TargetSyncProfileSpec{`, - `Validate:` + fmt.Sprintf("%v", this.Validate) + `,`, - `Buffer:` + fmt.Sprintf("%v", this.Buffer) + `,`, - `Workers:` + fmt.Sprintf("%v", this.Workers) + `,`, - `Sync:` + repeatedStringForSync + `,`, - `}`, - }, "") - return s -} -func (this *TargetSyncProfileSync) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TargetSyncProfileSync{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, - `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, - `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, - `Interval:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Interval), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TargetTemplate) String() string { - if this == nil { - return "nil" - } - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) - } - mapStringForAnnotations += "}" - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) - } - mapStringForLabels += "}" - s := strings.Join([]string{`&TargetTemplate{`, - `NameTemplate:` + fmt.Sprintf("%v", this.NameTemplate) + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `Labels:` + mapStringForLabels + `,`, - `}`, - }, "") - return s -} -func (this *Workspace) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Workspace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "WorkspaceSpec", "WorkspaceSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "WorkspaceStatus", "WorkspaceStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *WorkspaceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Workspace{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Workspace", "Workspace", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&WorkspaceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *WorkspaceSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WorkspaceSpec{`, - `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *WorkspaceStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WorkspaceStatus{`, - `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, - `Kind:` + valueToStringGenerated(this.Kind) + `,`, - `DeployedRef:` + valueToStringGenerated(this.DeployedRef) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *DiscoveryInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Provider = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Platform = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MacAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MacAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SerialNumber", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SerialNumber = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupportedEncodings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupportedEncodings = append(m.SupportedEncodings, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryParameters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSchema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultSchema == nil { - m.DefaultSchema = &SchemaKey{} - } - if err := m.DefaultSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryProfile", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DiscoveryProfile == nil { - m.DiscoveryProfile = &DiscoveryProfile{} - } - if err := m.DiscoveryProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetConnectionProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TargetConnectionProfiles = append(m.TargetConnectionProfiles, TargetProfile{}) - if err := m.TargetConnectionProfiles[len(m.TargetConnectionProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetTemplate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TargetTemplate == nil { - m.TargetTemplate = &TargetTemplate{} - } - if err := m.TargetTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Period.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConcurrentScans", wireType) - } - m.ConcurrentScans = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConcurrentScans |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryPathDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryPathDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryPathDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Script", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Script = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Regex = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryProfile) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryProfile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryProfile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLSSecret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.TLSSecret = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfiles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionProfiles = append(m.ConnectionProfiles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + repeatedStringForSync := "[]TargetSyncProfileSync{" + for _, f := range this.Sync { + repeatedStringForSync += strings.Replace(strings.Replace(f.String(), "TargetSyncProfileSync", "TargetSyncProfileSync", 1), `&`, ``, 1) + "," } - - if iNdEx > l { - return io.ErrUnexpectedEOF + repeatedStringForSync += "}" + s := strings.Join([]string{`&TargetSyncProfileSpec{`, + `Validate:` + fmt.Sprintf("%v", this.Validate) + `,`, + `Buffer:` + fmt.Sprintf("%v", this.Buffer) + `,`, + `Workers:` + fmt.Sprintf("%v", this.Workers) + `,`, + `Sync:` + repeatedStringForSync + `,`, + `}`, + }, "") + return s +} +func (this *TargetSyncProfileSync) String() string { + if this == nil { + return "nil" } - return nil + s := strings.Join([]string{`&TargetSyncProfileSync{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, + `Encoding:` + valueToStringGenerated(this.Encoding) + `,`, + `Interval:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Interval), "Duration", "v1.Duration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } -func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { +func (this *TargetTemplate) String() string { + if this == nil { + return "nil" + } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + sort.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + sort.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + s := strings.Join([]string{`&TargetTemplate{`, + `NameTemplate:` + fmt.Sprintf("%v", this.NameTemplate) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `Labels:` + mapStringForLabels + `,`, + `}`, + }, "") + return s +} +func (this *Workspace) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Workspace{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "WorkspaceSpec", "WorkspaceSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "WorkspaceStatus", "WorkspaceStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *WorkspaceList) String() string { + if this == nil { + return "nil" + } + repeatedStringForItems := "[]Workspace{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Workspace", "Workspace", 1), `&`, ``, 1) + "," + } + repeatedStringForItems += "}" + s := strings.Join([]string{`&WorkspaceList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s +} +func (this *WorkspaceSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WorkspaceSpec{`, + `Repository:` + strings.Replace(strings.Replace(this.Repository.String(), "Repository", "Repository", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *WorkspaceStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WorkspaceStatus{`, + `ConditionedStatus:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConditionedStatus), "ConditionedStatus", "v1alpha1.ConditionedStatus", 1), `&`, ``, 1) + `,`, + `Kind:` + valueToStringGenerated(this.Kind) + `,`, + `DeployedRef:` + valueToStringGenerated(this.DeployedRef) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DiscoveryParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7321,15 +4233,15 @@ func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRule: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRule: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSchema", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7356,13 +4268,16 @@ func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.DefaultSchema == nil { + m.DefaultSchema = &SchemaKey{} + } + if err := m.DefaultSchema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryProfile", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7389,13 +4304,16 @@ func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.DiscoveryProfile == nil { + m.DiscoveryProfile = &DiscoveryProfile{} + } + if err := m.DiscoveryProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetConnectionProfiles", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7407,192 +4325,29 @@ func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryRuleAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRuleAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRuleAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.HostName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + m.TargetConnectionProfiles = append(m.TargetConnectionProfiles, TargetProfile{}) + if err := m.TargetConnectionProfiles[len(m.TargetConnectionProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryRuleList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRuleList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRuleList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetTemplate", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7619,13 +4374,16 @@ func (m *DiscoveryRuleList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetTemplate == nil { + m.TargetTemplate = &TargetTemplate{} + } + if err := m.TargetTemplate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7652,11 +4410,29 @@ func (m *DiscoveryRuleList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, DiscoveryRule{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Period.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConcurrentScans", wireType) + } + m.ConcurrentScans = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConcurrentScans |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7678,7 +4454,7 @@ func (m *DiscoveryRuleList) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiscoveryRulePrefix) Unmarshal(dAtA []byte) error { +func (m *DiscoveryPathDefinition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7701,15 +4477,15 @@ func (m *DiscoveryRulePrefix) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRulePrefix: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryPathDefinition: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRulePrefix: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryPathDefinition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7737,11 +4513,11 @@ func (m *DiscoveryRulePrefix) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Prefix = string(dAtA[iNdEx:postIndex]) + m.Key = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Excludes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7769,63 +4545,13 @@ func (m *DiscoveryRulePrefix) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Excludes = append(m.Excludes, string(dAtA[iNdEx:postIndex])) + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRuleSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRuleSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefixes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Script", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7835,31 +4561,30 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Prefixes = append(m.Prefixes, DiscoveryRulePrefix{}) - if err := m.Prefixes[len(m.Prefixes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.Script = &s iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Regex", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7869,67 +4594,80 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Addresses = append(m.Addresses, DiscoveryRuleAddress{}) - if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.Regex = &s iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.PodSelector == nil { - m.PodSelector = &v1.LabelSelector{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiscoveryProfile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 4: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiscoveryProfile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiscoveryProfile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7939,31 +4677,27 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ServiceSelector == nil { - m.ServiceSelector = &v1.LabelSelector{} - } - if err := m.ServiceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Credentials = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceDomain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TLSSecret", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7991,13 +4725,14 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ServiceDomain = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.TLSSecret = &s iNdEx = postIndex - case 6: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryParameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfiles", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8007,24 +4742,23 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DiscoveryParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ConnectionProfiles = append(m.ConnectionProfiles, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -8047,7 +4781,7 @@ func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRule) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8070,15 +4804,15 @@ func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryRuleStatus: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRule: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryRuleStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRule: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8105,13 +4839,13 @@ func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8138,10 +4872,40 @@ func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StartTime == nil { - m.StartTime = &v1.Time{} + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8166,7 +4930,7 @@ func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRuleAddress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8189,17 +4953,17 @@ func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryVendorProfile: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRuleAddress: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryVendorProfile: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRuleAddress: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8209,30 +4973,29 @@ func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8242,24 +5005,23 @@ func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.HostName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8282,7 +5044,7 @@ func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiscoveryVendorProfileList) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRuleList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8305,10 +5067,10 @@ func (m *DiscoveryVendorProfileList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryVendorProfileList: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRuleList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryVendorProfileList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRuleList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8373,7 +5135,7 @@ func (m *DiscoveryVendorProfileList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, DiscoveryVendorProfile{}) + m.Items = append(m.Items, DiscoveryRule{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8399,7 +5161,7 @@ func (m *DiscoveryVendorProfileList) Unmarshal(dAtA []byte) error { } return nil } -func (m *DiscoveryVendorProfileSpec) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRulePrefix) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8422,17 +5184,17 @@ func (m *DiscoveryVendorProfileSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DiscoveryVendorProfileSpec: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRulePrefix: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DiscoveryVendorProfileSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRulePrefix: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gnmi", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8442,24 +5204,55 @@ func (m *DiscoveryVendorProfileSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Gnmi.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Excludes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Excludes = append(m.Excludes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -8482,7 +5275,7 @@ func (m *DiscoveryVendorProfileSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRuleSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8505,17 +5298,17 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GnmiDiscoveryVendorProfileParameters: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRuleSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GnmiDiscoveryVendorProfileParameters: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRuleSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Organization", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Prefixes", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8525,29 +5318,65 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Organization = string(dAtA[iNdEx:postIndex]) + m.Prefixes = append(m.Prefixes, DiscoveryRulePrefix{}) + if err := m.Prefixes[len(m.Prefixes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, DiscoveryRuleAddress{}) + if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ModelMatch", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PodSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8557,28 +5386,31 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.ModelMatch = &s + if m.PodSelector == nil { + m.PodSelector = &v1.LabelSelector{} + } + if err := m.PodSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServiceSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8605,14 +5437,16 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Paths = append(m.Paths, DiscoveryPathDefinition{}) - if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ServiceSelector == nil { + m.ServiceSelector = &v1.LabelSelector{} + } + if err := m.ServiceSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ServiceDomain", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8640,14 +5474,13 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := Encoding(dAtA[iNdEx:postIndex]) - m.Encoding = &s + m.ServiceDomain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreserveNamespace", wireType) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryParameters", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8657,13 +5490,25 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.PreserveNamespace = &b + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DiscoveryParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8685,7 +5530,7 @@ func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { } return nil } -func (m *Proxy) Unmarshal(dAtA []byte) error { +func (m *DiscoveryRuleStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8708,17 +5553,17 @@ func (m *Proxy) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Proxy: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryRuleStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Proxy: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryRuleStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8728,29 +5573,30 @@ func (m *Proxy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.URL = string(dAtA[iNdEx:postIndex]) + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8760,23 +5606,27 @@ func (m *Proxy) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Credentials = string(dAtA[iNdEx:postIndex]) + if m.StartTime == nil { + m.StartTime = &v1.Time{} + } + if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -8799,7 +5649,7 @@ func (m *Proxy) Unmarshal(dAtA []byte) error { } return nil } -func (m *Repository) Unmarshal(dAtA []byte) error { +func (m *DiscoveryVendorProfile) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8822,17 +5672,17 @@ func (m *Repository) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Repository: wiretype end group for non-group") + return fmt.Errorf("proto: DiscoveryVendorProfile: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Repository: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DiscoveryVendorProfile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepositoryURL", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8842,29 +5692,30 @@ func (m *Repository) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.RepositoryURL = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8874,27 +5725,78 @@ func (m *Repository) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Credentials = string(dAtA[iNdEx:postIndex]) + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiscoveryVendorProfileList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiscoveryVendorProfileList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiscoveryVendorProfileList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proxy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8921,18 +5823,15 @@ func (m *Repository) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Proxy == nil { - m.Proxy = &Proxy{} - } - if err := m.Proxy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8942,29 +5841,81 @@ func (m *Repository) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = BranchTagKind(dAtA[iNdEx:postIndex]) + m.Items = append(m.Items, DiscoveryVendorProfile{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiscoveryVendorProfileSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiscoveryVendorProfileSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiscoveryVendorProfileSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Gnmi", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8974,23 +5925,24 @@ func (m *Repository) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Ref = string(dAtA[iNdEx:postIndex]) + if err := m.Gnmi.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9013,7 +5965,7 @@ func (m *Repository) Unmarshal(dAtA []byte) error { } return nil } -func (m *Rollout) Unmarshal(dAtA []byte) error { +func (m *GnmiDiscoveryVendorProfileParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9036,17 +5988,17 @@ func (m *Rollout) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Rollout: wiretype end group for non-group") + return fmt.Errorf("proto: GnmiDiscoveryVendorProfileParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Rollout: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GnmiDiscoveryVendorProfileParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Organization", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9056,30 +6008,29 @@ func (m *Rollout) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Organization = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ModelMatch", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9089,28 +6040,28 @@ func (m *Rollout) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.ModelMatch = &s iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9137,65 +6088,16 @@ func (m *Rollout) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Paths = append(m.Paths, DiscoveryPathDefinition{}) + if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RolloutList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RolloutList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RolloutList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9205,30 +6107,30 @@ func (m *RolloutList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := Encoding(dAtA[iNdEx:postIndex]) + m.Encoding = &s iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreserveNamespace", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9238,26 +6140,13 @@ func (m *RolloutList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Rollout{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + b := bool(v != 0) + m.PreserveNamespace = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -9279,7 +6168,7 @@ func (m *RolloutList) Unmarshal(dAtA []byte) error { } return nil } -func (m *RolloutSpec) Unmarshal(dAtA []byte) error { +func (m *Proxy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9302,17 +6191,17 @@ func (m *RolloutSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RolloutSpec: wiretype end group for non-group") + return fmt.Errorf("proto: Proxy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RolloutSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Proxy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9322,28 +6211,27 @@ func (m *RolloutSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.URL = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9371,29 +6259,8 @@ func (m *RolloutSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Strategy = RolloutStrategy(dAtA[iNdEx:postIndex]) + m.Credentials = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SkipUnavailableTarget", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.SkipUnavailableTarget = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -9415,7 +6282,7 @@ func (m *RolloutSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *RolloutStatus) Unmarshal(dAtA []byte) error { +func (m *Repository) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9438,17 +6305,17 @@ func (m *RolloutStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RolloutStatus: wiretype end group for non-group") + return fmt.Errorf("proto: Repository: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RolloutStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Repository: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepoURL", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9458,28 +6325,59 @@ func (m *RolloutStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoURL = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Credentials = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Proxy", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9506,64 +6404,16 @@ func (m *RolloutStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Targets = append(m.Targets, RolloutTargetStatus{}) - if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Proxy == nil { + m.Proxy = &Proxy{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Proxy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RolloutTargetStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RolloutTargetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RolloutTargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9591,13 +6441,13 @@ func (m *RolloutTargetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Kind = BranchTagKind(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9607,24 +6457,23 @@ func (m *RolloutTargetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9647,7 +6496,7 @@ func (m *RolloutTargetStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *Schema) Unmarshal(dAtA []byte) error { +func (m *Rollout) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9670,10 +6519,10 @@ func (m *Schema) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Schema: wiretype end group for non-group") + return fmt.Errorf("proto: Rollout: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Rollout: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -9796,7 +6645,7 @@ func (m *Schema) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaKey) Unmarshal(dAtA []byte) error { +func (m *RolloutList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9819,17 +6668,17 @@ func (m *SchemaKey) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaKey: wiretype end group for non-group") + return fmt.Errorf("proto: RolloutList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaKey: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RolloutList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9839,29 +6688,30 @@ func (m *SchemaKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Provider = string(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9871,23 +6721,25 @@ func (m *SchemaKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.Items = append(m.Items, Rollout{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -9910,7 +6762,7 @@ func (m *SchemaKey) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaList) Unmarshal(dAtA []byte) error { +func (m *RolloutSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9933,15 +6785,15 @@ func (m *SchemaList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaList: wiretype end group for non-group") + return fmt.Errorf("proto: RolloutSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RolloutSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9968,15 +6820,15 @@ func (m *SchemaList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9986,26 +6838,45 @@ func (m *SchemaList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Schema{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Strategy = RolloutStrategy(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipUnavailableTarget", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.SkipUnavailableTarget = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -10027,7 +6898,7 @@ func (m *SchemaList) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { +func (m *RolloutStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10050,17 +6921,17 @@ func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaRepositoryStatus: wiretype end group for non-group") + return fmt.Errorf("proto: RolloutStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaRepositoryStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RolloutStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepoURL", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -10070,29 +6941,30 @@ func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.RepoURL = string(dAtA[iNdEx:postIndex]) + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -10102,23 +6974,25 @@ func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Reference = string(dAtA[iNdEx:postIndex]) + m.Targets = append(m.Targets, RolloutTargetStatus{}) + if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -10141,7 +7015,7 @@ func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaSpec) Unmarshal(dAtA []byte) error { +func (m *RolloutTargetStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10164,47 +7038,15 @@ func (m *SchemaSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Provider = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + return fmt.Errorf("proto: RolloutTargetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RolloutTargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10232,11 +7074,11 @@ func (m *SchemaSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repositories", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10263,8 +7105,7 @@ func (m *SchemaSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Repositories = append(m.Repositories, &SchemaSpecRepository{}) - if err := m.Repositories[len(m.Repositories)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10289,7 +7130,7 @@ func (m *SchemaSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { +func (m *Schema) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10312,15 +7153,15 @@ func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaSpecRepository: wiretype end group for non-group") + return fmt.Errorf("proto: Schema: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaSpecRepository: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 6: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dirs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10347,14 +7188,13 @@ func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Dirs = append(m.Dirs, SrcDstPath{}) - if err := m.Dirs[len(m.Dirs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10381,13 +7221,13 @@ func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 8: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10414,7 +7254,7 @@ func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10439,7 +7279,7 @@ func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { +func (m *SchemaKey) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10462,15 +7302,15 @@ func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaSpecSchema: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaKey: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaSpecSchema: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Models", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10498,43 +7338,11 @@ func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Models = append(m.Models, string(dAtA[iNdEx:postIndex])) + m.Provider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Includes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Includes = append(m.Includes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Excludes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10562,7 +7370,7 @@ func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Excludes = append(m.Excludes, string(dAtA[iNdEx:postIndex])) + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10585,7 +7393,7 @@ func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { } return nil } -func (m *SchemaStatus) Unmarshal(dAtA []byte) error { +func (m *SchemaList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10608,15 +7416,15 @@ func (m *SchemaStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaStatus: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10643,13 +7451,13 @@ func (m *SchemaStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repositories", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10676,8 +7484,8 @@ func (m *SchemaStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Repositories = append(m.Repositories, SchemaRepositoryStatus{}) - if err := m.Repositories[len(m.Repositories)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, Schema{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10702,7 +7510,7 @@ func (m *SchemaStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *SrcDstPath) Unmarshal(dAtA []byte) error { +func (m *SchemaRepositoryStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10725,15 +7533,15 @@ func (m *SrcDstPath) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SrcDstPath: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaRepositoryStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SrcDstPath: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaRepositoryStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Src", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepoURL", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10761,11 +7569,11 @@ func (m *SrcDstPath) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Src = string(dAtA[iNdEx:postIndex]) + m.RepoURL = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dst", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -10793,7 +7601,7 @@ func (m *SrcDstPath) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Dst = string(dAtA[iNdEx:postIndex]) + m.Reference = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -10816,7 +7624,7 @@ func (m *SrcDstPath) Unmarshal(dAtA []byte) error { } return nil } -func (m *Subscription) Unmarshal(dAtA []byte) error { +func (m *SchemaSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10839,17 +7647,17 @@ func (m *Subscription) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Subscription: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Subscription: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -10859,146 +7667,29 @@ func (m *Subscription) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Provider = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubscriptionList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubscriptionList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubscriptionList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11008,28 +7699,27 @@ func (m *SubscriptionList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Repositories", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11056,8 +7746,8 @@ func (m *SubscriptionList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Subscription{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Repositories = append(m.Repositories, &SchemaSpecRepository{}) + if err := m.Repositories[len(m.Repositories)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11082,7 +7772,7 @@ func (m *SubscriptionList) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { +func (m *SchemaSpecRepository) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11105,17 +7795,17 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubscriptionParameters: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaSpecRepository: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubscriptionParameters: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaSpecRepository: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Dirs", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11125,29 +7815,31 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Dirs = append(m.Dirs, SrcDstPath{}) + if err := m.Dirs[len(m.Dirs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11157,28 +7849,28 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.Description = &s + if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11205,140 +7897,63 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Labels[mapkey] = mapvalue iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdminState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - if postIndex > l { + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SchemaSpecSchema) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } - s := AdminState(dAtA[iNdEx:postIndex]) - m.AdminState = &s - iNdEx = postIndex - case 5: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SchemaSpecSchema: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SchemaSpecSchema: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Models", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11366,13 +7981,13 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Mode = SyncMode(dAtA[iNdEx:postIndex]) + m.Models = append(m.Models, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 6: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Includes", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11382,31 +7997,27 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Interval == nil { - m.Interval = &v1.Duration{} - } - if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Includes = append(m.Includes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 7: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Excludes", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11434,7 +8045,7 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + m.Excludes = append(m.Excludes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -11457,7 +8068,7 @@ func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { +func (m *SchemaStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11480,15 +8091,15 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubscriptionSpec: wiretype end group for non-group") + return fmt.Errorf("proto: SchemaStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubscriptionSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SchemaStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11515,15 +8126,15 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Repositories", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11533,46 +8144,79 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Protocol = Protocol(dAtA[iNdEx:postIndex]) + m.Repositories = append(m.Repositories, SchemaRepositoryStatus{}) + if err := m.Repositories[len(m.Repositories)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated } - case 4: + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SrcDstPath) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SrcDstPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SrcDstPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Src", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11600,14 +8244,13 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := Encoding(dAtA[iNdEx:postIndex]) - m.Encoding = &s + m.Src = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Dst", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11617,25 +8260,23 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Subscriptions = append(m.Subscriptions, SubscriptionParameters{}) - if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Dst = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -11658,7 +8299,7 @@ func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *SubscriptionStatus) Unmarshal(dAtA []byte) error { +func (m *Subscription) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11681,15 +8322,15 @@ func (m *SubscriptionStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubscriptionStatus: wiretype end group for non-group") + return fmt.Errorf("proto: Subscription: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubscriptionStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Subscription: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11716,15 +8357,15 @@ func (m *SubscriptionStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -11734,77 +8375,28 @@ func (m *SubscriptionStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Targets = append(m.Targets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubscriptionTarget) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubscriptionTarget: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubscriptionTarget: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11831,10 +8423,7 @@ func (m *SubscriptionTarget) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TargetSelector == nil { - m.TargetSelector = &v1.LabelSelector{} - } - if err := m.TargetSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11859,7 +8448,7 @@ func (m *SubscriptionTarget) Unmarshal(dAtA []byte) error { } return nil } -func (m *Target) Unmarshal(dAtA []byte) error { +func (m *SubscriptionList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -11869,61 +8458,28 @@ func (m *Target) Unmarshal(dAtA []byte) error { if shift >= 64 { return ErrIntOverflowGenerated } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Target: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Target: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscriptionList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscriptionList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11950,13 +8506,13 @@ func (m *Target) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -11983,7 +8539,8 @@ func (m *Target) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, Subscription{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12008,7 +8565,7 @@ func (m *Target) Unmarshal(dAtA []byte) error { } return nil } -func (m *TargetConnectionProfile) Unmarshal(dAtA []byte) error { +func (m *SubscriptionParameters) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12031,17 +8588,17 @@ func (m *TargetConnectionProfile) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TargetConnectionProfile: wiretype end group for non-group") + return fmt.Errorf("proto: SubscriptionParameters: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TargetConnectionProfile: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubscriptionParameters: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12051,28 +8608,60 @@ func (m *TargetConnectionProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Description = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12099,63 +8688,172 @@ func (m *TargetConnectionProfile) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } + m.Labels[mapkey] = mapvalue iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminState", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - if (iNdEx + skippy) > l { + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TargetConnectionProfileList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + s := AdminState(dAtA[iNdEx:postIndex]) + m.AdminState = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TargetConnectionProfileList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TargetConnectionProfileList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mode = SyncMode(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12182,15 +8880,18 @@ func (m *TargetConnectionProfileList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Interval == nil { + m.Interval = &v1.Duration{} + } + if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12200,25 +8901,23 @@ func (m *TargetConnectionProfileList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, TargetConnectionProfile{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -12241,7 +8940,7 @@ func (m *TargetConnectionProfileList) Unmarshal(dAtA []byte) error { } return nil } -func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { +func (m *SubscriptionSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12264,15 +8963,15 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TargetConnectionProfileSpec: wiretype end group for non-group") + return fmt.Errorf("proto: SubscriptionSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TargetConnectionProfileSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubscriptionSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectRetry", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12299,44 +8998,11 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ConnectRetry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Target.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } @@ -12368,7 +9034,7 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { } m.Protocol = Protocol(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } @@ -12387,7 +9053,7 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } @@ -12420,11 +9086,11 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { s := Encoding(dAtA[iNdEx:postIndex]) m.Encoding = &s iNdEx = postIndex - case 6: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PreferredNetconfVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subscriptions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12434,93 +9100,81 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.PreferredNetconfVersion = &s + m.Subscriptions = append(m.Subscriptions, SubscriptionParameters{}) + if err := m.Subscriptions[len(m.Subscriptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated } - b := bool(v != 0) - m.Insecure = &b - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SkipVerify", wireType) + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscriptionStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - b := bool(v != 0) - m.SkipVerify = &b - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeNS", wireType) + if iNdEx >= l { + return io.ErrUnexpectedEOF } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - b := bool(v != 0) - m.IncludeNS = &b - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OperationWithNS", wireType) + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscriptionStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscriptionStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12530,37 +9184,28 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.OperationWithNS = &b - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UseOperationRemove", wireType) + if msglen < 0 { + return ErrInvalidLengthGenerated } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - b := bool(v != 0) - m.UseOperationRemove = &b - case 12: + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitCandidate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12588,14 +9233,63 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - s := CommitCandidate(dAtA[iNdEx:postIndex]) - m.CommitCandidate = &s + m.Targets = append(m.Targets, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 13: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SubscriptionTarget) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SubscriptionTarget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SubscriptionTarget: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12605,24 +9299,27 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.TargetName = &s + if m.TargetSelector == nil { + m.TargetSelector = &v1.LabelSelector{} + } + if err := m.TargetSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -12645,7 +9342,7 @@ func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *TargetList) Unmarshal(dAtA []byte) error { +func (m *TargetConnectionProfile) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12668,15 +9365,15 @@ func (m *TargetList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TargetList: wiretype end group for non-group") + return fmt.Errorf("proto: TargetConnectionProfile: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TargetList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetConnectionProfile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12703,13 +9400,13 @@ func (m *TargetList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -12736,8 +9433,7 @@ func (m *TargetList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Target{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -12762,7 +9458,7 @@ func (m *TargetList) Unmarshal(dAtA []byte) error { } return nil } -func (m *TargetProfile) Unmarshal(dAtA []byte) error { +func (m *TargetConnectionProfileList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -12785,17 +9481,17 @@ func (m *TargetProfile) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TargetProfile: wiretype end group for non-group") + return fmt.Errorf("proto: TargetConnectionProfileList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TargetProfile: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetConnectionProfileList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12805,29 +9501,30 @@ func (m *TargetProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Credentials = string(dAtA[iNdEx:postIndex]) + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLSSecret", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12837,30 +9534,81 @@ func (m *TargetProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - s := string(dAtA[iNdEx:postIndex]) - m.TLSSecret = &s + m.Items = append(m.Items, TargetConnectionProfile{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TargetConnectionProfileSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TargetConnectionProfileSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TargetConnectionProfileSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfile", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConnectRetry", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12870,29 +9618,30 @@ func (m *TargetProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.ConnectionProfile = string(dAtA[iNdEx:postIndex]) + if err := m.ConnectRetry.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncProfile", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -12902,78 +9651,28 @@ func (m *TargetProfile) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.SyncProfile = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TargetSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TargetSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TargetSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13001,11 +9700,30 @@ func (m *TargetSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Provider = string(dAtA[iNdEx:postIndex]) + m.Protocol = Protocol(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13033,13 +9751,14 @@ func (m *TargetSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + s := Encoding(dAtA[iNdEx:postIndex]) + m.Encoding = &s iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetProfile", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PreferredNetconfVersion", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -13049,80 +9768,72 @@ func (m *TargetSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TargetProfile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.PreferredNetconfVersion = &s iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType) } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TargetStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + b := bool(v != 0) + m.Insecure = &b + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipVerify", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TargetStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TargetStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConditionedStatus", wireType) + b := bool(v != 0) + m.SkipVerify = &b + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeNS", wireType) } - var msglen int + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -13132,30 +9843,60 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated + b := bool(v != 0) + m.IncludeNS = &b + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationWithNS", wireType) } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if postIndex > l { - return io.ErrUnexpectedEOF + b := bool(v != 0) + m.OperationWithNS = &b + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UseOperationRemove", wireType) } - if err := m.ConditionedStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: + b := bool(v != 0) + m.UseOperationRemove = &b + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DiscoveryInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CommitCandidate", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -13165,33 +9906,30 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.DiscoveryInfo == nil { - m.DiscoveryInfo = &DiscoveryInfo{} - } - if err := m.DiscoveryInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := CommitCandidate(dAtA[iNdEx:postIndex]) + m.CommitCandidate = &s iNdEx = postIndex - case 3: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsedReferences", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetName", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -13201,27 +9939,24 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.UsedReferences == nil { - m.UsedReferences = &TargetStatusUsedReferences{} - } - if err := m.UsedReferences.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.TargetName = &s iNdEx = postIndex default: iNdEx = preIndex @@ -13244,7 +9979,7 @@ func (m *TargetStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { +func (m *TargetProfile) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -13267,15 +10002,15 @@ func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TargetStatusUsedReferences: wiretype end group for non-group") + return fmt.Errorf("proto: TargetProfile: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TargetStatusUsedReferences: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TargetProfile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretResourceVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13303,11 +10038,11 @@ func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SecretResourceVersion = string(dAtA[iNdEx:postIndex]) + m.Credentials = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLSSecretResourceVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TLSSecret", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13335,11 +10070,12 @@ func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TLSSecretResourceVersion = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.TLSSecret = &s iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfileResourceVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionProfile", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13367,11 +10103,11 @@ func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ConnectionProfileResourceVersion = string(dAtA[iNdEx:postIndex]) + m.ConnectionProfile = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SyncProfileResourceVersion", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SyncProfile", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -13399,7 +10135,8 @@ func (m *TargetStatusUsedReferences) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.SyncProfileResourceVersion = string(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.SyncProfile = &s iNdEx = postIndex default: iNdEx = preIndex diff --git a/apis/inv/v1alpha1/generated.proto b/apis/inv/v1alpha1/generated.proto index f523837d..7a1b208c 100644 --- a/apis/inv/v1alpha1/generated.proto +++ b/apis/inv/v1alpha1/generated.proto @@ -26,32 +26,6 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated". option go_package = "github.com/sdcio/config-server/apis/inv/v1alpha1"; -message DiscoveryInfo { - // Protocol used for discovery - optional string protocol = 1; - - // Type associated with the target - optional string provider = 2; - - // Version associated with the target - optional string version = 3; - - // HostName associated with the target - optional string hostname = 4; - - // Platform associated with the target - optional string platform = 5; - - // MacAddress associated with the target - optional string macAddress = 6; - - // SerialNumber associated with the target - optional string serialNumber = 7; - - // Supported Encodings of the target - repeated string supportedEncodings = 8; -} - message DiscoveryParameters { // DefaultSchema define the default schema used to connect to a target // Indicates that discovery is disable; cannot be used for prefix based discovery rules @@ -62,6 +36,7 @@ message DiscoveryParameters { // TargetConnectionProfiles define the profile the discovery controller uses to create targets // once discovered + // +listType=atomic repeated TargetProfile targetConnectionProfiles = 3; // TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery @@ -97,6 +72,7 @@ message DiscoveryProfile { // ConnectionProfiles define the list of profiles the discovery controller uses to discover the target. // The order in which they are specified is the order in which discovery is executed. + // +listType=atomic repeated string connectionProfiles = 3; } @@ -139,15 +115,18 @@ message DiscoveryRulePrefix { optional string prefix = 1; // IP Prefixes to be excluded + // +listType=atomic repeated string excludes = 2; } // DiscoveryRuleSpec defines the desired state of DiscoveryRule message DiscoveryRuleSpec { // IP Prefixes for which this discovery rule applies + // +listType=atomic repeated DiscoveryRulePrefix prefixes = 1; // IP Prefixes for which this discovery rule applies + // +listType=atomic repeated DiscoveryRuleAddress addresses = 2; // PodSelector defines the pod selector for which this discovery rule applies @@ -210,6 +189,7 @@ message GnmiDiscoveryVendorProfileParameters { optional string modelMatch = 2; // Paths DiscoveryPaths `json:"paths" protobuf:"bytes,3,opt,name=paths"` + // +listType=atomic repeated DiscoveryPathDefinition paths = 3; // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="encoding is immutable" @@ -224,14 +204,14 @@ message GnmiDiscoveryVendorProfileParameters { message Proxy { // URL specifies the base URL of the HTTP/HTTPS proxy server. - optional string URL = 1; + optional string url = 1; // Credentials defines the name of the secret that holds the credentials to connect to the proxy server optional string credentials = 2; } message Repository { - // RepositoryURL specifies the base URL for a given repository + // RepoURL specifies the base URL for a given repository optional string repoURL = 1; // Credentials defines the name of the secret that holds the credentials to connect to the repo @@ -293,6 +273,7 @@ message RolloutStatus { optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; // Targets defines the status of the rollout on the respective target + // +listType=atomic repeated RolloutTargetStatus targets = 2; } @@ -363,6 +344,7 @@ message SchemaSpec { // +kubebuilder:validation:MinItems:=1 // +kubebuilder:validation:MaxItems:=10 // Repositories define the repositories used for building the provider schema + // +listType=atomic repeated SchemaSpecRepository repositories = 3; } @@ -372,6 +354,7 @@ message SchemaSpecRepository { // +kubebuilder:validation:MaxItems=10 // Dirs defines the list of directories that identified the provider schema in src/dst pairs // relative within the repository + // +listType=atomic repeated SrcDstPath dirs = 6; // Schema provides the details of which files must be used for the models and which files/directories @@ -382,14 +365,17 @@ message SchemaSpecRepository { message SchemaSpecSchema { // +kubebuilder:validation:MaxItems=64 // Models defines the list of files/directories to be used as a model + // +listType=atomic repeated string models = 1; // +kubebuilder:validation:MaxItems=64 // Excludes defines the list of files/directories to be excluded + // +listType=atomic repeated string includes = 2; // +kubebuilder:validation:MaxItems=64 // Excludes defines the list of files/directories to be excluded + // +listType=atomic repeated string excludes = 3; } @@ -399,6 +385,7 @@ message SchemaStatus { optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; // SchemaRepositoryStatus provides the array of repositories + // +listType=atomic repeated SchemaRepositoryStatus repositories = 2; } @@ -471,6 +458,7 @@ message SubscriptionParameters { optional .k8s.io.apimachinery.pkg.apis.meta.v1.Duration interval = 6; // +kubebuilder:validation:MaxItems=128 + // +listType=atomic repeated string paths = 7; } @@ -492,6 +480,7 @@ message SubscriptionSpec { // +kubebuilder:validation:MaxItems=128 // +kubebuilder:validation:Optional + // +listType=atomic repeated SubscriptionParameters subscriptions = 5; } @@ -500,6 +489,7 @@ message SubscriptionStatus { optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; // Targets defines the list of targets this resource applies to + // +listType=atomic repeated string targets = 2; } @@ -508,30 +498,6 @@ message SubscriptionTarget { optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector targetSelector = 1; } -// +kubebuilder:object:root=true -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" -// +kubebuilder:printcolumn:name="REASON",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" -// +kubebuilder:printcolumn:name="PROVIDER",type="string",JSONPath=".spec.provider" -// +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".status.discoveryInfo.version" -// +kubebuilder:printcolumn:name="ADDRESS",type="string",JSONPath=".spec.address" -// +kubebuilder:printcolumn:name="PLATFORM",type="string",JSONPath=".status.discoveryInfo.platform" -// +kubebuilder:printcolumn:name="SERIALNUMBER",type="string",JSONPath=".status.discoveryInfo.serialNumber" -// +kubebuilder:printcolumn:name="MACADDRESS",type="string",JSONPath=".status.discoveryInfo.macAddress" -// +kubebuilder:resource:categories={sdc,inv} -// Target is the Schema for the Target API -// +k8s:openapi-gen=true -message Target { - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - optional TargetSpec spec = 2; - - optional TargetStatus status = 3; -} - // +kubebuilder:object:root=true // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -619,15 +585,6 @@ message TargetConnectionProfileSpec { optional string targetName = 13; } -// +kubebuilder:object:root=true -// TargetList contains a list of Targets -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -message TargetList { - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated Target items = 2; -} - message TargetProfile { // Credentials defines the name of the secret that holds the credentials to connect to the target optional string credentials = 1; @@ -642,40 +599,6 @@ message TargetProfile { optional string syncProfile = 4; } -// TargetSpec defines the desired state of Target -message TargetSpec { - // Provider specifies the provider using this target. - optional string provider = 1; - - // Address defines the address to connect to the target - optional string address = 2; - - // TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target - optional TargetProfile targetProfile = 3; -} - -// TargetStatus defines the observed state of Target -message TargetStatus { - // ConditionedStatus provides the status of the Target using conditions - optional .github.com.sdcio.config_server.apis.condition.v1alpha1.ConditionedStatus conditionedStatus = 1; - - // Discovery info defines the information retrieved during discovery - optional DiscoveryInfo discoveryInfo = 2; - - // UsedReferences track the resource used to reconcile the cr - optional TargetStatusUsedReferences usedReferences = 3; -} - -message TargetStatusUsedReferences { - optional string secretResourceVersion = 1; - - optional string tlsSecretResourceVersion = 2; - - optional string connectionProfileResourceVersion = 3; - - optional string syncProfileResourceVersion = 4; -} - // +kubebuilder:object:root=true // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -721,6 +644,7 @@ message TargetSyncProfileSpec { // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:Optional // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="sync may only be added" + // +listType=atomic repeated TargetSyncProfileSync sync = 4; } @@ -737,6 +661,7 @@ message TargetSyncProfileSync { optional uint32 port = 3; // +kubebuilder:validation:MaxItems=10 + // +listType=atomic repeated string paths = 4; // +kubebuilder:validation:Enum=unknown;onChange;sample;once;get; diff --git a/apis/inv/v1alpha1/generated.protomessage.pb.go b/apis/inv/v1alpha1/generated.protomessage.pb.go new file mode 100644 index 00000000..4efc85f4 --- /dev/null +++ b/apis/inv/v1alpha1/generated.protomessage.pb.go @@ -0,0 +1,118 @@ +//go:build kubernetes_protomessage_one_more_release +// +build kubernetes_protomessage_one_more_release + +/* +Copyright 2024 Nokia. + +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 go-to-protobuf. DO NOT EDIT. + +package v1alpha1 + +func (*DiscoveryParameters) ProtoMessage() {} + +func (*DiscoveryPathDefinition) ProtoMessage() {} + +func (*DiscoveryProfile) ProtoMessage() {} + +func (*DiscoveryRule) ProtoMessage() {} + +func (*DiscoveryRuleAddress) ProtoMessage() {} + +func (*DiscoveryRuleList) ProtoMessage() {} + +func (*DiscoveryRulePrefix) ProtoMessage() {} + +func (*DiscoveryRuleSpec) ProtoMessage() {} + +func (*DiscoveryRuleStatus) ProtoMessage() {} + +func (*DiscoveryVendorProfile) ProtoMessage() {} + +func (*DiscoveryVendorProfileList) ProtoMessage() {} + +func (*DiscoveryVendorProfileSpec) ProtoMessage() {} + +func (*GnmiDiscoveryVendorProfileParameters) ProtoMessage() {} + +func (*Proxy) ProtoMessage() {} + +func (*Repository) ProtoMessage() {} + +func (*Rollout) ProtoMessage() {} + +func (*RolloutList) ProtoMessage() {} + +func (*RolloutSpec) ProtoMessage() {} + +func (*RolloutStatus) ProtoMessage() {} + +func (*RolloutTargetStatus) ProtoMessage() {} + +func (*Schema) ProtoMessage() {} + +func (*SchemaKey) ProtoMessage() {} + +func (*SchemaList) ProtoMessage() {} + +func (*SchemaRepositoryStatus) ProtoMessage() {} + +func (*SchemaSpec) ProtoMessage() {} + +func (*SchemaSpecRepository) ProtoMessage() {} + +func (*SchemaSpecSchema) ProtoMessage() {} + +func (*SchemaStatus) ProtoMessage() {} + +func (*SrcDstPath) ProtoMessage() {} + +func (*Subscription) ProtoMessage() {} + +func (*SubscriptionList) ProtoMessage() {} + +func (*SubscriptionParameters) ProtoMessage() {} + +func (*SubscriptionSpec) ProtoMessage() {} + +func (*SubscriptionStatus) ProtoMessage() {} + +func (*SubscriptionTarget) ProtoMessage() {} + +func (*TargetConnectionProfile) ProtoMessage() {} + +func (*TargetConnectionProfileList) ProtoMessage() {} + +func (*TargetConnectionProfileSpec) ProtoMessage() {} + +func (*TargetProfile) ProtoMessage() {} + +func (*TargetSyncProfile) ProtoMessage() {} + +func (*TargetSyncProfileList) ProtoMessage() {} + +func (*TargetSyncProfileSpec) ProtoMessage() {} + +func (*TargetSyncProfileSync) ProtoMessage() {} + +func (*TargetTemplate) ProtoMessage() {} + +func (*Workspace) ProtoMessage() {} + +func (*WorkspaceList) ProtoMessage() {} + +func (*WorkspaceSpec) ProtoMessage() {} + +func (*WorkspaceStatus) ProtoMessage() {} diff --git a/apis/inv/v1alpha1/repository.go b/apis/inv/v1alpha1/repository.go index ee84c9bf..1da6008e 100644 --- a/apis/inv/v1alpha1/repository.go +++ b/apis/inv/v1alpha1/repository.go @@ -17,8 +17,8 @@ limitations under the License. package v1alpha1 type Repository struct { - // RepositoryURL specifies the base URL for a given repository - RepositoryURL string `json:"repoURL" protobuf:"bytes,1,opt,name=repoURL"` + // RepoURL specifies the base URL for a given repository + RepoURL string `json:"repoURL" protobuf:"bytes,1,opt,name=repoURL"` // Credentials defines the name of the secret that holds the credentials to connect to the repo Credentials string `json:"credentials,omitempty" protobuf:"bytes,2,opt,name=credentials"` // Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. @@ -34,7 +34,7 @@ type Repository struct { type Proxy struct { // URL specifies the base URL of the HTTP/HTTPS proxy server. - URL string `json:"URL" protobuf:"bytes,1,opt,name=URL"` + URL string `json:"url" protobuf:"bytes,1,opt,name=url"` // Credentials defines the name of the secret that holds the credentials to connect to the proxy server Credentials string `json:"credentials" protobuf:"bytes,2,opt,name=credentials"` } diff --git a/apis/inv/v1alpha1/rollout_types.go b/apis/inv/v1alpha1/rollout_types.go index 7d2516f0..b22b7ab1 100644 --- a/apis/inv/v1alpha1/rollout_types.go +++ b/apis/inv/v1alpha1/rollout_types.go @@ -43,6 +43,7 @@ type RolloutStatus struct { // ConditionedStatus provides the status of the Rollout using conditions condv1alpha1.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // Targets defines the status of the rollout on the respective target + // +listType=atomic Targets []RolloutTargetStatus `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` } diff --git a/apis/inv/v1alpha1/schema_types.go b/apis/inv/v1alpha1/schema_types.go index fe49e20c..9587aa26 100644 --- a/apis/inv/v1alpha1/schema_types.go +++ b/apis/inv/v1alpha1/schema_types.go @@ -43,6 +43,7 @@ type SchemaSpec struct { // +kubebuilder:validation:MinItems:=1 // +kubebuilder:validation:MaxItems:=10 // Repositories define the repositories used for building the provider schema + // +listType=atomic Repositories []*SchemaSpecRepository `json:"repositories" protobuf:"bytes,3,rep,name=repositories"` } @@ -51,6 +52,7 @@ type SchemaSpecRepository struct { // +kubebuilder:validation:MaxItems=10 // Dirs defines the list of directories that identified the provider schema in src/dst pairs // relative within the repository + // +listType=atomic Dirs []SrcDstPath `json:"dirs,omitempty" yaml:"dirs,omitempty" protobuf:"bytes,6,rep,name=dirs"` // Schema provides the details of which files must be used for the models and which files/directories // cana be excludes @@ -69,12 +71,15 @@ type SrcDstPath struct { type SchemaSpecSchema struct { // +kubebuilder:validation:MaxItems=64 // Models defines the list of files/directories to be used as a model + // +listType=atomic Models []string `json:"models,omitempty" yaml:"models,omitempty" protobuf:"bytes,1,rep,name=models"` // +kubebuilder:validation:MaxItems=64 // Excludes defines the list of files/directories to be excluded + // +listType=atomic Includes []string `json:"includes,omitempty" yaml:"includes,omitempty" protobuf:"bytes,2,rep,name=includes"` // +kubebuilder:validation:MaxItems=64 // Excludes defines the list of files/directories to be excluded + // +listType=atomic Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty" protobuf:"bytes,3,rep,name=excludes"` } @@ -83,6 +88,7 @@ type SchemaStatus struct { // ConditionedStatus provides the status of the Schema using conditions condv1alpha1.ConditionedStatus `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // SchemaRepositoryStatus provides the array of repositories + // +listType=atomic Repositories []SchemaRepositoryStatus `json:"repositories,omitempty" protobuf:"bytes,2,rep,name=repositories"` } diff --git a/apis/inv/v1alpha1/subscription_types.go b/apis/inv/v1alpha1/subscription_types.go index 2757b4ca..28b2afca 100644 --- a/apis/inv/v1alpha1/subscription_types.go +++ b/apis/inv/v1alpha1/subscription_types.go @@ -44,6 +44,7 @@ type SubscriptionSpec struct { Encoding *Encoding `json:"encoding,omitempty" protobuf:"bytes,4,opt,name=encoding,casttype=Encoding"` // +kubebuilder:validation:MaxItems=128 // +kubebuilder:validation:Optional + // +listType=atomic Subscriptions []SubscriptionParameters `json:"subscriptions" protobuf:"bytes,5,rep,name=subscriptions"` } @@ -74,6 +75,7 @@ type SubscriptionParameters struct { // +kubebuilder:validation:Enum="1s";"15s";"30s";"60s"; Interval *metav1.Duration `json:"interval,omitempty" protobuf:"bytes,6,opt,name=interval"` // +kubebuilder:validation:MaxItems=128 + // +listType=atomic Paths []string `json:"paths" protobuf:"bytes,7,rep,name=paths"` // TODO Outputs define the outputs to which this information should go -> reight now we only support prometheus locally // this looks up another CR where they are defined with their respective secrets, etc @@ -84,6 +86,7 @@ type SubscriptionStatus struct { // ConditionedStatus provides the status of the Schema using conditions condv1alpha1.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"` // Targets defines the list of targets this resource applies to + // +listType=atomic Targets []string `json:"targets,omitempty" protobuf:"bytes,2,rep,name=targets"` } diff --git a/apis/inv/v1alpha1/targetconnprofile_types.go b/apis/inv/v1alpha1/targetconnprofile_types.go index 8c2581c0..6890be32 100644 --- a/apis/inv/v1alpha1/targetconnprofile_types.go +++ b/apis/inv/v1alpha1/targetconnprofile_types.go @@ -156,6 +156,6 @@ func init() { var ( TargetConnectionProfileKind = reflect.TypeOf(TargetConnectionProfile{}).Name() TargetConnectionProfileGroupKind = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetConnectionProfileKind}.String() - TargetConnectionProfileKindAPIVersion = TargetKind + "." + SchemeGroupVersion.String() + TargetConnectionProfileKindAPIVersion = TargetConnectionProfileKind + "." + SchemeGroupVersion.String() TargetConnectionProfileGroupVersionKind = SchemeGroupVersion.WithKind(TargetConnectionProfileKind) ) diff --git a/apis/inv/v1alpha1/targetsyncprofile_types.go b/apis/inv/v1alpha1/targetsyncprofile_types.go index 429d5095..f6d28ece 100644 --- a/apis/inv/v1alpha1/targetsyncprofile_types.go +++ b/apis/inv/v1alpha1/targetsyncprofile_types.go @@ -48,6 +48,7 @@ type TargetSyncProfileSpec struct { // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:Optional // +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="sync may only be added" + // +listType=atomic Sync []TargetSyncProfileSync `json:"sync" yaml:"sync" protobuf:"bytes,4,rep,name=sync"` } @@ -61,6 +62,7 @@ type TargetSyncProfileSync struct { // Port defines the port on which the scan runs Port uint32 `json:"port" yaml:"port" protobuf:"varint,3,opt,name=port"` // +kubebuilder:validation:MaxItems=10 + // +listType=atomic Paths []string `json:"paths" yaml:"paths" protobuf:"bytes,4,rep,name=paths"` // +kubebuilder:validation:Enum=unknown;onChange;sample;once;get; // +kubebuilder:default:="get" @@ -109,6 +111,6 @@ func init() { var ( TargetSyncProfileKind = reflect.TypeOf(TargetSyncProfile{}).Name() TargetSyncProfileGroupKind = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetSyncProfileKind}.String() - TargetSyncProfileKindAPIVersion = TargetKind + "." + SchemeGroupVersion.String() + TargetSyncProfileKindAPIVersion = TargetSyncProfileKind + "." + SchemeGroupVersion.String() TargetSyncProfileGroupVersionKind = SchemeGroupVersion.WithKind(TargetSyncProfileKind) ) diff --git a/apis/inv/v1alpha1/zz_generated.deepcopy.go b/apis/inv/v1alpha1/zz_generated.deepcopy.go index 4d2b728c..d99e8115 100644 --- a/apis/inv/v1alpha1/zz_generated.deepcopy.go +++ b/apis/inv/v1alpha1/zz_generated.deepcopy.go @@ -25,27 +25,6 @@ import ( 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 *DiscoveryInfo) DeepCopyInto(out *DiscoveryInfo) { - *out = *in - if in.SupportedEncodings != nil { - in, out := &in.SupportedEncodings, &out.SupportedEncodings - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryInfo. -func (in *DiscoveryInfo) DeepCopy() *DiscoveryInfo { - if in == nil { - return nil - } - out := new(DiscoveryInfo) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DiscoveryParameters) DeepCopyInto(out *DiscoveryParameters) { *out = *in @@ -959,34 +938,6 @@ func (in *SubscriptionTarget) DeepCopy() *SubscriptionTarget { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Target) DeepCopyInto(out *Target) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target. -func (in *Target) DeepCopy() *Target { - if in == nil { - return nil - } - out := new(Target) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Target) 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 *TargetConnectionProfile) DeepCopyInto(out *TargetConnectionProfile) { *out = *in @@ -1110,39 +1061,6 @@ func (in *TargetConnectionProfileSpec) DeepCopy() *TargetConnectionProfileSpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TargetList) DeepCopyInto(out *TargetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Target, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetList. -func (in *TargetList) DeepCopy() *TargetList { - if in == nil { - return nil - } - out := new(TargetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TargetList) 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 *TargetProfile) DeepCopyInto(out *TargetProfile) { *out = *in @@ -1169,66 +1087,6 @@ func (in *TargetProfile) DeepCopy() *TargetProfile { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TargetSpec) DeepCopyInto(out *TargetSpec) { - *out = *in - in.TargetProfile.DeepCopyInto(&out.TargetProfile) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec. -func (in *TargetSpec) DeepCopy() *TargetSpec { - if in == nil { - return nil - } - out := new(TargetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TargetStatus) DeepCopyInto(out *TargetStatus) { - *out = *in - in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus) - if in.DiscoveryInfo != nil { - in, out := &in.DiscoveryInfo, &out.DiscoveryInfo - *out = new(DiscoveryInfo) - (*in).DeepCopyInto(*out) - } - if in.UsedReferences != nil { - in, out := &in.UsedReferences, &out.UsedReferences - *out = new(TargetStatusUsedReferences) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus. -func (in *TargetStatus) DeepCopy() *TargetStatus { - if in == nil { - return nil - } - out := new(TargetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TargetStatusUsedReferences) DeepCopyInto(out *TargetStatusUsedReferences) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatusUsedReferences. -func (in *TargetStatusUsedReferences) DeepCopy() *TargetStatusUsedReferences { - if in == nil { - return nil - } - out := new(TargetStatusUsedReferences) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TargetSyncProfile) DeepCopyInto(out *TargetSyncProfile) { *out = *in diff --git a/artifacts/deployment-apiserver.yaml b/artifacts/deployment-apiserver.yaml index 678ef130..52e664e3 100644 --- a/artifacts/deployment-apiserver.yaml +++ b/artifacts/deployment-apiserver.yaml @@ -61,6 +61,8 @@ spec: fieldPath: status.hostIP - name: METRIC_PORT value: "8443" + - name: KUBE_FEATURE_WatchListClient + value: "false" volumeMounts: - name: api-server-certs mountPath: /apiserver.local.config/certificates diff --git a/artifacts/deployment-controller.yaml b/artifacts/deployment-controller.yaml index 07ca39fa..24120601 100644 --- a/artifacts/deployment-controller.yaml +++ b/artifacts/deployment-controller.yaml @@ -76,6 +76,8 @@ spec: value: "true" - name: ENABLE_ROLLOUT value: "true" + - name: KUBE_FEATURE_WatchListClient + value: "false" volumeMounts: #- name: schema-store # mountPath: /schemas diff --git a/artifacts/in/configmap-input-vars.yaml b/artifacts/in/configmap-input-vars.yaml index fef462d7..dd94988c 100644 --- a/artifacts/in/configmap-input-vars.yaml +++ b/artifacts/in/configmap-input-vars.yaml @@ -5,5 +5,5 @@ metadata: data: sdcApiServerImage: europe-docker.pkg.dev/srlinux/eu.gcr.io/sdc-apiserver:latest sdcControllerImage: europe-docker.pkg.dev/srlinux/eu.gcr.io/sdc-controller:latest - dataServerImage: ghcr.io/sdcio/data-server:v0.0.66 + dataServerImage: ghcr.io/sdcio/data-server:v0.0.67 diff --git a/artifacts/inv.sdcio.dev_discoveryrules.yaml b/artifacts/inv.sdcio.dev_discoveryrules.yaml index d0e68938..98c6b3ea 100644 --- a/artifacts/inv.sdcio.dev_discoveryrules.yaml +++ b/artifacts/inv.sdcio.dev_discoveryrules.yaml @@ -61,6 +61,7 @@ spec: - address type: object type: array + x-kubernetes-list-type: atomic concurrentScans: description: number of concurrent IP scan format: int64 @@ -91,6 +92,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the target @@ -163,6 +165,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic prefix: description: Prefix of the target/target(s) type: string @@ -170,6 +173,7 @@ spec: - prefix type: object type: array + x-kubernetes-list-type: atomic serviceDomain: description: |- ServiceDomain defines the service domain of the cluster, used by svc discovery to identify the @@ -249,6 +253,7 @@ spec: - credentials type: object type: array + x-kubernetes-list-type: atomic targetTemplate: description: TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery diff --git a/artifacts/inv.sdcio.dev_discoveryvendorprofiles.yaml b/artifacts/inv.sdcio.dev_discoveryvendorprofiles.yaml index ae4f6b5d..6d51f13f 100644 --- a/artifacts/inv.sdcio.dev_discoveryvendorprofiles.yaml +++ b/artifacts/inv.sdcio.dev_discoveryvendorprofiles.yaml @@ -83,6 +83,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic preserveNamespace: default: true type: boolean diff --git a/artifacts/inv.sdcio.dev_rollouts.yaml b/artifacts/inv.sdcio.dev_rollouts.yaml index 006a73dc..9baa00b5 100644 --- a/artifacts/inv.sdcio.dev_rollouts.yaml +++ b/artifacts/inv.sdcio.dev_rollouts.yaml @@ -69,17 +69,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS proxy - server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS proxy + server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -87,7 +87,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given repository + description: RepoURL specifies the base URL for a given repository type: string skipUnavailableTarget: type: boolean @@ -230,6 +230,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/artifacts/inv.sdcio.dev_schemas.yaml b/artifacts/inv.sdcio.dev_schemas.yaml index d6fb1dd4..4f11e5e1 100644 --- a/artifacts/inv.sdcio.dev_schemas.yaml +++ b/artifacts/inv.sdcio.dev_schemas.yaml @@ -96,6 +96,7 @@ spec: type: object maxItems: 10 type: array + x-kubernetes-list-type: atomic kind: default: tag description: Kind defines the that the BranchOrTag string is @@ -109,17 +110,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS - proxy server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS + proxy server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -127,8 +128,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given - repository + description: RepoURL specifies the base URL for a given repository type: string schema: description: |- @@ -142,6 +142,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic includes: description: Excludes defines the list of files/directories to be excluded @@ -149,6 +150,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic models: description: Models defines the list of files/directories to be used as a model @@ -156,6 +158,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic type: object required: - kind @@ -166,6 +169,7 @@ spec: maxItems: 10 minItems: 1 type: array + x-kubernetes-list-type: atomic version: description: Version defines the version of the schema type: string @@ -252,6 +256,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/artifacts/inv.sdcio.dev_subscriptions.yaml b/artifacts/inv.sdcio.dev_subscriptions.yaml index 302b0e4b..5a1d7b8d 100644 --- a/artifacts/inv.sdcio.dev_subscriptions.yaml +++ b/artifacts/inv.sdcio.dev_subscriptions.yaml @@ -125,6 +125,7 @@ spec: type: string maxItems: 128 type: array + x-kubernetes-list-type: atomic required: - mode - name @@ -132,6 +133,7 @@ spec: type: object maxItems: 128 type: array + x-kubernetes-list-type: atomic target: description: Targets defines the targets on which this Subscription applies @@ -255,6 +257,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/artifacts/inv.sdcio.dev_targetsyncprofiles.yaml b/artifacts/inv.sdcio.dev_targetsyncprofiles.yaml index f3786d60..3f37ba12 100644 --- a/artifacts/inv.sdcio.dev_targetsyncprofiles.yaml +++ b/artifacts/inv.sdcio.dev_targetsyncprofiles.yaml @@ -98,6 +98,7 @@ spec: type: string maxItems: 10 type: array + x-kubernetes-list-type: atomic port: default: 57400 description: Port defines the port on which the scan runs @@ -120,6 +121,7 @@ spec: type: object maxItems: 10 type: array + x-kubernetes-list-type: atomic x-kubernetes-validations: - message: sync may only be added rule: oldSelf.all(x, x in self) diff --git a/artifacts/inv.sdcio.dev_workspaces.yaml b/artifacts/inv.sdcio.dev_workspaces.yaml index 9957ec18..8eb70407 100644 --- a/artifacts/inv.sdcio.dev_workspaces.yaml +++ b/artifacts/inv.sdcio.dev_workspaces.yaml @@ -69,17 +69,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS proxy - server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS proxy + server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -87,7 +87,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given repository + description: RepoURL specifies the base URL for a given repository type: string required: - kind diff --git a/artifacts/rbac-cluster-role-api-server.yaml b/artifacts/rbac-cluster-role-api-server.yaml index e43d38da..96501375 100644 --- a/artifacts/rbac-cluster-role-api-server.yaml +++ b/artifacts/rbac-cluster-role-api-server.yaml @@ -6,7 +6,7 @@ rules: - apiGroups: [""] resources: ["namespaces", "secrets", "configmaps", "services", "pods"] verbs: ["get", "watch", "list"] -- apiGroups: [""] +- apiGroups: ["events.k8s.io"] resources: ["events"] verbs: ["create", "patch"] - apiGroups: ["admissionregistration.k8s.io"] @@ -15,6 +15,6 @@ rules: - apiGroups: ["flowcontrol.apiserver.k8s.io"] resources: ["flowschemas", "prioritylevelconfigurations"] verbs: ["get", "watch", "list"] -- apiGroups: ["inv.sdcio.dev"] +- apiGroups: ["config.sdcio.dev"] resources: ["targets", "targets/status"] verbs: ["get", "watch", "list"] diff --git a/artifacts/rbac-cluster-role-controller.yaml b/artifacts/rbac-cluster-role-controller.yaml index 09fdb9e2..7e2620d5 100644 --- a/artifacts/rbac-cluster-role-controller.yaml +++ b/artifacts/rbac-cluster-role-controller.yaml @@ -6,7 +6,7 @@ rules: - apiGroups: [""] resources: ["namespaces", "secrets", "services", "pods"] verbs: ["get", "watch", "list"] -- apiGroups: [""] +- apiGroups: ["events.k8s.io"] resources: ["events"] verbs: ["create", "patch"] - apiGroups: ["admissionregistration.k8s.io"] @@ -24,7 +24,7 @@ rules: - apiGroups: ["config.sdcio.dev"] resources: ["deviations", "deviations/status"] verbs: ["get", "watch", "list", "create", "update", "patch", "delete"] -- apiGroups: ["inv.sdcio.dev"] +- apiGroups: ["config.sdcio.dev"] resources: ["targets", "targets/status"] verbs: ["get", "watch", "list", "create", "update", "patch", "delete"] - apiGroups: ["inv.sdcio.dev"] diff --git a/artifacts/rbac-cluster-role-data-server-controller.yaml b/artifacts/rbac-cluster-role-data-server-controller.yaml index 5a1bfc5b..21f54023 100644 --- a/artifacts/rbac-cluster-role-data-server-controller.yaml +++ b/artifacts/rbac-cluster-role-data-server-controller.yaml @@ -6,7 +6,7 @@ rules: - apiGroups: [""] resources: ["namespaces", "secrets", "services", "pods"] verbs: ["get", "watch", "list"] -- apiGroups: [""] +- apiGroups: ["events.k8s.io"] resources: ["events"] verbs: ["create", "patch"] - apiGroups: ["admissionregistration.k8s.io"] @@ -24,7 +24,7 @@ rules: - apiGroups: ["config.sdcio.dev"] resources: ["deviations", "deviations/status"] verbs: ["get", "watch", "list", "create", "update", "patch", "delete"] -- apiGroups: ["inv.sdcio.dev"] +- apiGroups: ["config.sdcio.dev"] resources: ["targets", "targets/status"] verbs: ["get", "watch", "list", "create", "update", "patch", "delete"] - apiGroups: ["inv.sdcio.dev"] diff --git a/artifacts/statefulset-data-server.yaml b/artifacts/statefulset-data-server.yaml index 103d72de..7859106d 100644 --- a/artifacts/statefulset-data-server.yaml +++ b/artifacts/statefulset-data-server.yaml @@ -78,6 +78,8 @@ spec: # value: "true" #- name: ENABLE_ROLLOUT # value: "true" + - name: KUBE_FEATURE_WatchListClient + value: "false" volumeMounts: - name: schema-store mountPath: /schemas diff --git a/cmd/api-server/main.go b/cmd/api-server/main.go index 27f53591..1abf63f5 100644 --- a/cmd/api-server/main.go +++ b/cmd/api-server/main.go @@ -31,7 +31,6 @@ import ( sdcconfig "github.com/sdcio/config-server/apis/config" "github.com/sdcio/config-server/apis/config/handlers" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "github.com/sdcio/config-server/pkg/generated/openapi" _ "github.com/sdcio/config-server/pkg/reconcilers/all" configblameregistry "github.com/sdcio/config-server/pkg/registry/configblame" @@ -45,14 +44,14 @@ import ( "k8s.io/component-base/logs" "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/metrics/filters" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" ) var ( - configDir = "/config" + configDir = "/config" ) func main() { @@ -76,7 +75,7 @@ func main() { for _, api := range (runtime.SchemeBuilder{ clientgoscheme.AddToScheme, configv1alpha1.AddToScheme, - invv1alpha1.AddToScheme, + //invv1alpha1.AddToScheme, }) { if err := api(runScheme); err != nil { log.Error("cannot add scheme", "err", err) @@ -84,7 +83,6 @@ func main() { } } - var tlsOpts []func(*tls.Config) metricsServerOptions := metricsserver.Options{ BindAddress: MetricBindAddress(), @@ -99,7 +97,6 @@ func main() { // this setup is not recommended for production. TLSOpts: tlsOpts, } - mgr_options := ctrl.Options{ Scheme: runScheme, @@ -126,14 +123,19 @@ func main() { os.Exit(1) } + // setting client for subresources + sdcconfig.SetSubResourceClient(mgr.GetClient()) + sdcconfig.SetConfigLister(handlers.ListConfigsByTarget) + registryOptions := &options.Options{ Prefix: configDir, Type: options.StorageType_KV, DB: db, + Client: mgr.GetClient(), } configHandler := handlers.ConfigStoreHandler{ - Client: mgr.GetClient(), + Client: mgr.GetClient(), } configregistryOptions := *registryOptions @@ -141,27 +143,29 @@ func main() { configregistryOptions.DryRunUpdateFn = configHandler.DryRunUpdateFn configregistryOptions.DryRunDeleteFn = configHandler.DryRunDeleteFn + targetStorageProvider := genericregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyTarget(), registryOptions) configStorageProvider := genericregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyConfig(), &configregistryOptions) - sensitiveconfigStorageProvider := genericregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptySensitiveConfig(), &configregistryOptions) configSetStorageProvider := genericregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyConfigSet(), registryOptions) deviationStorageProvider := genericregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyDeviation(), registryOptions) // no storage required since the targetStore is acting as the storage for the running config resource runningConfigStorageProvider := runningconfigregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyRunningConfig(), &options.Options{ - Client: mgr.GetClient(), + Client: mgr.GetClient(), //TargetStore: targetStore, }) // no storage required since the targetStore is acting as the storage for the running config resource configBlameStorageProvider := configblameregistry.NewStorageProvider(ctx, sdcconfig.BuildEmptyConfigBlame(), &options.Options{ - Client: mgr.GetClient(), + Client: mgr.GetClient(), //TargetStore: targetStore, }) - + go func() { if err := builder.APIServer. WithServerName("config-server"). WithOpenAPIDefinitions("Config", "v1alpha1", openapi.GetOpenAPIDefinitions). + WithResourceAndHandler(&sdcconfig.Target{}, targetStorageProvider). + WithResourceAndHandler(&configv1alpha1.Target{}, targetStorageProvider). WithResourceAndHandler(&sdcconfig.Config{}, configStorageProvider). WithResourceAndHandler(&configv1alpha1.Config{}, configStorageProvider). WithResourceAndHandler(&sdcconfig.SensitiveConfig{}, sensitiveconfigStorageProvider). @@ -207,10 +211,9 @@ func IsPProfEnabled() *string { return nil } - func MetricBindAddress() string { if val, found := os.LookupEnv("METRIC_PORT"); found { return fmt.Sprintf(":%s", val) } return ":8443" -} \ No newline at end of file +} diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 09a20e83..ca31d002 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -135,7 +135,7 @@ func main() { if IsLocalDataServerEnabled() { // Create the DS connection manager and register it with controller-runtime. dsCfg := &dsclient.Config{ - Address: dsclient.GetDataServerAddress(), + Address: dsclient.GetLocalDataServerAddress(), // Insecure/TLS settings etc if needed } dsConnMgr := dsmanager.New(ctx, dsCfg) diff --git a/crds/config.sdcio.dev_configblames.yaml b/crds/config.sdcio.dev_configblames.yaml index 90e18aea..03f8c86b 100644 --- a/crds/config.sdcio.dev_configblames.yaml +++ b/crds/config.sdcio.dev_configblames.yaml @@ -19,7 +19,7 @@ spec: - name: config schema: openAPIV3Schema: - description: "\tConfigBlame defines the Schema for the ConfigBlame API" + description: ConfigBlame defines the Schema for the ConfigBlame API properties: apiVersion: description: |- diff --git a/crds/config.sdcio.dev_configs.yaml b/crds/config.sdcio.dev_configs.yaml index 20bc1f16..fa12bb87 100644 --- a/crds/config.sdcio.dev_configs.yaml +++ b/crds/config.sdcio.dev_configs.yaml @@ -19,7 +19,7 @@ spec: - name: config schema: openAPIV3Schema: - description: "\tConfig defines the Schema for the Config API" + description: Config defines the Schema for the Config API properties: apiVersion: description: |- @@ -250,6 +250,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic x-kubernetes-preserve-unknown-fields: true lifecycle: description: |- @@ -300,6 +301,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic x-kubernetes-preserve-unknown-fields: true lifecycle: description: |- diff --git a/crds/config.sdcio.dev_configsets.yaml b/crds/config.sdcio.dev_configsets.yaml index 2df02784..e3bedae5 100644 --- a/crds/config.sdcio.dev_configsets.yaml +++ b/crds/config.sdcio.dev_configsets.yaml @@ -300,6 +300,7 @@ spec: - value type: object type: array + x-kubernetes-list-type: atomic x-kubernetes-preserve-unknown-fields: true lifecycle: description: |- @@ -500,6 +501,7 @@ spec: - type type: object type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/artifacts/inv.sdcio.dev_targets.yaml b/crds/config.sdcio.dev_deviationclears.yaml similarity index 52% rename from artifacts/inv.sdcio.dev_targets.yaml rename to crds/config.sdcio.dev_deviationclears.yaml index ca896dc5..6f3d691e 100644 --- a/artifacts/inv.sdcio.dev_targets.yaml +++ b/crds/config.sdcio.dev_deviationclears.yaml @@ -4,48 +4,22 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.20.0 - name: targets.inv.sdcio.dev + name: deviationclears.config.sdcio.dev spec: - group: inv.sdcio.dev + group: config.sdcio.dev names: categories: - sdc - - inv - kind: Target - listKind: TargetList - plural: targets - singular: target + kind: DeviationClear + listKind: DeviationClearList + plural: deviationclears + singular: deviationclear scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].message - name: REASON - type: string - - jsonPath: .spec.provider - name: PROVIDER - type: string - - jsonPath: .status.discoveryInfo.version - name: VERSION - type: string - - jsonPath: .spec.address - name: ADDRESS - type: string - - jsonPath: .status.discoveryInfo.platform - name: PLATFORM - type: string - - jsonPath: .status.discoveryInfo.serialNumber - name: SERIALNUMBER - type: string - - jsonPath: .status.discoveryInfo.macAddress - name: MACADDRESS - type: string - name: v1alpha1 + - name: config schema: openAPIV3Schema: - description: Target is the Schema for the Target API + description: DeviationClear is the Schema for the DeviationClear API properties: apiVersion: description: |- @@ -65,38 +39,32 @@ spec: metadata: type: object spec: - description: TargetSpec defines the desired state of Target + description: DeviationSpec defines the desired state of Deviation properties: - address: - description: Address defines the address to connect to the target - type: string - connectionProfile: - description: ConnectionProfile define the profile used to connect - to the target once discovered - type: string - credentials: - description: Credentials defines the name of the secret that holds - the credentials to connect to the target - type: string - provider: - description: Provider specifies the provider using this target. - type: string - syncProfile: - description: SyncProfile define the profile used to sync to the target - config once discovered - type: string - tlsSecret: - description: TLSSecret defines the name of the TLS secret to connect - to the target if mtls is used - type: string + items: + items: + properties: + configName: + description: Name of the config - mandatory if the type is config + - not applicable for the other types + type: string + paths: + description: Paths of the respective type that should be cleared + items: + type: string + type: array + type: + type: string + required: + - paths + - type + type: object + type: array required: - - address - - connectionProfile - - credentials - - provider + - items type: object status: - description: TargetStatus defines the observed state of Target + description: DeviationStatus defines the observed state of Deviationgit properties: conditions: description: Conditions of the resource. @@ -156,53 +124,6 @@ spec: x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map - discoveryInfo: - description: Discovery info defines the information retrieved during - discovery - properties: - hostname: - description: HostName associated with the target - type: string - macAddress: - description: MacAddress associated with the target - type: string - platform: - description: Platform associated with the target - type: string - protocol: - description: Protocol used for discovery - type: string - provider: - description: Type associated with the target - type: string - serialNumber: - description: SerialNumber associated with the target - type: string - supportedEncodings: - description: Supported Encodings of the target - items: - type: string - type: array - version: - description: Version associated with the target - type: string - type: object - usedReferences: - description: UsedReferences track the resource used to reconcile the - cr - properties: - connectionProfileResourceVersion: - type: string - secretResourceVersion: - type: string - syncProfileResourceVersion: - type: string - tlsSecretResourceVersion: - type: string - required: - - connectionProfileResourceVersion - - syncProfileResourceVersion - type: object type: object type: object served: true diff --git a/crds/config.sdcio.dev_deviations.yaml b/crds/config.sdcio.dev_deviations.yaml index 88d48eb2..2d6ed5f9 100644 --- a/crds/config.sdcio.dev_deviations.yaml +++ b/crds/config.sdcio.dev_deviations.yaml @@ -19,7 +19,7 @@ spec: - name: config schema: openAPIV3Schema: - description: "\tDeviation is the Schema for the Deviation API" + description: Deviation is the Schema for the Deviation API properties: apiVersion: description: |- @@ -50,7 +50,7 @@ spec: properties: actualValue: description: |- - CurrentValue defines the current value of the config belonging to the path + ActualValue defines the current value of the config belonging to the path that is currently configured on the target type: string desiredValue: @@ -167,7 +167,7 @@ spec: properties: actualValue: description: |- - CurrentValue defines the current value of the config belonging to the path + ActualValue defines the current value of the config belonging to the path that is currently configured on the target type: string desiredValue: @@ -182,6 +182,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic type: object status: description: DeviationStatus defines the observed state of Deviation diff --git a/crds/config.sdcio.dev_runningconfigs.yaml b/crds/config.sdcio.dev_runningconfigs.yaml index 6b440199..6d472cb7 100644 --- a/crds/config.sdcio.dev_runningconfigs.yaml +++ b/crds/config.sdcio.dev_runningconfigs.yaml @@ -19,7 +19,7 @@ spec: - name: config schema: openAPIV3Schema: - description: "\tRunningConfig defines the Schema for the RunningConfig API" + description: RunningConfig defines the Schema for the RunningConfig API properties: apiVersion: description: |- diff --git a/crds/config.sdcio.dev_sensitiveconfigs.yaml b/crds/config.sdcio.dev_sensitiveconfigs.yaml index 984bf0eb..c1d8edf5 100644 --- a/crds/config.sdcio.dev_sensitiveconfigs.yaml +++ b/crds/config.sdcio.dev_sensitiveconfigs.yaml @@ -19,8 +19,7 @@ spec: - name: config schema: openAPIV3Schema: - description: "\tSensitiveConfig defines the Schema for the SensitiveConfig - API" + description: SensitiveConfig defines the Schema for the SensitiveConfig API properties: apiVersion: description: |- @@ -320,6 +319,7 @@ spec: - secretKeyRef type: object type: array + x-kubernetes-list-type: atomic lifecycle: description: |- Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete @@ -393,6 +393,7 @@ spec: - secretKeyRef type: object type: array + x-kubernetes-list-type: atomic lifecycle: description: |- Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete diff --git a/crds/config.sdcio.dev_targetblames.yaml b/crds/config.sdcio.dev_targetblames.yaml new file mode 100644 index 00000000..ec47f21d --- /dev/null +++ b/crds/config.sdcio.dev_targetblames.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.20.0 + name: targetblames.config.sdcio.dev +spec: + group: config.sdcio.dev + names: + kind: TargetBlame + listKind: TargetBlameList + plural: targetblames + singular: targetblame + scope: Namespaced + versions: + - name: config + schema: + openAPIV3Schema: + description: TargetBlame is the Schema for the TargetBlame API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + value: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - value + type: object + served: true + storage: true diff --git a/crds/config.sdcio.dev_targetcleardeviations.yaml b/crds/config.sdcio.dev_targetcleardeviations.yaml new file mode 100644 index 00000000..0185015e --- /dev/null +++ b/crds/config.sdcio.dev_targetcleardeviations.yaml @@ -0,0 +1,63 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.20.0 + name: targetcleardeviations.config.sdcio.dev +spec: + group: config.sdcio.dev + names: + kind: TargetClearDeviation + listKind: TargetClearDeviationList + plural: targetcleardeviations + singular: targetcleardeviation + scope: Namespaced + versions: + - name: config + schema: + openAPIV3Schema: + description: TargetClearDeviation is the Schema for the TargetClearDeviation + API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TargetClearDeviationSpec defines the desired state of Target + properties: + paths: + description: Paths provide the path of the deviation to be cleared + items: + type: string + type: array + required: + - paths + type: object + status: + properties: + cleared: + type: integer + message: + type: string + required: + - cleared + - message + type: object + type: object + served: true + storage: true diff --git a/crds/config.sdcio.dev_targetrunnings.yaml b/crds/config.sdcio.dev_targetrunnings.yaml new file mode 100644 index 00000000..10f917cb --- /dev/null +++ b/crds/config.sdcio.dev_targetrunnings.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.20.0 + name: targetrunnings.config.sdcio.dev +spec: + group: config.sdcio.dev + names: + kind: TargetRunning + listKind: TargetRunningList + plural: targetrunnings + singular: targetrunning + scope: Namespaced + versions: + - name: config + schema: + openAPIV3Schema: + description: TargetRunning is the Schema for the TargetRunning API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + value: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - value + type: object + served: true + storage: true diff --git a/crds/config.sdcio.dev_targets.yaml b/crds/config.sdcio.dev_targets.yaml new file mode 100644 index 00000000..599ae64d --- /dev/null +++ b/crds/config.sdcio.dev_targets.yaml @@ -0,0 +1,354 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.20.0 + name: targets.config.sdcio.dev +spec: + group: config.sdcio.dev + names: + categories: + - sdc + kind: Target + listKind: TargetList + plural: targets + singular: target + scope: Namespaced + versions: + - name: config + schema: + openAPIV3Schema: + description: Target is the Schema for the Target API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TargetSpec defines the desired state of Target + properties: + address: + description: Address defines the address to connect to the target + type: string + connectionProfile: + description: ConnectionProfile define the profile used to connect + to the target once discovered + type: string + credentials: + description: Credentials defines the name of the secret that holds + the credentials to connect to the target + type: string + provider: + description: Provider specifies the provider using this target. + type: string + syncProfile: + description: SyncProfile define the profile used to sync to the target + config once discovered + type: string + tlsSecret: + description: TLSSecret defines the name of the TLS secret to connect + to the target if mtls is used + type: string + required: + - address + - connectionProfile + - credentials + - provider + type: object + status: + description: TargetStatus defines the observed state of Target + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + discoveryInfo: + description: Discovery info defines the information retrieved during + discovery + properties: + hostname: + description: Hostname associated with the target + type: string + macAddress: + description: MacAddress associated with the target + type: string + platform: + description: Platform associated with the target + type: string + protocol: + description: Protocol used for discovery + type: string + provider: + description: Type associated with the target + type: string + serialNumber: + description: SerialNumber associated with the target + type: string + supportedEncodings: + description: Supported Encodings of the target + items: + type: string + type: array + x-kubernetes-list-type: atomic + version: + description: Version associated with the target + type: string + type: object + usedReferences: + description: UsedReferences track the resource used to reconcile the + cr + properties: + connectionProfileResourceVersion: + type: string + secretResourceVersion: + type: string + syncProfileResourceVersion: + type: string + tlsSecretResourceVersion: + type: string + required: + - connectionProfileResourceVersion + - syncProfileResourceVersion + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Target is the Schema for the Target API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: TargetSpec defines the desired state of Target + properties: + address: + description: Address defines the address to connect to the target + type: string + connectionProfile: + description: ConnectionProfile define the profile used to connect + to the target once discovered + type: string + credentials: + description: Credentials defines the name of the secret that holds + the credentials to connect to the target + type: string + provider: + description: Provider specifies the provider using this target. + type: string + syncProfile: + description: SyncProfile define the profile used to sync to the target + config once discovered + type: string + tlsSecret: + description: TLSSecret defines the name of the TLS secret to connect + to the target if mtls is used + type: string + required: + - address + - connectionProfile + - credentials + - provider + type: object + status: + description: TargetStatus defines the observed state of Target + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + discoveryInfo: + description: Discovery info defines the information retrieved during + discovery + properties: + hostname: + description: Hostname associated with the target + type: string + macAddress: + description: MacAddress associated with the target + type: string + platform: + description: Platform associated with the target + type: string + protocol: + description: Protocol used for discovery + type: string + provider: + description: Type associated with the target + type: string + serialNumber: + description: SerialNumber associated with the target + type: string + supportedEncodings: + description: Supported Encodings of the target + items: + type: string + type: array + x-kubernetes-list-type: atomic + version: + description: Version associated with the target + type: string + type: object + usedReferences: + description: UsedReferences track the resource used to reconcile the + cr + properties: + connectionProfileResourceVersion: + type: string + secretResourceVersion: + type: string + syncProfileResourceVersion: + type: string + tlsSecretResourceVersion: + type: string + required: + - connectionProfileResourceVersion + - syncProfileResourceVersion + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/crds/inv.sdcio.dev_discoveryrules.yaml b/crds/inv.sdcio.dev_discoveryrules.yaml index d0e68938..98c6b3ea 100644 --- a/crds/inv.sdcio.dev_discoveryrules.yaml +++ b/crds/inv.sdcio.dev_discoveryrules.yaml @@ -61,6 +61,7 @@ spec: - address type: object type: array + x-kubernetes-list-type: atomic concurrentScans: description: number of concurrent IP scan format: int64 @@ -91,6 +92,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the target @@ -163,6 +165,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic prefix: description: Prefix of the target/target(s) type: string @@ -170,6 +173,7 @@ spec: - prefix type: object type: array + x-kubernetes-list-type: atomic serviceDomain: description: |- ServiceDomain defines the service domain of the cluster, used by svc discovery to identify the @@ -249,6 +253,7 @@ spec: - credentials type: object type: array + x-kubernetes-list-type: atomic targetTemplate: description: TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery diff --git a/crds/inv.sdcio.dev_discoveryvendorprofiles.yaml b/crds/inv.sdcio.dev_discoveryvendorprofiles.yaml index ae4f6b5d..6d51f13f 100644 --- a/crds/inv.sdcio.dev_discoveryvendorprofiles.yaml +++ b/crds/inv.sdcio.dev_discoveryvendorprofiles.yaml @@ -83,6 +83,7 @@ spec: - path type: object type: array + x-kubernetes-list-type: atomic preserveNamespace: default: true type: boolean diff --git a/crds/inv.sdcio.dev_rollouts.yaml b/crds/inv.sdcio.dev_rollouts.yaml index 006a73dc..9baa00b5 100644 --- a/crds/inv.sdcio.dev_rollouts.yaml +++ b/crds/inv.sdcio.dev_rollouts.yaml @@ -69,17 +69,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS proxy - server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS proxy + server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -87,7 +87,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given repository + description: RepoURL specifies the base URL for a given repository type: string skipUnavailableTarget: type: boolean @@ -230,6 +230,7 @@ spec: - name type: object type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/crds/inv.sdcio.dev_schemas.yaml b/crds/inv.sdcio.dev_schemas.yaml index d6fb1dd4..4f11e5e1 100644 --- a/crds/inv.sdcio.dev_schemas.yaml +++ b/crds/inv.sdcio.dev_schemas.yaml @@ -96,6 +96,7 @@ spec: type: object maxItems: 10 type: array + x-kubernetes-list-type: atomic kind: default: tag description: Kind defines the that the BranchOrTag string is @@ -109,17 +110,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS - proxy server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS + proxy server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -127,8 +128,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given - repository + description: RepoURL specifies the base URL for a given repository type: string schema: description: |- @@ -142,6 +142,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic includes: description: Excludes defines the list of files/directories to be excluded @@ -149,6 +150,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic models: description: Models defines the list of files/directories to be used as a model @@ -156,6 +158,7 @@ spec: type: string maxItems: 64 type: array + x-kubernetes-list-type: atomic type: object required: - kind @@ -166,6 +169,7 @@ spec: maxItems: 10 minItems: 1 type: array + x-kubernetes-list-type: atomic version: description: Version defines the version of the schema type: string @@ -252,6 +256,7 @@ spec: type: string type: object type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/crds/inv.sdcio.dev_subscriptions.yaml b/crds/inv.sdcio.dev_subscriptions.yaml index 302b0e4b..5a1d7b8d 100644 --- a/crds/inv.sdcio.dev_subscriptions.yaml +++ b/crds/inv.sdcio.dev_subscriptions.yaml @@ -125,6 +125,7 @@ spec: type: string maxItems: 128 type: array + x-kubernetes-list-type: atomic required: - mode - name @@ -132,6 +133,7 @@ spec: type: object maxItems: 128 type: array + x-kubernetes-list-type: atomic target: description: Targets defines the targets on which this Subscription applies @@ -255,6 +257,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic type: object type: object served: true diff --git a/crds/inv.sdcio.dev_targetsyncprofiles.yaml b/crds/inv.sdcio.dev_targetsyncprofiles.yaml index f3786d60..3f37ba12 100644 --- a/crds/inv.sdcio.dev_targetsyncprofiles.yaml +++ b/crds/inv.sdcio.dev_targetsyncprofiles.yaml @@ -98,6 +98,7 @@ spec: type: string maxItems: 10 type: array + x-kubernetes-list-type: atomic port: default: 57400 description: Port defines the port on which the scan runs @@ -120,6 +121,7 @@ spec: type: object maxItems: 10 type: array + x-kubernetes-list-type: atomic x-kubernetes-validations: - message: sync may only be added rule: oldSelf.all(x, x in self) diff --git a/crds/inv.sdcio.dev_workspaces.yaml b/crds/inv.sdcio.dev_workspaces.yaml index 9957ec18..8eb70407 100644 --- a/crds/inv.sdcio.dev_workspaces.yaml +++ b/crds/inv.sdcio.dev_workspaces.yaml @@ -69,17 +69,17 @@ spec: description: Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. properties: - URL: - description: URL specifies the base URL of the HTTP/HTTPS proxy - server. - type: string credentials: description: Credentials defines the name of the secret that holds the credentials to connect to the proxy server type: string + url: + description: URL specifies the base URL of the HTTP/HTTPS proxy + server. + type: string required: - - URL - credentials + - url type: object ref: description: |- @@ -87,7 +87,7 @@ spec: provider schema version type: string repoURL: - description: RepositoryURL specifies the base URL for a given repository + description: RepoURL specifies the base URL for a given repository type: string required: - kind diff --git a/go.mod b/go.mod index ceb1d557..fa257f3b 100644 --- a/go.mod +++ b/go.mod @@ -1,72 +1,67 @@ module github.com/sdcio/config-server -go 1.24.0 - -toolchain go1.24.3 - -//replace sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.4.1 +go 1.25.0 require ( - github.com/dgraph-io/badger/v4 v4.8.0 - github.com/go-git/go-git/v5 v5.12.0 - github.com/gogo/protobuf v1.3.2 + github.com/dgraph-io/badger/v4 v4.9.1 + github.com/go-git/go-git/v5 v5.16.5 github.com/google/go-cmp v0.7.0 github.com/google/uuid v1.6.0 - github.com/henderiw/apiserver-builder v0.0.4 - github.com/henderiw/apiserver-store v0.0.2 + github.com/henderiw/apiserver-builder v0.0.8 + github.com/henderiw/apiserver-store v0.0.4 github.com/henderiw/iputil v0.0.0-20231218081610-37f78ad9c81c github.com/henderiw/logger v0.0.0-20230911123436-8655829b1abe github.com/henderiw/store v0.0.2-0.20241030044529-f6baff74eab3 github.com/openconfig/gnmi v0.14.1 github.com/openconfig/gnmic/pkg/api v0.1.9 github.com/openconfig/gnmic/pkg/cache v0.1.3 - github.com/otiai10/copy v1.14.0 + github.com/otiai10/copy v1.14.1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.23.0 + github.com/prometheus/client_golang v1.23.2 github.com/prometheus/client_model v0.6.2 - github.com/prometheus/prometheus v0.300.1 - github.com/sdcio/sdc-protos v0.0.50 - github.com/spf13/cobra v1.9.1 + github.com/prometheus/prometheus v0.309.1 + github.com/sdcio/sdc-protos v0.0.51-0.20260304120533-f0e62d96331e + github.com/spf13/cobra v1.10.2 github.com/stretchr/testify v1.11.1 - go.opentelemetry.io/otel v1.38.0 + go.opentelemetry.io/otel v1.39.0 go.starlark.net v0.0.0-20250205221240-492d3672b3f4 - go.uber.org/zap v1.27.0 - golang.org/x/mod v0.29.0 - golang.org/x/sync v0.18.0 - google.golang.org/grpc v1.78.0 + go.uber.org/zap v1.27.1 + golang.org/x/mod v0.30.0 + golang.org/x/sync v0.19.0 + google.golang.org/grpc v1.79.1 google.golang.org/protobuf v1.36.11 - k8s.io/api v0.33.2 - k8s.io/apimachinery v0.33.2 - k8s.io/apiserver v0.33.0 - k8s.io/client-go v0.33.1 - k8s.io/code-generator v0.33.1 - k8s.io/component-base v0.33.1 - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff - k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e - sigs.k8s.io/controller-runtime v0.20.4 - sigs.k8s.io/structured-merge-diff/v4 v4.7.0 - sigs.k8s.io/yaml v1.4.0 + k8s.io/api v0.35.1 + k8s.io/apimachinery v0.35.1 + k8s.io/apiserver v0.35.1 + k8s.io/client-go v0.35.1 + k8s.io/code-generator v0.35.1 + k8s.io/component-base v0.35.1 + k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 + k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 + sigs.k8s.io/controller-runtime v0.23.1 + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 + sigs.k8s.io/yaml v1.6.0 ) require ( bitbucket.org/creachadair/stringset v0.0.14 // indirect - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect cloud.google.com/go/compute/metadata v0.9.0 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AlekSi/pointer v1.2.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/ProtonMail/go-crypto v1.0.0 // indirect + github.com/ProtonMail/go-crypto v1.1.6 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bufbuild/protocompile v0.14.1 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cloudflare/circl v1.3.7 // indirect + github.com/cloudflare/circl v1.6.1 // indirect github.com/coreos/go-semver v0.3.1 // indirect - github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/coreos/go-systemd/v22 v22.6.0 // indirect + github.com/cyphar/filepath-securejoin v0.4.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect @@ -77,96 +72,105 @@ require ( github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/fxamacker/cbor/v2 v2.8.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-billy/v5 v5.6.2 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.21.1 // indirect - github.com/go-openapi/jsonreference v0.21.0 // indirect - github.com/go-openapi/swag v0.23.1 // indirect + github.com/go-openapi/jsonpointer v0.22.1 // indirect + github.com/go-openapi/jsonreference v0.21.3 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.5 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.25.0 // indirect + github.com/google/cel-go v0.26.0 // indirect github.com/google/flatbuffers v25.2.10+incompatible // indirect - github.com/google/gnostic-models v0.6.9 // indirect - github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect + github.com/google/gnostic-models v0.7.0 // indirect + github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jhump/protoreflect v1.17.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/compress v1.18.2 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/mailru/easyjson v0.9.0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nats-io/jwt/v2 v2.5.2 // indirect github.com/nats-io/nats-server/v2 v2.10.4 // indirect github.com/nats-io/nats.go v1.32.0 // indirect github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect - github.com/onsi/ginkgo/v2 v2.22.2 // indirect - github.com/onsi/gomega v1.36.2 // indirect github.com/openconfig/grpctunnel v0.1.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect + github.com/otiai10/mint v1.6.3 // indirect + github.com/pjbgf/sha1cd v0.3.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/common v0.65.0 // indirect + github.com/prometheus/common v0.67.4 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/sdcio/logger v0.0.3 // indirect github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect - github.com/skeema/knownhosts v1.2.2 // indirect - github.com/spf13/pflag v1.0.6 // indirect + github.com/skeema/knownhosts v1.3.1 // indirect + github.com/spf13/pflag v1.0.9 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - go.etcd.io/etcd/api/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/v3 v3.5.21 // indirect + go.etcd.io/etcd/api/v3 v3.6.5 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect + go.etcd.io/etcd/client/v3 v3.6.5 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 // indirect - go.opentelemetry.io/otel/metric v1.38.0 // indirect - go.opentelemetry.io/otel/sdk v1.38.0 // indirect - go.opentelemetry.io/otel/trace v1.38.0 // indirect - go.opentelemetry.io/proto/otlp v1.5.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 // indirect + go.opentelemetry.io/otel/metric v1.39.0 // indirect + go.opentelemetry.io/otel/sdk v1.39.0 // indirect + go.opentelemetry.io/otel/trace v1.39.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect - golang.org/x/crypto v0.44.0 // indirect - golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect - golang.org/x/net v0.47.0 // indirect - golang.org/x/oauth2 v0.32.0 // indirect - golang.org/x/sys v0.38.0 // indirect - golang.org/x/term v0.37.0 // indirect - golang.org/x/text v0.31.0 // indirect - golang.org/x/time v0.11.0 // indirect - golang.org/x/tools v0.38.0 // indirect - golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/term v0.38.0 // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/time v0.14.0 // indirect + golang.org/x/tools v0.39.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.32.1 // indirect - k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 // indirect + k8s.io/apiextensions-apiserver v0.35.1 // indirect + k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kms v0.33.0 // indirect + k8s.io/kms v0.35.1 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.0 // indirect - sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect ) diff --git a/go.sum b/go.sum index 3e551730..344b6ca3 100644 --- a/go.sum +++ b/go.sum @@ -1,20 +1,22 @@ bitbucket.org/creachadair/stringset v0.0.14 h1:t1ejQyf8utS4GZV/4fM+1gvYucggZkfhb+tMobDxYOE= bitbucket.org/creachadair/stringset v0.0.14/go.mod h1:Ej8fsr6rQvmeMDf6CCWMWGb14H9mz8kmDgPPTdiVT0w= -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= -github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw= +github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= @@ -27,27 +29,27 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= -github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= -github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= +github.com/cloudflare/circl v1.6.1 h1:zqIqSPIndyBh1bjLVVDHMPpVKqp8Su/V+6MeDzzQBQ0= +github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.6.0 h1:aGVa/v8B7hpb0TKl0MWoAavPDmHvobFe5R5zn0bCJWo= +github.com/coreos/go-systemd/v22 v22.6.0/go.mod h1:iG+pp635Fo7ZmV/j14KUcmEyWF+0X7Lua8rrTWzYgWU= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= +github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgraph-io/badger/v4 v4.8.0 h1:JYph1ChBijCw8SLeybvPINizbDKWZ5n/GYbz2yhN/bs= -github.com/dgraph-io/badger/v4 v4.8.0/go.mod h1:U6on6e8k/RTbUWxqKR0MvugJuVmkxSNc79ap4917h4w= +github.com/dgraph-io/badger/v4 v4.9.1 h1:DocZXZkg5JJHJPtUErA0ibyHxOVUDVoXLSCV6t8NC8w= +github.com/dgraph-io/badger/v4 v4.9.1/go.mod h1:5/MEx97uzdPUHR4KtkNt8asfI2T4JiEiQlV7kWUo8c0= github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM= github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI= github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= @@ -56,8 +58,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= +github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -70,18 +72,18 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= -github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU= -github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= -github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= -github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/go-git/go-git/v5 v5.16.5 h1:mdkuqblwr57kVfXri5TTH+nMFLNUxIj9Z7F5ykFbw5s= +github.com/go-git/go-git/v5 v5.16.5/go.mod h1:QOMLpNf1qxuSY4StA/ArOdfFR2TrKEjJiye2kel2m+M= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -89,61 +91,88 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.21.1 h1:whnzv/pNXtK2FbX/W9yJfRmE2gsmkfahjMKB0fZvcic= -github.com/go-openapi/jsonpointer v0.21.1/go.mod h1:50I1STOfbY1ycR8jGz8DaMeLCdXiI6aDteEdRNNzpdk= -github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= -github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/swag v0.23.1 h1:lpsStH0n2ittzTnbaSloVZLuB5+fvSY/+hnagBjSNZU= -github.com/go-openapi/swag v0.23.1/go.mod h1:STZs8TbRvEQQKUA+JZNAm3EWlgaOBGpyFDqQnDHMef0= +github.com/go-openapi/jsonpointer v0.22.1 h1:sHYI1He3b9NqJ4wXLoJDKmUmHkWy/L7rtEo92JUxBNk= +github.com/go-openapi/jsonpointer v0.22.1/go.mod h1:pQT9OsLkfz1yWoMgYFy4x3U5GY5nUlsOn1qSBH5MkCM= +github.com/go-openapi/jsonreference v0.21.3 h1:96Dn+MRPa0nYAR8DR1E03SblB5FJvh7W6krPI0Z7qMc= +github.com/go-openapi/jsonreference v0.21.3/go.mod h1:RqkUP0MrLf37HqxZxrIAtTWW4ZJIK1VzduhXYBEeGc4= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= -github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I= github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY= -github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/flatbuffers v25.2.10+incompatible h1:F3vclr7C3HpB1k9mxCGRMXq6FdUalZ6H/pNX4FP1v0Q= github.com/google/flatbuffers v25.2.10+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= -github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f h1:HU1RgM6NALf/KW9HEY6zry3ADbDKcmpQ+hJedoNGQYQ= +github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f/go.mod h1:67FPmZWbr+KDT/VlpWtw6sO9XSjpJmLuHpoLmWiTGgY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= -github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= -github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= +github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 h1:cLN4IBkmkYZNnk7EAJ0BHIethd+J6LqxFNw5mSiI2bM= +github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 h1:FbSCl+KggFl+Ocym490i/EyXF4lPgLoUtcSWquBM0Rs= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= -github.com/henderiw/apiserver-builder v0.0.4 h1:H0VBAs74x6Tf2KCQ3Us3kkWjzA/kj3eBpvnylwDIGdo= -github.com/henderiw/apiserver-builder v0.0.4/go.mod h1:guryT8mhwZhroye1C7JoiLlqLmXnxg/pFKwoxLGZTQQ= -github.com/henderiw/apiserver-store v0.0.2 h1:0nfgU9wPl/zZmtSOta2MlFm+WsXlEl0Mo2EKwsk6B4w= -github.com/henderiw/apiserver-store v0.0.2/go.mod h1:sz0/rzH0rk/WJMztre8hmctMkaY1ANRWCKM67SK5Ei0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 h1:NmZ1PKzSTQbuGHw9DGPFomqkkLWMC+vZCkfs+FHv1Vg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= +github.com/henderiw/apiserver-builder v0.0.8 h1:TxJnhISBgrhw1HJ1cSNAz7nveu86y3jy4dvcmNQdsVc= +github.com/henderiw/apiserver-builder v0.0.8/go.mod h1:7VrZxXPR54Urtg49taC7cNgo+AOzSxWEJXPDdDbKnCk= +github.com/henderiw/apiserver-store v0.0.4 h1:IeawmDpcX4PzRxh0IW8j8IC++Vn1OOkUUBeq3laylPU= +github.com/henderiw/apiserver-store v0.0.4/go.mod h1:RuXLMHJwszn6LXgL6fO9fxMC7AW5wAc4zOddnnZpkKI= github.com/henderiw/iputil v0.0.0-20231218081610-37f78ad9c81c h1:nFnCNyRV1Ej/zqV/gn8UnFESkoPUXhwpUCZyhSYGSYA= github.com/henderiw/iputil v0.0.0-20231218081610-37f78ad9c81c/go.mod h1:PrPJdVAwtl5tL323wykHZ5L/b7tfJJsjhegza/wq4fQ= github.com/henderiw/logger v0.0.0-20230911123436-8655829b1abe h1:+R53KH7fW+pmqlfSYVTCGPn8pj6gqBGcQ0nq7L1h8+g= @@ -156,18 +185,16 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94= github.com/jhump/protoreflect v1.17.0/go.mod h1:h9+vUUL38jiBzck8ck+6G/aeMX8Z4QUY/NiJPwPNi+8= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -177,15 +204,14 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= -github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nats-io/jwt/v2 v2.5.2 h1:DhGH+nKt+wIkDxM6qnVSKjokq5t59AZV5HRcFW0zJwU= @@ -202,10 +228,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= -github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= -github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= -github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/openconfig/gnmi v0.14.1 h1:qKMuFvhIRR2/xxCOsStPQ25aKpbMDdWr3kI+nP9bhMs= github.com/openconfig/gnmi v0.14.1/go.mod h1:whr6zVq9PCU8mV1D0K9v7Ajd3+swoN6Yam9n8OH3eT0= github.com/openconfig/gnmic/pkg/api v0.1.9 h1:XPln4mDgC2Bjh9VqE+BY1LLvQrk1tGHZLivDnCR3Nbg= @@ -218,47 +244,47 @@ github.com/openconfig/grpctunnel v0.1.0 h1:EN99qtlExZczgQgp5ANnHRC/Rs62cAG+Tz2BQ github.com/openconfig/grpctunnel v0.1.0/go.mod h1:G04Pdu0pml98tdvXrvLaU+EBo3PxYfI9MYqpvdaEHLo= github.com/openconfig/ygot v0.29.20 h1:XHLpwCN91QuKc2LAvnEqtCmH8OuxgLlErDhrdl2mJw8= github.com/openconfig/ygot v0.29.20/go.mod h1:K8HbrPm/v8/emtGQ9+RsJXx6UPKC5JzS/FqK7pN+tMo= -github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= -github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8= +github.com/otiai10/copy v1.14.1/go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I= +github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs= +github.com/otiai10/mint v1.6.3/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= +github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= +github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= -github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE= -github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8= +github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+Lvsc= +github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/prometheus/prometheus v0.300.1 h1:9KKcTTq80gkzmXW0Et/QCFSrBPgmwiS3Hlcxc6o8KlM= -github.com/prometheus/prometheus v0.300.1/go.mod h1:gtTPY/XVyCdqqnjA3NzDMb0/nc5H9hOu1RMame+gHyM= +github.com/prometheus/prometheus v0.309.1 h1:jutK6eCYDpWdPTUbVbkcQsNCMO9CCkSwjQRMLds4jSo= +github.com/prometheus/prometheus v0.309.1/go.mod h1:d+dOGiVhuNDa4MaFXHVdnUBy/CzqlcNTooR8oM1wdTU= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sdcio/logger v0.0.3 h1:IFUbObObGry+S8lHGwOQKKRxJSuOphgRU/hxVhOdMOM= github.com/sdcio/logger v0.0.3/go.mod h1:yWaOxK/G6vszjg8tKZiMqiEjlZouHsjFME4zSk+SAEA= -github.com/sdcio/sdc-protos v0.0.50 h1:aR6Av1QMTFNXKKxnrz8vlIXQ0y21lxQJEMut1oLd2Bg= -github.com/sdcio/sdc-protos v0.0.50/go.mod h1:huh1QVE023w+reU2Gt6h1f83R3lJidcFLbQje7cMY1M= +github.com/sdcio/sdc-protos v0.0.51-0.20260304120533-f0e62d96331e h1:oe0q40PuBLd4M7X9D5UHnfhN0Tv/RXZE/eQOKOSIlCw= +github.com/sdcio/sdc-protos v0.0.51-0.20260304120533-f0e62d96331e/go.mod h1:huh1QVE023w+reU2Gt6h1f83R3lJidcFLbQje7cMY1M= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= -github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= +github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -284,93 +310,82 @@ github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chq github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= -go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= -go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= -go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= -go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= -go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= -go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA= -go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8= -go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= -go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= -go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk= -go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU= -go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk= -go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs= -go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU= -go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= +go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= +go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= +go.etcd.io/etcd/api/v3 v3.6.5 h1:pMMc42276sgR1j1raO/Qv3QI9Af/AuyQUW6CBAWuntA= +go.etcd.io/etcd/api/v3 v3.6.5/go.mod h1:ob0/oWA/UQQlT1BmaEkWQzI0sJ1M0Et0mMpaABxguOQ= +go.etcd.io/etcd/client/pkg/v3 v3.6.5 h1:Duz9fAzIZFhYWgRjp/FgNq2gO1jId9Yae/rLn3RrBP8= +go.etcd.io/etcd/client/pkg/v3 v3.6.5/go.mod h1:8Wx3eGRPiy0qOFMZT/hfvdos+DjEaPxdIDiCDUv/FQk= +go.etcd.io/etcd/client/v3 v3.6.5 h1:yRwZNFBx/35VKHTcLDeO7XVLbCBFbPi+XV4OC3QJf2U= +go.etcd.io/etcd/client/v3 v3.6.5/go.mod h1:ZqwG/7TAFZ0BJ0jXRPoJjKQJtbFo/9NIY8uoFFKcCyo= +go.etcd.io/etcd/pkg/v3 v3.6.5 h1:byxWB4AqIKI4SBmquZUG1WGtvMfMaorXFoCcFbVeoxM= +go.etcd.io/etcd/pkg/v3 v3.6.5/go.mod h1:uqrXrzmMIJDEy5j00bCqhVLzR5jEJIwDp5wTlLwPGOU= +go.etcd.io/etcd/server/v3 v3.6.5 h1:4RbUb1Bd4y1WkBHmuF+cZII83JNQMuNXzyjwigQ06y0= +go.etcd.io/etcd/server/v3 v3.6.5/go.mod h1:PLuhyVXz8WWRhzXDsl3A3zv/+aK9e4A9lpQkqawIaH0= +go.etcd.io/raft/v3 v3.6.0 h1:5NtvbDVYpnfZWcIHgGRk9DyzkBIXOi8j+DDp1IcnUWQ= +go.etcd.io/raft/v3 v3.6.0/go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= -go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= -go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 h1:1fTNlAIJZGWLP5FVu0fikVry1IsiUnXjf7QFvoNN3Xw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0/go.mod h1:zjPK58DtkqQFn+YUMbx0M2XV3QgKU0gS9LeGohREyK4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 h1:m639+BofXTvcY1q8CGs4ItwQarYtJPOWmVobfM1HpVI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0/go.mod h1:LjReUci/F4BUyv+y4dwnq3h/26iNOeC3wAIqgvTIZVo= -go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= -go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= -go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= -go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= -go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= -go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= -go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= -go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= -go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= -go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 h1:ssfIgGNANqpVFCndZvcuyKbl0g+UAVcbBcqGkG28H0Y= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0/go.mod h1:GQ/474YrbE4Jx8gZ4q5I4hrhUzM6UPzyrqJYV2AqPoQ= +go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= +go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 h1:f0cb2XPmrqn4XMy9PNliTgRKJgS5WcL/u0/WRYGz4t0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0/go.mod h1:vnakAaFckOMiMtOIhFI2MNH4FYrZzXCYxmb1LlhoGz8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0 h1:in9O8ESIOlwJAEGTkkf34DesGRAc/Pn8qJ7k3r/42LM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.39.0/go.mod h1:Rp0EXBm5tfnv0WL+ARyO/PHBEaEAT8UUHQ6AGJcSq6c= +go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= +go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= +go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= +go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= +go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= +go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= +go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.starlark.net v0.0.0-20250205221240-492d3672b3f4 h1:eBP+boBfJoGU3irqbxGTcTlKcbNwJCOdbmsnDq56nak= go.starlark.net v0.0.0-20250205221240-492d3672b3f4/go.mod h1:YKMCv9b1WrfWmeqdV5MAuEHWsu5iC+fe6kYl2sQjdI8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= -go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= +go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= +golang.org/x/exp v0.0.0-20250808145144-a408d31f581a h1:Y+7uR/b1Mw2iSXZ3G//1haIiSElDQZ8KWh0h+sZPG90= +golang.org/x/exp v0.0.0-20250808145144-a408d31f581a/go.mod h1:rT6SFzZ7oxADUDx58pcaKFTcZ+inxAa9fTrYx/uVYwg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= -golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk= +golang.org/x/mod v0.30.0/go.mod h1:lAsf5O2EvJeSFMiBxXDki7sCgAxEUcZHXoXMKT4GJKc= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= -golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= -golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -380,43 +395,27 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= -golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= +golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q= +golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= -golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= -golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= -golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= -golang.org/x/tools/go/expect v0.1.0-deprecated h1:jY2C5HGYR5lqex3gEniOQL0r7Dq5+VGVgY1nudX5lXY= -golang.org/x/tools/go/expect v0.1.0-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= +golang.org/x/tools/go/expect v0.1.1-deprecated h1:jpBZDwmgPhXsKZC6WhL20P4b/wmnpsEAGHaNy0n/rJM= +golang.org/x/tools/go/expect v0.1.1-deprecated/go.mod h1:eihoPOH+FgIqa3FpoTwguz/bVUSGBlGQU67vpBeOrBY= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated h1:1h2MnaIAIXISqTFKdENegdpAgUXz6NrPEsbIeWaBRvM= golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated/go.mod h1:RVAQXBGNv1ib0J382/DPCRS/BPnsGebyM1Gj5VSDpG8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -427,22 +426,20 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= -google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda h1:+2XxjfsAu6vqFxwGBRcHiMaDCuZiqXGDUDVWVtrFAnE= -google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= -google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= -google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 h1:7LRqPCEdE4TP4/9psdaB7F2nhZFfBiGJomA5sojLWdU= +google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY= +google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= @@ -452,45 +449,43 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY= -k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs= -k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= -k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= -k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY= -k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc= -k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8= -k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4= -k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA= -k8s.io/code-generator v0.33.1 h1:ZLzIRdMsh3Myfnx9BaooX6iQry29UJjVfVG+BuS+UMw= -k8s.io/code-generator v0.33.1/go.mod h1:HUKT7Ubp6bOgIbbaPIs9lpd2Q02uqkMCMx9/GjDrWpY= -k8s.io/component-base v0.33.1 h1:EoJ0xA+wr77T+G8p6T3l4efT2oNwbqBVKR71E0tBIaI= -k8s.io/component-base v0.33.1/go.mod h1:guT/w/6piyPfTgq7gfvgetyXMIh10zuXA6cRRm3rDuY= -k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 h1:2OX19X59HxDprNCVrWi6jb7LW1PoqTlYqEq5H2oetog= -k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.35.1 h1:0PO/1FhlK/EQNVK5+txc4FuhQibV25VLSdLMmGpDE/Q= +k8s.io/api v0.35.1/go.mod h1:28uR9xlXWml9eT0uaGo6y71xK86JBELShLy4wR1XtxM= +k8s.io/apiextensions-apiserver v0.35.1 h1:p5vvALkknlOcAqARwjS20kJffgzHqwyQRM8vHLwgU7w= +k8s.io/apiextensions-apiserver v0.35.1/go.mod h1:2CN4fe1GZ3HMe4wBr25qXyJnJyZaquy4nNlNmb3R7AQ= +k8s.io/apimachinery v0.35.1 h1:yxO6gV555P1YV0SANtnTjXYfiivaTPvCTKX6w6qdDsU= +k8s.io/apimachinery v0.35.1/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/apiserver v0.35.1 h1:potxdhhTL4i6AYAa2QCwtlhtB1eCdWQFvJV6fXgJzxs= +k8s.io/apiserver v0.35.1/go.mod h1:BiL6Dd3A2I/0lBnteXfWmCFobHM39vt5+hJQd7Lbpi4= +k8s.io/client-go v0.35.1 h1:+eSfZHwuo/I19PaSxqumjqZ9l5XiTEKbIaJ+j1wLcLM= +k8s.io/client-go v0.35.1/go.mod h1:1p1KxDt3a0ruRfc/pG4qT/3oHmUj1AhSHEcxNSGg+OA= +k8s.io/code-generator v0.35.1 h1:yLKR2la7Z9cWT5qmk67ayx8xXLM4RRKQMnC8YPvTWRI= +k8s.io/code-generator v0.35.1/go.mod h1:F2Fhm7aA69tC/VkMXLDokdovltXEF026Tb9yfQXQWKg= +k8s.io/component-base v0.35.1 h1:XgvpRf4srp037QWfGBLFsYMUQJkE5yMa94UsJU7pmcE= +k8s.io/component-base v0.35.1/go.mod h1:HI/6jXlwkiOL5zL9bqA3en1Ygv60F03oEpnuU1G56Bs= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b h1:gMplByicHV/TJBizHd9aVEsTYoJBnnUAT5MHlTkbjhQ= +k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b/go.mod h1:CgujABENc3KuTrcsdpGmrrASjtQsWCT7R99mEV4U/fM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kms v0.33.0 h1:fhQSW/vyaWDhMp0vDuO/sLg2RlGZf4F77beSXcB4/eE= -k8s.io/kms v0.33.0/go.mod h1:C1I8mjFFBNzfUZXYt9FZVJ8MJl7ynFbGgZFbBzkBJ3E= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e h1:KqK5c/ghOm8xkHYhlodbp6i6+r+ChV2vuAuVRdFbLro= -k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kms v0.35.1 h1:kjv2r9g1mY7uL+l1RhyAZvWVZIA/4qIfBHXyjFGLRhU= +k8s.io/kms v0.35.1/go.mod h1:VT+4ekZAdrZDMgShK37vvlyHUVhwI9t/9tvh0AyCWmQ= +k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 h1:HhDfevmPS+OalTjQRKbTHppRIz01AWi8s45TMXStgYY= +k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzkbzn+gDM4X9T4Ck= +k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.0 h1:XotDXzqvJ8Nx5eiZZueLpTuafJz8SiodgOemI+w87QU= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.32.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU= -sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= -sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/controller-runtime v0.23.1 h1:TjJSM80Nf43Mg21+RCy3J70aj/W6KyvDtOlpKf+PupE= +sigs.k8s.io/controller-runtime v0.23.1/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.7.0 h1:qPeWmscJcXP0snki5IYF79Z8xrl8ETFxgMd7wez1XkI= -sigs.k8s.io/structured-merge-diff/v4 v4.7.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/goreleaser.api-server.dockerfile b/goreleaser.api-server.dockerfile index 0b3878d6..83808c3e 100644 --- a/goreleaser.api-server.dockerfile +++ b/goreleaser.api-server.dockerfile @@ -2,7 +2,7 @@ # Licensed under the Apache License 2.0 # SPDX-License-Identifier: Apache-2.0 # -FROM golang:1.21 AS builder +FROM golang:1.25 AS builder ARG USERID=10000 # no need to include cgo bindings ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 diff --git a/goreleaser.controller.dockerfile b/goreleaser.controller.dockerfile index d224a4ee..9763200b 100644 --- a/goreleaser.controller.dockerfile +++ b/goreleaser.controller.dockerfile @@ -2,7 +2,7 @@ # Licensed under the Apache License 2.0 # SPDX-License-Identifier: Apache-2.0 # -FROM golang:1.21 AS builder +FROM golang:1.25 AS builder ARG USERID=10000 # no need to include cgo bindings ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64 diff --git a/pkg/discovery/discoveryrule/children.go b/pkg/discovery/discoveryrule/children.go index 8d6dd72b..9208fd6b 100644 --- a/pkg/discovery/discoveryrule/children.go +++ b/pkg/discovery/discoveryrule/children.go @@ -44,7 +44,7 @@ func (r *dr) deleteUnWantedTargets(ctx context.Context) error { client.MatchingLabels{invv1alpha1.LabelKeyDiscoveryRule: r.cfg.CR.GetName()}, } - targetList := &invv1alpha1.TargetList{} + targetList := &configv1alpha1.TargetList{} if err := r.client.List(ctx, targetList, opts...); err != nil { return err } diff --git a/pkg/discovery/discoveryrule/config.go b/pkg/discovery/discoveryrule/config.go index d567946f..b4353f66 100644 --- a/pkg/discovery/discoveryrule/config.go +++ b/pkg/discovery/discoveryrule/config.go @@ -40,18 +40,18 @@ type DiscoveryRuleConfig struct { } type DiscoveryProfile struct { - Secret string - SecretResourceVersion string // used to validate a profile change - TLSSecret string - TLSSecretResourceVersion string // used to validate a profile change - Connectionprofiles []*invv1alpha1.TargetConnectionProfile + Secret string + SecretResourceVersion string // used to validate a profile change (secrets only increment resourceVersion iso generation) + TLSSecret string + TLSSecretGeneration string // used to validate a profile change + Connectionprofiles []*invv1alpha1.TargetConnectionProfile } type TargetConnectionProfile struct { - Secret string - SecretResourceVersion string // used to validate a profile change + provide the version to the target if provisioned - TLSSecret string - TLSSecretResourceVersion string // used to validate a profile change + provide the version to the target if provisioned - Connectionprofile *invv1alpha1.TargetConnectionProfile - Syncprofile *invv1alpha1.TargetSyncProfile + Secret string + SecretResourceVersion string // used to validate a profile change + provide the version to the target if provisioned + TLSSecret string + TLSSecretGeneration string // used to validate a profile change + provide the version to the target if provisioned + Connectionprofile *invv1alpha1.TargetConnectionProfile + Syncprofile *invv1alpha1.TargetSyncProfile } diff --git a/pkg/discovery/discoveryrule/deviation.go b/pkg/discovery/discoveryrule/deviation.go index 6251d316..8fec297b 100644 --- a/pkg/discovery/discoveryrule/deviation.go +++ b/pkg/discovery/discoveryrule/deviation.go @@ -20,17 +20,16 @@ import ( "context" "github.com/henderiw/logger/log" - configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" "github.com/sdcio/config-server/apis/config" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" ) -func (r *dr) applyTargetDeviationCR(ctx context.Context, target *invv1alpha1.Target) error { +func (r *dr) applyTargetDeviationCR(ctx context.Context, target *configv1alpha1.Target) error { newUnManagedConfigCR, err := r.newDeviationCR(ctx, target) if err != nil { return err @@ -54,7 +53,7 @@ func (r *dr) applyTargetDeviationCR(ctx context.Context, target *invv1alpha1.Tar return nil } -func (r *dr) newDeviationCR(_ context.Context, target *invv1alpha1.Target) (*configv1alpha1.Deviation, error) { +func (r *dr) newDeviationCR(_ context.Context, target *configv1alpha1.Target) (*configv1alpha1.Deviation, error) { labels, err := r.cfg.CR.GetDiscoveryParameters().GetTargetLabels(r.cfg.CR.GetName()) if err != nil { return nil, err @@ -86,7 +85,7 @@ func (r *dr) newDeviationCR(_ context.Context, target *invv1alpha1.Target) (*con }, Spec: configv1alpha1.DeviationSpec{ DeviationType: ptr.To(configv1alpha1.DeviationType_TARGET), - Deviations: []configv1alpha1.ConfigDeviation{}, + Deviations: []configv1alpha1.ConfigDeviation{}, }, Status: configv1alpha1.DeviationStatus{}, }, nil diff --git a/pkg/discovery/discoveryrule/discover.go b/pkg/discovery/discoveryrule/discover.go index 85da347a..a4c95ab3 100644 --- a/pkg/discovery/discoveryrule/discover.go +++ b/pkg/discovery/discoveryrule/discover.go @@ -57,12 +57,12 @@ func (r *dr) discover(ctx context.Context, h *hostInfo) error { for _, connProfile := range r.getDiscoveryProfiles(ctx, h) { discover, ok := r.protocols.get(connProfile.Spec.Protocol) if !ok { - log.Info("connection profile points to unsupported protocol", "protocol", connProfile.Spec.Protocol) + log.Warn("connection profile points to unsupported protocol", "protocol", connProfile.Spec.Protocol) err = errors.Join(err, fmt.Errorf("unsupported protocol :%s", string(connProfile.Spec.Protocol))) continue } if derr := discover(ctx, h, connProfile); derr != nil { - log.Info("discovery failed", "protocol", connProfile.Spec.Protocol) + log.Debug("discovery failed", "protocol", connProfile.Spec.Protocol) err = errors.Join(err, derr) continue } diff --git a/pkg/discovery/discoveryrule/discover_gnmi.go b/pkg/discovery/discoveryrule/discover_gnmi.go index 5195a9dc..db3188dd 100644 --- a/pkg/discovery/discoveryrule/discover_gnmi.go +++ b/pkg/discovery/discoveryrule/discover_gnmi.go @@ -32,6 +32,7 @@ import ( "github.com/openconfig/gnmic/pkg/api" "github.com/openconfig/gnmic/pkg/api/path" "github.com/openconfig/gnmic/pkg/api/target" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "go.starlark.net/starlark" "go.starlark.net/syntax" @@ -55,16 +56,16 @@ func (r *dr) discoverWithGNMI(ctx context.Context, h *hostInfo, connProfile *inv if err != nil { return err } - log.Info("Creating gNMI client") + log.Debug("Creating gNMI client") err = t.CreateGNMIClient(ctx) if err != nil { return err } defer func() { - if err := t.Close(); err != nil { - log.Error("closing gNMI target", "err", err) - } - }() + if err := t.Close(); err != nil { + log.Error("closing gNMI target", "err", err) + } + }() capRsp, err := t.Capabilities(ctx) if err != nil { return err @@ -133,7 +134,7 @@ func (r *Discoverer) GetProvider() string { return r.Provider } -func (r *Discoverer) Discover(ctx context.Context, t *target.Target) (*invv1alpha1.DiscoveryInfo, error) { +func (r *Discoverer) Discover(ctx context.Context, t *target.Target) (*configv1alpha1.DiscoveryInfo, error) { var req *gnmi.GetRequest var err error switch r.DiscoveryParameters.GetEncoding() { @@ -200,10 +201,10 @@ func (r *Discoverer) parseDiscoveryInformation( pathMap map[string]invv1alpha1.DiscoveryPathDefinition, capRsp *gnmi.CapabilityResponse, getRsp *gnmi.GetResponse, -) (*invv1alpha1.DiscoveryInfo, error) { +) (*configv1alpha1.DiscoveryInfo, error) { log := log.FromContext(ctx).With("provider", r.Provider) - di := &invv1alpha1.DiscoveryInfo{ + di := &configv1alpha1.DiscoveryInfo{ Protocol: string(invv1alpha1.Protocol_GNMI), Provider: r.Provider, SupportedEncodings: make([]string, 0, len(capRsp.GetSupportedEncodings())), @@ -218,7 +219,7 @@ func (r *Discoverer) parseDiscoveryInformation( "platform": &di.Platform, "serialNumber": &di.SerialNumber, "macAddress": &di.MacAddress, - "hostname": &di.HostName, + "hostname": &di.Hostname, } // Process gNMI notifications @@ -234,7 +235,7 @@ func (r *Discoverer) parseDiscoveryInformation( gnmiPath = strings.Join(strings.Split(gnmiPath, ":")[1:], ":") } - log.Info("discovery", "path", preserveNamespace) + log.Debug("discovery", "path", preserveNamespace) // SRLINUX a path that was requested without keys is returned as a JSON blob up to the first element // for which the first key was found @@ -243,7 +244,7 @@ func (r *Discoverer) parseDiscoveryInformation( if param, exists := pathMap[gnmiPath]; exists { if targetField, found := fieldMapping[param.Key]; found { - log.Info("discovery before transform", "path", gnmiPath, "key", param.Key, "value", upd.GetVal()) + log.Debug("discovery before transform", "path", gnmiPath, "key", param.Key, "value", upd.GetVal()) string_value, err := getStringValue(upd.GetVal()) if err != nil { @@ -252,7 +253,7 @@ func (r *Discoverer) parseDiscoveryInformation( *targetField = string_value - log.Info("discovery before transform", "path", gnmiPath, "key", param.Key, "value", *targetField) + log.Debug("discovery before transform", "path", gnmiPath, "key", param.Key, "value", *targetField) // Apply transformations (Regex + Starlark) transformedValue, err := applyTransformations(ctx, param, *targetField) @@ -260,7 +261,7 @@ func (r *Discoverer) parseDiscoveryInformation( return nil, fmt.Errorf("failed to process transformation for %q: %w", param.Key, err) } - log.Info("discovery after transform", "path", gnmiPath, "key", param.Key, "value", transformedValue) + log.Debug("discovery after transform", "path", gnmiPath, "key", param.Key, "value", transformedValue) *targetField = transformedValue } } diff --git a/pkg/discovery/discoveryrule/discover_gnmi_discoverer_test.go b/pkg/discovery/discoveryrule/discover_gnmi_discoverer_test.go index 494b5779..c125300c 100644 --- a/pkg/discovery/discoveryrule/discover_gnmi_discoverer_test.go +++ b/pkg/discovery/discoveryrule/discover_gnmi_discoverer_test.go @@ -35,24 +35,24 @@ const ( func TestGetDiscovererGNMI(t *testing.T) { cases := map[string]struct { - capabilityFile string + capabilityFile string expectedProvider string expectError bool }{ "NokiaSROS": { - capabilityFile: "data/nokia-sros-capabilities.json", + capabilityFile: "data/nokia-sros-capabilities.json", expectedProvider: "sros.nokia.sdcio.dev", }, "NokiaSRL": { - capabilityFile: "data/nokia-srl-capabilities.json", + capabilityFile: "data/nokia-srl-capabilities.json", expectedProvider: "srl.nokia.sdcio.dev", }, "Arista": { - capabilityFile: "data/arista-capabilities.json", + capabilityFile: "data/arista-capabilities.json", expectedProvider: "eos.arista.sdcio.dev", }, "Unknown": { - capabilityFile: "data/unknown-capabilities.json", + capabilityFile: "data/unknown-capabilities.json", expectedProvider: "eos.arista.sdcio.dev", expectError: true, }, diff --git a/pkg/discovery/discoveryrule/discover_gnmi_discovery_test.go b/pkg/discovery/discoveryrule/discover_gnmi_discovery_test.go index f5a3f3c3..968c4373 100644 --- a/pkg/discovery/discoveryrule/discover_gnmi_discovery_test.go +++ b/pkg/discovery/discoveryrule/discover_gnmi_discovery_test.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/openconfig/gnmi/proto/gnmi" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" ) func TestParseDiscoveryInformation(t *testing.T) { @@ -30,18 +30,18 @@ func TestParseDiscoveryInformation(t *testing.T) { capabilityFile string provider string getResponse func() *gnmi.GetResponse - expectedResult *invv1alpha1.DiscoveryInfo + expectedResult *configv1alpha1.DiscoveryInfo expectError bool }{ "NokiaSRL": { capabilityFile: "data/nokia-srl-capabilities.json", provider: "srl.nokia.sdcio.dev", getResponse: getSRLResponse, - expectedResult: &invv1alpha1.DiscoveryInfo{ + expectedResult: &configv1alpha1.DiscoveryInfo{ Protocol: "gnmi", Provider: "srl.nokia.sdcio.dev", Version: "24.3.2", - HostName: "edge02", + Hostname: "edge02", Platform: "7220 IXR-D2", MacAddress: "1A:05:04:FF:00:00", SerialNumber: "Sim Serial No.", @@ -52,11 +52,11 @@ func TestParseDiscoveryInformation(t *testing.T) { capabilityFile: "data/arista-capabilities.json", provider: "eos.arista.sdcio.dev", getResponse: getAristaResponse, - expectedResult: &invv1alpha1.DiscoveryInfo{ + expectedResult: &configv1alpha1.DiscoveryInfo{ Protocol: "gnmi", Provider: "eos.arista.sdcio.dev", Version: "4.33.1F", - HostName: "edge02", + Hostname: "edge02", Platform: "cEOSLab", MacAddress: "00:1c:73:6f:e4:7c", SerialNumber: "864D1228500892CEF934F5C6DF8784B2", @@ -67,11 +67,11 @@ func TestParseDiscoveryInformation(t *testing.T) { capabilityFile: "data/cisco-capabilities.json", provider: "iosxr.cisco.sdcio.dev", getResponse: getCiscoResponse, - expectedResult: &invv1alpha1.DiscoveryInfo{ + expectedResult: &configv1alpha1.DiscoveryInfo{ Protocol: "gnmi", Provider: "iosxr.cisco.sdcio.dev", Version: "24.4.1.26I", - HostName: "edge02", + Hostname: "edge02", Platform: "Cisco IOS-XRv 9000 Centralized Virtual Router", MacAddress: "02:42:0a:0a:14:65", SerialNumber: "VSN-NPP2G7K", @@ -123,8 +123,8 @@ func TestParseDiscoveryInformation(t *testing.T) { if di.Version != tc.expectedResult.Version { t.Errorf("Version mismatch: expected %s, got %s", tc.expectedResult.Version, di.Version) } - if di.HostName != tc.expectedResult.HostName { - t.Errorf("HostName mismatch: expected %s, got %s", tc.expectedResult.HostName, di.HostName) + if di.Hostname != tc.expectedResult.Hostname { + t.Errorf("HostName mismatch: expected %s, got %s", tc.expectedResult.Hostname, di.Hostname) } if di.Platform != tc.expectedResult.Platform { t.Errorf("Platform mismatch: expected %s, got %s", tc.expectedResult.Platform, di.Platform) @@ -310,7 +310,7 @@ func getCiscoResponse() *gnmi.GetResponse { {Name: "system"}, {Name: "state"}, {Name: "software-version"}, - }}, + }}, Val: &gnmi.TypedValue{ Value: &gnmi.TypedValue_StringVal{StringVal: "24.4.1.26I"}, }, @@ -320,13 +320,13 @@ func getCiscoResponse() *gnmi.GetResponse { { Update: []*gnmi.Update{ { - Path: &gnmi.Path{Origin: "openconfig-platform", + Path: &gnmi.Path{Origin: "openconfig-platform", Elem: []*gnmi.PathElem{ {Name: "components"}, {Name: "component", Key: map[string]string{"name": "Rack 0"}}, {Name: "state"}, {Name: "part-no"}, - }}, + }}, Val: &gnmi.TypedValue{ Value: &gnmi.TypedValue_StringVal{StringVal: "Cisco IOS-XRv 9000 Centralized Virtual Router"}, }, @@ -336,12 +336,12 @@ func getCiscoResponse() *gnmi.GetResponse { { Update: []*gnmi.Update{ { - Path: &gnmi.Path{Origin: "openconfig-system", + Path: &gnmi.Path{Origin: "openconfig-system", Elem: []*gnmi.PathElem{ {Name: "system"}, {Name: "state"}, {Name: "hostname"}, - }}, + }}, Val: &gnmi.TypedValue{ Value: &gnmi.TypedValue_StringVal{StringVal: "edge02"}, }, @@ -357,7 +357,7 @@ func getCiscoResponse() *gnmi.GetResponse { {Name: "component", Key: map[string]string{"name": "Rack 0"}}, {Name: "state"}, {Name: "serial-no"}, - }}, + }}, Val: &gnmi.TypedValue{ Value: &gnmi.TypedValue_StringVal{StringVal: "VSN-NPP2G7K"}, }, @@ -367,14 +367,14 @@ func getCiscoResponse() *gnmi.GetResponse { { Update: []*gnmi.Update{ { - Path: &gnmi.Path{Origin: "openconfig-interfaces", + Path: &gnmi.Path{Origin: "openconfig-interfaces", Elem: []*gnmi.PathElem{ {Name: "interfaces"}, {Name: "interface", Key: map[string]string{"name": "MgmtEth0/RP0/CPU0/0"}}, {Name: "openconfig-if-ethernet:ethernet"}, {Name: "state"}, {Name: "mac-address"}, - }}, + }}, Val: &gnmi.TypedValue{ Value: &gnmi.TypedValue_StringVal{StringVal: "02:42:0a:0a:14:65"}, }, diff --git a/pkg/discovery/discoveryrule/discover_gnmi_transform_test.go b/pkg/discovery/discoveryrule/discover_gnmi_transform_test.go index 11edecb6..d514d4f3 100644 --- a/pkg/discovery/discoveryrule/discover_gnmi_transform_test.go +++ b/pkg/discovery/discoveryrule/discover_gnmi_transform_test.go @@ -62,9 +62,9 @@ func TestApplyRegex(t *testing.T) { shouldError: true, }, { - name: "Version", - pattern: `^v?(\d+\.\d+\.\d+)`, - value: "v24.3.2-118-g706b4f0d99", + name: "Version", + pattern: `^v?(\d+\.\d+\.\d+)`, + value: "v24.3.2-118-g706b4f0d99", expected: "24.3.2", }, } diff --git a/pkg/discovery/discoveryrule/discover_none.go b/pkg/discovery/discoveryrule/discover_none.go index 3e4334f9..c56e4eff 100644 --- a/pkg/discovery/discoveryrule/discover_none.go +++ b/pkg/discovery/discoveryrule/discover_none.go @@ -20,6 +20,7 @@ import ( "context" "github.com/henderiw/logger/log" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" ) @@ -32,11 +33,11 @@ func (r *dr) discoverWithNone(ctx context.Context, h *hostInfo, connProfile *inv // h.Address, // r.cfg.TargetConnectionProfiles[0].Connectionprofile.Spec.Port, //) - di := &invv1alpha1.DiscoveryInfo{ + di := &configv1alpha1.DiscoveryInfo{ Protocol: "static", Provider: provider, Version: version, - HostName: h.hostName, + Hostname: h.hostName, //LastSeen: metav1.Now(), } return r.createTarget(ctx, provider, h.Address, di) diff --git a/pkg/discovery/discoveryrule/rule.go b/pkg/discovery/discoveryrule/rule.go index 46f50e97..f41a8b3b 100644 --- a/pkg/discovery/discoveryrule/rule.go +++ b/pkg/discovery/discoveryrule/rule.go @@ -26,9 +26,9 @@ import ( "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/henderiw/apiserver-store/pkg/storebackend/memory" "github.com/henderiw/logger/log" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "golang.org/x/sync/semaphore" "sigs.k8s.io/controller-runtime/pkg/client" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" ) type DiscoveryRule interface { @@ -46,14 +46,13 @@ func New(client client.Client, cfg *DiscoveryRuleConfig) DiscoveryRule { } type dr struct { - client client.Client - cfg *DiscoveryRuleConfig - protocols *protocols - children storebackend.Storer[string] - + client client.Client + cfg *DiscoveryRuleConfig + protocols *protocols + children storebackend.Storer[string] gnmiDiscoveryProfiles map[string]invv1alpha1.GnmiDiscoveryVendorProfileParameters - cancel context.CancelFunc + cancel context.CancelFunc } func (r *dr) Stop(ctx context.Context) { @@ -131,9 +130,9 @@ func (r *dr) run(ctx context.Context) error { if err := r.discover(ctx, h); err != nil { //if status.Code(err) == codes.Canceled { if strings.Contains(err.Error(), "context cancelled") { - log.Info("discovery cancelled") + log.Debug("discovery cancelled") } else { - log.Info("discovery failed", "error", err) + log.Debug("discovery failed", "error", err) } } }(h) @@ -143,7 +142,6 @@ func (r *dr) run(ctx context.Context) error { return nil } - func (r *dr) getVendorDiscoveryProfiles(ctx context.Context) error { discoveryVendorProfiles := &invv1alpha1.DiscoveryVendorProfileList{} if err := r.client.List(ctx, discoveryVendorProfiles); err != nil { @@ -155,4 +153,4 @@ func (r *dr) getVendorDiscoveryProfiles(ctx context.Context) error { r.gnmiDiscoveryProfiles[discoveryProfile.Name] = discoveryProfile.Spec.Gnmi } return nil -} \ No newline at end of file +} diff --git a/pkg/discovery/discoveryrule/target.go b/pkg/discovery/discoveryrule/target.go index f18c1f53..ce8b4a33 100644 --- a/pkg/discovery/discoveryrule/target.go +++ b/pkg/discovery/discoveryrule/target.go @@ -19,281 +19,224 @@ package discoveryrule import ( "context" "strings" - "time" "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/henderiw/logger/log" - //condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" - "github.com/sdcio/config-server/pkg/reconcilers/resource" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" ) const ( - reconcilerName = "DiscoveryController" + specFieldManager = "DiscoveryRuleController-spec" + statusFieldManager = "DiscoveryRuleController-status" ) -func (r *dr) createTarget(ctx context.Context, provider, address string, di *invv1alpha1.DiscoveryInfo) error { +func (r *dr) createTarget(ctx context.Context, provider, address string, di *configv1alpha1.DiscoveryInfo) error { log := log.FromContext(ctx) - if err := r.children.Create(ctx, storebackend.ToKey(getTargetName(di.HostName)), ""); err != nil { + log.Info("createTarget start", "hostname", di.Hostname, "address", address) + if err := r.children.Apply(ctx, storebackend.ToKey(getTargetName(di.Hostname)), ""); err != nil { + log.Warn("children.apply", "error", err) return err } - newTarget, err := r.newTarget( - ctx, - provider, - address, - di, - ) - if err != nil { - return err + targetKey := types.NamespacedName{ + Namespace: r.cfg.CR.GetNamespace(), + Name: getTargetName(di.Hostname), } - if err := r.applyTarget(ctx, newTarget); err != nil { - log.Info("dynamic target creation failed", "error", err) + log.Info("applyTargetSpec start", "target", targetKey) + if err := r.applyTargetSpec(ctx, targetKey, provider, address); err != nil { + log.Error("dynamic target creation failed", "error", err) return err } - targetKey := newTarget.GetNamespacedName() - target := &invv1alpha1.Target{} - if err := r.client.Get(ctx, targetKey, target); err != nil { - log.Info("cannot get target", "error", err) + log.Info("applyTargetSpec done", "target", targetKey) + target, err := r.applyTargetStatus(ctx, targetKey, di) + if err != nil { + log.Error("dynamic target status apply failed", "error", err) return err } + log.Info("applyTargetStatus done", "target", targetKey) - if err := r.applyTargetDeviationCR(ctx, target); err != nil { + log.Error("apply deviation failed", "error", err) return err } - + log.Info("createTarget done", "target", targetKey) return nil } -func (r *dr) newTarget(_ context.Context, providerName, address string, di *invv1alpha1.DiscoveryInfo) (*invv1alpha1.Target, error) { - targetSpec := invv1alpha1.TargetSpec{ - Provider: providerName, - Address: address, - TargetProfile: invv1alpha1.TargetProfile{ - Credentials: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].Credentials, - // TODO TLSSecret: - ConnectionProfile: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].ConnectionProfile, - SyncProfile: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].SyncProfile, - }, - } +func (r *dr) applyTargetSpec(ctx context.Context, targetKey types.NamespacedName, provider, address string) error { + //di := newTarget.Status.DiscoveryInfo.DeepCopy() + log := log.FromContext(ctx).With("target", targetKey) + labels, err := r.cfg.CR.GetDiscoveryParameters().GetTargetLabels(r.cfg.CR.GetName()) if err != nil { - return nil, err + return err } anno, err := r.cfg.CR.GetDiscoveryParameters().GetTargetAnnotations(r.cfg.CR.GetName()) if err != nil { - return nil, err + return err } - return invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Name: getTargetName(di.HostName), - Namespace: r.cfg.CR.GetNamespace(), - Labels: labels, - Annotations: anno, - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: schema.GroupVersion{ - Group: r.cfg.CR.GetObjectKind().GroupVersionKind().Group, - Version: r.cfg.CR.GetObjectKind().GroupVersionKind().Version, - }.String(), - Kind: r.cfg.CR.GetObjectKind().GroupVersionKind().Kind, - Name: r.cfg.CR.GetName(), - UID: r.cfg.CR.GetUID(), - Controller: ptr.To[bool](true), - }}, - }, - targetSpec, - invv1alpha1.TargetStatus{ - DiscoveryInfo: di, - }, - ), nil -} + applyConfig := configv1alpha1apply.Target(targetKey.Name, targetKey.Namespace). + WithLabels(labels). + WithAnnotations(anno). + WithOwnerReferences(ownerRefsToApply([]metav1.OwnerReference{ + { + APIVersion: schema.GroupVersion{ + Group: r.cfg.CR.GetObjectKind().GroupVersionKind().Group, + Version: r.cfg.CR.GetObjectKind().GroupVersionKind().Version, + }.String(), + Kind: r.cfg.CR.GetObjectKind().GroupVersionKind().Kind, + Name: r.cfg.CR.GetName(), + UID: r.cfg.CR.GetUID(), + Controller: ptr.To[bool](true), + }})...). + WithSpec(specToApply(&configv1alpha1.TargetSpec{ + Provider: provider, + Address: address, + TargetProfile: invv1alpha1.TargetProfile{ + Credentials: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].Credentials, + // TODO TLSSecret: + ConnectionProfile: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].ConnectionProfile, + SyncProfile: r.cfg.CR.GetDiscoveryParameters().TargetConnectionProfiles[0].SyncProfile, + }, + })) -// w/o seperated discovery info + if err := r.client.Apply(ctx, applyConfig, &client.ApplyOptions{ + FieldManager: specFieldManager, + }); err != nil { + log.Error("failed to apply target spec", "err", err) + return err + } + return nil +} -func (r *dr) applyTarget(ctx context.Context, newTarget *invv1alpha1.Target) error { - //di := newTarget.Status.DiscoveryInfo.DeepCopy() - log := log.FromContext(ctx).With("targetName", newTarget.Name, "address", newTarget.Spec.Address) +// applyTargetStatus applies status (condition + discoveryInfo) via SSA on the status subresource +func (r *dr) applyTargetStatus(ctx context.Context, targetKey types.NamespacedName, di *configv1alpha1.DiscoveryInfo) (*configv1alpha1.Target, error) { + log := log.FromContext(ctx).With("targetKey", targetKey) - // Check if the target already exists - target := &invv1alpha1.Target{} - if err := r.client.Get(ctx, types.NamespacedName{ - Namespace: newTarget.Namespace, - Name: newTarget.Name, - }, target); err != nil { - if resource.IgnoreNotFound(err) != nil { - return err + // Check current state to avoid unnecessary updates + target := &configv1alpha1.Target{} + targetExists := true + if err := r.client.Get(ctx, targetKey, target); err != nil { + if client.IgnoreNotFound(err) != nil { + return nil, err } - log.Info("discovery target apply, target does not exist -> create") - - target := newTarget.DeepCopy() + // Object just created — cache hasn't synced yet, skip optimization + targetExists = false + } - if err := r.client.Create(ctx, target, &client.CreateOptions{FieldManager: reconcilerName}); err != nil { - return err + if targetExists { + newCond := configv1alpha1.TargetDiscoveryReady() + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetDiscoveryReady) + if newCond.Equal(oldCond) && + equality.Semantic.DeepEqual(di, target.Status.DiscoveryInfo) { + log.Info("applyTargetStatus -> no change") + return target, nil } - time.Sleep(500 * time.Millisecond) - - // we get the target again to get the latest update - /* - target = &invv1alpha1.Target{} - if err := r.client.Get(ctx, types.NamespacedName{ - Namespace: targetNew.Namespace, - Name: targetNew.Name, - }, target); err != nil { - // the resource should always exist - return err - } - */ + log.Info("applyTargetStatus", + "condition change", !newCond.Equal(oldCond), + "discovery info change", !equality.Semantic.DeepEqual(di, target.Status.DiscoveryInfo), + ) } - // set old condition to avoid updating the new status if not changed - newTarget.SetConditions(target.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady)) - // set new conditions - newTarget.SetConditions(invv1alpha1.DiscoveryReady()) - - if newTarget.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady)) && - equality.Semantic.DeepEqual(newTarget.Spec, target.Spec) && - equality.Semantic.DeepEqual(newTarget.Status.DiscoveryInfo, target.Status.DiscoveryInfo) { - log.Info("handleSuccess -> no change") - return nil + statusApply := configv1alpha1apply.TargetStatus(). + WithConditions(configv1alpha1.TargetDiscoveryReady()) + if di != nil { + statusApply = statusApply.WithDiscoveryInfo(discoveryInfoToApply(di)) } - log.Info("handleSuccess", - "condition change", newTarget.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady)), - "spec change", equality.Semantic.DeepEqual(newTarget.Spec, target.Spec), - "discovery info change", equality.Semantic.DeepEqual(newTarget.Status.DiscoveryInfo, target.Status.DiscoveryInfo), - ) - log.Info("newTarget", "target", newTarget) + applyConfig := configv1alpha1apply.Target(targetKey.Name, targetKey.Namespace). + WithStatus(statusApply) - err := r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, + if err := r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ + FieldManager: statusFieldManager, }, - }) - if err != nil { - log.Error("failed to patch target status", "err", err) - return err + }); err != nil { + log.Error("failed to apply target status", "err", err) + return nil, err } - /* - //targetPatch := targetCurrent.DeepCopy() - //targetPatch.Status.SetConditions(invv1alpha1.DiscoveryReady()) - //targetPatch.Status.DiscoveryInfo = di - - log.Info("discovery target apply", - "Ready", targetPatch.GetCondition(condv1alpha1.ConditionTypeReady).Status, - "DSReady", targetPatch.GetCondition(invv1alpha1.ConditionTypeDatastoreReady).Status, - "ConfigReady", targetPatch.GetCondition(invv1alpha1.ConditionTypeConfigReady).Status, - "DiscoveryInfo", targetPatch.Status.DiscoveryInfo, - ) - // Apply the patch - err := r.client.Status().Patch(ctx, targetPatch, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, - }, - }) - if err != nil { - log.Error("failed to patch target status", "err", err) - return err - } - */ - - return nil + // Re-fetch to return fresh object + if err := r.client.Get(ctx, targetKey, target); err != nil { + return nil, err + } + return target, nil } -/* -func hasChanged(ctx context.Context, curTargetCR, newTargetCR *invv1alpha1.Target) bool { - log := log.FromContext(ctx).With("target", newTargetCR.GetName(), "address", newTargetCR.Spec.Address) - - log.Info("validateDataStoreChanges", "current target status", curTargetCR.Status.GetCondition(condv1alpha1.ConditionTypeReady).Status) - if curTargetCR.Status.GetCondition(condv1alpha1.ConditionTypeReady).Status == metav1.ConditionFalse { - return true +func discoveryInfoToApply(di *configv1alpha1.DiscoveryInfo) *configv1alpha1apply.DiscoveryInfoApplyConfiguration { + if di == nil { + return nil } - - if curTargetCR.Spec.SyncProfile != nil && newTargetCR.Spec.SyncProfile != nil { - log.Info("validateDataStoreChanges", - "Provider", fmt.Sprintf("%s/%s", curTargetCR.Spec.Provider, newTargetCR.Spec.Provider), - "Address", fmt.Sprintf("%s/%s", curTargetCR.Spec.Address, newTargetCR.Spec.Address), - "connectionProfile", fmt.Sprintf("%s/%s", curTargetCR.Spec.ConnectionProfile, newTargetCR.Spec.ConnectionProfile), - "SyncProfile", fmt.Sprintf("%s/%s", *curTargetCR.Spec.SyncProfile, *newTargetCR.Spec.SyncProfile), - "Secret", fmt.Sprintf("%s/%s", curTargetCR.Spec.Credentials, newTargetCR.Spec.Credentials), - //"TLSSecret", fmt.Sprintf("%s/%s", *curTargetCR.Spec.TLSSecret, *newTargetCR.Spec.TLSSecret), - ) - if curTargetCR.Spec.Address != newTargetCR.Spec.Address || - curTargetCR.Spec.Provider != newTargetCR.Spec.Provider || - curTargetCR.Spec.ConnectionProfile != newTargetCR.Spec.ConnectionProfile || - *curTargetCR.Spec.SyncProfile != *newTargetCR.Spec.SyncProfile || - curTargetCR.Spec.Credentials != newTargetCR.Spec.Credentials { // TODO TLS Secret - return true - } - } else { - log.Info("validateDataStoreChanges", - "Provider", fmt.Sprintf("%s/%s", curTargetCR.Spec.Provider, newTargetCR.Spec.Provider), - "Address", fmt.Sprintf("%s/%s", curTargetCR.Spec.Address, newTargetCR.Spec.Address), - "connectionProfile", fmt.Sprintf("%s/%s", curTargetCR.Spec.ConnectionProfile, newTargetCR.Spec.ConnectionProfile), - "Secret", fmt.Sprintf("%s/%s", curTargetCR.Spec.Credentials, newTargetCR.Spec.Credentials), - //"TLSSecret", fmt.Sprintf("%s/%s", *curTargetCR.Spec.TLSSecret, *newTargetCR.Spec.TLSSecret), - ) - - if curTargetCR.Spec.Address != newTargetCR.Spec.Address || - curTargetCR.Spec.Provider != newTargetCR.Spec.Provider || - curTargetCR.Spec.ConnectionProfile != newTargetCR.Spec.ConnectionProfile || - curTargetCR.Spec.Credentials != newTargetCR.Spec.Credentials { // TODO TLS Secret - return true - } + a := configv1alpha1apply.DiscoveryInfo() + if di.Protocol != "" { + a.WithProtocol(di.Protocol) } - - if curTargetCR.Status.DiscoveryInfo == nil { - log.Info("validateDataStoreChanges", "DiscoveryInfo", "nil") - return true + if di.Provider != "" { + a.WithProvider(di.Provider) } - - log.Info("validateDataStoreChanges", - "Protocol", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.Protocol, newTargetCR.Status.DiscoveryInfo.Protocol), - "Provider", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.Provider, newTargetCR.Status.DiscoveryInfo.Provider), - "Version", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.Version, newTargetCR.Status.DiscoveryInfo.Version), - "HostName", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.HostName, newTargetCR.Status.DiscoveryInfo.HostName), - "Platform", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.Platform, newTargetCR.Status.DiscoveryInfo.Platform), - "MacAddress", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.MacAddress, newTargetCR.Status.DiscoveryInfo.MacAddress), - "SerialNumber", fmt.Sprintf("%s/%s", curTargetCR.Status.DiscoveryInfo.SerialNumber, newTargetCR.Status.DiscoveryInfo.SerialNumber), - ) - - if curTargetCR.Status.DiscoveryInfo.Protocol != newTargetCR.Status.DiscoveryInfo.Protocol || - curTargetCR.Status.DiscoveryInfo.Provider != newTargetCR.Status.DiscoveryInfo.Provider || - curTargetCR.Status.DiscoveryInfo.Version != newTargetCR.Status.DiscoveryInfo.Version || - curTargetCR.Status.DiscoveryInfo.HostName != newTargetCR.Status.DiscoveryInfo.HostName || - curTargetCR.Status.DiscoveryInfo.Platform != newTargetCR.Status.DiscoveryInfo.Platform { - return true + if di.Version != "" { + a.WithVersion(di.Version) } - - if newTargetCR.Status.DiscoveryInfo.SerialNumber != "" && (curTargetCR.Status.DiscoveryInfo.SerialNumber != newTargetCR.Status.DiscoveryInfo.SerialNumber) { - return true + if di.Hostname != "" { + a.WithHostname(di.Hostname) } - - if newTargetCR.Status.DiscoveryInfo.MacAddress != "" && (curTargetCR.Status.DiscoveryInfo.MacAddress != newTargetCR.Status.DiscoveryInfo.MacAddress) { - return true + if di.Platform != "" { + a.WithPlatform(di.Platform) } - - if newTargetCR.Status.DiscoveryInfo.Platform != "" && (curTargetCR.Status.DiscoveryInfo.Platform != newTargetCR.Status.DiscoveryInfo.Platform) { - return true + if di.MacAddress != "" { + a.WithMacAddress(di.MacAddress) } - - return false + if di.SerialNumber != "" { + a.WithSerialNumber(di.SerialNumber) + } + return a } -*/ func getTargetName(s string) string { targetName := strings.ReplaceAll(s, ":", "-") return strings.ToLower(targetName) } + +func specToApply(spec *configv1alpha1.TargetSpec) *configv1alpha1apply.TargetSpecApplyConfiguration { + a := configv1alpha1apply.TargetSpec(). + WithProvider(spec.Provider). + WithAddress(spec.Address). + WithCredentials(spec.Credentials). + WithConnectionProfile(spec.ConnectionProfile) + if spec.SyncProfile != nil { + a.WithSyncProfile(*spec.SyncProfile) + } + if spec.TLSSecret != nil { + a.WithTLSSecret(*spec.TLSSecret) + } + return a +} + +func ownerRefsToApply(refs []metav1.OwnerReference) []*v1.OwnerReferenceApplyConfiguration { + result := make([]*v1.OwnerReferenceApplyConfiguration, 0, len(refs)) + for _, ref := range refs { + r := v1.OwnerReference(). + WithAPIVersion(ref.APIVersion). + WithKind(ref.Kind). + WithName(ref.Name). + WithUID(ref.UID) + if ref.Controller != nil { + r.WithController(*ref.Controller) + } + result = append(result, r) + } + return result +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/config.go b/pkg/generated/applyconfiguration/config/v1alpha1/config.go new file mode 100644 index 00000000..c0411794 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/config.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConfigApplyConfiguration represents a declarative configuration of the Config type for use +// with apply. +// +// Config defines the Schema for the Config API +type ConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// Config constructs a declarative configuration of the Config type for use with +// apply. +func Config(name, namespace string) *ConfigApplyConfiguration { + b := &ConfigApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Config") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b ConfigApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithGeneration(value int64) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConfigApplyConfiguration) WithFinalizers(values ...string) *ConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithSpec(value *ConfigSpecApplyConfiguration) *ConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ConfigApplyConfiguration) WithStatus(value *ConfigStatusApplyConfiguration) *ConfigApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConfigApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConfigApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConfigApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConfigApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configblame.go b/pkg/generated/applyconfiguration/config/v1alpha1/configblame.go new file mode 100644 index 00000000..8e5ca4ee --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configblame.go @@ -0,0 +1,245 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConfigBlameApplyConfiguration represents a declarative configuration of the ConfigBlame type for use +// with apply. +// +// ConfigBlame is the Schema for the ConfigBlame API +type ConfigBlameApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *configv1alpha1.ConfigBlameSpec `json:"spec,omitempty"` + Status *ConfigBlameStatusApplyConfiguration `json:"status,omitempty"` +} + +// ConfigBlame constructs a declarative configuration of the ConfigBlame type for use with +// apply. +func ConfigBlame(name, namespace string) *ConfigBlameApplyConfiguration { + b := &ConfigBlameApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ConfigBlame") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b ConfigBlameApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithKind(value string) *ConfigBlameApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithAPIVersion(value string) *ConfigBlameApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithName(value string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithGenerateName(value string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithNamespace(value string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithUID(value types.UID) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithResourceVersion(value string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithGeneration(value int64) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConfigBlameApplyConfiguration) WithLabels(entries map[string]string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConfigBlameApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConfigBlameApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConfigBlameApplyConfiguration) WithFinalizers(values ...string) *ConfigBlameApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConfigBlameApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithSpec(value configv1alpha1.ConfigBlameSpec) *ConfigBlameApplyConfiguration { + b.Spec = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ConfigBlameApplyConfiguration) WithStatus(value *ConfigBlameStatusApplyConfiguration) *ConfigBlameApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConfigBlameApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConfigBlameApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConfigBlameApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConfigBlameApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configblamestatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/configblamestatus.go new file mode 100644 index 00000000..5c78a925 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configblamestatus.go @@ -0,0 +1,44 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// ConfigBlameStatusApplyConfiguration represents a declarative configuration of the ConfigBlameStatus type for use +// with apply. +// +// ConfigBlameStatus defines the observed state of ConfigBlame +type ConfigBlameStatusApplyConfiguration struct { + Value *runtime.RawExtension `json:"value,omitempty"` +} + +// ConfigBlameStatusApplyConfiguration constructs a declarative configuration of the ConfigBlameStatus type for use with +// apply. +func ConfigBlameStatus() *ConfigBlameStatusApplyConfiguration { + return &ConfigBlameStatusApplyConfiguration{} +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *ConfigBlameStatusApplyConfiguration) WithValue(value runtime.RawExtension) *ConfigBlameStatusApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configblob.go b/pkg/generated/applyconfiguration/config/v1alpha1/configblob.go new file mode 100644 index 00000000..353fbe72 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configblob.go @@ -0,0 +1,52 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// ConfigBlobApplyConfiguration represents a declarative configuration of the ConfigBlob type for use +// with apply. +type ConfigBlobApplyConfiguration struct { + // Path defines the path relative to which the value is applicable + Path *string `json:"path,omitempty"` + Value *runtime.RawExtension `json:"value,omitempty"` +} + +// ConfigBlobApplyConfiguration constructs a declarative configuration of the ConfigBlob type for use with +// apply. +func ConfigBlob() *ConfigBlobApplyConfiguration { + return &ConfigBlobApplyConfiguration{} +} + +// WithPath sets the Path field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Path field is set to the value of the last call. +func (b *ConfigBlobApplyConfiguration) WithPath(value string) *ConfigBlobApplyConfiguration { + b.Path = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *ConfigBlobApplyConfiguration) WithValue(value runtime.RawExtension) *ConfigBlobApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configdeviation.go b/pkg/generated/applyconfiguration/config/v1alpha1/configdeviation.go new file mode 100644 index 00000000..8484de79 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configdeviation.go @@ -0,0 +1,70 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ConfigDeviationApplyConfiguration represents a declarative configuration of the ConfigDeviation type for use +// with apply. +type ConfigDeviationApplyConfiguration struct { + // Path of the config this deviation belongs to + Path *string `json:"path,omitempty"` + // DesiredValue is the desired value of the config belonging to the path + DesiredValue *string `json:"desiredValue,omitempty"` + // ActualValue defines the current value of the config belonging to the path + // that is currently configured on the target + ActualValue *string `json:"actualValue,omitempty"` + // Reason defines the reason of the deviation + Reason *string `json:"reason,omitempty"` +} + +// ConfigDeviationApplyConfiguration constructs a declarative configuration of the ConfigDeviation type for use with +// apply. +func ConfigDeviation() *ConfigDeviationApplyConfiguration { + return &ConfigDeviationApplyConfiguration{} +} + +// WithPath sets the Path field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Path field is set to the value of the last call. +func (b *ConfigDeviationApplyConfiguration) WithPath(value string) *ConfigDeviationApplyConfiguration { + b.Path = &value + return b +} + +// WithDesiredValue sets the DesiredValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DesiredValue field is set to the value of the last call. +func (b *ConfigDeviationApplyConfiguration) WithDesiredValue(value string) *ConfigDeviationApplyConfiguration { + b.DesiredValue = &value + return b +} + +// WithActualValue sets the ActualValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ActualValue field is set to the value of the last call. +func (b *ConfigDeviationApplyConfiguration) WithActualValue(value string) *ConfigDeviationApplyConfiguration { + b.ActualValue = &value + return b +} + +// WithReason sets the Reason field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reason field is set to the value of the last call. +func (b *ConfigDeviationApplyConfiguration) WithReason(value string) *ConfigDeviationApplyConfiguration { + b.Reason = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configset.go b/pkg/generated/applyconfiguration/config/v1alpha1/configset.go new file mode 100644 index 00000000..11739fed --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configset.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConfigSetApplyConfiguration represents a declarative configuration of the ConfigSet type for use +// with apply. +// +// ConfigSet is the Schema for the ConfigSet API +type ConfigSetApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConfigSetSpecApplyConfiguration `json:"spec,omitempty"` + Status *ConfigSetStatusApplyConfiguration `json:"status,omitempty"` +} + +// ConfigSet constructs a declarative configuration of the ConfigSet type for use with +// apply. +func ConfigSet(name, namespace string) *ConfigSetApplyConfiguration { + b := &ConfigSetApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("ConfigSet") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b ConfigSetApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithKind(value string) *ConfigSetApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithAPIVersion(value string) *ConfigSetApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithName(value string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithGenerateName(value string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithNamespace(value string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithUID(value types.UID) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithResourceVersion(value string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithGeneration(value int64) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConfigSetApplyConfiguration) WithLabels(entries map[string]string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConfigSetApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConfigSetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConfigSetApplyConfiguration) WithFinalizers(values ...string) *ConfigSetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConfigSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithSpec(value *ConfigSetSpecApplyConfiguration) *ConfigSetApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ConfigSetApplyConfiguration) WithStatus(value *ConfigSetStatusApplyConfiguration) *ConfigSetApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConfigSetApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConfigSetApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConfigSetApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConfigSetApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configsetspec.go b/pkg/generated/applyconfiguration/config/v1alpha1/configsetspec.go new file mode 100644 index 00000000..1ca6dfb7 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configsetspec.go @@ -0,0 +1,87 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ConfigSetSpecApplyConfiguration represents a declarative configuration of the ConfigSetSpec type for use +// with apply. +// +// ConfigSetSpec defines the desired state of Config +type ConfigSetSpecApplyConfiguration struct { + // Targets defines the targets on which this configSet applies + Target *ConfigSetTargetApplyConfiguration `json:"target,omitempty"` + // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete + // will follow + Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` + // Priority defines the priority of this config + Priority *int64 `json:"priority,omitempty"` + // Revertive defines if this CR is enabled for revertive or non revertve operation + Revertive *bool `json:"revertive,omitempty"` + // Config defines the configuration to be applied to a target device + Config []ConfigBlobApplyConfiguration `json:"config,omitempty"` +} + +// ConfigSetSpecApplyConfiguration constructs a declarative configuration of the ConfigSetSpec type for use with +// apply. +func ConfigSetSpec() *ConfigSetSpecApplyConfiguration { + return &ConfigSetSpecApplyConfiguration{} +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *ConfigSetSpecApplyConfiguration) WithTarget(value *ConfigSetTargetApplyConfiguration) *ConfigSetSpecApplyConfiguration { + b.Target = value + return b +} + +// WithLifecycle sets the Lifecycle field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Lifecycle field is set to the value of the last call. +func (b *ConfigSetSpecApplyConfiguration) WithLifecycle(value *LifecycleApplyConfiguration) *ConfigSetSpecApplyConfiguration { + b.Lifecycle = value + return b +} + +// WithPriority sets the Priority field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Priority field is set to the value of the last call. +func (b *ConfigSetSpecApplyConfiguration) WithPriority(value int64) *ConfigSetSpecApplyConfiguration { + b.Priority = &value + return b +} + +// WithRevertive sets the Revertive field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Revertive field is set to the value of the last call. +func (b *ConfigSetSpecApplyConfiguration) WithRevertive(value bool) *ConfigSetSpecApplyConfiguration { + b.Revertive = &value + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *ConfigSetSpecApplyConfiguration) WithConfig(values ...*ConfigBlobApplyConfiguration) *ConfigSetSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configsetstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/configsetstatus.go new file mode 100644 index 00000000..5b53aa7b --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configsetstatus.go @@ -0,0 +1,63 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// ConfigSetStatusApplyConfiguration represents a declarative configuration of the ConfigSetStatus type for use +// with apply. +// +// ConfigSetStatus defines the observed state of Config +type ConfigSetStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Readiness using conditions + // if the condition is true the other attributes in the status are meaningful + conditionv1alpha1.ConditionedStatus `json:",inline"` + // Targets defines the status of the configSet resource on the respective target + Targets []ConfigSetTargetStatusApplyConfiguration `json:"targets,omitempty"` +} + +// ConfigSetStatusApplyConfiguration constructs a declarative configuration of the ConfigSetStatus type for use with +// apply. +func ConfigSetStatus() *ConfigSetStatusApplyConfiguration { + return &ConfigSetStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ConfigSetStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *ConfigSetStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithTargets adds the given value to the Targets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Targets field. +func (b *ConfigSetStatusApplyConfiguration) WithTargets(values ...*ConfigSetTargetStatusApplyConfiguration) *ConfigSetStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTargets") + } + b.Targets = append(b.Targets, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configsettarget.go b/pkg/generated/applyconfiguration/config/v1alpha1/configsettarget.go new file mode 100644 index 00000000..8e8dbd13 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configsettarget.go @@ -0,0 +1,43 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConfigSetTargetApplyConfiguration represents a declarative configuration of the ConfigSetTarget type for use +// with apply. +type ConfigSetTargetApplyConfiguration struct { + // TargetSelector defines the selector used to select the targets to which the config applies + TargetSelector *v1.LabelSelectorApplyConfiguration `json:"targetSelector,omitempty"` +} + +// ConfigSetTargetApplyConfiguration constructs a declarative configuration of the ConfigSetTarget type for use with +// apply. +func ConfigSetTarget() *ConfigSetTargetApplyConfiguration { + return &ConfigSetTargetApplyConfiguration{} +} + +// WithTargetSelector sets the TargetSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetSelector field is set to the value of the last call. +func (b *ConfigSetTargetApplyConfiguration) WithTargetSelector(value *v1.LabelSelectorApplyConfiguration) *ConfigSetTargetApplyConfiguration { + b.TargetSelector = value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configsettargetstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/configsettargetstatus.go new file mode 100644 index 00000000..d30dd4ff --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configsettargetstatus.go @@ -0,0 +1,46 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// ConfigSetTargetStatusApplyConfiguration represents a declarative configuration of the ConfigSetTargetStatus type for use +// with apply. +type ConfigSetTargetStatusApplyConfiguration struct { + Name *string `json:"name,omitempty"` + // right now we assume the namespace of the config and target are aligned + // NameSpace string `json:"namespace" protobuf:"bytes,2,opt,name=name"` + // Condition of the configCR status + conditionv1alpha1.Condition `json:",inline"` +} + +// ConfigSetTargetStatusApplyConfiguration constructs a declarative configuration of the ConfigSetTargetStatus type for use with +// apply. +func ConfigSetTargetStatus() *ConfigSetTargetStatusApplyConfiguration { + return &ConfigSetTargetStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConfigSetTargetStatusApplyConfiguration) WithName(value string) *ConfigSetTargetStatusApplyConfiguration { + b.Name = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configspec.go b/pkg/generated/applyconfiguration/config/v1alpha1/configspec.go new file mode 100644 index 00000000..21e1eec6 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configspec.go @@ -0,0 +1,77 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ConfigSpecApplyConfiguration represents a declarative configuration of the ConfigSpec type for use +// with apply. +// +// ConfigSpec defines the desired state of Config +type ConfigSpecApplyConfiguration struct { + // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete + // will follow + Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` + // Priority defines the priority of this config + Priority *int64 `json:"priority,omitempty"` + // Revertive defines if this CR is enabled for revertive or non revertve operation + Revertive *bool `json:"revertive,omitempty"` + // Config defines the configuration to be applied to a target device + Config []ConfigBlobApplyConfiguration `json:"config,omitempty"` +} + +// ConfigSpecApplyConfiguration constructs a declarative configuration of the ConfigSpec type for use with +// apply. +func ConfigSpec() *ConfigSpecApplyConfiguration { + return &ConfigSpecApplyConfiguration{} +} + +// WithLifecycle sets the Lifecycle field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Lifecycle field is set to the value of the last call. +func (b *ConfigSpecApplyConfiguration) WithLifecycle(value *LifecycleApplyConfiguration) *ConfigSpecApplyConfiguration { + b.Lifecycle = value + return b +} + +// WithPriority sets the Priority field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Priority field is set to the value of the last call. +func (b *ConfigSpecApplyConfiguration) WithPriority(value int64) *ConfigSpecApplyConfiguration { + b.Priority = &value + return b +} + +// WithRevertive sets the Revertive field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Revertive field is set to the value of the last call. +func (b *ConfigSpecApplyConfiguration) WithRevertive(value bool) *ConfigSpecApplyConfiguration { + b.Revertive = &value + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *ConfigSpecApplyConfiguration) WithConfig(values ...*ConfigBlobApplyConfiguration) *ConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/configstatus.go new file mode 100644 index 00000000..24f92d1c --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configstatus.go @@ -0,0 +1,78 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// ConfigStatusApplyConfiguration represents a declarative configuration of the ConfigStatus type for use +// with apply. +// +// ConfigStatus defines the observed state of Config +type ConfigStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Readiness using conditions + // if the condition is true the other attributes in the status are meaningful + conditionv1alpha1.ConditionedStatus `json:",inline"` + // LastKnownGoodSchema identifies the last known good schema used to apply the config successfully + LastKnownGoodSchema *ConfigStatusLastKnownGoodSchemaApplyConfiguration `json:"lastKnownGoodSchema,omitempty"` + // AppliedConfig defines the config applied to the target + AppliedConfig *ConfigSpecApplyConfiguration `json:"appliedConfig,omitempty"` + // Deviations generation used for the latest config apply + DeviationGeneration *int64 `json:"deviationGeneration,omitempty"` +} + +// ConfigStatusApplyConfiguration constructs a declarative configuration of the ConfigStatus type for use with +// apply. +func ConfigStatus() *ConfigStatusApplyConfiguration { + return &ConfigStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ConfigStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *ConfigStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithLastKnownGoodSchema sets the LastKnownGoodSchema field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastKnownGoodSchema field is set to the value of the last call. +func (b *ConfigStatusApplyConfiguration) WithLastKnownGoodSchema(value *ConfigStatusLastKnownGoodSchemaApplyConfiguration) *ConfigStatusApplyConfiguration { + b.LastKnownGoodSchema = value + return b +} + +// WithAppliedConfig sets the AppliedConfig field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppliedConfig field is set to the value of the last call. +func (b *ConfigStatusApplyConfiguration) WithAppliedConfig(value *ConfigSpecApplyConfiguration) *ConfigStatusApplyConfiguration { + b.AppliedConfig = value + return b +} + +// WithDeviationGeneration sets the DeviationGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeviationGeneration field is set to the value of the last call. +func (b *ConfigStatusApplyConfiguration) WithDeviationGeneration(value int64) *ConfigStatusApplyConfiguration { + b.DeviationGeneration = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/configstatuslastknowngoodschema.go b/pkg/generated/applyconfiguration/config/v1alpha1/configstatuslastknowngoodschema.go new file mode 100644 index 00000000..3f631e82 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/configstatuslastknowngoodschema.go @@ -0,0 +1,59 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ConfigStatusLastKnownGoodSchemaApplyConfiguration represents a declarative configuration of the ConfigStatusLastKnownGoodSchema type for use +// with apply. +type ConfigStatusLastKnownGoodSchemaApplyConfiguration struct { + // Schema Type + Type *string `json:"type,omitempty"` + // Schema Vendor + Vendor *string `json:"vendor,omitempty"` + // Schema Version + Version *string `json:"version,omitempty"` +} + +// ConfigStatusLastKnownGoodSchemaApplyConfiguration constructs a declarative configuration of the ConfigStatusLastKnownGoodSchema type for use with +// apply. +func ConfigStatusLastKnownGoodSchema() *ConfigStatusLastKnownGoodSchemaApplyConfiguration { + return &ConfigStatusLastKnownGoodSchemaApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *ConfigStatusLastKnownGoodSchemaApplyConfiguration) WithType(value string) *ConfigStatusLastKnownGoodSchemaApplyConfiguration { + b.Type = &value + return b +} + +// WithVendor sets the Vendor field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Vendor field is set to the value of the last call. +func (b *ConfigStatusLastKnownGoodSchemaApplyConfiguration) WithVendor(value string) *ConfigStatusLastKnownGoodSchemaApplyConfiguration { + b.Vendor = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *ConfigStatusLastKnownGoodSchemaApplyConfiguration) WithVersion(value string) *ConfigStatusLastKnownGoodSchemaApplyConfiguration { + b.Version = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/deviation.go b/pkg/generated/applyconfiguration/config/v1alpha1/deviation.go new file mode 100644 index 00000000..abd04d44 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/deviation.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// DeviationApplyConfiguration represents a declarative configuration of the Deviation type for use +// with apply. +// +// Deviation is the Schema for the Deviation API +type DeviationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DeviationSpecApplyConfiguration `json:"spec,omitempty"` + Status *DeviationStatusApplyConfiguration `json:"status,omitempty"` +} + +// Deviation constructs a declarative configuration of the Deviation type for use with +// apply. +func Deviation(name, namespace string) *DeviationApplyConfiguration { + b := &DeviationApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Deviation") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b DeviationApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithKind(value string) *DeviationApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithAPIVersion(value string) *DeviationApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithName(value string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithGenerateName(value string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithNamespace(value string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithUID(value types.UID) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithResourceVersion(value string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithGeneration(value int64) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *DeviationApplyConfiguration) WithLabels(entries map[string]string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *DeviationApplyConfiguration) WithAnnotations(entries map[string]string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *DeviationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *DeviationApplyConfiguration) WithFinalizers(values ...string) *DeviationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *DeviationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithSpec(value *DeviationSpecApplyConfiguration) *DeviationApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *DeviationApplyConfiguration) WithStatus(value *DeviationStatusApplyConfiguration) *DeviationApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *DeviationApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *DeviationApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *DeviationApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *DeviationApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/deviationspec.go b/pkg/generated/applyconfiguration/config/v1alpha1/deviationspec.go new file mode 100644 index 00000000..6a33fd38 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/deviationspec.go @@ -0,0 +1,59 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" +) + +// DeviationSpecApplyConfiguration represents a declarative configuration of the DeviationSpec type for use +// with apply. +// +// DeviationSpec defines the desired state of Deviation +type DeviationSpecApplyConfiguration struct { + DeviationType *configv1alpha1.DeviationType `json:"deviationType,omitempty"` + // Deviations identify the configuration deviation based on the last applied config CR + Deviations []ConfigDeviationApplyConfiguration `json:"deviations,omitempty"` +} + +// DeviationSpecApplyConfiguration constructs a declarative configuration of the DeviationSpec type for use with +// apply. +func DeviationSpec() *DeviationSpecApplyConfiguration { + return &DeviationSpecApplyConfiguration{} +} + +// WithDeviationType sets the DeviationType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeviationType field is set to the value of the last call. +func (b *DeviationSpecApplyConfiguration) WithDeviationType(value configv1alpha1.DeviationType) *DeviationSpecApplyConfiguration { + b.DeviationType = &value + return b +} + +// WithDeviations adds the given value to the Deviations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Deviations field. +func (b *DeviationSpecApplyConfiguration) WithDeviations(values ...*ConfigDeviationApplyConfiguration) *DeviationSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDeviations") + } + b.Deviations = append(b.Deviations, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/deviationstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/deviationstatus.go new file mode 100644 index 00000000..832e5890 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/deviationstatus.go @@ -0,0 +1,48 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// DeviationStatusApplyConfiguration represents a declarative configuration of the DeviationStatus type for use +// with apply. +// +// DeviationStatus defines the observed state of Deviation +type DeviationStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Readiness using conditions + // if the condition is true the other attributes in the status are meaningful + conditionv1alpha1.ConditionedStatus `json:",inline"` +} + +// DeviationStatusApplyConfiguration constructs a declarative configuration of the DeviationStatus type for use with +// apply. +func DeviationStatus() *DeviationStatusApplyConfiguration { + return &DeviationStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *DeviationStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *DeviationStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/discoveryinfo.go b/pkg/generated/applyconfiguration/config/v1alpha1/discoveryinfo.go new file mode 100644 index 00000000..7096908d --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/discoveryinfo.go @@ -0,0 +1,111 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryInfoApplyConfiguration represents a declarative configuration of the DiscoveryInfo type for use +// with apply. +type DiscoveryInfoApplyConfiguration struct { + // Protocol used for discovery + Protocol *string `json:"protocol,omitempty"` + // Type associated with the target + Provider *string `json:"provider,omitempty"` + // Version associated with the target + Version *string `json:"version,omitempty"` + // Hostname associated with the target + Hostname *string `json:"hostname,omitempty"` + // Platform associated with the target + Platform *string `json:"platform,omitempty"` + // MacAddress associated with the target + MacAddress *string `json:"macAddress,omitempty"` + // SerialNumber associated with the target + SerialNumber *string `json:"serialNumber,omitempty"` + // Supported Encodings of the target + SupportedEncodings []string `json:"supportedEncodings,omitempty"` +} + +// DiscoveryInfoApplyConfiguration constructs a declarative configuration of the DiscoveryInfo type for use with +// apply. +func DiscoveryInfo() *DiscoveryInfoApplyConfiguration { + return &DiscoveryInfoApplyConfiguration{} +} + +// WithProtocol sets the Protocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Protocol field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithProtocol(value string) *DiscoveryInfoApplyConfiguration { + b.Protocol = &value + return b +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithProvider(value string) *DiscoveryInfoApplyConfiguration { + b.Provider = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithVersion(value string) *DiscoveryInfoApplyConfiguration { + b.Version = &value + return b +} + +// WithHostname sets the Hostname field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Hostname field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithHostname(value string) *DiscoveryInfoApplyConfiguration { + b.Hostname = &value + return b +} + +// WithPlatform sets the Platform field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Platform field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithPlatform(value string) *DiscoveryInfoApplyConfiguration { + b.Platform = &value + return b +} + +// WithMacAddress sets the MacAddress field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MacAddress field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithMacAddress(value string) *DiscoveryInfoApplyConfiguration { + b.MacAddress = &value + return b +} + +// WithSerialNumber sets the SerialNumber field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SerialNumber field is set to the value of the last call. +func (b *DiscoveryInfoApplyConfiguration) WithSerialNumber(value string) *DiscoveryInfoApplyConfiguration { + b.SerialNumber = &value + return b +} + +// WithSupportedEncodings adds the given value to the SupportedEncodings field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the SupportedEncodings field. +func (b *DiscoveryInfoApplyConfiguration) WithSupportedEncodings(values ...string) *DiscoveryInfoApplyConfiguration { + for i := range values { + b.SupportedEncodings = append(b.SupportedEncodings, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/lifecycle.go b/pkg/generated/applyconfiguration/config/v1alpha1/lifecycle.go new file mode 100644 index 00000000..166e9f58 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/lifecycle.go @@ -0,0 +1,45 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" +) + +// LifecycleApplyConfiguration represents a declarative configuration of the Lifecycle type for use +// with apply. +type LifecycleApplyConfiguration struct { + // DeletionPolicy specifies what will happen to the underlying resource + // when this resource is deleted - either "delete" or "orphan" the + // resource. + DeletionPolicy *configv1alpha1.DeletionPolicy `json:"deletionPolicy,omitempty"` +} + +// LifecycleApplyConfiguration constructs a declarative configuration of the Lifecycle type for use with +// apply. +func Lifecycle() *LifecycleApplyConfiguration { + return &LifecycleApplyConfiguration{} +} + +// WithDeletionPolicy sets the DeletionPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionPolicy field is set to the value of the last call. +func (b *LifecycleApplyConfiguration) WithDeletionPolicy(value configv1alpha1.DeletionPolicy) *LifecycleApplyConfiguration { + b.DeletionPolicy = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/runningconfig.go b/pkg/generated/applyconfiguration/config/v1alpha1/runningconfig.go new file mode 100644 index 00000000..ec42d5f6 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/runningconfig.go @@ -0,0 +1,245 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// RunningConfigApplyConfiguration represents a declarative configuration of the RunningConfig type for use +// with apply. +// +// RunningConfig is the Schema for the RunningConfig API +type RunningConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *configv1alpha1.RunningConfigSpec `json:"spec,omitempty"` + Status *RunningConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// RunningConfig constructs a declarative configuration of the RunningConfig type for use with +// apply. +func RunningConfig(name, namespace string) *RunningConfigApplyConfiguration { + b := &RunningConfigApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("RunningConfig") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b RunningConfigApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithKind(value string) *RunningConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithAPIVersion(value string) *RunningConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithName(value string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithGenerateName(value string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithNamespace(value string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithUID(value types.UID) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithResourceVersion(value string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithGeneration(value int64) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *RunningConfigApplyConfiguration) WithLabels(entries map[string]string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *RunningConfigApplyConfiguration) WithAnnotations(entries map[string]string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *RunningConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *RunningConfigApplyConfiguration) WithFinalizers(values ...string) *RunningConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *RunningConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithSpec(value configv1alpha1.RunningConfigSpec) *RunningConfigApplyConfiguration { + b.Spec = &value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *RunningConfigApplyConfiguration) WithStatus(value *RunningConfigStatusApplyConfiguration) *RunningConfigApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *RunningConfigApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *RunningConfigApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *RunningConfigApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *RunningConfigApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/runningconfigstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/runningconfigstatus.go new file mode 100644 index 00000000..65d5f91c --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/runningconfigstatus.go @@ -0,0 +1,44 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RunningConfigStatusApplyConfiguration represents a declarative configuration of the RunningConfigStatus type for use +// with apply. +// +// RunningConfigStatus defines the observed state of RunningConfig +type RunningConfigStatusApplyConfiguration struct { + Value *runtime.RawExtension `json:"value,omitempty"` +} + +// RunningConfigStatusApplyConfiguration constructs a declarative configuration of the RunningConfigStatus type for use with +// apply. +func RunningConfigStatus() *RunningConfigStatusApplyConfiguration { + return &RunningConfigStatusApplyConfiguration{} +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *RunningConfigStatusApplyConfiguration) WithValue(value runtime.RawExtension) *RunningConfigStatusApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfig.go b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfig.go new file mode 100644 index 00000000..f0686683 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfig.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// SensitiveConfigApplyConfiguration represents a declarative configuration of the SensitiveConfig type for use +// with apply. +// +// SensitiveConfig defines the Schema for the SensitiveConfig API +type SensitiveConfigApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *SensitiveConfigSpecApplyConfiguration `json:"spec,omitempty"` + Status *SensitiveConfigStatusApplyConfiguration `json:"status,omitempty"` +} + +// SensitiveConfig constructs a declarative configuration of the SensitiveConfig type for use with +// apply. +func SensitiveConfig(name, namespace string) *SensitiveConfigApplyConfiguration { + b := &SensitiveConfigApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("SensitiveConfig") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b SensitiveConfigApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithKind(value string) *SensitiveConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithAPIVersion(value string) *SensitiveConfigApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithName(value string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithGenerateName(value string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithNamespace(value string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithUID(value types.UID) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithResourceVersion(value string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithGeneration(value int64) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *SensitiveConfigApplyConfiguration) WithLabels(entries map[string]string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *SensitiveConfigApplyConfiguration) WithAnnotations(entries map[string]string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *SensitiveConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *SensitiveConfigApplyConfiguration) WithFinalizers(values ...string) *SensitiveConfigApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *SensitiveConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithSpec(value *SensitiveConfigSpecApplyConfiguration) *SensitiveConfigApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *SensitiveConfigApplyConfiguration) WithStatus(value *SensitiveConfigStatusApplyConfiguration) *SensitiveConfigApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *SensitiveConfigApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *SensitiveConfigApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *SensitiveConfigApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *SensitiveConfigApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigdata.go b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigdata.go new file mode 100644 index 00000000..c857d842 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigdata.go @@ -0,0 +1,53 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// SensitiveConfigDataApplyConfiguration represents a declarative configuration of the SensitiveConfigData type for use +// with apply. +type SensitiveConfigDataApplyConfiguration struct { + // Path defines the path relative to which the value is applicable + Path *string `json:"path,omitempty"` + // SecretKeyRef refers to a secret in the same namesapce as the config + SecretKeyRef *v1.SecretKeySelector `json:"secretKeyRef,omitempty"` +} + +// SensitiveConfigDataApplyConfiguration constructs a declarative configuration of the SensitiveConfigData type for use with +// apply. +func SensitiveConfigData() *SensitiveConfigDataApplyConfiguration { + return &SensitiveConfigDataApplyConfiguration{} +} + +// WithPath sets the Path field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Path field is set to the value of the last call. +func (b *SensitiveConfigDataApplyConfiguration) WithPath(value string) *SensitiveConfigDataApplyConfiguration { + b.Path = &value + return b +} + +// WithSecretKeyRef sets the SecretKeyRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecretKeyRef field is set to the value of the last call. +func (b *SensitiveConfigDataApplyConfiguration) WithSecretKeyRef(value v1.SecretKeySelector) *SensitiveConfigDataApplyConfiguration { + b.SecretKeyRef = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigspec.go b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigspec.go new file mode 100644 index 00000000..42b76e73 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigspec.go @@ -0,0 +1,77 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SensitiveConfigSpecApplyConfiguration represents a declarative configuration of the SensitiveConfigSpec type for use +// with apply. +// +// SensitiveConfigSpec defines the desired state of SensitiveConfig +type SensitiveConfigSpecApplyConfiguration struct { + // Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete + // will follow + Lifecycle *LifecycleApplyConfiguration `json:"lifecycle,omitempty"` + // Priority defines the priority of this SensitiveConfig + Priority *int64 `json:"priority,omitempty"` + // Revertive defines if this CR is enabled for revertive or non revertve operation + Revertive *bool `json:"revertive,omitempty"` + // SensitiveConfig defines the SensitiveConfiguration to be applied to a target device + Config []SensitiveConfigDataApplyConfiguration `json:"config,omitempty"` +} + +// SensitiveConfigSpecApplyConfiguration constructs a declarative configuration of the SensitiveConfigSpec type for use with +// apply. +func SensitiveConfigSpec() *SensitiveConfigSpecApplyConfiguration { + return &SensitiveConfigSpecApplyConfiguration{} +} + +// WithLifecycle sets the Lifecycle field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Lifecycle field is set to the value of the last call. +func (b *SensitiveConfigSpecApplyConfiguration) WithLifecycle(value *LifecycleApplyConfiguration) *SensitiveConfigSpecApplyConfiguration { + b.Lifecycle = value + return b +} + +// WithPriority sets the Priority field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Priority field is set to the value of the last call. +func (b *SensitiveConfigSpecApplyConfiguration) WithPriority(value int64) *SensitiveConfigSpecApplyConfiguration { + b.Priority = &value + return b +} + +// WithRevertive sets the Revertive field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Revertive field is set to the value of the last call. +func (b *SensitiveConfigSpecApplyConfiguration) WithRevertive(value bool) *SensitiveConfigSpecApplyConfiguration { + b.Revertive = &value + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *SensitiveConfigSpecApplyConfiguration) WithConfig(values ...*SensitiveConfigDataApplyConfiguration) *SensitiveConfigSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigstatus.go new file mode 100644 index 00000000..e43d6062 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/sensitiveconfigstatus.go @@ -0,0 +1,78 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// SensitiveConfigStatusApplyConfiguration represents a declarative configuration of the SensitiveConfigStatus type for use +// with apply. +// +// SensitiveConfigStatus defines the observed state of SensitiveConfig +type SensitiveConfigStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Readiness using conditions + // if the condition is true the other attributes in the status are meaningful + conditionv1alpha1.ConditionedStatus `json:",inline"` + // LastKnownGoodSchema identifies the last known good schema used to apply the SensitiveConfig successfully + LastKnownGoodSchema *ConfigStatusLastKnownGoodSchemaApplyConfiguration `json:"lastKnownGoodSchema,omitempty"` + // AppliedSensitiveConfig defines the SensitiveConfig applied to the target + AppliedSensitiveConfig *SensitiveConfigSpecApplyConfiguration `json:"appliedSensitiveConfig,omitempty"` + // Deviations generation used for the latest SensitiveConfig apply + DeviationGeneration *int64 `json:"deviationGeneration,omitempty"` +} + +// SensitiveConfigStatusApplyConfiguration constructs a declarative configuration of the SensitiveConfigStatus type for use with +// apply. +func SensitiveConfigStatus() *SensitiveConfigStatusApplyConfiguration { + return &SensitiveConfigStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *SensitiveConfigStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *SensitiveConfigStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithLastKnownGoodSchema sets the LastKnownGoodSchema field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastKnownGoodSchema field is set to the value of the last call. +func (b *SensitiveConfigStatusApplyConfiguration) WithLastKnownGoodSchema(value *ConfigStatusLastKnownGoodSchemaApplyConfiguration) *SensitiveConfigStatusApplyConfiguration { + b.LastKnownGoodSchema = value + return b +} + +// WithAppliedSensitiveConfig sets the AppliedSensitiveConfig field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppliedSensitiveConfig field is set to the value of the last call. +func (b *SensitiveConfigStatusApplyConfiguration) WithAppliedSensitiveConfig(value *SensitiveConfigSpecApplyConfiguration) *SensitiveConfigStatusApplyConfiguration { + b.AppliedSensitiveConfig = value + return b +} + +// WithDeviationGeneration sets the DeviationGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeviationGeneration field is set to the value of the last call. +func (b *SensitiveConfigStatusApplyConfiguration) WithDeviationGeneration(value int64) *SensitiveConfigStatusApplyConfiguration { + b.DeviationGeneration = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/target.go b/pkg/generated/applyconfiguration/config/v1alpha1/target.go new file mode 100644 index 00000000..36d91e10 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/target.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TargetApplyConfiguration represents a declarative configuration of the Target type for use +// with apply. +// +// Target is the Schema for the Target API +type TargetApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *TargetSpecApplyConfiguration `json:"spec,omitempty"` + Status *TargetStatusApplyConfiguration `json:"status,omitempty"` +} + +// Target constructs a declarative configuration of the Target type for use with +// apply. +func Target(name, namespace string) *TargetApplyConfiguration { + b := &TargetApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Target") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b TargetApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithKind(value string) *TargetApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithAPIVersion(value string) *TargetApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithName(value string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithGenerateName(value string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithNamespace(value string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithUID(value types.UID) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithResourceVersion(value string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithGeneration(value int64) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TargetApplyConfiguration) WithLabels(entries map[string]string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TargetApplyConfiguration) WithAnnotations(entries map[string]string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *TargetApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *TargetApplyConfiguration) WithFinalizers(values ...string) *TargetApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *TargetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithSpec(value *TargetSpecApplyConfiguration) *TargetApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *TargetApplyConfiguration) WithStatus(value *TargetStatusApplyConfiguration) *TargetApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TargetApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TargetApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *TargetApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TargetApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/targetrunning.go b/pkg/generated/applyconfiguration/config/v1alpha1/targetrunning.go new file mode 100644 index 00000000..f90bbe80 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/targetrunning.go @@ -0,0 +1,236 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TargetRunningApplyConfiguration represents a declarative configuration of the TargetRunning type for use +// with apply. +// +// TargetRunning is the Schema for the TargetRunning API +type TargetRunningApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Value *runtime.RawExtension `json:"value,omitempty"` +} + +// TargetRunning constructs a declarative configuration of the TargetRunning type for use with +// apply. +func TargetRunning(name, namespace string) *TargetRunningApplyConfiguration { + b := &TargetRunningApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("TargetRunning") + b.WithAPIVersion("config.sdcio.dev/v1alpha1") + return b +} + +func (b TargetRunningApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithKind(value string) *TargetRunningApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithAPIVersion(value string) *TargetRunningApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithName(value string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithGenerateName(value string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithNamespace(value string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithUID(value types.UID) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithResourceVersion(value string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithGeneration(value int64) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TargetRunningApplyConfiguration) WithLabels(entries map[string]string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TargetRunningApplyConfiguration) WithAnnotations(entries map[string]string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *TargetRunningApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *TargetRunningApplyConfiguration) WithFinalizers(values ...string) *TargetRunningApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *TargetRunningApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *TargetRunningApplyConfiguration) WithValue(value runtime.RawExtension) *TargetRunningApplyConfiguration { + b.Value = &value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TargetRunningApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TargetRunningApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *TargetRunningApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TargetRunningApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/targetspec.go b/pkg/generated/applyconfiguration/config/v1alpha1/targetspec.go new file mode 100644 index 00000000..3660fc70 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/targetspec.go @@ -0,0 +1,89 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" +) + +// TargetSpecApplyConfiguration represents a declarative configuration of the TargetSpec type for use +// with apply. +// +// TargetSpec defines the desired state of Target +type TargetSpecApplyConfiguration struct { + // Provider specifies the provider using this target. + Provider *string `json:"provider,omitempty"` + // Address defines the address to connect to the target + Address *string `json:"address,omitempty"` + // TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target + invv1alpha1.TargetProfileApplyConfiguration `json:",inline"` +} + +// TargetSpecApplyConfiguration constructs a declarative configuration of the TargetSpec type for use with +// apply. +func TargetSpec() *TargetSpecApplyConfiguration { + return &TargetSpecApplyConfiguration{} +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithProvider(value string) *TargetSpecApplyConfiguration { + b.Provider = &value + return b +} + +// WithAddress sets the Address field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Address field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithAddress(value string) *TargetSpecApplyConfiguration { + b.Address = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithCredentials(value string) *TargetSpecApplyConfiguration { + b.TargetProfileApplyConfiguration.Credentials = &value + return b +} + +// WithTLSSecret sets the TLSSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSSecret field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithTLSSecret(value string) *TargetSpecApplyConfiguration { + b.TargetProfileApplyConfiguration.TLSSecret = &value + return b +} + +// WithConnectionProfile sets the ConnectionProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConnectionProfile field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithConnectionProfile(value string) *TargetSpecApplyConfiguration { + b.TargetProfileApplyConfiguration.ConnectionProfile = &value + return b +} + +// WithSyncProfile sets the SyncProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SyncProfile field is set to the value of the last call. +func (b *TargetSpecApplyConfiguration) WithSyncProfile(value string) *TargetSpecApplyConfiguration { + b.TargetProfileApplyConfiguration.SyncProfile = &value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/targetstatus.go b/pkg/generated/applyconfiguration/config/v1alpha1/targetstatus.go new file mode 100644 index 00000000..686f61df --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/targetstatus.go @@ -0,0 +1,67 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// TargetStatusApplyConfiguration represents a declarative configuration of the TargetStatus type for use +// with apply. +// +// TargetStatus defines the observed state of Target +type TargetStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Target using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` + // Discovery info defines the information retrieved during discovery + DiscoveryInfo *DiscoveryInfoApplyConfiguration `json:"discoveryInfo,omitempty"` + // UsedReferences track the resource used to reconcile the cr + UsedReferences *TargetStatusUsedReferencesApplyConfiguration `json:"usedReferences,omitempty"` +} + +// TargetStatusApplyConfiguration constructs a declarative configuration of the TargetStatus type for use with +// apply. +func TargetStatus() *TargetStatusApplyConfiguration { + return &TargetStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *TargetStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *TargetStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithDiscoveryInfo sets the DiscoveryInfo field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DiscoveryInfo field is set to the value of the last call. +func (b *TargetStatusApplyConfiguration) WithDiscoveryInfo(value *DiscoveryInfoApplyConfiguration) *TargetStatusApplyConfiguration { + b.DiscoveryInfo = value + return b +} + +// WithUsedReferences sets the UsedReferences field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UsedReferences field is set to the value of the last call. +func (b *TargetStatusApplyConfiguration) WithUsedReferences(value *TargetStatusUsedReferencesApplyConfiguration) *TargetStatusApplyConfiguration { + b.UsedReferences = value + return b +} diff --git a/pkg/generated/applyconfiguration/config/v1alpha1/targetstatususedreferences.go b/pkg/generated/applyconfiguration/config/v1alpha1/targetstatususedreferences.go new file mode 100644 index 00000000..958a4625 --- /dev/null +++ b/pkg/generated/applyconfiguration/config/v1alpha1/targetstatususedreferences.go @@ -0,0 +1,65 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TargetStatusUsedReferencesApplyConfiguration represents a declarative configuration of the TargetStatusUsedReferences type for use +// with apply. +type TargetStatusUsedReferencesApplyConfiguration struct { + SecretResourceVersion *string `json:"secretResourceVersion,omitempty"` + TLSSecretResourceVersion *string `json:"tlsSecretResourceVersion,omitempty"` + ConnectionProfileResourceVersion *string `json:"connectionProfileResourceVersion,omitempty"` + SyncProfileResourceVersion *string `json:"syncProfileResourceVersion,omitempty"` +} + +// TargetStatusUsedReferencesApplyConfiguration constructs a declarative configuration of the TargetStatusUsedReferences type for use with +// apply. +func TargetStatusUsedReferences() *TargetStatusUsedReferencesApplyConfiguration { + return &TargetStatusUsedReferencesApplyConfiguration{} +} + +// WithSecretResourceVersion sets the SecretResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecretResourceVersion field is set to the value of the last call. +func (b *TargetStatusUsedReferencesApplyConfiguration) WithSecretResourceVersion(value string) *TargetStatusUsedReferencesApplyConfiguration { + b.SecretResourceVersion = &value + return b +} + +// WithTLSSecretResourceVersion sets the TLSSecretResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSSecretResourceVersion field is set to the value of the last call. +func (b *TargetStatusUsedReferencesApplyConfiguration) WithTLSSecretResourceVersion(value string) *TargetStatusUsedReferencesApplyConfiguration { + b.TLSSecretResourceVersion = &value + return b +} + +// WithConnectionProfileResourceVersion sets the ConnectionProfileResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConnectionProfileResourceVersion field is set to the value of the last call. +func (b *TargetStatusUsedReferencesApplyConfiguration) WithConnectionProfileResourceVersion(value string) *TargetStatusUsedReferencesApplyConfiguration { + b.ConnectionProfileResourceVersion = &value + return b +} + +// WithSyncProfileResourceVersion sets the SyncProfileResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SyncProfileResourceVersion field is set to the value of the last call. +func (b *TargetStatusUsedReferencesApplyConfiguration) WithSyncProfileResourceVersion(value string) *TargetStatusUsedReferencesApplyConfiguration { + b.SyncProfileResourceVersion = &value + return b +} diff --git a/pkg/generated/applyconfiguration/internal/internal.go b/pkg/generated/applyconfiguration/internal/internal.go new file mode 100644 index 00000000..897bb91b --- /dev/null +++ b/pkg/generated/applyconfiguration/internal/internal.go @@ -0,0 +1,61 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package internal + +import ( + fmt "fmt" + sync "sync" + + typed "sigs.k8s.io/structured-merge-diff/v6/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryparameters.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryparameters.go new file mode 100644 index 00000000..8924c7f4 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryparameters.go @@ -0,0 +1,100 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// DiscoveryParametersApplyConfiguration represents a declarative configuration of the DiscoveryParameters type for use +// with apply. +type DiscoveryParametersApplyConfiguration struct { + // DefaultSchema define the default schema used to connect to a target + // Indicates that discovery is disable; cannot be used for prefix based discovery rules + DefaultSchema *SchemaKeyApplyConfiguration `json:"defaultSchema,omitempty"` + // DiscoveryProfile define the profiles the discovery controller uses to discover targets + DiscoveryProfile *DiscoveryProfileApplyConfiguration `json:"discoveryProfile,omitempty"` + // TargetConnectionProfiles define the profile the discovery controller uses to create targets + // once discovered + TargetConnectionProfiles []TargetProfileApplyConfiguration `json:"targetConnectionProfiles,omitempty"` + // TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery + TargetTemplate *TargetTemplateApplyConfiguration `json:"targetTemplate,omitempty"` + // Period defines the wait period between discovery rule runs + Period *v1.Duration `json:"period,omitempty"` + // number of concurrent IP scan + ConcurrentScans *int64 `json:"concurrentScans,omitempty"` +} + +// DiscoveryParametersApplyConfiguration constructs a declarative configuration of the DiscoveryParameters type for use with +// apply. +func DiscoveryParameters() *DiscoveryParametersApplyConfiguration { + return &DiscoveryParametersApplyConfiguration{} +} + +// WithDefaultSchema sets the DefaultSchema field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DefaultSchema field is set to the value of the last call. +func (b *DiscoveryParametersApplyConfiguration) WithDefaultSchema(value *SchemaKeyApplyConfiguration) *DiscoveryParametersApplyConfiguration { + b.DefaultSchema = value + return b +} + +// WithDiscoveryProfile sets the DiscoveryProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DiscoveryProfile field is set to the value of the last call. +func (b *DiscoveryParametersApplyConfiguration) WithDiscoveryProfile(value *DiscoveryProfileApplyConfiguration) *DiscoveryParametersApplyConfiguration { + b.DiscoveryProfile = value + return b +} + +// WithTargetConnectionProfiles adds the given value to the TargetConnectionProfiles field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TargetConnectionProfiles field. +func (b *DiscoveryParametersApplyConfiguration) WithTargetConnectionProfiles(values ...*TargetProfileApplyConfiguration) *DiscoveryParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTargetConnectionProfiles") + } + b.TargetConnectionProfiles = append(b.TargetConnectionProfiles, *values[i]) + } + return b +} + +// WithTargetTemplate sets the TargetTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetTemplate field is set to the value of the last call. +func (b *DiscoveryParametersApplyConfiguration) WithTargetTemplate(value *TargetTemplateApplyConfiguration) *DiscoveryParametersApplyConfiguration { + b.TargetTemplate = value + return b +} + +// WithPeriod sets the Period field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Period field is set to the value of the last call. +func (b *DiscoveryParametersApplyConfiguration) WithPeriod(value v1.Duration) *DiscoveryParametersApplyConfiguration { + b.Period = &value + return b +} + +// WithConcurrentScans sets the ConcurrentScans field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConcurrentScans field is set to the value of the last call. +func (b *DiscoveryParametersApplyConfiguration) WithConcurrentScans(value int64) *DiscoveryParametersApplyConfiguration { + b.ConcurrentScans = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoverypathdefinition.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoverypathdefinition.go new file mode 100644 index 00000000..9b3aa997 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoverypathdefinition.go @@ -0,0 +1,69 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryPathDefinitionApplyConfiguration represents a declarative configuration of the DiscoveryPathDefinition type for use +// with apply. +type DiscoveryPathDefinitionApplyConfiguration struct { + // Key defines the key of the path for fast lookup + Key *string `json:"key,omitempty"` + // Path associated with the key + Path *string `json:"path,omitempty"` + // Script defines the starlark script to transform the value + Script *string `json:"script,omitempty"` + // Regex defines the regex to transform the value + Regex *string `json:"regex,omitempty"` +} + +// DiscoveryPathDefinitionApplyConfiguration constructs a declarative configuration of the DiscoveryPathDefinition type for use with +// apply. +func DiscoveryPathDefinition() *DiscoveryPathDefinitionApplyConfiguration { + return &DiscoveryPathDefinitionApplyConfiguration{} +} + +// WithKey sets the Key field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Key field is set to the value of the last call. +func (b *DiscoveryPathDefinitionApplyConfiguration) WithKey(value string) *DiscoveryPathDefinitionApplyConfiguration { + b.Key = &value + return b +} + +// WithPath sets the Path field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Path field is set to the value of the last call. +func (b *DiscoveryPathDefinitionApplyConfiguration) WithPath(value string) *DiscoveryPathDefinitionApplyConfiguration { + b.Path = &value + return b +} + +// WithScript sets the Script field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Script field is set to the value of the last call. +func (b *DiscoveryPathDefinitionApplyConfiguration) WithScript(value string) *DiscoveryPathDefinitionApplyConfiguration { + b.Script = &value + return b +} + +// WithRegex sets the Regex field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Regex field is set to the value of the last call. +func (b *DiscoveryPathDefinitionApplyConfiguration) WithRegex(value string) *DiscoveryPathDefinitionApplyConfiguration { + b.Regex = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryprofile.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryprofile.go new file mode 100644 index 00000000..4cfa08c6 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryprofile.go @@ -0,0 +1,62 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryProfileApplyConfiguration represents a declarative configuration of the DiscoveryProfile type for use +// with apply. +type DiscoveryProfileApplyConfiguration struct { + // Credentials defines the name of the secret that holds the credentials to connect to the target + Credentials *string `json:"credentials,omitempty"` + // TLSSecret defines the name of the TLS secret to connect to the target if mtls is used + TLSSecret *string `json:"tlsSecret,omitempty"` + // ConnectionProfiles define the list of profiles the discovery controller uses to discover the target. + // The order in which they are specified is the order in which discovery is executed. + ConnectionProfiles []string `json:"connectionProfiles,omitempty"` +} + +// DiscoveryProfileApplyConfiguration constructs a declarative configuration of the DiscoveryProfile type for use with +// apply. +func DiscoveryProfile() *DiscoveryProfileApplyConfiguration { + return &DiscoveryProfileApplyConfiguration{} +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *DiscoveryProfileApplyConfiguration) WithCredentials(value string) *DiscoveryProfileApplyConfiguration { + b.Credentials = &value + return b +} + +// WithTLSSecret sets the TLSSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSSecret field is set to the value of the last call. +func (b *DiscoveryProfileApplyConfiguration) WithTLSSecret(value string) *DiscoveryProfileApplyConfiguration { + b.TLSSecret = &value + return b +} + +// WithConnectionProfiles adds the given value to the ConnectionProfiles field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ConnectionProfiles field. +func (b *DiscoveryProfileApplyConfiguration) WithConnectionProfiles(values ...string) *DiscoveryProfileApplyConfiguration { + for i := range values { + b.ConnectionProfiles = append(b.ConnectionProfiles, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrule.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrule.go new file mode 100644 index 00000000..00266a33 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrule.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// DiscoveryRuleApplyConfiguration represents a declarative configuration of the DiscoveryRule type for use +// with apply. +// +// DiscoveryRule is the Schema for the DiscoveryRule API +type DiscoveryRuleApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DiscoveryRuleSpecApplyConfiguration `json:"spec,omitempty"` + Status *DiscoveryRuleStatusApplyConfiguration `json:"status,omitempty"` +} + +// DiscoveryRule constructs a declarative configuration of the DiscoveryRule type for use with +// apply. +func DiscoveryRule(name, namespace string) *DiscoveryRuleApplyConfiguration { + b := &DiscoveryRuleApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("DiscoveryRule") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b DiscoveryRuleApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithKind(value string) *DiscoveryRuleApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithAPIVersion(value string) *DiscoveryRuleApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithName(value string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithGenerateName(value string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithNamespace(value string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithUID(value types.UID) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithResourceVersion(value string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithGeneration(value int64) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *DiscoveryRuleApplyConfiguration) WithLabels(entries map[string]string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *DiscoveryRuleApplyConfiguration) WithAnnotations(entries map[string]string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *DiscoveryRuleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *DiscoveryRuleApplyConfiguration) WithFinalizers(values ...string) *DiscoveryRuleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *DiscoveryRuleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithSpec(value *DiscoveryRuleSpecApplyConfiguration) *DiscoveryRuleApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *DiscoveryRuleApplyConfiguration) WithStatus(value *DiscoveryRuleStatusApplyConfiguration) *DiscoveryRuleApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *DiscoveryRuleApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *DiscoveryRuleApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *DiscoveryRuleApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *DiscoveryRuleApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleaddress.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleaddress.go new file mode 100644 index 00000000..c51af135 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleaddress.go @@ -0,0 +1,49 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryRuleAddressApplyConfiguration represents a declarative configuration of the DiscoveryRuleAddress type for use +// with apply. +type DiscoveryRuleAddressApplyConfiguration struct { + // Address (specified as IP or DNS name) of the target/target(s) + Address *string `json:"address,omitempty"` + // HostName of the ip prefix; used for /32 or /128 addresses with discovery disabled + HostName *string `json:"hostName,omitempty"` +} + +// DiscoveryRuleAddressApplyConfiguration constructs a declarative configuration of the DiscoveryRuleAddress type for use with +// apply. +func DiscoveryRuleAddress() *DiscoveryRuleAddressApplyConfiguration { + return &DiscoveryRuleAddressApplyConfiguration{} +} + +// WithAddress sets the Address field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Address field is set to the value of the last call. +func (b *DiscoveryRuleAddressApplyConfiguration) WithAddress(value string) *DiscoveryRuleAddressApplyConfiguration { + b.Address = &value + return b +} + +// WithHostName sets the HostName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HostName field is set to the value of the last call. +func (b *DiscoveryRuleAddressApplyConfiguration) WithHostName(value string) *DiscoveryRuleAddressApplyConfiguration { + b.HostName = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleprefix.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleprefix.go new file mode 100644 index 00000000..030bf86b --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryruleprefix.go @@ -0,0 +1,51 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryRulePrefixApplyConfiguration represents a declarative configuration of the DiscoveryRulePrefix type for use +// with apply. +type DiscoveryRulePrefixApplyConfiguration struct { + // Prefix of the target/target(s) + Prefix *string `json:"prefix,omitempty"` + // IP Prefixes to be excluded + Excludes []string `json:"excludes,omitempty"` +} + +// DiscoveryRulePrefixApplyConfiguration constructs a declarative configuration of the DiscoveryRulePrefix type for use with +// apply. +func DiscoveryRulePrefix() *DiscoveryRulePrefixApplyConfiguration { + return &DiscoveryRulePrefixApplyConfiguration{} +} + +// WithPrefix sets the Prefix field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Prefix field is set to the value of the last call. +func (b *DiscoveryRulePrefixApplyConfiguration) WithPrefix(value string) *DiscoveryRulePrefixApplyConfiguration { + b.Prefix = &value + return b +} + +// WithExcludes adds the given value to the Excludes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Excludes field. +func (b *DiscoveryRulePrefixApplyConfiguration) WithExcludes(values ...string) *DiscoveryRulePrefixApplyConfiguration { + for i := range values { + b.Excludes = append(b.Excludes, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulespec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulespec.go new file mode 100644 index 00000000..66e76275 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulespec.go @@ -0,0 +1,152 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// DiscoveryRuleSpecApplyConfiguration represents a declarative configuration of the DiscoveryRuleSpec type for use +// with apply. +// +// DiscoveryRuleSpec defines the desired state of DiscoveryRule +type DiscoveryRuleSpecApplyConfiguration struct { + // IP Prefixes for which this discovery rule applies + Prefixes []DiscoveryRulePrefixApplyConfiguration `json:"prefixes,omitempty"` + // IP Prefixes for which this discovery rule applies + Addresses []DiscoveryRuleAddressApplyConfiguration `json:"addresses,omitempty"` + // PodSelector defines the pod selector for which this discovery rule applies + PodSelector *v1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"` + // ServiceSelector defines the service selector for which this discovery rule applies + ServiceSelector *v1.LabelSelectorApplyConfiguration `json:"serviceSelector,omitempty"` + // ServiceDomain defines the service domain of the cluster, used by svc discovery to identify the + // domain name in the k8s cluster where the service reside. + ServiceDomain *string `json:"serviceDomain,omitempty"` + // Discovery defines the generic parameters of the discovery rule + DiscoveryParametersApplyConfiguration `json:",inline"` +} + +// DiscoveryRuleSpecApplyConfiguration constructs a declarative configuration of the DiscoveryRuleSpec type for use with +// apply. +func DiscoveryRuleSpec() *DiscoveryRuleSpecApplyConfiguration { + return &DiscoveryRuleSpecApplyConfiguration{} +} + +// WithPrefixes adds the given value to the Prefixes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Prefixes field. +func (b *DiscoveryRuleSpecApplyConfiguration) WithPrefixes(values ...*DiscoveryRulePrefixApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPrefixes") + } + b.Prefixes = append(b.Prefixes, *values[i]) + } + return b +} + +// WithAddresses adds the given value to the Addresses field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Addresses field. +func (b *DiscoveryRuleSpecApplyConfiguration) WithAddresses(values ...*DiscoveryRuleAddressApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAddresses") + } + b.Addresses = append(b.Addresses, *values[i]) + } + return b +} + +// WithPodSelector sets the PodSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PodSelector field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithPodSelector(value *v1.LabelSelectorApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + b.PodSelector = value + return b +} + +// WithServiceSelector sets the ServiceSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceSelector field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithServiceSelector(value *v1.LabelSelectorApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + b.ServiceSelector = value + return b +} + +// WithServiceDomain sets the ServiceDomain field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ServiceDomain field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithServiceDomain(value string) *DiscoveryRuleSpecApplyConfiguration { + b.ServiceDomain = &value + return b +} + +// WithDefaultSchema sets the DefaultSchema field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DefaultSchema field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithDefaultSchema(value *SchemaKeyApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + b.DiscoveryParametersApplyConfiguration.DefaultSchema = value + return b +} + +// WithDiscoveryProfile sets the DiscoveryProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DiscoveryProfile field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithDiscoveryProfile(value *DiscoveryProfileApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + b.DiscoveryParametersApplyConfiguration.DiscoveryProfile = value + return b +} + +// WithTargetConnectionProfiles adds the given value to the TargetConnectionProfiles field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the TargetConnectionProfiles field. +func (b *DiscoveryRuleSpecApplyConfiguration) WithTargetConnectionProfiles(values ...*TargetProfileApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTargetConnectionProfiles") + } + b.DiscoveryParametersApplyConfiguration.TargetConnectionProfiles = append(b.DiscoveryParametersApplyConfiguration.TargetConnectionProfiles, *values[i]) + } + return b +} + +// WithTargetTemplate sets the TargetTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetTemplate field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithTargetTemplate(value *TargetTemplateApplyConfiguration) *DiscoveryRuleSpecApplyConfiguration { + b.DiscoveryParametersApplyConfiguration.TargetTemplate = value + return b +} + +// WithPeriod sets the Period field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Period field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithPeriod(value metav1.Duration) *DiscoveryRuleSpecApplyConfiguration { + b.DiscoveryParametersApplyConfiguration.Period = &value + return b +} + +// WithConcurrentScans sets the ConcurrentScans field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConcurrentScans field is set to the value of the last call. +func (b *DiscoveryRuleSpecApplyConfiguration) WithConcurrentScans(value int64) *DiscoveryRuleSpecApplyConfiguration { + b.DiscoveryParametersApplyConfiguration.ConcurrentScans = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulestatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulestatus.go new file mode 100644 index 00000000..195fe786 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryrulestatus.go @@ -0,0 +1,62 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// DiscoveryRuleStatusApplyConfiguration represents a declarative configuration of the DiscoveryRuleStatus type for use +// with apply. +// +// DiscoveryRuleStatus defines the observed state of DiscoveryRule +type DiscoveryRuleStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Discovery using conditions + // 2 conditions are used: + // - a condition for the reconcilation status + // - a condition for the ready status + // if both are true the other attributes in the status are meaningful + conditionv1alpha1.ConditionedStatus `json:",inline"` + // StartTime identifies when the dr got started + StartTime *v1.Time `json:"startTime,omitempty"` +} + +// DiscoveryRuleStatusApplyConfiguration constructs a declarative configuration of the DiscoveryRuleStatus type for use with +// apply. +func DiscoveryRuleStatus() *DiscoveryRuleStatusApplyConfiguration { + return &DiscoveryRuleStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *DiscoveryRuleStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *DiscoveryRuleStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithStartTime sets the StartTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StartTime field is set to the value of the last call. +func (b *DiscoveryRuleStatusApplyConfiguration) WithStartTime(value v1.Time) *DiscoveryRuleStatusApplyConfiguration { + b.StartTime = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofile.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofile.go new file mode 100644 index 00000000..c561ab9c --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofile.go @@ -0,0 +1,235 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// DiscoveryVendorProfileApplyConfiguration represents a declarative configuration of the DiscoveryVendorProfile type for use +// with apply. +// +// DiscoveryVendorProfile is the Schema for the DiscoveryVendorProfile API +type DiscoveryVendorProfileApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *DiscoveryVendorProfileSpecApplyConfiguration `json:"spec,omitempty"` +} + +// DiscoveryVendorProfile constructs a declarative configuration of the DiscoveryVendorProfile type for use with +// apply. +func DiscoveryVendorProfile(name, namespace string) *DiscoveryVendorProfileApplyConfiguration { + b := &DiscoveryVendorProfileApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("DiscoveryVendorProfile") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b DiscoveryVendorProfileApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithKind(value string) *DiscoveryVendorProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithAPIVersion(value string) *DiscoveryVendorProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithName(value string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithGenerateName(value string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithNamespace(value string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithUID(value types.UID) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithResourceVersion(value string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithGeneration(value int64) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *DiscoveryVendorProfileApplyConfiguration) WithLabels(entries map[string]string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *DiscoveryVendorProfileApplyConfiguration) WithAnnotations(entries map[string]string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *DiscoveryVendorProfileApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *DiscoveryVendorProfileApplyConfiguration) WithFinalizers(values ...string) *DiscoveryVendorProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *DiscoveryVendorProfileApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *DiscoveryVendorProfileApplyConfiguration) WithSpec(value *DiscoveryVendorProfileSpecApplyConfiguration) *DiscoveryVendorProfileApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *DiscoveryVendorProfileApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *DiscoveryVendorProfileApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *DiscoveryVendorProfileApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *DiscoveryVendorProfileApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofilespec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofilespec.go new file mode 100644 index 00000000..c1fe426a --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/discoveryvendorprofilespec.go @@ -0,0 +1,40 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// DiscoveryVendorProfileSpecApplyConfiguration represents a declarative configuration of the DiscoveryVendorProfileSpec type for use +// with apply. +// +// DiscoveryProfileSpec defines the desired state of DiscoveryProfile +type DiscoveryVendorProfileSpecApplyConfiguration struct { + Gnmi *GnmiDiscoveryVendorProfileParametersApplyConfiguration `json:"gnmi,omitempty"` +} + +// DiscoveryVendorProfileSpecApplyConfiguration constructs a declarative configuration of the DiscoveryVendorProfileSpec type for use with +// apply. +func DiscoveryVendorProfileSpec() *DiscoveryVendorProfileSpecApplyConfiguration { + return &DiscoveryVendorProfileSpecApplyConfiguration{} +} + +// WithGnmi sets the Gnmi field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Gnmi field is set to the value of the last call. +func (b *DiscoveryVendorProfileSpecApplyConfiguration) WithGnmi(value *GnmiDiscoveryVendorProfileParametersApplyConfiguration) *DiscoveryVendorProfileSpecApplyConfiguration { + b.Gnmi = value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/gnmidiscoveryvendorprofileparameters.go b/pkg/generated/applyconfiguration/inv/v1alpha1/gnmidiscoveryvendorprofileparameters.go new file mode 100644 index 00000000..59dde6ca --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/gnmidiscoveryvendorprofileparameters.go @@ -0,0 +1,84 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// GnmiDiscoveryVendorProfileParametersApplyConfiguration represents a declarative configuration of the GnmiDiscoveryVendorProfileParameters type for use +// with apply. +type GnmiDiscoveryVendorProfileParametersApplyConfiguration struct { + Organization *string `json:"organization,omitempty"` + ModelMatch *string `json:"modelMatch,omitempty"` + // Paths DiscoveryPaths `json:"paths" protobuf:"bytes,3,opt,name=paths"` + Paths []DiscoveryPathDefinitionApplyConfiguration `json:"paths,omitempty"` + Encoding *invv1alpha1.Encoding `json:"encoding,omitempty"` + PreserveNamespace *bool `json:"preserveNamespace,omitempty"` +} + +// GnmiDiscoveryVendorProfileParametersApplyConfiguration constructs a declarative configuration of the GnmiDiscoveryVendorProfileParameters type for use with +// apply. +func GnmiDiscoveryVendorProfileParameters() *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + return &GnmiDiscoveryVendorProfileParametersApplyConfiguration{} +} + +// WithOrganization sets the Organization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Organization field is set to the value of the last call. +func (b *GnmiDiscoveryVendorProfileParametersApplyConfiguration) WithOrganization(value string) *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + b.Organization = &value + return b +} + +// WithModelMatch sets the ModelMatch field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ModelMatch field is set to the value of the last call. +func (b *GnmiDiscoveryVendorProfileParametersApplyConfiguration) WithModelMatch(value string) *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + b.ModelMatch = &value + return b +} + +// WithPaths adds the given value to the Paths field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Paths field. +func (b *GnmiDiscoveryVendorProfileParametersApplyConfiguration) WithPaths(values ...*DiscoveryPathDefinitionApplyConfiguration) *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPaths") + } + b.Paths = append(b.Paths, *values[i]) + } + return b +} + +// WithEncoding sets the Encoding field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Encoding field is set to the value of the last call. +func (b *GnmiDiscoveryVendorProfileParametersApplyConfiguration) WithEncoding(value invv1alpha1.Encoding) *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + b.Encoding = &value + return b +} + +// WithPreserveNamespace sets the PreserveNamespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PreserveNamespace field is set to the value of the last call. +func (b *GnmiDiscoveryVendorProfileParametersApplyConfiguration) WithPreserveNamespace(value bool) *GnmiDiscoveryVendorProfileParametersApplyConfiguration { + b.PreserveNamespace = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/proxy.go b/pkg/generated/applyconfiguration/inv/v1alpha1/proxy.go new file mode 100644 index 00000000..d7dda4aa --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/proxy.go @@ -0,0 +1,49 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ProxyApplyConfiguration represents a declarative configuration of the Proxy type for use +// with apply. +type ProxyApplyConfiguration struct { + // URL specifies the base URL of the HTTP/HTTPS proxy server. + URL *string `json:"url,omitempty"` + // Credentials defines the name of the secret that holds the credentials to connect to the proxy server + Credentials *string `json:"credentials,omitempty"` +} + +// ProxyApplyConfiguration constructs a declarative configuration of the Proxy type for use with +// apply. +func Proxy() *ProxyApplyConfiguration { + return &ProxyApplyConfiguration{} +} + +// WithURL sets the URL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the URL field is set to the value of the last call. +func (b *ProxyApplyConfiguration) WithURL(value string) *ProxyApplyConfiguration { + b.URL = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *ProxyApplyConfiguration) WithCredentials(value string) *ProxyApplyConfiguration { + b.Credentials = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/repository.go b/pkg/generated/applyconfiguration/inv/v1alpha1/repository.go new file mode 100644 index 00000000..e793d636 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/repository.go @@ -0,0 +1,84 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// RepositoryApplyConfiguration represents a declarative configuration of the Repository type for use +// with apply. +type RepositoryApplyConfiguration struct { + // RepoURL specifies the base URL for a given repository + RepoURL *string `json:"repoURL,omitempty"` + // Credentials defines the name of the secret that holds the credentials to connect to the repo + Credentials *string `json:"credentials,omitempty"` + // Proxy defines the HTTP/HTTPS proxy to be used to connect to the repo. + Proxy *ProxyApplyConfiguration `json:"proxy,omitempty"` + // Kind defines the that the BranchOrTag string is a repository branch or a tag + Kind *invv1alpha1.BranchTagKind `json:"kind,omitempty"` + // Ref defines the branch or tag of the repository corresponding to the + // provider schema version + Ref *string `json:"ref,omitempty"` +} + +// RepositoryApplyConfiguration constructs a declarative configuration of the Repository type for use with +// apply. +func Repository() *RepositoryApplyConfiguration { + return &RepositoryApplyConfiguration{} +} + +// WithRepoURL sets the RepoURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RepoURL field is set to the value of the last call. +func (b *RepositoryApplyConfiguration) WithRepoURL(value string) *RepositoryApplyConfiguration { + b.RepoURL = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *RepositoryApplyConfiguration) WithCredentials(value string) *RepositoryApplyConfiguration { + b.Credentials = &value + return b +} + +// WithProxy sets the Proxy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Proxy field is set to the value of the last call. +func (b *RepositoryApplyConfiguration) WithProxy(value *ProxyApplyConfiguration) *RepositoryApplyConfiguration { + b.Proxy = value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *RepositoryApplyConfiguration) WithKind(value invv1alpha1.BranchTagKind) *RepositoryApplyConfiguration { + b.Kind = &value + return b +} + +// WithRef sets the Ref field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Ref field is set to the value of the last call. +func (b *RepositoryApplyConfiguration) WithRef(value string) *RepositoryApplyConfiguration { + b.Ref = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/rollout.go b/pkg/generated/applyconfiguration/inv/v1alpha1/rollout.go new file mode 100644 index 00000000..5bda9028 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/rollout.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// RolloutApplyConfiguration represents a declarative configuration of the Rollout type for use +// with apply. +// +// Rollout is the Rollout for the Rollout API +type RolloutApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *RolloutSpecApplyConfiguration `json:"spec,omitempty"` + Status *RolloutStatusApplyConfiguration `json:"status,omitempty"` +} + +// Rollout constructs a declarative configuration of the Rollout type for use with +// apply. +func Rollout(name, namespace string) *RolloutApplyConfiguration { + b := &RolloutApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Rollout") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b RolloutApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithKind(value string) *RolloutApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithAPIVersion(value string) *RolloutApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithName(value string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithGenerateName(value string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithNamespace(value string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithUID(value types.UID) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithResourceVersion(value string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithGeneration(value int64) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *RolloutApplyConfiguration) WithLabels(entries map[string]string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *RolloutApplyConfiguration) WithAnnotations(entries map[string]string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *RolloutApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *RolloutApplyConfiguration) WithFinalizers(values ...string) *RolloutApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *RolloutApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithSpec(value *RolloutSpecApplyConfiguration) *RolloutApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *RolloutApplyConfiguration) WithStatus(value *RolloutStatusApplyConfiguration) *RolloutApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *RolloutApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *RolloutApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *RolloutApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *RolloutApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutspec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutspec.go new file mode 100644 index 00000000..df8b926d --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutspec.go @@ -0,0 +1,94 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// RolloutSpecApplyConfiguration represents a declarative configuration of the RolloutSpec type for use +// with apply. +// +// RolloutSpec defines the desired state of Rollout +type RolloutSpecApplyConfiguration struct { + RepositoryApplyConfiguration `json:",inline"` + Strategy *invv1alpha1.RolloutStrategy `json:"strategy,omitempty"` + SkipUnavailableTarget *bool `json:"skipUnavailableTarget,omitempty"` +} + +// RolloutSpecApplyConfiguration constructs a declarative configuration of the RolloutSpec type for use with +// apply. +func RolloutSpec() *RolloutSpecApplyConfiguration { + return &RolloutSpecApplyConfiguration{} +} + +// WithRepoURL sets the RepoURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RepoURL field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithRepoURL(value string) *RolloutSpecApplyConfiguration { + b.RepositoryApplyConfiguration.RepoURL = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithCredentials(value string) *RolloutSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Credentials = &value + return b +} + +// WithProxy sets the Proxy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Proxy field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithProxy(value *ProxyApplyConfiguration) *RolloutSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Proxy = value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithKind(value invv1alpha1.BranchTagKind) *RolloutSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Kind = &value + return b +} + +// WithRef sets the Ref field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Ref field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithRef(value string) *RolloutSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Ref = &value + return b +} + +// WithStrategy sets the Strategy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Strategy field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithStrategy(value invv1alpha1.RolloutStrategy) *RolloutSpecApplyConfiguration { + b.Strategy = &value + return b +} + +// WithSkipUnavailableTarget sets the SkipUnavailableTarget field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SkipUnavailableTarget field is set to the value of the last call. +func (b *RolloutSpecApplyConfiguration) WithSkipUnavailableTarget(value bool) *RolloutSpecApplyConfiguration { + b.SkipUnavailableTarget = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutstatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutstatus.go new file mode 100644 index 00000000..ea853ca7 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/rolloutstatus.go @@ -0,0 +1,62 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// RolloutStatusApplyConfiguration represents a declarative configuration of the RolloutStatus type for use +// with apply. +// +// RolloutStatus defines the observed state of Rollout +type RolloutStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Rollout using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` + // Targets defines the status of the rollout on the respective target + Targets []RolloutTargetStatusApplyConfiguration `json:"targets,omitempty"` +} + +// RolloutStatusApplyConfiguration constructs a declarative configuration of the RolloutStatus type for use with +// apply. +func RolloutStatus() *RolloutStatusApplyConfiguration { + return &RolloutStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *RolloutStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *RolloutStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithTargets adds the given value to the Targets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Targets field. +func (b *RolloutStatusApplyConfiguration) WithTargets(values ...*RolloutTargetStatusApplyConfiguration) *RolloutStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTargets") + } + b.Targets = append(b.Targets, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/rollouttargetstatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/rollouttargetstatus.go new file mode 100644 index 00000000..9a79bc5d --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/rollouttargetstatus.go @@ -0,0 +1,54 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// RolloutTargetStatusApplyConfiguration represents a declarative configuration of the RolloutTargetStatus type for use +// with apply. +type RolloutTargetStatusApplyConfiguration struct { + Name *string `json:"name,omitempty"` + // ConditionedStatus provides the status of the Rollout using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` +} + +// RolloutTargetStatusApplyConfiguration constructs a declarative configuration of the RolloutTargetStatus type for use with +// apply. +func RolloutTargetStatus() *RolloutTargetStatusApplyConfiguration { + return &RolloutTargetStatusApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *RolloutTargetStatusApplyConfiguration) WithName(value string) *RolloutTargetStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *RolloutTargetStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *RolloutTargetStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schema.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schema.go new file mode 100644 index 00000000..bba70e44 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schema.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// SchemaApplyConfiguration represents a declarative configuration of the Schema type for use +// with apply. +// +// Schema is the Schema for the Schema API +type SchemaApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *SchemaSpecApplyConfiguration `json:"spec,omitempty"` + Status *SchemaStatusApplyConfiguration `json:"status,omitempty"` +} + +// Schema constructs a declarative configuration of the Schema type for use with +// apply. +func Schema(name, namespace string) *SchemaApplyConfiguration { + b := &SchemaApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Schema") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b SchemaApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithKind(value string) *SchemaApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithAPIVersion(value string) *SchemaApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithName(value string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithGenerateName(value string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithNamespace(value string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithUID(value types.UID) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithResourceVersion(value string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithGeneration(value int64) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *SchemaApplyConfiguration) WithLabels(entries map[string]string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *SchemaApplyConfiguration) WithAnnotations(entries map[string]string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *SchemaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *SchemaApplyConfiguration) WithFinalizers(values ...string) *SchemaApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *SchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithSpec(value *SchemaSpecApplyConfiguration) *SchemaApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *SchemaApplyConfiguration) WithStatus(value *SchemaStatusApplyConfiguration) *SchemaApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *SchemaApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *SchemaApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *SchemaApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *SchemaApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemakey.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemakey.go new file mode 100644 index 00000000..52356b3f --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemakey.go @@ -0,0 +1,49 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SchemaKeyApplyConfiguration represents a declarative configuration of the SchemaKey type for use +// with apply. +type SchemaKeyApplyConfiguration struct { + // Provider specifies the provider of the schema. + Provider *string `json:"provider,omitempty"` + // Version defines the version of the schema + Version *string `json:"version,omitempty"` +} + +// SchemaKeyApplyConfiguration constructs a declarative configuration of the SchemaKey type for use with +// apply. +func SchemaKey() *SchemaKeyApplyConfiguration { + return &SchemaKeyApplyConfiguration{} +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *SchemaKeyApplyConfiguration) WithProvider(value string) *SchemaKeyApplyConfiguration { + b.Provider = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *SchemaKeyApplyConfiguration) WithVersion(value string) *SchemaKeyApplyConfiguration { + b.Version = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemarepositorystatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemarepositorystatus.go new file mode 100644 index 00000000..a349e436 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemarepositorystatus.go @@ -0,0 +1,51 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SchemaRepositoryStatusApplyConfiguration represents a declarative configuration of the SchemaRepositoryStatus type for use +// with apply. +// +// SchemaRepositoryStatus provides the observed hash of a repository +type SchemaRepositoryStatusApplyConfiguration struct { + // RepoURL defines URL of the repository + RepoURL *string `json:"repoURL,omitempty"` + // Reference indicating version of loaded repository + Reference *string `json:"reference,omitempty"` +} + +// SchemaRepositoryStatusApplyConfiguration constructs a declarative configuration of the SchemaRepositoryStatus type for use with +// apply. +func SchemaRepositoryStatus() *SchemaRepositoryStatusApplyConfiguration { + return &SchemaRepositoryStatusApplyConfiguration{} +} + +// WithRepoURL sets the RepoURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RepoURL field is set to the value of the last call. +func (b *SchemaRepositoryStatusApplyConfiguration) WithRepoURL(value string) *SchemaRepositoryStatusApplyConfiguration { + b.RepoURL = &value + return b +} + +// WithReference sets the Reference field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Reference field is set to the value of the last call. +func (b *SchemaRepositoryStatusApplyConfiguration) WithReference(value string) *SchemaRepositoryStatusApplyConfiguration { + b.Reference = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspec.go new file mode 100644 index 00000000..603a2e71 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspec.go @@ -0,0 +1,70 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// SchemaSpecApplyConfiguration represents a declarative configuration of the SchemaSpec type for use +// with apply. +// +// SchemaSpec defines the desired state of Schema +type SchemaSpecApplyConfiguration struct { + // Provider specifies the provider of the schema. + Provider *string `json:"provider,omitempty"` + // Version defines the version of the schema + Version *string `json:"version,omitempty"` + // Repositories define the repositories used for building the provider schema + Repositories []*invv1alpha1.SchemaSpecRepository `json:"repositories,omitempty"` +} + +// SchemaSpecApplyConfiguration constructs a declarative configuration of the SchemaSpec type for use with +// apply. +func SchemaSpec() *SchemaSpecApplyConfiguration { + return &SchemaSpecApplyConfiguration{} +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *SchemaSpecApplyConfiguration) WithProvider(value string) *SchemaSpecApplyConfiguration { + b.Provider = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *SchemaSpecApplyConfiguration) WithVersion(value string) *SchemaSpecApplyConfiguration { + b.Version = &value + return b +} + +// WithRepositories adds the given value to the Repositories field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Repositories field. +func (b *SchemaSpecApplyConfiguration) WithRepositories(values ...**invv1alpha1.SchemaSpecRepository) *SchemaSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRepositories") + } + b.Repositories = append(b.Repositories, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecrepository.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecrepository.go new file mode 100644 index 00000000..e2cffd7c --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecrepository.go @@ -0,0 +1,101 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// SchemaSpecRepositoryApplyConfiguration represents a declarative configuration of the SchemaSpecRepository type for use +// with apply. +type SchemaSpecRepositoryApplyConfiguration struct { + RepositoryApplyConfiguration `json:",inline"` + // Dirs defines the list of directories that identified the provider schema in src/dst pairs + // relative within the repository + Dirs []SrcDstPathApplyConfiguration `json:"dirs,omitempty"` + // Schema provides the details of which files must be used for the models and which files/directories + // cana be excludes + Schema *SchemaSpecSchemaApplyConfiguration `json:"schema,omitempty"` +} + +// SchemaSpecRepositoryApplyConfiguration constructs a declarative configuration of the SchemaSpecRepository type for use with +// apply. +func SchemaSpecRepository() *SchemaSpecRepositoryApplyConfiguration { + return &SchemaSpecRepositoryApplyConfiguration{} +} + +// WithRepoURL sets the RepoURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RepoURL field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithRepoURL(value string) *SchemaSpecRepositoryApplyConfiguration { + b.RepositoryApplyConfiguration.RepoURL = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithCredentials(value string) *SchemaSpecRepositoryApplyConfiguration { + b.RepositoryApplyConfiguration.Credentials = &value + return b +} + +// WithProxy sets the Proxy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Proxy field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithProxy(value *ProxyApplyConfiguration) *SchemaSpecRepositoryApplyConfiguration { + b.RepositoryApplyConfiguration.Proxy = value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithKind(value invv1alpha1.BranchTagKind) *SchemaSpecRepositoryApplyConfiguration { + b.RepositoryApplyConfiguration.Kind = &value + return b +} + +// WithRef sets the Ref field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Ref field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithRef(value string) *SchemaSpecRepositoryApplyConfiguration { + b.RepositoryApplyConfiguration.Ref = &value + return b +} + +// WithDirs adds the given value to the Dirs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Dirs field. +func (b *SchemaSpecRepositoryApplyConfiguration) WithDirs(values ...*SrcDstPathApplyConfiguration) *SchemaSpecRepositoryApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDirs") + } + b.Dirs = append(b.Dirs, *values[i]) + } + return b +} + +// WithSchema sets the Schema field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Schema field is set to the value of the last call. +func (b *SchemaSpecRepositoryApplyConfiguration) WithSchema(value *SchemaSpecSchemaApplyConfiguration) *SchemaSpecRepositoryApplyConfiguration { + b.Schema = value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecschema.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecschema.go new file mode 100644 index 00000000..b9b8e896 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemaspecschema.go @@ -0,0 +1,65 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SchemaSpecSchemaApplyConfiguration represents a declarative configuration of the SchemaSpecSchema type for use +// with apply. +type SchemaSpecSchemaApplyConfiguration struct { + // Models defines the list of files/directories to be used as a model + Models []string `json:"models,omitempty"` + // Excludes defines the list of files/directories to be excluded + Includes []string `json:"includes,omitempty"` + // Excludes defines the list of files/directories to be excluded + Excludes []string `json:"excludes,omitempty"` +} + +// SchemaSpecSchemaApplyConfiguration constructs a declarative configuration of the SchemaSpecSchema type for use with +// apply. +func SchemaSpecSchema() *SchemaSpecSchemaApplyConfiguration { + return &SchemaSpecSchemaApplyConfiguration{} +} + +// WithModels adds the given value to the Models field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Models field. +func (b *SchemaSpecSchemaApplyConfiguration) WithModels(values ...string) *SchemaSpecSchemaApplyConfiguration { + for i := range values { + b.Models = append(b.Models, values[i]) + } + return b +} + +// WithIncludes adds the given value to the Includes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Includes field. +func (b *SchemaSpecSchemaApplyConfiguration) WithIncludes(values ...string) *SchemaSpecSchemaApplyConfiguration { + for i := range values { + b.Includes = append(b.Includes, values[i]) + } + return b +} + +// WithExcludes adds the given value to the Excludes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Excludes field. +func (b *SchemaSpecSchemaApplyConfiguration) WithExcludes(values ...string) *SchemaSpecSchemaApplyConfiguration { + for i := range values { + b.Excludes = append(b.Excludes, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/schemastatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/schemastatus.go new file mode 100644 index 00000000..93d0e43b --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/schemastatus.go @@ -0,0 +1,62 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// SchemaStatusApplyConfiguration represents a declarative configuration of the SchemaStatus type for use +// with apply. +// +// SchemaStatus defines the observed state of Schema +type SchemaStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Schema using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` + // SchemaRepositoryStatus provides the array of repositories + Repositories []SchemaRepositoryStatusApplyConfiguration `json:"repositories,omitempty"` +} + +// SchemaStatusApplyConfiguration constructs a declarative configuration of the SchemaStatus type for use with +// apply. +func SchemaStatus() *SchemaStatusApplyConfiguration { + return &SchemaStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *SchemaStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *SchemaStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithRepositories adds the given value to the Repositories field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Repositories field. +func (b *SchemaStatusApplyConfiguration) WithRepositories(values ...*SchemaRepositoryStatusApplyConfiguration) *SchemaStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRepositories") + } + b.Repositories = append(b.Repositories, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/srcdstpath.go b/pkg/generated/applyconfiguration/inv/v1alpha1/srcdstpath.go new file mode 100644 index 00000000..e7077565 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/srcdstpath.go @@ -0,0 +1,52 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// SrcDstPathApplyConfiguration represents a declarative configuration of the SrcDstPath type for use +// with apply. +// +// SrcDstPath provide a src/dst pair for the loader to download the schema from a specific src +// in the repository to a given destination in the schema server +type SrcDstPathApplyConfiguration struct { + // Src is the relative directory in the repository URL + Src *string `json:"src,omitempty"` + // Dst is the relative directory in the schema server + Dst *string `json:"dst,omitempty"` +} + +// SrcDstPathApplyConfiguration constructs a declarative configuration of the SrcDstPath type for use with +// apply. +func SrcDstPath() *SrcDstPathApplyConfiguration { + return &SrcDstPathApplyConfiguration{} +} + +// WithSrc sets the Src field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Src field is set to the value of the last call. +func (b *SrcDstPathApplyConfiguration) WithSrc(value string) *SrcDstPathApplyConfiguration { + b.Src = &value + return b +} + +// WithDst sets the Dst field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Dst field is set to the value of the last call. +func (b *SrcDstPathApplyConfiguration) WithDst(value string) *SrcDstPathApplyConfiguration { + b.Dst = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/subscription.go b/pkg/generated/applyconfiguration/inv/v1alpha1/subscription.go new file mode 100644 index 00000000..5a573bf4 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/subscription.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// SubscriptionApplyConfiguration represents a declarative configuration of the Subscription type for use +// with apply. +// +// Subscription is the Schema for the Subscription API +type SubscriptionApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *SubscriptionSpecApplyConfiguration `json:"spec,omitempty"` + Status *SubscriptionStatusApplyConfiguration `json:"status,omitempty"` +} + +// Subscription constructs a declarative configuration of the Subscription type for use with +// apply. +func Subscription(name, namespace string) *SubscriptionApplyConfiguration { + b := &SubscriptionApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Subscription") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b SubscriptionApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithKind(value string) *SubscriptionApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithAPIVersion(value string) *SubscriptionApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithName(value string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithGenerateName(value string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithNamespace(value string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithUID(value types.UID) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithResourceVersion(value string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithGeneration(value int64) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *SubscriptionApplyConfiguration) WithLabels(entries map[string]string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *SubscriptionApplyConfiguration) WithAnnotations(entries map[string]string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *SubscriptionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *SubscriptionApplyConfiguration) WithFinalizers(values ...string) *SubscriptionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *SubscriptionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithSpec(value *SubscriptionSpecApplyConfiguration) *SubscriptionApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *SubscriptionApplyConfiguration) WithStatus(value *SubscriptionStatusApplyConfiguration) *SubscriptionApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *SubscriptionApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *SubscriptionApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *SubscriptionApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *SubscriptionApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionparameters.go b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionparameters.go new file mode 100644 index 00000000..f4083758 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionparameters.go @@ -0,0 +1,111 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SubscriptionParametersApplyConfiguration represents a declarative configuration of the SubscriptionParameters type for use +// with apply. +// +// SubscriptionSync defines the desired Subscription of SubscriptionSync +type SubscriptionParametersApplyConfiguration struct { + // Name defines the name of the group of the Subscription to be collected + Name *string `json:"name,omitempty"` + // Description details what the Subscription collection is about + Description *string `json:"description,omitempty"` + // Labels can be defined as user defined data to provide extra context + Labels map[string]string `json:"labels,omitempty"` + // AdminState allows to disable the subscription + AdminState *invv1alpha1.AdminState `json:"adminState,omitempty"` + Mode *invv1alpha1.SyncMode `json:"mode,omitempty"` + Interval *v1.Duration `json:"interval,omitempty"` + Paths []string `json:"paths,omitempty"` +} + +// SubscriptionParametersApplyConfiguration constructs a declarative configuration of the SubscriptionParameters type for use with +// apply. +func SubscriptionParameters() *SubscriptionParametersApplyConfiguration { + return &SubscriptionParametersApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *SubscriptionParametersApplyConfiguration) WithName(value string) *SubscriptionParametersApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *SubscriptionParametersApplyConfiguration) WithDescription(value string) *SubscriptionParametersApplyConfiguration { + b.Description = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *SubscriptionParametersApplyConfiguration) WithLabels(entries map[string]string) *SubscriptionParametersApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAdminState sets the AdminState field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminState field is set to the value of the last call. +func (b *SubscriptionParametersApplyConfiguration) WithAdminState(value invv1alpha1.AdminState) *SubscriptionParametersApplyConfiguration { + b.AdminState = &value + return b +} + +// WithMode sets the Mode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Mode field is set to the value of the last call. +func (b *SubscriptionParametersApplyConfiguration) WithMode(value invv1alpha1.SyncMode) *SubscriptionParametersApplyConfiguration { + b.Mode = &value + return b +} + +// WithInterval sets the Interval field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Interval field is set to the value of the last call. +func (b *SubscriptionParametersApplyConfiguration) WithInterval(value v1.Duration) *SubscriptionParametersApplyConfiguration { + b.Interval = &value + return b +} + +// WithPaths adds the given value to the Paths field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Paths field. +func (b *SubscriptionParametersApplyConfiguration) WithPaths(values ...string) *SubscriptionParametersApplyConfiguration { + for i := range values { + b.Paths = append(b.Paths, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionspec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionspec.go new file mode 100644 index 00000000..d8226f52 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionspec.go @@ -0,0 +1,87 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// SubscriptionSpecApplyConfiguration represents a declarative configuration of the SubscriptionSpec type for use +// with apply. +// +// SubscriptionSpec defines the desired Subscription of Subscription +type SubscriptionSpecApplyConfiguration struct { + // Targets defines the targets on which this Subscription applies + Target *SubscriptionTargetApplyConfiguration `json:"target,omitempty"` + Protocol *invv1alpha1.Protocol `json:"protocol,omitempty"` + // Port defines the port on which the scan runs + Port *uint32 `json:"port,omitempty"` + Encoding *invv1alpha1.Encoding `json:"encoding,omitempty"` + Subscriptions []SubscriptionParametersApplyConfiguration `json:"subscriptions,omitempty"` +} + +// SubscriptionSpecApplyConfiguration constructs a declarative configuration of the SubscriptionSpec type for use with +// apply. +func SubscriptionSpec() *SubscriptionSpecApplyConfiguration { + return &SubscriptionSpecApplyConfiguration{} +} + +// WithTarget sets the Target field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Target field is set to the value of the last call. +func (b *SubscriptionSpecApplyConfiguration) WithTarget(value *SubscriptionTargetApplyConfiguration) *SubscriptionSpecApplyConfiguration { + b.Target = value + return b +} + +// WithProtocol sets the Protocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Protocol field is set to the value of the last call. +func (b *SubscriptionSpecApplyConfiguration) WithProtocol(value invv1alpha1.Protocol) *SubscriptionSpecApplyConfiguration { + b.Protocol = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *SubscriptionSpecApplyConfiguration) WithPort(value uint32) *SubscriptionSpecApplyConfiguration { + b.Port = &value + return b +} + +// WithEncoding sets the Encoding field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Encoding field is set to the value of the last call. +func (b *SubscriptionSpecApplyConfiguration) WithEncoding(value invv1alpha1.Encoding) *SubscriptionSpecApplyConfiguration { + b.Encoding = &value + return b +} + +// WithSubscriptions adds the given value to the Subscriptions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Subscriptions field. +func (b *SubscriptionSpecApplyConfiguration) WithSubscriptions(values ...*SubscriptionParametersApplyConfiguration) *SubscriptionSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSubscriptions") + } + b.Subscriptions = append(b.Subscriptions, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionstatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionstatus.go new file mode 100644 index 00000000..420fad14 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptionstatus.go @@ -0,0 +1,57 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" +) + +// SubscriptionStatusApplyConfiguration represents a declarative configuration of the SubscriptionStatus type for use +// with apply. +type SubscriptionStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Schema using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` + // Targets defines the list of targets this resource applies to + Targets []string `json:"targets,omitempty"` +} + +// SubscriptionStatusApplyConfiguration constructs a declarative configuration of the SubscriptionStatus type for use with +// apply. +func SubscriptionStatus() *SubscriptionStatusApplyConfiguration { + return &SubscriptionStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *SubscriptionStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *SubscriptionStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithTargets adds the given value to the Targets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Targets field. +func (b *SubscriptionStatusApplyConfiguration) WithTargets(values ...string) *SubscriptionStatusApplyConfiguration { + for i := range values { + b.Targets = append(b.Targets, values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptiontarget.go b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptiontarget.go new file mode 100644 index 00000000..203eeeb7 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/subscriptiontarget.go @@ -0,0 +1,43 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// SubscriptionTargetApplyConfiguration represents a declarative configuration of the SubscriptionTarget type for use +// with apply. +type SubscriptionTargetApplyConfiguration struct { + // TargetSelector defines the selector used to select the targets to which the config applies + TargetSelector *v1.LabelSelectorApplyConfiguration `json:"targetSelector,omitempty"` +} + +// SubscriptionTargetApplyConfiguration constructs a declarative configuration of the SubscriptionTarget type for use with +// apply. +func SubscriptionTarget() *SubscriptionTargetApplyConfiguration { + return &SubscriptionTargetApplyConfiguration{} +} + +// WithTargetSelector sets the TargetSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetSelector field is set to the value of the last call. +func (b *SubscriptionTargetApplyConfiguration) WithTargetSelector(value *v1.LabelSelectorApplyConfiguration) *SubscriptionTargetApplyConfiguration { + b.TargetSelector = value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofile.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofile.go new file mode 100644 index 00000000..12526701 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofile.go @@ -0,0 +1,235 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TargetConnectionProfileApplyConfiguration represents a declarative configuration of the TargetConnectionProfile type for use +// with apply. +// +// TargetConnectionProfile is the Schema for the TargetConnectionProfile API +type TargetConnectionProfileApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *TargetConnectionProfileSpecApplyConfiguration `json:"spec,omitempty"` +} + +// TargetConnectionProfile constructs a declarative configuration of the TargetConnectionProfile type for use with +// apply. +func TargetConnectionProfile(name, namespace string) *TargetConnectionProfileApplyConfiguration { + b := &TargetConnectionProfileApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("TargetConnectionProfile") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b TargetConnectionProfileApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithKind(value string) *TargetConnectionProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithAPIVersion(value string) *TargetConnectionProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithName(value string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithGenerateName(value string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithNamespace(value string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithUID(value types.UID) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithResourceVersion(value string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithGeneration(value int64) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TargetConnectionProfileApplyConfiguration) WithLabels(entries map[string]string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TargetConnectionProfileApplyConfiguration) WithAnnotations(entries map[string]string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *TargetConnectionProfileApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *TargetConnectionProfileApplyConfiguration) WithFinalizers(values ...string) *TargetConnectionProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *TargetConnectionProfileApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *TargetConnectionProfileApplyConfiguration) WithSpec(value *TargetConnectionProfileSpecApplyConfiguration) *TargetConnectionProfileApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TargetConnectionProfileApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TargetConnectionProfileApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *TargetConnectionProfileApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TargetConnectionProfileApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofilespec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofilespec.go new file mode 100644 index 00000000..f8a42e15 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetconnectionprofilespec.go @@ -0,0 +1,156 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TargetConnectionProfileSpecApplyConfiguration represents a declarative configuration of the TargetConnectionProfileSpec type for use +// with apply. +// +// TargetConnectionProfileSpec defines the desired state of TargetConnectionProfile +type TargetConnectionProfileSpecApplyConfiguration struct { + ConnectRetry *v1.Duration `json:"connectRetry,omitempty"` + Timeout *v1.Duration `json:"timeout,omitempty"` + Protocol *invv1alpha1.Protocol `json:"protocol,omitempty"` + // Port defines the port on which the scan runs + Port *uint32 `json:"port,omitempty"` + Encoding *invv1alpha1.Encoding `json:"encoding,omitempty"` + PreferredNetconfVersion *string `json:"preferredNetconfVersion,omitempty"` + Insecure *bool `json:"insecure,omitempty"` + SkipVerify *bool `json:"skipVerify,omitempty"` + IncludeNS *bool `json:"includeNS,omitempty"` + OperationWithNS *bool `json:"operationWithNS,omitempty"` + UseOperationRemove *bool `json:"useOperationRemove,omitempty"` + CommitCandidate *invv1alpha1.CommitCandidate `json:"commitCandidate,omitempty"` + // TargetName specifies the target field value in gNMI Path prefix + // Examples: "OC-YANG" (SONiC), "openconfig" (some vendors), or empty + TargetName *string `json:"targetName,omitempty"` +} + +// TargetConnectionProfileSpecApplyConfiguration constructs a declarative configuration of the TargetConnectionProfileSpec type for use with +// apply. +func TargetConnectionProfileSpec() *TargetConnectionProfileSpecApplyConfiguration { + return &TargetConnectionProfileSpecApplyConfiguration{} +} + +// WithConnectRetry sets the ConnectRetry field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConnectRetry field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithConnectRetry(value v1.Duration) *TargetConnectionProfileSpecApplyConfiguration { + b.ConnectRetry = &value + return b +} + +// WithTimeout sets the Timeout field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Timeout field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithTimeout(value v1.Duration) *TargetConnectionProfileSpecApplyConfiguration { + b.Timeout = &value + return b +} + +// WithProtocol sets the Protocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Protocol field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithProtocol(value invv1alpha1.Protocol) *TargetConnectionProfileSpecApplyConfiguration { + b.Protocol = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithPort(value uint32) *TargetConnectionProfileSpecApplyConfiguration { + b.Port = &value + return b +} + +// WithEncoding sets the Encoding field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Encoding field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithEncoding(value invv1alpha1.Encoding) *TargetConnectionProfileSpecApplyConfiguration { + b.Encoding = &value + return b +} + +// WithPreferredNetconfVersion sets the PreferredNetconfVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PreferredNetconfVersion field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithPreferredNetconfVersion(value string) *TargetConnectionProfileSpecApplyConfiguration { + b.PreferredNetconfVersion = &value + return b +} + +// WithInsecure sets the Insecure field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Insecure field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithInsecure(value bool) *TargetConnectionProfileSpecApplyConfiguration { + b.Insecure = &value + return b +} + +// WithSkipVerify sets the SkipVerify field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SkipVerify field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithSkipVerify(value bool) *TargetConnectionProfileSpecApplyConfiguration { + b.SkipVerify = &value + return b +} + +// WithIncludeNS sets the IncludeNS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IncludeNS field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithIncludeNS(value bool) *TargetConnectionProfileSpecApplyConfiguration { + b.IncludeNS = &value + return b +} + +// WithOperationWithNS sets the OperationWithNS field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OperationWithNS field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithOperationWithNS(value bool) *TargetConnectionProfileSpecApplyConfiguration { + b.OperationWithNS = &value + return b +} + +// WithUseOperationRemove sets the UseOperationRemove field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UseOperationRemove field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithUseOperationRemove(value bool) *TargetConnectionProfileSpecApplyConfiguration { + b.UseOperationRemove = &value + return b +} + +// WithCommitCandidate sets the CommitCandidate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CommitCandidate field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithCommitCandidate(value invv1alpha1.CommitCandidate) *TargetConnectionProfileSpecApplyConfiguration { + b.CommitCandidate = &value + return b +} + +// WithTargetName sets the TargetName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetName field is set to the value of the last call. +func (b *TargetConnectionProfileSpecApplyConfiguration) WithTargetName(value string) *TargetConnectionProfileSpecApplyConfiguration { + b.TargetName = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetprofile.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetprofile.go new file mode 100644 index 00000000..62c9f359 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetprofile.go @@ -0,0 +1,69 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TargetProfileApplyConfiguration represents a declarative configuration of the TargetProfile type for use +// with apply. +type TargetProfileApplyConfiguration struct { + // Credentials defines the name of the secret that holds the credentials to connect to the target + Credentials *string `json:"credentials,omitempty"` + // TLSSecret defines the name of the TLS secret to connect to the target if mtls is used + TLSSecret *string `json:"tlsSecret,omitempty"` + // ConnectionProfile define the profile used to connect to the target once discovered + ConnectionProfile *string `json:"connectionProfile,omitempty"` + // SyncProfile define the profile used to sync to the target config once discovered + SyncProfile *string `json:"syncProfile,omitempty"` +} + +// TargetProfileApplyConfiguration constructs a declarative configuration of the TargetProfile type for use with +// apply. +func TargetProfile() *TargetProfileApplyConfiguration { + return &TargetProfileApplyConfiguration{} +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *TargetProfileApplyConfiguration) WithCredentials(value string) *TargetProfileApplyConfiguration { + b.Credentials = &value + return b +} + +// WithTLSSecret sets the TLSSecret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TLSSecret field is set to the value of the last call. +func (b *TargetProfileApplyConfiguration) WithTLSSecret(value string) *TargetProfileApplyConfiguration { + b.TLSSecret = &value + return b +} + +// WithConnectionProfile sets the ConnectionProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConnectionProfile field is set to the value of the last call. +func (b *TargetProfileApplyConfiguration) WithConnectionProfile(value string) *TargetProfileApplyConfiguration { + b.ConnectionProfile = &value + return b +} + +// WithSyncProfile sets the SyncProfile field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SyncProfile field is set to the value of the last call. +func (b *TargetProfileApplyConfiguration) WithSyncProfile(value string) *TargetProfileApplyConfiguration { + b.SyncProfile = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofile.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofile.go new file mode 100644 index 00000000..1d3c47f3 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofile.go @@ -0,0 +1,235 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TargetSyncProfileApplyConfiguration represents a declarative configuration of the TargetSyncProfile type for use +// with apply. +// +// TargetSyncProfile is the Schema for the TargetSyncProfile API +type TargetSyncProfileApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *TargetSyncProfileSpecApplyConfiguration `json:"spec,omitempty"` +} + +// TargetSyncProfile constructs a declarative configuration of the TargetSyncProfile type for use with +// apply. +func TargetSyncProfile(name, namespace string) *TargetSyncProfileApplyConfiguration { + b := &TargetSyncProfileApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("TargetSyncProfile") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b TargetSyncProfileApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithKind(value string) *TargetSyncProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithAPIVersion(value string) *TargetSyncProfileApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithName(value string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithGenerateName(value string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithNamespace(value string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithUID(value types.UID) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithResourceVersion(value string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithGeneration(value int64) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TargetSyncProfileApplyConfiguration) WithLabels(entries map[string]string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TargetSyncProfileApplyConfiguration) WithAnnotations(entries map[string]string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *TargetSyncProfileApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *TargetSyncProfileApplyConfiguration) WithFinalizers(values ...string) *TargetSyncProfileApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *TargetSyncProfileApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *TargetSyncProfileApplyConfiguration) WithSpec(value *TargetSyncProfileSpecApplyConfiguration) *TargetSyncProfileApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TargetSyncProfileApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TargetSyncProfileApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *TargetSyncProfileApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TargetSyncProfileApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilespec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilespec.go new file mode 100644 index 00000000..5d3e4b2f --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilespec.go @@ -0,0 +1,72 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TargetSyncProfileSpecApplyConfiguration represents a declarative configuration of the TargetSyncProfileSpec type for use +// with apply. +// +// TargetSyncProfileSpec defines the desired state of TargetSyncProfile +type TargetSyncProfileSpecApplyConfiguration struct { + Validate *bool `json:"validate,omitempty"` + Buffer *int64 `json:"buffer,omitempty"` + Workers *int64 `json:"workers,omitempty"` + Sync []TargetSyncProfileSyncApplyConfiguration `json:"sync,omitempty"` +} + +// TargetSyncProfileSpecApplyConfiguration constructs a declarative configuration of the TargetSyncProfileSpec type for use with +// apply. +func TargetSyncProfileSpec() *TargetSyncProfileSpecApplyConfiguration { + return &TargetSyncProfileSpecApplyConfiguration{} +} + +// WithValidate sets the Validate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Validate field is set to the value of the last call. +func (b *TargetSyncProfileSpecApplyConfiguration) WithValidate(value bool) *TargetSyncProfileSpecApplyConfiguration { + b.Validate = &value + return b +} + +// WithBuffer sets the Buffer field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Buffer field is set to the value of the last call. +func (b *TargetSyncProfileSpecApplyConfiguration) WithBuffer(value int64) *TargetSyncProfileSpecApplyConfiguration { + b.Buffer = &value + return b +} + +// WithWorkers sets the Workers field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Workers field is set to the value of the last call. +func (b *TargetSyncProfileSpecApplyConfiguration) WithWorkers(value int64) *TargetSyncProfileSpecApplyConfiguration { + b.Workers = &value + return b +} + +// WithSync adds the given value to the Sync field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Sync field. +func (b *TargetSyncProfileSpecApplyConfiguration) WithSync(values ...*TargetSyncProfileSyncApplyConfiguration) *TargetSyncProfileSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSync") + } + b.Sync = append(b.Sync, *values[i]) + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilesync.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilesync.go new file mode 100644 index 00000000..a5aad98e --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targetsyncprofilesync.go @@ -0,0 +1,102 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TargetSyncProfileSyncApplyConfiguration represents a declarative configuration of the TargetSyncProfileSync type for use +// with apply. +// +// TargetSyncProfileSync defines the desired state of TargetSyncProfileSync +type TargetSyncProfileSyncApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Protocol *invv1alpha1.Protocol `json:"protocol,omitempty"` + // Port defines the port on which the scan runs + Port *uint32 `json:"port,omitempty"` + Paths []string `json:"paths,omitempty"` + Mode *invv1alpha1.SyncMode `json:"mode,omitempty"` + Encoding *invv1alpha1.Encoding `json:"encoding,omitempty"` + Interval *v1.Duration `json:"interval,omitempty"` +} + +// TargetSyncProfileSyncApplyConfiguration constructs a declarative configuration of the TargetSyncProfileSync type for use with +// apply. +func TargetSyncProfileSync() *TargetSyncProfileSyncApplyConfiguration { + return &TargetSyncProfileSyncApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithName(value string) *TargetSyncProfileSyncApplyConfiguration { + b.Name = &value + return b +} + +// WithProtocol sets the Protocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Protocol field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithProtocol(value invv1alpha1.Protocol) *TargetSyncProfileSyncApplyConfiguration { + b.Protocol = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithPort(value uint32) *TargetSyncProfileSyncApplyConfiguration { + b.Port = &value + return b +} + +// WithPaths adds the given value to the Paths field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Paths field. +func (b *TargetSyncProfileSyncApplyConfiguration) WithPaths(values ...string) *TargetSyncProfileSyncApplyConfiguration { + for i := range values { + b.Paths = append(b.Paths, values[i]) + } + return b +} + +// WithMode sets the Mode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Mode field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithMode(value invv1alpha1.SyncMode) *TargetSyncProfileSyncApplyConfiguration { + b.Mode = &value + return b +} + +// WithEncoding sets the Encoding field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Encoding field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithEncoding(value invv1alpha1.Encoding) *TargetSyncProfileSyncApplyConfiguration { + b.Encoding = &value + return b +} + +// WithInterval sets the Interval field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Interval field is set to the value of the last call. +func (b *TargetSyncProfileSyncApplyConfiguration) WithInterval(value v1.Duration) *TargetSyncProfileSyncApplyConfiguration { + b.Interval = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/targettemplate.go b/pkg/generated/applyconfiguration/inv/v1alpha1/targettemplate.go new file mode 100644 index 00000000..788ba544 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/targettemplate.go @@ -0,0 +1,73 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TargetTemplateApplyConfiguration represents a declarative configuration of the TargetTemplate type for use +// with apply. +// +// TargetTemplate defines the template of the target +type TargetTemplateApplyConfiguration struct { + // target name template + NameTemplate *string `json:"nameTemplate,omitempty"` + // Annotations is a key value map to be copied to the target CR. + Annotations map[string]string `json:"annotations,omitempty"` + // Labels is a key value map to be copied to the target CR. + Labels map[string]string `json:"labels,omitempty"` +} + +// TargetTemplateApplyConfiguration constructs a declarative configuration of the TargetTemplate type for use with +// apply. +func TargetTemplate() *TargetTemplateApplyConfiguration { + return &TargetTemplateApplyConfiguration{} +} + +// WithNameTemplate sets the NameTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NameTemplate field is set to the value of the last call. +func (b *TargetTemplateApplyConfiguration) WithNameTemplate(value string) *TargetTemplateApplyConfiguration { + b.NameTemplate = &value + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TargetTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *TargetTemplateApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TargetTemplateApplyConfiguration) WithLabels(entries map[string]string) *TargetTemplateApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/workspace.go b/pkg/generated/applyconfiguration/inv/v1alpha1/workspace.go new file mode 100644 index 00000000..5a0e53fc --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/workspace.go @@ -0,0 +1,244 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// WorkspaceApplyConfiguration represents a declarative configuration of the Workspace type for use +// with apply. +// +// Workspace is the Workspace for the Workspace API +type WorkspaceApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *WorkspaceSpecApplyConfiguration `json:"spec,omitempty"` + Status *WorkspaceStatusApplyConfiguration `json:"status,omitempty"` +} + +// Workspace constructs a declarative configuration of the Workspace type for use with +// apply. +func Workspace(name, namespace string) *WorkspaceApplyConfiguration { + b := &WorkspaceApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Workspace") + b.WithAPIVersion("inv.sdcio.dev/v1alpha1") + return b +} + +func (b WorkspaceApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithKind(value string) *WorkspaceApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithAPIVersion(value string) *WorkspaceApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithName(value string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithGenerateName(value string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithNamespace(value string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithUID(value types.UID) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithResourceVersion(value string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithGeneration(value int64) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *WorkspaceApplyConfiguration) WithLabels(entries map[string]string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *WorkspaceApplyConfiguration) WithAnnotations(entries map[string]string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *WorkspaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *WorkspaceApplyConfiguration) WithFinalizers(values ...string) *WorkspaceApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *WorkspaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithSpec(value *WorkspaceSpecApplyConfiguration) *WorkspaceApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *WorkspaceApplyConfiguration) WithStatus(value *WorkspaceStatusApplyConfiguration) *WorkspaceApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/workspacespec.go b/pkg/generated/applyconfiguration/inv/v1alpha1/workspacespec.go new file mode 100644 index 00000000..824b9a47 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/workspacespec.go @@ -0,0 +1,76 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// WorkspaceSpecApplyConfiguration represents a declarative configuration of the WorkspaceSpec type for use +// with apply. +// +// WorkspaceSpec defines the desired state of Workspace +type WorkspaceSpecApplyConfiguration struct { + RepositoryApplyConfiguration `json:",inline"` +} + +// WorkspaceSpecApplyConfiguration constructs a declarative configuration of the WorkspaceSpec type for use with +// apply. +func WorkspaceSpec() *WorkspaceSpecApplyConfiguration { + return &WorkspaceSpecApplyConfiguration{} +} + +// WithRepoURL sets the RepoURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RepoURL field is set to the value of the last call. +func (b *WorkspaceSpecApplyConfiguration) WithRepoURL(value string) *WorkspaceSpecApplyConfiguration { + b.RepositoryApplyConfiguration.RepoURL = &value + return b +} + +// WithCredentials sets the Credentials field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Credentials field is set to the value of the last call. +func (b *WorkspaceSpecApplyConfiguration) WithCredentials(value string) *WorkspaceSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Credentials = &value + return b +} + +// WithProxy sets the Proxy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Proxy field is set to the value of the last call. +func (b *WorkspaceSpecApplyConfiguration) WithProxy(value *ProxyApplyConfiguration) *WorkspaceSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Proxy = value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *WorkspaceSpecApplyConfiguration) WithKind(value invv1alpha1.BranchTagKind) *WorkspaceSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Kind = &value + return b +} + +// WithRef sets the Ref field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Ref field is set to the value of the last call. +func (b *WorkspaceSpecApplyConfiguration) WithRef(value string) *WorkspaceSpecApplyConfiguration { + b.RepositoryApplyConfiguration.Ref = &value + return b +} diff --git a/pkg/generated/applyconfiguration/inv/v1alpha1/workspacestatus.go b/pkg/generated/applyconfiguration/inv/v1alpha1/workspacestatus.go new file mode 100644 index 00000000..96453433 --- /dev/null +++ b/pkg/generated/applyconfiguration/inv/v1alpha1/workspacestatus.go @@ -0,0 +1,68 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + conditionv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" +) + +// WorkspaceStatusApplyConfiguration represents a declarative configuration of the WorkspaceStatus type for use +// with apply. +// +// WorkspaceStatus defines the observed state of Workspace +type WorkspaceStatusApplyConfiguration struct { + // ConditionedStatus provides the status of the Workspace using conditions + conditionv1alpha1.ConditionedStatus `json:",inline"` + // Kind defines the that the BranchOrTag string is a repository branch or a tag + Kind *invv1alpha1.BranchTagKind `json:"kind,omitempty"` + // DeployedRef is the reference that is deployed + DeployedRef *string `json:"deployedRef,omitempty"` +} + +// WorkspaceStatusApplyConfiguration constructs a declarative configuration of the WorkspaceStatus type for use with +// apply. +func WorkspaceStatus() *WorkspaceStatusApplyConfiguration { + return &WorkspaceStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *WorkspaceStatusApplyConfiguration) WithConditions(values ...conditionv1alpha1.Condition) *WorkspaceStatusApplyConfiguration { + for i := range values { + b.ConditionedStatus.Conditions = append(b.ConditionedStatus.Conditions, values[i]) + } + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *WorkspaceStatusApplyConfiguration) WithKind(value invv1alpha1.BranchTagKind) *WorkspaceStatusApplyConfiguration { + b.Kind = &value + return b +} + +// WithDeployedRef sets the DeployedRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeployedRef field is set to the value of the last call. +func (b *WorkspaceStatusApplyConfiguration) WithDeployedRef(value string) *WorkspaceStatusApplyConfiguration { + b.DeployedRef = &value + return b +} diff --git a/pkg/generated/applyconfiguration/utils.go b/pkg/generated/applyconfiguration/utils.go new file mode 100644 index 00000000..354baa37 --- /dev/null +++ b/pkg/generated/applyconfiguration/utils.go @@ -0,0 +1,181 @@ +/* +Copyright 2024 Nokia. + +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 applyconfiguration-gen. DO NOT EDIT. + +package applyconfiguration + +import ( + v1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" + internal "github.com/sdcio/config-server/pkg/generated/applyconfiguration/internal" + applyconfigurationinvv1alpha1 "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" +) + +// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no +// apply configuration type exists for the given GroupVersionKind. +func ForKind(kind schema.GroupVersionKind) interface{} { + switch kind { + // Group=config.sdcio.dev, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithKind("Config"): + return &configv1alpha1.ConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigBlame"): + return &configv1alpha1.ConfigBlameApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigBlameStatus"): + return &configv1alpha1.ConfigBlameStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigBlob"): + return &configv1alpha1.ConfigBlobApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigDeviation"): + return &configv1alpha1.ConfigDeviationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSet"): + return &configv1alpha1.ConfigSetApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSetSpec"): + return &configv1alpha1.ConfigSetSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSetStatus"): + return &configv1alpha1.ConfigSetStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSetTarget"): + return &configv1alpha1.ConfigSetTargetApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSetTargetStatus"): + return &configv1alpha1.ConfigSetTargetStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigSpec"): + return &configv1alpha1.ConfigSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigStatus"): + return &configv1alpha1.ConfigStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ConfigStatusLastKnownGoodSchema"): + return &configv1alpha1.ConfigStatusLastKnownGoodSchemaApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Deviation"): + return &configv1alpha1.DeviationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("DeviationSpec"): + return &configv1alpha1.DeviationSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("DeviationStatus"): + return &configv1alpha1.DeviationStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("DiscoveryInfo"): + return &configv1alpha1.DiscoveryInfoApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Lifecycle"): + return &configv1alpha1.LifecycleApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("RunningConfig"): + return &configv1alpha1.RunningConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("RunningConfigStatus"): + return &configv1alpha1.RunningConfigStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SensitiveConfig"): + return &configv1alpha1.SensitiveConfigApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SensitiveConfigData"): + return &configv1alpha1.SensitiveConfigDataApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SensitiveConfigSpec"): + return &configv1alpha1.SensitiveConfigSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("SensitiveConfigStatus"): + return &configv1alpha1.SensitiveConfigStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Target"): + return &configv1alpha1.TargetApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TargetSpec"): + return &configv1alpha1.TargetSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TargetStatus"): + return &configv1alpha1.TargetStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TargetStatusUsedReferences"): + return &configv1alpha1.TargetStatusUsedReferencesApplyConfiguration{} + + // Group=inv.sdcio.dev, Version=v1alpha1 + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryParameters"): + return &applyconfigurationinvv1alpha1.DiscoveryParametersApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryPathDefinition"): + return &applyconfigurationinvv1alpha1.DiscoveryPathDefinitionApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryProfile"): + return &applyconfigurationinvv1alpha1.DiscoveryProfileApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryRule"): + return &applyconfigurationinvv1alpha1.DiscoveryRuleApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryRuleAddress"): + return &applyconfigurationinvv1alpha1.DiscoveryRuleAddressApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryRulePrefix"): + return &applyconfigurationinvv1alpha1.DiscoveryRulePrefixApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryRuleSpec"): + return &applyconfigurationinvv1alpha1.DiscoveryRuleSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryRuleStatus"): + return &applyconfigurationinvv1alpha1.DiscoveryRuleStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryVendorProfile"): + return &applyconfigurationinvv1alpha1.DiscoveryVendorProfileApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("DiscoveryVendorProfileSpec"): + return &applyconfigurationinvv1alpha1.DiscoveryVendorProfileSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("GnmiDiscoveryVendorProfileParameters"): + return &applyconfigurationinvv1alpha1.GnmiDiscoveryVendorProfileParametersApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Proxy"): + return &applyconfigurationinvv1alpha1.ProxyApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Repository"): + return &applyconfigurationinvv1alpha1.RepositoryApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Rollout"): + return &applyconfigurationinvv1alpha1.RolloutApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("RolloutSpec"): + return &applyconfigurationinvv1alpha1.RolloutSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("RolloutStatus"): + return &applyconfigurationinvv1alpha1.RolloutStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("RolloutTargetStatus"): + return &applyconfigurationinvv1alpha1.RolloutTargetStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Schema"): + return &applyconfigurationinvv1alpha1.SchemaApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaKey"): + return &applyconfigurationinvv1alpha1.SchemaKeyApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaRepositoryStatus"): + return &applyconfigurationinvv1alpha1.SchemaRepositoryStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaSpec"): + return &applyconfigurationinvv1alpha1.SchemaSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaSpecRepository"): + return &applyconfigurationinvv1alpha1.SchemaSpecRepositoryApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaSpecSchema"): + return &applyconfigurationinvv1alpha1.SchemaSpecSchemaApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SchemaStatus"): + return &applyconfigurationinvv1alpha1.SchemaStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SrcDstPath"): + return &applyconfigurationinvv1alpha1.SrcDstPathApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Subscription"): + return &applyconfigurationinvv1alpha1.SubscriptionApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SubscriptionParameters"): + return &applyconfigurationinvv1alpha1.SubscriptionParametersApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SubscriptionSpec"): + return &applyconfigurationinvv1alpha1.SubscriptionSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SubscriptionStatus"): + return &applyconfigurationinvv1alpha1.SubscriptionStatusApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("SubscriptionTarget"): + return &applyconfigurationinvv1alpha1.SubscriptionTargetApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetConnectionProfile"): + return &applyconfigurationinvv1alpha1.TargetConnectionProfileApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetConnectionProfileSpec"): + return &applyconfigurationinvv1alpha1.TargetConnectionProfileSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetProfile"): + return &applyconfigurationinvv1alpha1.TargetProfileApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetSyncProfile"): + return &applyconfigurationinvv1alpha1.TargetSyncProfileApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetSyncProfileSpec"): + return &applyconfigurationinvv1alpha1.TargetSyncProfileSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetSyncProfileSync"): + return &applyconfigurationinvv1alpha1.TargetSyncProfileSyncApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("TargetTemplate"): + return &applyconfigurationinvv1alpha1.TargetTemplateApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("Workspace"): + return &applyconfigurationinvv1alpha1.WorkspaceApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("WorkspaceSpec"): + return &applyconfigurationinvv1alpha1.WorkspaceSpecApplyConfiguration{} + case invv1alpha1.SchemeGroupVersion.WithKind("WorkspaceStatus"): + return &applyconfigurationinvv1alpha1.WorkspaceStatusApplyConfiguration{} + + } + return nil +} + +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) +} diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go index 2d993dc0..18ed1dca 100644 --- a/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -36,7 +36,7 @@ import ( // without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. // -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// Deprecated: NewClientset replaces this with support for field management, which significantly improves // server side apply testing. NewClientset is only available when apply configurations are generated (e.g. // via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { @@ -52,8 +52,8 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() @@ -84,6 +84,17 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } +// IsWatchListSemanticsSupported informs the reflector that this client +// doesn't support WatchList semantics. +// +// This is a synthetic method whose sole purpose is to satisfy the optional +// interface check performed by the reflector. +// Returning true signals that WatchList can NOT be used. +// No additional logic is implemented here. +func (c *Clientset) IsWatchListSemanticsUnSupported() bool { + return true +} + var ( _ clientset.Interface = &Clientset{} _ testing.FakeClient = &Clientset{} diff --git a/pkg/generated/clientset/versioned/typed/config/v1alpha1/config_client.go b/pkg/generated/clientset/versioned/typed/config/v1alpha1/config_client.go index 74021aa7..f9164671 100644 --- a/pkg/generated/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/pkg/generated/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -33,6 +33,7 @@ type ConfigV1alpha1Interface interface { DeviationsGetter RunningConfigsGetter SensitiveConfigsGetter + TargetsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.sdcio.dev group. @@ -64,6 +65,10 @@ func (c *ConfigV1alpha1Client) SensitiveConfigs(namespace string) SensitiveConfi return newSensitiveConfigs(c, namespace) } +func (c *ConfigV1alpha1Client) Targets(namespace string) TargetInterface { + return newTargets(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index e9234883..df4bc527 100644 --- a/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -51,6 +51,10 @@ func (c *FakeConfigV1alpha1) SensitiveConfigs(namespace string) v1alpha1.Sensiti return newFakeSensitiveConfigs(c, namespace) } +func (c *FakeConfigV1alpha1) Targets(namespace string) v1alpha1.TargetInterface { + return newFakeTargets(c, namespace) +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_target.go b/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_target.go similarity index 83% rename from pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_target.go rename to pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_target.go index 6da1064d..764fc05f 100644 --- a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_target.go +++ b/pkg/generated/clientset/versioned/typed/config/v1alpha1/fake/fake_target.go @@ -18,18 +18,18 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/pkg/generated/clientset/versioned/typed/inv/v1alpha1" + v1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/pkg/generated/clientset/versioned/typed/config/v1alpha1" gentype "k8s.io/client-go/gentype" ) // fakeTargets implements TargetInterface type fakeTargets struct { *gentype.FakeClientWithList[*v1alpha1.Target, *v1alpha1.TargetList] - Fake *FakeInvV1alpha1 + Fake *FakeConfigV1alpha1 } -func newFakeTargets(fake *FakeInvV1alpha1, namespace string) invv1alpha1.TargetInterface { +func newFakeTargets(fake *FakeConfigV1alpha1, namespace string) configv1alpha1.TargetInterface { return &fakeTargets{ gentype.NewFakeClientWithList[*v1alpha1.Target, *v1alpha1.TargetList]( fake.Fake, diff --git a/pkg/generated/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index 709d2456..2881f978 100644 --- a/pkg/generated/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -28,3 +28,5 @@ type DeviationExpansion interface{} type RunningConfigExpansion interface{} type SensitiveConfigExpansion interface{} + +type TargetExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/target.go b/pkg/generated/clientset/versioned/typed/config/v1alpha1/target.go similarity index 64% rename from pkg/generated/clientset/versioned/typed/inv/v1alpha1/target.go rename to pkg/generated/clientset/versioned/typed/config/v1alpha1/target.go index a65305f7..3e22b6a7 100644 --- a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/target.go +++ b/pkg/generated/clientset/versioned/typed/config/v1alpha1/target.go @@ -20,7 +20,7 @@ package v1alpha1 import ( context "context" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" scheme "github.com/sdcio/config-server/pkg/generated/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -36,34 +36,34 @@ type TargetsGetter interface { // TargetInterface has methods to work with Target resources. type TargetInterface interface { - Create(ctx context.Context, target *invv1alpha1.Target, opts v1.CreateOptions) (*invv1alpha1.Target, error) - Update(ctx context.Context, target *invv1alpha1.Target, opts v1.UpdateOptions) (*invv1alpha1.Target, error) + Create(ctx context.Context, target *configv1alpha1.Target, opts v1.CreateOptions) (*configv1alpha1.Target, error) + Update(ctx context.Context, target *configv1alpha1.Target, opts v1.UpdateOptions) (*configv1alpha1.Target, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, target *invv1alpha1.Target, opts v1.UpdateOptions) (*invv1alpha1.Target, error) + UpdateStatus(ctx context.Context, target *configv1alpha1.Target, opts v1.UpdateOptions) (*configv1alpha1.Target, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*invv1alpha1.Target, error) - List(ctx context.Context, opts v1.ListOptions) (*invv1alpha1.TargetList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.Target, error) + List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.TargetList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *invv1alpha1.Target, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.Target, err error) TargetExpansion } // targets implements TargetInterface type targets struct { - *gentype.ClientWithList[*invv1alpha1.Target, *invv1alpha1.TargetList] + *gentype.ClientWithList[*configv1alpha1.Target, *configv1alpha1.TargetList] } // newTargets returns a Targets -func newTargets(c *InvV1alpha1Client, namespace string) *targets { +func newTargets(c *ConfigV1alpha1Client, namespace string) *targets { return &targets{ - gentype.NewClientWithList[*invv1alpha1.Target, *invv1alpha1.TargetList]( + gentype.NewClientWithList[*configv1alpha1.Target, *configv1alpha1.TargetList]( "targets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *invv1alpha1.Target { return &invv1alpha1.Target{} }, - func() *invv1alpha1.TargetList { return &invv1alpha1.TargetList{} }, + func() *configv1alpha1.Target { return &configv1alpha1.Target{} }, + func() *configv1alpha1.TargetList { return &configv1alpha1.TargetList{} }, ), } } diff --git a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_inv_client.go b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_inv_client.go index 7275f8b8..5fa300f7 100644 --- a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_inv_client.go +++ b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/fake/fake_inv_client.go @@ -47,10 +47,6 @@ func (c *FakeInvV1alpha1) Subscriptions(namespace string) v1alpha1.SubscriptionI return newFakeSubscriptions(c, namespace) } -func (c *FakeInvV1alpha1) Targets(namespace string) v1alpha1.TargetInterface { - return newFakeTargets(c, namespace) -} - func (c *FakeInvV1alpha1) TargetConnectionProfiles(namespace string) v1alpha1.TargetConnectionProfileInterface { return newFakeTargetConnectionProfiles(c, namespace) } diff --git a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/generated_expansion.go b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/generated_expansion.go index d7e8daab..6f2d0d40 100644 --- a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/generated_expansion.go @@ -27,8 +27,6 @@ type SchemaExpansion interface{} type SubscriptionExpansion interface{} -type TargetExpansion interface{} - type TargetConnectionProfileExpansion interface{} type TargetSyncProfileExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/inv_client.go b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/inv_client.go index c203138f..6d408ad7 100644 --- a/pkg/generated/clientset/versioned/typed/inv/v1alpha1/inv_client.go +++ b/pkg/generated/clientset/versioned/typed/inv/v1alpha1/inv_client.go @@ -32,7 +32,6 @@ type InvV1alpha1Interface interface { RolloutsGetter SchemasGetter SubscriptionsGetter - TargetsGetter TargetConnectionProfilesGetter TargetSyncProfilesGetter WorkspacesGetter @@ -63,10 +62,6 @@ func (c *InvV1alpha1Client) Subscriptions(namespace string) SubscriptionInterfac return newSubscriptions(c, namespace) } -func (c *InvV1alpha1Client) Targets(namespace string) TargetInterface { - return newTargets(c, namespace) -} - func (c *InvV1alpha1Client) TargetConnectionProfiles(namespace string) TargetConnectionProfileInterface { return newTargetConnectionProfiles(c, namespace) } diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/config.go b/pkg/generated/informers/externalversions/config/v1alpha1/config.go index 00943405..4c12fb74 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/config.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/config.go @@ -56,7 +56,7 @@ func NewConfigInformer(client versioned.Interface, namespace string, resyncPerio // one. This reduces memory footprint and number of connections to the server. func NewFilteredConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredConfigInformer(client versioned.Interface, namespace string, res } return client.ConfigV1alpha1().Configs(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.Config{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/configblame.go b/pkg/generated/informers/externalversions/config/v1alpha1/configblame.go index a9bb7771..8a089dbe 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/configblame.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/configblame.go @@ -56,7 +56,7 @@ func NewConfigBlameInformer(client versioned.Interface, namespace string, resync // one. This reduces memory footprint and number of connections to the server. func NewFilteredConfigBlameInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredConfigBlameInformer(client versioned.Interface, namespace string } return client.ConfigV1alpha1().ConfigBlames(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.ConfigBlame{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/configset.go b/pkg/generated/informers/externalversions/config/v1alpha1/configset.go index 3e8be38a..807b698f 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/configset.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/configset.go @@ -56,7 +56,7 @@ func NewConfigSetInformer(client versioned.Interface, namespace string, resyncPe // one. This reduces memory footprint and number of connections to the server. func NewFilteredConfigSetInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredConfigSetInformer(client versioned.Interface, namespace string, } return client.ConfigV1alpha1().ConfigSets(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.ConfigSet{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/deviation.go b/pkg/generated/informers/externalversions/config/v1alpha1/deviation.go index 711ded29..a6195d69 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/deviation.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/deviation.go @@ -56,7 +56,7 @@ func NewDeviationInformer(client versioned.Interface, namespace string, resyncPe // one. This reduces memory footprint and number of connections to the server. func NewFilteredDeviationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredDeviationInformer(client versioned.Interface, namespace string, } return client.ConfigV1alpha1().Deviations(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.Deviation{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/interface.go b/pkg/generated/informers/externalversions/config/v1alpha1/interface.go index 5c24fb9c..abab3842 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/interface.go @@ -35,6 +35,8 @@ type Interface interface { RunningConfigs() RunningConfigInformer // SensitiveConfigs returns a SensitiveConfigInformer. SensitiveConfigs() SensitiveConfigInformer + // Targets returns a TargetInformer. + Targets() TargetInformer } type version struct { @@ -77,3 +79,8 @@ func (v *version) RunningConfigs() RunningConfigInformer { func (v *version) SensitiveConfigs() SensitiveConfigInformer { return &sensitiveConfigInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// Targets returns a TargetInformer. +func (v *version) Targets() TargetInformer { + return &targetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/runningconfig.go b/pkg/generated/informers/externalversions/config/v1alpha1/runningconfig.go index 1b4909ea..e2e94346 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/runningconfig.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/runningconfig.go @@ -56,7 +56,7 @@ func NewRunningConfigInformer(client versioned.Interface, namespace string, resy // one. This reduces memory footprint and number of connections to the server. func NewFilteredRunningConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredRunningConfigInformer(client versioned.Interface, namespace stri } return client.ConfigV1alpha1().RunningConfigs(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.RunningConfig{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/config/v1alpha1/sensitiveconfig.go b/pkg/generated/informers/externalversions/config/v1alpha1/sensitiveconfig.go index ce95036d..5fe40ba3 100644 --- a/pkg/generated/informers/externalversions/config/v1alpha1/sensitiveconfig.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/sensitiveconfig.go @@ -56,7 +56,7 @@ func NewSensitiveConfigInformer(client versioned.Interface, namespace string, re // one. This reduces memory footprint and number of connections to the server. func NewFilteredSensitiveConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredSensitiveConfigInformer(client versioned.Interface, namespace st } return client.ConfigV1alpha1().SensitiveConfigs(namespace).Watch(ctx, options) }, - }, + }, client), &apisconfigv1alpha1.SensitiveConfig{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/target.go b/pkg/generated/informers/externalversions/config/v1alpha1/target.go similarity index 79% rename from pkg/generated/informers/externalversions/inv/v1alpha1/target.go rename to pkg/generated/informers/externalversions/config/v1alpha1/target.go index b230503e..fbda33e9 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/target.go +++ b/pkg/generated/informers/externalversions/config/v1alpha1/target.go @@ -21,10 +21,10 @@ import ( context "context" time "time" - apisinvv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + apisconfigv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" versioned "github.com/sdcio/config-server/pkg/generated/clientset/versioned" internalinterfaces "github.com/sdcio/config-server/pkg/generated/informers/externalversions/internalinterfaces" - invv1alpha1 "github.com/sdcio/config-server/pkg/generated/listers/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/pkg/generated/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -35,7 +35,7 @@ import ( // Targets. type TargetInformer interface { Informer() cache.SharedIndexInformer - Lister() invv1alpha1.TargetLister + Lister() configv1alpha1.TargetLister } type targetInformer struct { @@ -56,33 +56,33 @@ func NewTargetInformer(client versioned.Interface, namespace string, resyncPerio // one. This reduces memory footprint and number of connections to the server. func NewFilteredTargetInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.InvV1alpha1().Targets(namespace).List(context.Background(), options) + return client.ConfigV1alpha1().Targets(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.InvV1alpha1().Targets(namespace).Watch(context.Background(), options) + return client.ConfigV1alpha1().Targets(namespace).Watch(context.Background(), options) }, ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.InvV1alpha1().Targets(namespace).List(ctx, options) + return client.ConfigV1alpha1().Targets(namespace).List(ctx, options) }, WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.InvV1alpha1().Targets(namespace).Watch(ctx, options) + return client.ConfigV1alpha1().Targets(namespace).Watch(ctx, options) }, - }, - &apisinvv1alpha1.Target{}, + }, client), + &apisconfigv1alpha1.Target{}, resyncPeriod, indexers, ) @@ -93,9 +93,9 @@ func (f *targetInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *targetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apisinvv1alpha1.Target{}, f.defaultInformer) + return f.factory.InformerFor(&apisconfigv1alpha1.Target{}, f.defaultInformer) } -func (f *targetInformer) Lister() invv1alpha1.TargetLister { - return invv1alpha1.NewTargetLister(f.Informer().GetIndexer()) +func (f *targetInformer) Lister() configv1alpha1.TargetLister { + return configv1alpha1.NewTargetLister(f.Informer().GetIndexer()) } diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go index 5c03885a..0336c541 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/pkg/generated/informers/externalversions/factory.go @@ -97,6 +97,7 @@ func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Dur // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// // Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) @@ -204,7 +205,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal // // It is typically used like this: // -// ctx, cancel := context.Background() +// ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // factory := NewSharedInformerFactory(client, resyncPeriod) // defer factory.WaitForStop() // Returns immediately if nothing was started. diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index b3414835..f9e678aa 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -65,6 +65,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().RunningConfigs().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("sensitiveconfigs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().SensitiveConfigs().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("targets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().Targets().Informer()}, nil // Group=inv.sdcio.dev, Version=v1alpha1 case invv1alpha1.SchemeGroupVersion.WithResource("discoveryrules"): @@ -77,8 +79,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Inv().V1alpha1().Schemas().Informer()}, nil case invv1alpha1.SchemeGroupVersion.WithResource("subscriptions"): return &genericInformer{resource: resource.GroupResource(), informer: f.Inv().V1alpha1().Subscriptions().Informer()}, nil - case invv1alpha1.SchemeGroupVersion.WithResource("targets"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Inv().V1alpha1().Targets().Informer()}, nil case invv1alpha1.SchemeGroupVersion.WithResource("targetconnectionprofiles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Inv().V1alpha1().TargetConnectionProfiles().Informer()}, nil case invv1alpha1.SchemeGroupVersion.WithResource("targetsyncprofiles"): diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryrule.go b/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryrule.go index fa1b1f08..2bca165e 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryrule.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryrule.go @@ -56,7 +56,7 @@ func NewDiscoveryRuleInformer(client versioned.Interface, namespace string, resy // one. This reduces memory footprint and number of connections to the server. func NewFilteredDiscoveryRuleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredDiscoveryRuleInformer(client versioned.Interface, namespace stri } return client.InvV1alpha1().DiscoveryRules(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.DiscoveryRule{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryvendorprofile.go b/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryvendorprofile.go index 0b488531..c7755f45 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryvendorprofile.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/discoveryvendorprofile.go @@ -56,7 +56,7 @@ func NewDiscoveryVendorProfileInformer(client versioned.Interface, namespace str // one. This reduces memory footprint and number of connections to the server. func NewFilteredDiscoveryVendorProfileInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredDiscoveryVendorProfileInformer(client versioned.Interface, names } return client.InvV1alpha1().DiscoveryVendorProfiles(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.DiscoveryVendorProfile{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/interface.go b/pkg/generated/informers/externalversions/inv/v1alpha1/interface.go index b0d43822..6038cc3e 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/interface.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/interface.go @@ -33,8 +33,6 @@ type Interface interface { Schemas() SchemaInformer // Subscriptions returns a SubscriptionInformer. Subscriptions() SubscriptionInformer - // Targets returns a TargetInformer. - Targets() TargetInformer // TargetConnectionProfiles returns a TargetConnectionProfileInformer. TargetConnectionProfiles() TargetConnectionProfileInformer // TargetSyncProfiles returns a TargetSyncProfileInformer. @@ -79,11 +77,6 @@ func (v *version) Subscriptions() SubscriptionInformer { return &subscriptionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// Targets returns a TargetInformer. -func (v *version) Targets() TargetInformer { - return &targetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // TargetConnectionProfiles returns a TargetConnectionProfileInformer. func (v *version) TargetConnectionProfiles() TargetConnectionProfileInformer { return &targetConnectionProfileInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/rollout.go b/pkg/generated/informers/externalversions/inv/v1alpha1/rollout.go index 7fecf46f..38004822 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/rollout.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/rollout.go @@ -56,7 +56,7 @@ func NewRolloutInformer(client versioned.Interface, namespace string, resyncPeri // one. This reduces memory footprint and number of connections to the server. func NewFilteredRolloutInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredRolloutInformer(client versioned.Interface, namespace string, re } return client.InvV1alpha1().Rollouts(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.Rollout{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/schema.go b/pkg/generated/informers/externalversions/inv/v1alpha1/schema.go index 314c15ac..0bf0ee3e 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/schema.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/schema.go @@ -56,7 +56,7 @@ func NewSchemaInformer(client versioned.Interface, namespace string, resyncPerio // one. This reduces memory footprint and number of connections to the server. func NewFilteredSchemaInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredSchemaInformer(client versioned.Interface, namespace string, res } return client.InvV1alpha1().Schemas(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.Schema{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/subscription.go b/pkg/generated/informers/externalversions/inv/v1alpha1/subscription.go index a6b7b1b3..772fc387 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/subscription.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/subscription.go @@ -56,7 +56,7 @@ func NewSubscriptionInformer(client versioned.Interface, namespace string, resyn // one. This reduces memory footprint and number of connections to the server. func NewFilteredSubscriptionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredSubscriptionInformer(client versioned.Interface, namespace strin } return client.InvV1alpha1().Subscriptions(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.Subscription{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/targetconnectionprofile.go b/pkg/generated/informers/externalversions/inv/v1alpha1/targetconnectionprofile.go index 6828c266..94cefe76 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/targetconnectionprofile.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/targetconnectionprofile.go @@ -56,7 +56,7 @@ func NewTargetConnectionProfileInformer(client versioned.Interface, namespace st // one. This reduces memory footprint and number of connections to the server. func NewFilteredTargetConnectionProfileInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredTargetConnectionProfileInformer(client versioned.Interface, name } return client.InvV1alpha1().TargetConnectionProfiles(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.TargetConnectionProfile{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/targetsyncprofile.go b/pkg/generated/informers/externalversions/inv/v1alpha1/targetsyncprofile.go index 94322e5a..1eb03e9f 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/targetsyncprofile.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/targetsyncprofile.go @@ -56,7 +56,7 @@ func NewTargetSyncProfileInformer(client versioned.Interface, namespace string, // one. This reduces memory footprint and number of connections to the server. func NewFilteredTargetSyncProfileInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredTargetSyncProfileInformer(client versioned.Interface, namespace } return client.InvV1alpha1().TargetSyncProfiles(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.TargetSyncProfile{}, resyncPeriod, indexers, diff --git a/pkg/generated/informers/externalversions/inv/v1alpha1/workspace.go b/pkg/generated/informers/externalversions/inv/v1alpha1/workspace.go index 1e3dadfa..8726b0dd 100644 --- a/pkg/generated/informers/externalversions/inv/v1alpha1/workspace.go +++ b/pkg/generated/informers/externalversions/inv/v1alpha1/workspace.go @@ -56,7 +56,7 @@ func NewWorkspaceInformer(client versioned.Interface, namespace string, resyncPe // one. This reduces memory footprint and number of connections to the server. func NewFilteredWorkspaceInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( - &cache.ListWatch{ + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) @@ -81,7 +81,7 @@ func NewFilteredWorkspaceInformer(client versioned.Interface, namespace string, } return client.InvV1alpha1().Workspaces(namespace).Watch(ctx, options) }, - }, + }, client), &apisinvv1alpha1.Workspace{}, resyncPeriod, indexers, diff --git a/pkg/generated/listers/config/v1alpha1/expansion_generated.go b/pkg/generated/listers/config/v1alpha1/expansion_generated.go index e6b61cf8..bd3358d3 100644 --- a/pkg/generated/listers/config/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/config/v1alpha1/expansion_generated.go @@ -64,3 +64,11 @@ type SensitiveConfigListerExpansion interface{} // SensitiveConfigNamespaceListerExpansion allows custom methods to be added to // SensitiveConfigNamespaceLister. type SensitiveConfigNamespaceListerExpansion interface{} + +// TargetListerExpansion allows custom methods to be added to +// TargetLister. +type TargetListerExpansion interface{} + +// TargetNamespaceListerExpansion allows custom methods to be added to +// TargetNamespaceLister. +type TargetNamespaceListerExpansion interface{} diff --git a/pkg/generated/listers/inv/v1alpha1/target.go b/pkg/generated/listers/config/v1alpha1/target.go similarity index 77% rename from pkg/generated/listers/inv/v1alpha1/target.go rename to pkg/generated/listers/config/v1alpha1/target.go index 39275995..44226b36 100644 --- a/pkg/generated/listers/inv/v1alpha1/target.go +++ b/pkg/generated/listers/config/v1alpha1/target.go @@ -18,7 +18,7 @@ limitations under the License. package v1alpha1 import ( - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" labels "k8s.io/apimachinery/pkg/labels" listers "k8s.io/client-go/listers" cache "k8s.io/client-go/tools/cache" @@ -29,7 +29,7 @@ import ( type TargetLister interface { // List lists all Targets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*invv1alpha1.Target, err error) + List(selector labels.Selector) (ret []*configv1alpha1.Target, err error) // Targets returns an object that can list and get Targets. Targets(namespace string) TargetNamespaceLister TargetListerExpansion @@ -37,17 +37,17 @@ type TargetLister interface { // targetLister implements the TargetLister interface. type targetLister struct { - listers.ResourceIndexer[*invv1alpha1.Target] + listers.ResourceIndexer[*configv1alpha1.Target] } // NewTargetLister returns a new TargetLister. func NewTargetLister(indexer cache.Indexer) TargetLister { - return &targetLister{listers.New[*invv1alpha1.Target](indexer, invv1alpha1.Resource("target"))} + return &targetLister{listers.New[*configv1alpha1.Target](indexer, configv1alpha1.Resource("target"))} } // Targets returns an object that can list and get Targets. func (s *targetLister) Targets(namespace string) TargetNamespaceLister { - return targetNamespaceLister{listers.NewNamespaced[*invv1alpha1.Target](s.ResourceIndexer, namespace)} + return targetNamespaceLister{listers.NewNamespaced[*configv1alpha1.Target](s.ResourceIndexer, namespace)} } // TargetNamespaceLister helps list and get Targets. @@ -55,15 +55,15 @@ func (s *targetLister) Targets(namespace string) TargetNamespaceLister { type TargetNamespaceLister interface { // List lists all Targets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*invv1alpha1.Target, err error) + List(selector labels.Selector) (ret []*configv1alpha1.Target, err error) // Get retrieves the Target from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*invv1alpha1.Target, error) + Get(name string) (*configv1alpha1.Target, error) TargetNamespaceListerExpansion } // targetNamespaceLister implements the TargetNamespaceLister // interface. type targetNamespaceLister struct { - listers.ResourceIndexer[*invv1alpha1.Target] + listers.ResourceIndexer[*configv1alpha1.Target] } diff --git a/pkg/generated/listers/inv/v1alpha1/expansion_generated.go b/pkg/generated/listers/inv/v1alpha1/expansion_generated.go index 09d3b5fc..b86141dd 100644 --- a/pkg/generated/listers/inv/v1alpha1/expansion_generated.go +++ b/pkg/generated/listers/inv/v1alpha1/expansion_generated.go @@ -57,14 +57,6 @@ type SubscriptionListerExpansion interface{} // SubscriptionNamespaceLister. type SubscriptionNamespaceListerExpansion interface{} -// TargetListerExpansion allows custom methods to be added to -// TargetLister. -type TargetListerExpansion interface{} - -// TargetNamespaceListerExpansion allows custom methods to be added to -// TargetNamespaceLister. -type TargetNamespaceListerExpansion interface{} - // TargetConnectionProfileListerExpansion allows custom methods to be added to // TargetConnectionProfileLister. type TargetConnectionProfileListerExpansion interface{} diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 916c1c33..306b917b 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -24,6 +24,8 @@ import ( v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + version "k8s.io/apimachinery/pkg/version" common "k8s.io/kube-openapi/pkg/common" spec "k8s.io/kube-openapi/pkg/validation/spec" ) @@ -45,6 +47,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetList": schema_config_server_apis_config_v1alpha1_ConfigSetList(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetSpec": schema_config_server_apis_config_v1alpha1_ConfigSetSpec(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetStatus": schema_config_server_apis_config_v1alpha1_ConfigSetStatus(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTarget": schema_config_server_apis_config_v1alpha1_ConfigSetTarget(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTargetStatus": schema_config_server_apis_config_v1alpha1_ConfigSetTargetStatus(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSpec": schema_config_server_apis_config_v1alpha1_ConfigSpec(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigStatus": schema_config_server_apis_config_v1alpha1_ConfigStatus(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigStatusLastKnownGoodSchema": schema_config_server_apis_config_v1alpha1_ConfigStatusLastKnownGoodSchema(ref), @@ -52,6 +56,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationList": schema_config_server_apis_config_v1alpha1_DeviationList(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationSpec": schema_config_server_apis_config_v1alpha1_DeviationSpec(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationStatus": schema_config_server_apis_config_v1alpha1_DeviationStatus(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.DiscoveryInfo": schema_config_server_apis_config_v1alpha1_DiscoveryInfo(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.Lifecycle": schema_config_server_apis_config_v1alpha1_Lifecycle(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfig": schema_config_server_apis_config_v1alpha1_RunningConfig(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfigList": schema_config_server_apis_config_v1alpha1_RunningConfigList(ref), @@ -63,8 +68,18 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigSpec": schema_config_server_apis_config_v1alpha1_SensitiveConfigSpec(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigStatus": schema_config_server_apis_config_v1alpha1_SensitiveConfigStatus(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.Target": schema_config_server_apis_config_v1alpha1_Target(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviation": schema_config_server_apis_config_v1alpha1_TargetClearDeviation(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfig": schema_config_server_apis_config_v1alpha1_TargetClearDeviationConfig(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfigResult": schema_config_server_apis_config_v1alpha1_TargetClearDeviationConfigResult(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationSpec": schema_config_server_apis_config_v1alpha1_TargetClearDeviationSpec(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationStatus": schema_config_server_apis_config_v1alpha1_TargetClearDeviationStatus(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetConfigBlame": schema_config_server_apis_config_v1alpha1_TargetConfigBlame(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetList": schema_config_server_apis_config_v1alpha1_TargetList(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetRunningConfig": schema_config_server_apis_config_v1alpha1_TargetRunningConfig(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetRunningConfigOptions": schema_config_server_apis_config_v1alpha1_TargetRunningConfigOptions(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetSpec": schema_config_server_apis_config_v1alpha1_TargetSpec(ref), "github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatus": schema_config_server_apis_config_v1alpha1_TargetStatus(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryInfo": schema_config_server_apis_inv_v1alpha1_DiscoveryInfo(ref), + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatusUsedReferences": schema_config_server_apis_config_v1alpha1_TargetStatusUsedReferences(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryParameters": schema_config_server_apis_inv_v1alpha1_DiscoveryParameters(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryPathDefinition": schema_config_server_apis_inv_v1alpha1_DiscoveryPathDefinition(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryProfile": schema_config_server_apis_inv_v1alpha1_DiscoveryProfile(ref), @@ -100,15 +115,10 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionSpec": schema_config_server_apis_inv_v1alpha1_SubscriptionSpec(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionStatus": schema_config_server_apis_inv_v1alpha1_SubscriptionStatus(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionTarget": schema_config_server_apis_inv_v1alpha1_SubscriptionTarget(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.Target": schema_config_server_apis_inv_v1alpha1_Target(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfile": schema_config_server_apis_inv_v1alpha1_TargetConnectionProfile(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfileList": schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileList(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfileSpec": schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileSpec(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetList": schema_config_server_apis_inv_v1alpha1_TargetList(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetProfile": schema_config_server_apis_inv_v1alpha1_TargetProfile(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSpec": schema_config_server_apis_inv_v1alpha1_TargetSpec(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatus": schema_config_server_apis_inv_v1alpha1_TargetStatus(ref), - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatusUsedReferences": schema_config_server_apis_inv_v1alpha1_TargetStatusUsedReferences(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfile": schema_config_server_apis_inv_v1alpha1_TargetSyncProfile(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfileList": schema_config_server_apis_inv_v1alpha1_TargetSyncProfileList(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfileSpec": schema_config_server_apis_inv_v1alpha1_TargetSyncProfileSpec(ref), @@ -118,291 +128,297 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceList": schema_config_server_apis_inv_v1alpha1_WorkspaceList(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceSpec": schema_config_server_apis_inv_v1alpha1_WorkspaceSpec(ref), "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceStatus": schema_config_server_apis_inv_v1alpha1_WorkspaceStatus(ref), - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AppArmorProfile": schema_k8sio_api_core_v1_AppArmorProfile(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ClusterTrustBundleProjection": schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerResizePolicy": schema_k8sio_api_core_v1_ContainerResizePolicy(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.ContainerUser": schema_k8sio_api_core_v1_ContainerUser(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostIP": schema_k8sio_api_core_v1_HostIP(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.ImageVolumeSource": schema_k8sio_api_core_v1_ImageVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.LinuxContainerUser": schema_k8sio_api_core_v1_LinuxContainerUser(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.ModifyVolumeStatus": schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeFeatures": schema_k8sio_api_core_v1_NodeFeatures(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeRuntimeHandler": schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures": schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSwapStatus": schema_k8sio_api_core_v1_NodeSwapStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodResourceClaim": schema_k8sio_api_core_v1_PodResourceClaim(ref), - "k8s.io/api/core/v1.PodResourceClaimStatus": schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), - "k8s.io/api/core/v1.PodSchedulingGate": schema_k8sio_api_core_v1_PodSchedulingGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceClaim": schema_k8sio_api_core_v1_ResourceClaim(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceHealth": schema_k8sio_api_core_v1_ResourceHealth(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.ResourceStatus": schema_k8sio_api_core_v1_ResourceStatus(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.SleepAction": schema_k8sio_api_core_v1_SleepAction(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.TypedObjectReference": schema_k8sio_api_core_v1_TypedObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeMountStatus": schema_k8sio_api_core_v1_VolumeMountStatus(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeResourceRequirements": schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), - "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), + v1.Affinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Affinity(ref), + v1.AppArmorProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AppArmorProfile(ref), + v1.AttachedVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AttachedVolume(ref), + v1.AvoidPods{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AvoidPods(ref), + v1.AzureDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), + v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), + v1.AzureFileVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), + v1.Binding{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Binding(ref), + v1.CSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), + v1.CSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CSIVolumeSource(ref), + v1.Capabilities{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Capabilities(ref), + v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), + v1.CephFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CephFSVolumeSource(ref), + v1.CinderPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), + v1.CinderVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_CinderVolumeSource(ref), + v1.ClientIPConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClientIPConfig(ref), + v1.ClusterTrustBundleProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), + v1.ComponentCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentCondition(ref), + v1.ComponentStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatus(ref), + v1.ComponentStatusList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ComponentStatusList(ref), + v1.ConfigMap{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMap(ref), + v1.ConfigMapEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), + v1.ConfigMapKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), + v1.ConfigMapList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapList(ref), + v1.ConfigMapNodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), + v1.ConfigMapProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapProjection(ref), + v1.ConfigMapVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), + v1.Container{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Container(ref), + v1.ContainerExtendedResourceRequest{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref), + v1.ContainerImage{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerImage(ref), + v1.ContainerPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerPort(ref), + v1.ContainerResizePolicy{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerResizePolicy(ref), + v1.ContainerRestartRule{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRule(ref), + v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref), + v1.ContainerState{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerState(ref), + v1.ContainerStateRunning{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateRunning(ref), + v1.ContainerStateTerminated{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateTerminated(ref), + v1.ContainerStateWaiting{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStateWaiting(ref), + v1.ContainerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerStatus(ref), + v1.ContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ContainerUser(ref), + v1.DaemonEndpoint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DaemonEndpoint(ref), + v1.DownwardAPIProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIProjection(ref), + v1.DownwardAPIVolumeFile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), + v1.DownwardAPIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), + v1.EmptyDirVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), + v1.EndpointAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointAddress(ref), + v1.EndpointPort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointPort(ref), + v1.EndpointSubset{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointSubset(ref), + v1.Endpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Endpoints(ref), + v1.EndpointsList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EndpointsList(ref), + v1.EnvFromSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvFromSource(ref), + v1.EnvVar{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVar(ref), + v1.EnvVarSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EnvVarSource(ref), + v1.EphemeralContainer{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainer(ref), + v1.EphemeralContainerCommon{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), + v1.EphemeralVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), + v1.Event{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Event(ref), + v1.EventList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventList(ref), + v1.EventSeries{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSeries(ref), + v1.EventSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_EventSource(ref), + v1.ExecAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ExecAction(ref), + v1.FCVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FCVolumeSource(ref), + v1.FileKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FileKeySelector(ref), + v1.FlexPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), + v1.FlexVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlexVolumeSource(ref), + v1.FlockerVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_FlockerVolumeSource(ref), + v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), + v1.GRPCAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GRPCAction(ref), + v1.GitRepoVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), + v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), + v1.GlusterfsVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), + v1.HTTPGetAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPGetAction(ref), + v1.HTTPHeader{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HTTPHeader(ref), + v1.HostAlias{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostAlias(ref), + v1.HostIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostIP(ref), + v1.HostPathVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_HostPathVolumeSource(ref), + v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), + v1.ISCSIVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), + v1.ImageVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ImageVolumeSource(ref), + v1.KeyToPath{}.OpenAPIModelName(): schema_k8sio_api_core_v1_KeyToPath(ref), + v1.Lifecycle{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Lifecycle(ref), + v1.LifecycleHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LifecycleHandler(ref), + v1.LimitRange{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRange(ref), + v1.LimitRangeItem{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeItem(ref), + v1.LimitRangeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeList(ref), + v1.LimitRangeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LimitRangeSpec(ref), + v1.LinuxContainerUser{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LinuxContainerUser(ref), + v1.List{}.OpenAPIModelName(): schema_k8sio_api_core_v1_List(ref), + v1.LoadBalancerIngress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerIngress(ref), + v1.LoadBalancerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LoadBalancerStatus(ref), + v1.LocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalObjectReference(ref), + v1.LocalVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_LocalVolumeSource(ref), + v1.ModifyVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), + v1.NFSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NFSVolumeSource(ref), + v1.Namespace{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Namespace(ref), + v1.NamespaceCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceCondition(ref), + v1.NamespaceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceList(ref), + v1.NamespaceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceSpec(ref), + v1.NamespaceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NamespaceStatus(ref), + v1.Node{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Node(ref), + v1.NodeAddress{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAddress(ref), + v1.NodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeAffinity(ref), + v1.NodeCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeCondition(ref), + v1.NodeConfigSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigSource(ref), + v1.NodeConfigStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeConfigStatus(ref), + v1.NodeDaemonEndpoints{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), + v1.NodeFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeFeatures(ref), + v1.NodeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeList(ref), + v1.NodeProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeProxyOptions(ref), + v1.NodeRuntimeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandler(ref), + v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeRuntimeHandlerFeatures(ref), + v1.NodeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelector(ref), + v1.NodeSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), + v1.NodeSelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSelectorTerm(ref), + v1.NodeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSpec(ref), + v1.NodeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeStatus(ref), + v1.NodeSwapStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSwapStatus(ref), + v1.NodeSystemInfo{}.OpenAPIModelName(): schema_k8sio_api_core_v1_NodeSystemInfo(ref), + v1.ObjectFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectFieldSelector(ref), + v1.ObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ObjectReference(ref), + v1.PersistentVolume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolume(ref), + v1.PersistentVolumeClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), + v1.PersistentVolumeClaimCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), + v1.PersistentVolumeClaimList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), + v1.PersistentVolumeClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), + v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), + v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), + v1.PersistentVolumeList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeList(ref), + v1.PersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSource(ref), + v1.PersistentVolumeSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), + v1.PersistentVolumeStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), + v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), + v1.Pod{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Pod(ref), + v1.PodAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinity(ref), + v1.PodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAffinityTerm(ref), + v1.PodAntiAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAntiAffinity(ref), + v1.PodAttachOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodAttachOptions(ref), + v1.PodCertificateProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCertificateProjection(ref), + v1.PodCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodCondition(ref), + v1.PodDNSConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfig(ref), + v1.PodDNSConfigOption{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodDNSConfigOption(ref), + v1.PodExecOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExecOptions(ref), + v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref), + v1.PodIP{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodIP(ref), + v1.PodList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodList(ref), + v1.PodLogOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodLogOptions(ref), + v1.PodOS{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodOS(ref), + v1.PodPortForwardOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodPortForwardOptions(ref), + v1.PodProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodProxyOptions(ref), + v1.PodReadinessGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodReadinessGate(ref), + v1.PodResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaim(ref), + v1.PodResourceClaimStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), + v1.PodSchedulingGate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSchedulingGate(ref), + v1.PodSecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSecurityContext(ref), + v1.PodSignature{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSignature(ref), + v1.PodSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodSpec(ref), + v1.PodStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatus(ref), + v1.PodStatusResult{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodStatusResult(ref), + v1.PodTemplate{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplate(ref), + v1.PodTemplateList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateList(ref), + v1.PodTemplateSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PodTemplateSpec(ref), + v1.PortStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortStatus(ref), + v1.PortworxVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PortworxVolumeSource(ref), + v1.PreferAvoidPodsEntry{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), + v1.PreferredSchedulingTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), + v1.Probe{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Probe(ref), + v1.ProbeHandler{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProbeHandler(ref), + v1.ProjectedVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), + v1.QuobyteVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), + v1.RBDPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), + v1.RBDVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RBDVolumeSource(ref), + v1.RangeAllocation{}.OpenAPIModelName(): schema_k8sio_api_core_v1_RangeAllocation(ref), + v1.ReplicationController{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationController(ref), + v1.ReplicationControllerCondition{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), + v1.ReplicationControllerList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerList(ref), + v1.ReplicationControllerSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), + v1.ReplicationControllerStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), + v1.ResourceClaim{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceClaim(ref), + v1.ResourceFieldSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceFieldSelector(ref), + v1.ResourceHealth{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceHealth(ref), + v1.ResourceQuota{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuota(ref), + v1.ResourceQuotaList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaList(ref), + v1.ResourceQuotaSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), + v1.ResourceQuotaStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), + v1.ResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceRequirements(ref), + v1.ResourceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ResourceStatus(ref), + v1.SELinuxOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SELinuxOptions(ref), + v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), + v1.ScaleIOVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), + v1.ScopeSelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopeSelector(ref), + v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), + v1.SeccompProfile{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SeccompProfile(ref), + v1.Secret{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Secret(ref), + v1.SecretEnvSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretEnvSource(ref), + v1.SecretKeySelector{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretKeySelector(ref), + v1.SecretList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretList(ref), + v1.SecretProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretProjection(ref), + v1.SecretReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretReference(ref), + v1.SecretVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecretVolumeSource(ref), + v1.SecurityContext{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SecurityContext(ref), + v1.SerializedReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SerializedReference(ref), + v1.Service{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Service(ref), + v1.ServiceAccount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccount(ref), + v1.ServiceAccountList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountList(ref), + v1.ServiceAccountTokenProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), + v1.ServiceList{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceList(ref), + v1.ServicePort{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServicePort(ref), + v1.ServiceProxyOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceProxyOptions(ref), + v1.ServiceSpec{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceSpec(ref), + v1.ServiceStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_ServiceStatus(ref), + v1.SessionAffinityConfig{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SessionAffinityConfig(ref), + v1.SleepAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_SleepAction(ref), + v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), + v1.StorageOSVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), + v1.Sysctl{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Sysctl(ref), + v1.TCPSocketAction{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TCPSocketAction(ref), + v1.Taint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Taint(ref), + v1.Toleration{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Toleration(ref), + v1.TopologySelectorLabelRequirement{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), + v1.TopologySelectorTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySelectorTerm(ref), + v1.TopologySpreadConstraint{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), + v1.TypedLocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), + v1.TypedObjectReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_TypedObjectReference(ref), + v1.Volume{}.OpenAPIModelName(): schema_k8sio_api_core_v1_Volume(ref), + v1.VolumeDevice{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeDevice(ref), + v1.VolumeMount{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMount(ref), + v1.VolumeMountStatus{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeMountStatus(ref), + v1.VolumeNodeAffinity{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), + v1.VolumeProjection{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeProjection(ref), + v1.VolumeResourceRequirements{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), + v1.VolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VolumeSource(ref), + v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), + v1.WeightedPodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), + v1.WindowsSecurityContextOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), + v1.WorkloadReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WorkloadReference(ref), + resource.Quantity{}.OpenAPIModelName(): schema_apimachinery_pkg_api_resource_Quantity(ref), + metav1.APIGroup{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroup(ref), + metav1.APIGroupList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIGroupList(ref), + metav1.APIResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResource(ref), + metav1.APIResourceList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIResourceList(ref), + metav1.APIVersions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_APIVersions(ref), + metav1.ApplyOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ApplyOptions(ref), + metav1.Condition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Condition(ref), + metav1.CreateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_CreateOptions(ref), + metav1.DeleteOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_DeleteOptions(ref), + metav1.Duration{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Duration(ref), + metav1.FieldSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref), + metav1.FieldsV1{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_FieldsV1(ref), + metav1.GetOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GetOptions(ref), + metav1.GroupKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupKind(ref), + metav1.GroupResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupResource(ref), + metav1.GroupVersion{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersion(ref), + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + metav1.GroupVersionKind{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionKind(ref), + metav1.GroupVersionResource{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_GroupVersionResource(ref), + metav1.InternalEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_InternalEvent(ref), + metav1.LabelSelector{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelector(ref), + metav1.LabelSelectorRequirement{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + metav1.List{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_List(ref), + metav1.ListMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListMeta(ref), + metav1.ListOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ListOptions(ref), + metav1.ManagedFieldsEntry{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + metav1.MicroTime{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_MicroTime(ref), + metav1.ObjectMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ObjectMeta(ref), + metav1.OwnerReference{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_OwnerReference(ref), + metav1.PartialObjectMetadata{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + metav1.PartialObjectMetadataList{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + metav1.Patch{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Patch(ref), + metav1.PatchOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_PatchOptions(ref), + metav1.Preconditions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Preconditions(ref), + metav1.RootPaths{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_RootPaths(ref), + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + metav1.Status{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Status(ref), + metav1.StatusCause{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusCause(ref), + metav1.StatusDetails{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_StatusDetails(ref), + metav1.Table{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Table(ref), + metav1.TableColumnDefinition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + metav1.TableOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableOptions(ref), + metav1.TableRow{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRow(ref), + metav1.TableRowCondition{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TableRowCondition(ref), + metav1.Time{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Time(ref), + metav1.Timestamp{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_Timestamp(ref), + metav1.TypeMeta{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_TypeMeta(ref), + metav1.UpdateOptions{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_UpdateOptions(ref), + metav1.WatchEvent{}.OpenAPIModelName(): schema_pkg_apis_meta_v1_WatchEvent(ref), + runtime.RawExtension{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + runtime.TypeMeta{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + runtime.Unknown{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + version.Info{}.OpenAPIModelName(): schema_k8sio_apimachinery_pkg_version_Info(ref), } } @@ -438,7 +454,7 @@ func schema_config_server_apis_condition_v1alpha1_Condition(ref common.Reference "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -462,7 +478,7 @@ func schema_config_server_apis_condition_v1alpha1_Condition(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -554,7 +570,7 @@ func schema_config_server_apis_config_v1alpha1_Config(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -571,9 +587,16 @@ func schema_config_server_apis_config_v1alpha1_Config(ref common.ReferenceCallba }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "Config", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -601,7 +624,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlame(ref common.ReferenceC "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -618,9 +641,16 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlame(ref common.ReferenceC }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "ConfigBlame", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlameSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlameStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlameSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlameStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -648,7 +678,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlameList(ref common.Refere "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -669,7 +699,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlameList(ref common.Refere }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlame", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlame", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -693,7 +723,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlameStatus(ref common.Refe Properties: map[string]spec.Schema{ "value": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -701,7 +731,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlameStatus(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -720,7 +750,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlob(ref common.ReferenceCa }, "value": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -728,7 +758,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigBlob(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -754,7 +784,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigDeviation(ref common.Refere }, "actualValue": { SchemaProps: spec.SchemaProps{ - Description: "CurrentValue defines the current value of the config belonging to the path that is currently configured on the target", + Description: "ActualValue defines the current value of the config belonging to the path that is currently configured on the target", Type: []string{"string"}, Format: "", }, @@ -796,7 +826,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigList(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -817,7 +847,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigList(ref common.ReferenceCa }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.Config", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.Config", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -845,7 +875,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSet(ref common.ReferenceCal "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -862,9 +892,16 @@ func schema_config_server_apis_config_v1alpha1_ConfigSet(ref common.ReferenceCal }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "ConfigSet", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -892,7 +929,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetList(ref common.Referenc "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -913,7 +950,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetList(ref common.Referenc }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSet", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSet", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -928,7 +965,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetSpec(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Targets defines the targets on which this configSet applies", Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.Target"), + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTarget"), }, }, "lifecycle": { @@ -952,6 +989,11 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetSpec(ref common.Referenc }, }, "config": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Config defines the configuration to be applied to a target device", Type: []string{"array"}, @@ -970,7 +1012,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetSpec(ref common.Referenc }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlob", "github.com/sdcio/config-server/apis/config/v1alpha1.Lifecycle", "github.com/sdcio/config-server/apis/config/v1alpha1.Target"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigBlob", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTarget", "github.com/sdcio/config-server/apis/config/v1alpha1.Lifecycle"}, } } @@ -1004,6 +1046,11 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetStatus(ref common.Refere }, }, "targets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Targets defines the status of the configSet resource on the respective target", Type: []string{"array"}, @@ -1011,7 +1058,7 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetStatus(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatus"), + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTargetStatus"), }, }, }, @@ -1021,7 +1068,94 @@ func schema_config_server_apis_config_v1alpha1_ConfigSetStatus(ref common.Refere }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", "github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatus"}, + "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", "github.com/sdcio/config-server/apis/config/v1alpha1.ConfigSetTargetStatus"}, + } +} + +func schema_config_server_apis_config_v1alpha1_ConfigSetTarget(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "targetSelector": { + SchemaProps: spec.SchemaProps{ + Description: "TargetSelector defines the selector used to select the targets to which the config applies", + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + Dependencies: []string{ + metav1.LabelSelector{}.OpenAPIModelName()}, + } +} + +func schema_config_server_apis_config_v1alpha1_ConfigSetTargetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status of the condition, one of True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Ref: ref(metav1.Time{}.OpenAPIModelName()), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "type", "status", "lastTransitionTime", "reason", "message"}, + }, + }, + Dependencies: []string{ + metav1.Time{}.OpenAPIModelName()}, } } @@ -1053,6 +1187,11 @@ func schema_config_server_apis_config_v1alpha1_ConfigSpec(ref common.ReferenceCa }, }, "config": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Config defines the configuration to be applied to a target device", Type: []string{"array"}, @@ -1188,7 +1327,7 @@ func schema_config_server_apis_config_v1alpha1_Deviation(ref common.ReferenceCal "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -1205,9 +1344,16 @@ func schema_config_server_apis_config_v1alpha1_Deviation(ref common.ReferenceCal }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "Deviation", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.DeviationStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1235,7 +1381,7 @@ func schema_config_server_apis_config_v1alpha1_DeviationList(ref common.Referenc "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1256,7 +1402,7 @@ func schema_config_server_apis_config_v1alpha1_DeviationList(ref common.Referenc }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.Deviation", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.Deviation", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1274,6 +1420,11 @@ func schema_config_server_apis_config_v1alpha1_DeviationSpec(ref common.Referenc }, }, "deviations": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Deviations identify the configuration deviation based on the last applied config CR", Type: []string{"array"}, @@ -1332,6 +1483,87 @@ func schema_config_server_apis_config_v1alpha1_DeviationStatus(ref common.Refere } } +func schema_config_server_apis_config_v1alpha1_DiscoveryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "protocol": { + SchemaProps: spec.SchemaProps{ + Description: "Protocol used for discovery", + Type: []string{"string"}, + Format: "", + }, + }, + "provider": { + SchemaProps: spec.SchemaProps{ + Description: "Type associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Description: "Hostname associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "platform": { + SchemaProps: spec.SchemaProps{ + Description: "Platform associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "macAddress": { + SchemaProps: spec.SchemaProps{ + Description: "MacAddress associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "serialNumber": { + SchemaProps: spec.SchemaProps{ + Description: "SerialNumber associated with the target", + Type: []string{"string"}, + Format: "", + }, + }, + "supportedEncodings": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Supported Encodings of the target", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + func schema_config_server_apis_config_v1alpha1_Lifecycle(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -1375,7 +1607,7 @@ func schema_config_server_apis_config_v1alpha1_RunningConfig(ref common.Referenc "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -1392,9 +1624,16 @@ func schema_config_server_apis_config_v1alpha1_RunningConfig(ref common.Referenc }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "RunningConfig", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfigStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfigStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1422,7 +1661,7 @@ func schema_config_server_apis_config_v1alpha1_RunningConfigList(ref common.Refe "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1443,7 +1682,7 @@ func schema_config_server_apis_config_v1alpha1_RunningConfigList(ref common.Refe }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.RunningConfig", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1467,7 +1706,7 @@ func schema_config_server_apis_config_v1alpha1_RunningConfigStatus(ref common.Re Properties: map[string]spec.Schema{ "value": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -1475,7 +1714,7 @@ func schema_config_server_apis_config_v1alpha1_RunningConfigStatus(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -1503,7 +1742,7 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfig(ref common.Refere "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -1520,9 +1759,16 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfig(ref common.Refere }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "SensitiveConfig", "version": "v1alpha1"}, + }, + }, + }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfigStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -1544,7 +1790,7 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfigData(ref common.Re SchemaProps: spec.SchemaProps{ Description: "SecretKeyRef refers to a secret in the same namesapce as the config", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + Ref: ref(v1.SecretKeySelector{}.OpenAPIModelName()), }, }, }, @@ -1552,7 +1798,7 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfigData(ref common.Re }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretKeySelector"}, + v1.SecretKeySelector{}.OpenAPIModelName()}, } } @@ -1580,7 +1826,7 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfigList(ref common.Re "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -1601,7 +1847,7 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfigList(ref common.Re }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.SensitiveConfig", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -1633,6 +1879,11 @@ func schema_config_server_apis_config_v1alpha1_SensitiveConfigSpec(ref common.Re }, }, "config": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "SensitiveConfig defines the SensitiveConfiguration to be applied to a target device", Type: []string{"array"}, @@ -1715,160 +1966,619 @@ func schema_config_server_apis_config_v1alpha1_Target(ref common.ReferenceCallba return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "Target is the Schema for the Target API", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "targetSelector": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "TargetSelector defines the selector used to select the targets to which the config applies", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatus"), + }, + }, + }, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "Target", "version": "v1alpha1"}, + }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } -func schema_config_server_apis_config_v1alpha1_TargetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_config_server_apis_config_v1alpha1_TargetClearDeviation(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "TargetClearDeviation is the Schema for the TargetClearDeviation API", + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "kind": { SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, - "type": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", - Default: "", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationSpec"), + }, + }, "status": { SchemaProps: spec.SchemaProps{ - Description: "status of the condition, one of True, False, Unknown.", + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationStatus"), + }, + }, + }, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "TargetClearDeviation", "version": "v1alpha1"}, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationSpec", "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetClearDeviationConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the config on which the paths should be cleared", Default: "", Type: []string{"string"}, Format: "", }, }, - "observedGeneration": { + "paths": { SchemaProps: spec.SchemaProps{ - Description: "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.", - Type: []string{"integer"}, - Format: "int64", + Description: "Paths provide the path of the deviation to be cleared", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "lastTransitionTime": { + }, + Required: []string{"name", "paths"}, + }, + }, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetClearDeviationConfigResult(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "Name of the config on which the paths should be cleared", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "reason": { + "success": { SchemaProps: spec.SchemaProps{ - Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", - Default: "", - Type: []string{"string"}, + Description: "Success indicates whether the clear deviation was successful", + Default: false, + Type: []string{"boolean"}, Format: "", }, }, "message": { SchemaProps: spec.SchemaProps{ - Description: "message is a human readable message indicating details about the transition. This may be an empty string.", - Default: "", + Description: "Message provides detail on the outcome", Type: []string{"string"}, Format: "", }, }, + "errors": { + SchemaProps: spec.SchemaProps{ + Description: "Errors lists any errors for this specific config", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "warnings": { + SchemaProps: spec.SchemaProps{ + Description: "Warnings lists any warnings for this specific config", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, }, - Required: []string{"name", "type", "status", "lastTransitionTime", "reason", "message"}, + Required: []string{"name", "success"}, + }, + }, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetClearDeviationSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetClearDeviationSpec defines the desired state of Target", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "config": { + SchemaProps: spec.SchemaProps{ + Description: "Config defines the clear deviations configs to applied on the taget", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfig"), + }, + }, + }, + }, + }, + }, + Required: []string{"config"}, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfig"}, } } -func schema_config_server_apis_inv_v1alpha1_DiscoveryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_config_server_apis_config_v1alpha1_TargetClearDeviationStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "protocol": { + "message": { SchemaProps: spec.SchemaProps{ - Description: "Protocol used for discovery", + Description: "Message is a global message for the transaction", + Type: []string{"string"}, + Format: "", + }, + }, + "warnings": { + SchemaProps: spec.SchemaProps{ + Description: "Warnings are global warnings from the transaction", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "results": { + SchemaProps: spec.SchemaProps{ + Description: "Results holds per-config outcomes, keyed by intent name", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfigResult"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/sdcio/config-server/apis/config/v1alpha1.TargetClearDeviationConfigResult"}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetConfigBlame(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetConfigBlame is the Schema for the TargetConfigBlame API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), + }, + }, + }, + Required: []string{"value"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "TargetConfigBlame", "version": "v1alpha1"}, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetList contains a list of Targets", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.Target"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/sdcio/config-server/apis/config/v1alpha1.Target", metav1.ListMeta{}.OpenAPIModelName()}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetRunningConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetRunningConfig is the Schema for the TargetRunningConfig API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), + }, + }, + }, + Required: []string{"value"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-group-version-kind": []interface{}{ + map[string]interface{}{"group": "config.sdcio.dev", "kind": "TargetRunningConfig", "version": "v1alpha1"}, + }, + }, + }, + }, + Dependencies: []string{ + metav1.ObjectMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetRunningConfigOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetRunningOptions is the Option Parametsrs for the TargetRunningOptions QueryParamters", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path filters the running config to a subtree", + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Description: "Format controls output format (json, json_ietf, xml, proto)", Type: []string{"string"}, Format: "", }, }, + }, + }, + }, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetSpec defines the desired state of Target", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ "provider": { SchemaProps: spec.SchemaProps{ - Description: "Type associated with the target", + Description: "Provider specifies the provider using this target.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "version": { + "address": { SchemaProps: spec.SchemaProps{ - Description: "Version associated with the target", + Description: "Address defines the address to connect to the target", + Default: "", Type: []string{"string"}, Format: "", }, }, - "hostname": { + "credentials": { + SchemaProps: spec.SchemaProps{ + Description: "Credentials defines the name of the secret that holds the credentials to connect to the target", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "tlsSecret": { SchemaProps: spec.SchemaProps{ - Description: "HostName associated with the target", + Description: "TLSSecret defines the name of the TLS secret to connect to the target if mtls is used", Type: []string{"string"}, Format: "", }, }, - "platform": { + "connectionProfile": { SchemaProps: spec.SchemaProps{ - Description: "Platform associated with the target", + Description: "ConnectionProfile define the profile used to connect to the target once discovered", + Default: "", Type: []string{"string"}, Format: "", }, }, - "macAddress": { + "syncProfile": { + SchemaProps: spec.SchemaProps{ + Description: "SyncProfile define the profile used to sync to the target config once discovered", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"provider", "address", "credentials", "connectionProfile"}, + }, + }, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetStatus defines the observed state of Target", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Conditions of the resource.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/sdcio/config-server/apis/condition/v1alpha1.Condition"), + }, + }, + }, + }, + }, + "discoveryInfo": { + SchemaProps: spec.SchemaProps{ + Description: "Discovery info defines the information retrieved during discovery", + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.DiscoveryInfo"), + }, + }, + "usedReferences": { + SchemaProps: spec.SchemaProps{ + Description: "UsedReferences track the resource used to reconcile the cr", + Ref: ref("github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatusUsedReferences"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", "github.com/sdcio/config-server/apis/config/v1alpha1.DiscoveryInfo", "github.com/sdcio/config-server/apis/config/v1alpha1.TargetStatusUsedReferences"}, + } +} + +func schema_config_server_apis_config_v1alpha1_TargetStatusUsedReferences(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "secretResourceVersion": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "tlsSecretResourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "MacAddress associated with the target", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "serialNumber": { + "connectionProfileResourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "SerialNumber associated with the target", - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "supportedEncodings": { + "syncProfileResourceVersion": { SchemaProps: spec.SchemaProps{ - Description: "Supported Encodings of the target", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"connectionProfileResourceVersion", "syncProfileResourceVersion"}, }, }, } @@ -1893,6 +2603,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryParameters(ref common.Refer }, }, "targetConnectionProfiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "TargetConnectionProfiles define the profile the discovery controller uses to create targets once discovered", Type: []string{"array"}, @@ -1915,7 +2630,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryParameters(ref common.Refer "period": { SchemaProps: spec.SchemaProps{ Description: "Period defines the wait period between discovery rule runs", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "concurrentScans": { @@ -1930,7 +2645,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryParameters(ref common.Refer }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaKey", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaKey", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetTemplate", metav1.Duration{}.OpenAPIModelName()}, } } @@ -1999,6 +2714,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryProfile(ref common.Referenc }, }, "connectionProfiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "ConnectionProfiles define the list of profiles the discovery controller uses to discover the target. The order in which they are specified is the order in which discovery is executed.", Type: []string{"array"}, @@ -2044,7 +2764,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRule(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -2063,7 +2783,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRule(ref common.ReferenceCa }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2119,7 +2839,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleList(ref common.Referen "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2140,7 +2860,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleList(ref common.Referen }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRule", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRule", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -2159,6 +2879,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRulePrefix(ref common.Refer }, }, "excludes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "IP Prefixes to be excluded", Type: []string{"array"}, @@ -2188,6 +2913,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen Type: []string{"object"}, Properties: map[string]spec.Schema{ "prefixes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "IP Prefixes for which this discovery rule applies", Type: []string{"array"}, @@ -2202,6 +2932,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen }, }, "addresses": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "IP Prefixes for which this discovery rule applies", Type: []string{"array"}, @@ -2218,13 +2953,13 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen "podSelector": { SchemaProps: spec.SchemaProps{ Description: "PodSelector defines the pod selector for which this discovery rule applies", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "serviceSelector": { SchemaProps: spec.SchemaProps{ Description: "ServiceSelector defines the service selector for which this discovery rule applies", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "serviceDomain": { @@ -2247,6 +2982,11 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen }, }, "targetConnectionProfiles": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "TargetConnectionProfiles define the profile the discovery controller uses to create targets once discovered", Type: []string{"array"}, @@ -2269,7 +3009,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen "period": { SchemaProps: spec.SchemaProps{ Description: "Period defines the wait period between discovery rule runs", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "concurrentScans": { @@ -2284,7 +3024,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleSpec(ref common.Referen }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleAddress", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRulePrefix", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaKey", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRuleAddress", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryRulePrefix", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaKey", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetProfile", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetTemplate", metav1.Duration{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -2320,14 +3060,14 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryRuleStatus(ref common.Refer "startTime": { SchemaProps: spec.SchemaProps{ Description: "StartTime identifies when the dr got started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", metav1.Time{}.OpenAPIModelName()}, } } @@ -2355,7 +3095,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryVendorProfile(ref common.Re "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -2368,7 +3108,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryVendorProfile(ref common.Re }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryVendorProfileSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryVendorProfileSpec", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2396,7 +3136,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryVendorProfileList(ref commo "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2417,7 +3157,7 @@ func schema_config_server_apis_inv_v1alpha1_DiscoveryVendorProfileList(ref commo }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryVendorProfile", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryVendorProfile", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -2463,6 +3203,11 @@ func schema_config_server_apis_inv_v1alpha1_GnmiDiscoveryVendorProfileParameters }, }, "paths": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Paths DiscoveryPaths `json:\"paths\" protobuf:\"bytes,3,opt,name=paths\"`", Type: []string{"array"}, @@ -2503,7 +3248,7 @@ func schema_config_server_apis_inv_v1alpha1_Proxy(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "URL": { + "url": { SchemaProps: spec.SchemaProps{ Description: "URL specifies the base URL of the HTTP/HTTPS proxy server.", Default: "", @@ -2520,7 +3265,7 @@ func schema_config_server_apis_inv_v1alpha1_Proxy(ref common.ReferenceCallback) }, }, }, - Required: []string{"URL", "credentials"}, + Required: []string{"url", "credentials"}, }, }, } @@ -2534,7 +3279,7 @@ func schema_config_server_apis_inv_v1alpha1_Repository(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "repoURL": { SchemaProps: spec.SchemaProps{ - Description: "RepositoryURL specifies the base URL for a given repository", + Description: "RepoURL specifies the base URL for a given repository", Default: "", Type: []string{"string"}, Format: "", @@ -2602,7 +3347,7 @@ func schema_config_server_apis_inv_v1alpha1_Rollout(ref common.ReferenceCallback "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -2621,7 +3366,7 @@ func schema_config_server_apis_inv_v1alpha1_Rollout(ref common.ReferenceCallback }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.RolloutSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.RolloutStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.RolloutSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.RolloutStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2649,7 +3394,7 @@ func schema_config_server_apis_inv_v1alpha1_RolloutList(ref common.ReferenceCall "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2670,7 +3415,7 @@ func schema_config_server_apis_inv_v1alpha1_RolloutList(ref common.ReferenceCall }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.Rollout", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.Rollout", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -2683,7 +3428,7 @@ func schema_config_server_apis_inv_v1alpha1_RolloutSpec(ref common.ReferenceCall Properties: map[string]spec.Schema{ "repoURL": { SchemaProps: spec.SchemaProps{ - Description: "RepositoryURL specifies the base URL for a given repository", + Description: "RepoURL specifies the base URL for a given repository", Default: "", Type: []string{"string"}, Format: "", @@ -2770,6 +3515,11 @@ func schema_config_server_apis_inv_v1alpha1_RolloutStatus(ref common.ReferenceCa }, }, "targets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Targets defines the status of the rollout on the respective target", Type: []string{"array"}, @@ -2859,7 +3609,7 @@ func schema_config_server_apis_inv_v1alpha1_Schema(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -2878,7 +3628,7 @@ func schema_config_server_apis_inv_v1alpha1_Schema(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.SchemaStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -2935,7 +3685,7 @@ func schema_config_server_apis_inv_v1alpha1_SchemaList(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -2956,7 +3706,7 @@ func schema_config_server_apis_inv_v1alpha1_SchemaList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.Schema", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.Schema", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3011,6 +3761,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpec(ref common.ReferenceCallb }, }, "repositories": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Repositories define the repositories used for building the provider schema", Type: []string{"array"}, @@ -3040,7 +3795,7 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpecRepository(ref common.Refe Properties: map[string]spec.Schema{ "repoURL": { SchemaProps: spec.SchemaProps{ - Description: "RepositoryURL specifies the base URL for a given repository", + Description: "RepoURL specifies the base URL for a given repository", Default: "", Type: []string{"string"}, Format: "", @@ -3076,6 +3831,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpecRepository(ref common.Refe }, }, "dirs": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Dirs defines the list of directories that identified the provider schema in src/dst pairs relative within the repository", Type: []string{"array"}, @@ -3112,6 +3872,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpecSchema(ref common.Referenc Type: []string{"object"}, Properties: map[string]spec.Schema{ "models": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Models defines the list of files/directories to be used as a model", Type: []string{"array"}, @@ -3127,6 +3892,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpecSchema(ref common.Referenc }, }, "includes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Excludes defines the list of files/directories to be excluded", Type: []string{"array"}, @@ -3142,6 +3912,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaSpecSchema(ref common.Referenc }, }, "excludes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Excludes defines the list of files/directories to be excluded", Type: []string{"array"}, @@ -3192,6 +3967,11 @@ func schema_config_server_apis_inv_v1alpha1_SchemaStatus(ref common.ReferenceCal }, }, "repositories": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "SchemaRepositoryStatus provides the array of repositories", Type: []string{"array"}, @@ -3267,7 +4047,7 @@ func schema_config_server_apis_inv_v1alpha1_Subscription(ref common.ReferenceCal "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -3286,7 +4066,7 @@ func schema_config_server_apis_inv_v1alpha1_Subscription(ref common.ReferenceCal }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.SubscriptionStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3314,7 +4094,7 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionList(ref common.Referenc "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -3335,7 +4115,7 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionList(ref common.Referenc }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.Subscription", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.Subscription", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3393,10 +4173,15 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionParameters(ref common.Re }, "interval": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "paths": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Type: []string{"array"}, Items: &spec.SchemaOrArray{ @@ -3415,7 +4200,7 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionParameters(ref common.Re }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -3455,6 +4240,11 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionSpec(ref common.Referenc }, }, "subscriptions": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Type: []string{"array"}, Items: &spec.SchemaOrArray{ @@ -3505,6 +4295,11 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionStatus(ref common.Refere }, }, "targets": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Description: "Targets defines the list of targets this resource applies to", Type: []string{"array"}, @@ -3536,61 +4331,14 @@ func schema_config_server_apis_inv_v1alpha1_SubscriptionTarget(ref common.Refere "targetSelector": { SchemaProps: spec.SchemaProps{ Description: "TargetSelector defines the selector used to select the targets to which the config applies", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_config_server_apis_inv_v1alpha1_Target(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Target is the Schema for the Target API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatus"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -3618,7 +4366,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfile(ref common.R "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -3631,7 +4379,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfile(ref common.R }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfileSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfileSpec", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -3659,7 +4407,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileList(ref comm "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -3680,7 +4428,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileList(ref comm }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfile", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetConnectionProfile", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -3693,12 +4441,12 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileSpec(ref comm Properties: map[string]spec.Schema{ "connectRetry": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "timeout": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, "protocol": { @@ -3738,163 +4486,54 @@ func schema_config_server_apis_inv_v1alpha1_TargetConnectionProfileSpec(ref comm SchemaProps: spec.SchemaProps{ Type: []string{"boolean"}, Format: "", - }, - }, - "includeNS": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "operationWithNS": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "useOperationRemove": { - SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", - }, - }, - "commitCandidate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "targetName": { - SchemaProps: spec.SchemaProps{ - Description: "TargetName specifies the target field value in gNMI Path prefix Examples: \"OC-YANG\" (SONiC), \"openconfig\" (some vendors), or empty", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"protocol", "port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, - } -} - -func schema_config_server_apis_inv_v1alpha1_TargetList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TargetList contains a list of Targets", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/inv/v1alpha1.Target"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.Target", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_config_server_apis_inv_v1alpha1_TargetProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credentials": { + }, + }, + "includeNS": { SchemaProps: spec.SchemaProps{ - Description: "Credentials defines the name of the secret that holds the credentials to connect to the target", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "tlsSecret": { + "operationWithNS": { SchemaProps: spec.SchemaProps{ - Description: "TLSSecret defines the name of the TLS secret to connect to the target if mtls is used", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "connectionProfile": { + "useOperationRemove": { SchemaProps: spec.SchemaProps{ - Description: "ConnectionProfile define the profile used to connect to the target once discovered", - Default: "", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "syncProfile": { + "commitCandidate": { SchemaProps: spec.SchemaProps{ - Description: "SyncProfile define the profile used to sync to the target config once discovered", + Type: []string{"string"}, + Format: "", + }, + }, + "targetName": { + SchemaProps: spec.SchemaProps{ + Description: "TargetName specifies the target field value in gNMI Path prefix Examples: \"OC-YANG\" (SONiC), \"openconfig\" (some vendors), or empty", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"credentials", "connectionProfile"}, + Required: []string{"protocol", "port"}, }, }, + Dependencies: []string{ + metav1.Duration{}.OpenAPIModelName()}, } } -func schema_config_server_apis_inv_v1alpha1_TargetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_config_server_apis_inv_v1alpha1_TargetProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "TargetSpec defines the desired state of Target", - Type: []string{"object"}, + Type: []string{"object"}, Properties: map[string]spec.Schema{ - "provider": { - SchemaProps: spec.SchemaProps{ - Description: "Provider specifies the provider using this target.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "address": { - SchemaProps: spec.SchemaProps{ - Description: "Address defines the address to connect to the target", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, "credentials": { SchemaProps: spec.SchemaProps{ Description: "Credentials defines the name of the secret that holds the credentials to connect to the target", @@ -3926,95 +4565,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSpec(ref common.ReferenceCallb }, }, }, - Required: []string{"provider", "address", "credentials", "connectionProfile"}, - }, - }, - } -} - -func schema_config_server_apis_inv_v1alpha1_TargetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TargetStatus defines the observed state of Target", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Conditions of the resource.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/sdcio/config-server/apis/condition/v1alpha1.Condition"), - }, - }, - }, - }, - }, - "discoveryInfo": { - SchemaProps: spec.SchemaProps{ - Description: "Discovery info defines the information retrieved during discovery", - Ref: ref("github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryInfo"), - }, - }, - "usedReferences": { - SchemaProps: spec.SchemaProps{ - Description: "UsedReferences track the resource used to reconcile the cr", - Ref: ref("github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatusUsedReferences"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/sdcio/config-server/apis/condition/v1alpha1.Condition", "github.com/sdcio/config-server/apis/inv/v1alpha1.DiscoveryInfo", "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetStatusUsedReferences"}, - } -} - -func schema_config_server_apis_inv_v1alpha1_TargetStatusUsedReferences(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "secretResourceVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "tlsSecretResourceVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "connectionProfileResourceVersion": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "syncProfileResourceVersion": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"connectionProfileResourceVersion", "syncProfileResourceVersion"}, + Required: []string{"credentials", "connectionProfile"}, }, }, } @@ -4044,7 +4595,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfile(ref common.Referen "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -4057,7 +4608,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfile(ref common.Referen }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfileSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfileSpec", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -4085,7 +4636,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileList(ref common.Ref "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4106,7 +4657,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileList(ref common.Ref }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfile", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.TargetSyncProfile", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4136,6 +4687,11 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileSpec(ref common.Ref }, }, "sync": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Type: []string{"array"}, Items: &spec.SchemaOrArray{ @@ -4187,6 +4743,11 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileSync(ref common.Ref }, }, "paths": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ Type: []string{"array"}, Items: &spec.SchemaOrArray{ @@ -4215,7 +4776,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileSync(ref common.Ref }, "interval": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref(metav1.Duration{}.OpenAPIModelName()), }, }, }, @@ -4223,7 +4784,7 @@ func schema_config_server_apis_inv_v1alpha1_TargetSyncProfileSync(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + metav1.Duration{}.OpenAPIModelName()}, } } @@ -4303,7 +4864,7 @@ func schema_config_server_apis_inv_v1alpha1_Workspace(ref common.ReferenceCallba "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { @@ -4322,7 +4883,7 @@ func schema_config_server_apis_inv_v1alpha1_Workspace(ref common.ReferenceCallba }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceSpec", "github.com/sdcio/config-server/apis/inv/v1alpha1.WorkspaceStatus", metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -4350,7 +4911,7 @@ func schema_config_server_apis_inv_v1alpha1_WorkspaceList(ref common.ReferenceCa "metadata": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -4371,7 +4932,7 @@ func schema_config_server_apis_inv_v1alpha1_WorkspaceList(ref common.ReferenceCa }, }, Dependencies: []string{ - "github.com/sdcio/config-server/apis/inv/v1alpha1.Workspace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/sdcio/config-server/apis/inv/v1alpha1.Workspace", metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -4384,7 +4945,7 @@ func schema_config_server_apis_inv_v1alpha1_WorkspaceSpec(ref common.ReferenceCa Properties: map[string]spec.Schema{ "repoURL": { SchemaProps: spec.SchemaProps{ - Description: "RepositoryURL specifies the base URL for a given repository", + Description: "RepoURL specifies the base URL for a given repository", Default: "", Type: []string{"string"}, Format: "", @@ -4532,26 +5093,26 @@ func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.Open "nodeAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), + Ref: ref(v1.NodeAffinity{}.OpenAPIModelName()), }, }, "podAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), + Ref: ref(v1.PodAffinity{}.OpenAPIModelName()), }, }, "podAntiAffinity": { SchemaProps: spec.SchemaProps{ Description: "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAntiAffinity"), + Ref: ref(v1.PodAntiAffinity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, + v1.NodeAffinity{}.OpenAPIModelName(), v1.PodAffinity{}.OpenAPIModelName(), v1.PodAntiAffinity{}.OpenAPIModelName()}, } } @@ -4647,7 +5208,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), + Ref: ref(v1.PreferAvoidPodsEntry{}.OpenAPIModelName()), }, }, }, @@ -4657,7 +5218,7 @@ func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, + v1.PreferAvoidPodsEntry{}.OpenAPIModelName()}, } } @@ -4831,14 +5392,14 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "target": { SchemaProps: spec.SchemaProps{ Description: "The target object that you want to bind to the standard object.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -4846,7 +5407,7 @@ func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -4906,31 +5467,31 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall "controllerPublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodeStageSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "controllerExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "nodeExpandSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -4938,7 +5499,7 @@ func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -4990,7 +5551,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm "nodePublishSecretRef": { SchemaProps: spec.SchemaProps{ Description: "nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -4998,7 +5559,7 @@ func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -5106,7 +5667,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -5121,7 +5682,7 @@ func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -5176,7 +5737,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -5191,7 +5752,7 @@ func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -5227,7 +5788,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, }, @@ -5235,7 +5796,7 @@ func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -5271,7 +5832,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -5279,7 +5840,7 @@ func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -5327,7 +5888,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as \"match nothing\". If set but empty, interpreted as \"match everything\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "optional": { @@ -5350,7 +5911,7 @@ func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceC }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -5423,7 +5984,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "conditions": { @@ -5444,7 +6005,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), + Ref: ref(v1.ComponentCondition{}.OpenAPIModelName()), }, }, }, @@ -5454,7 +6015,7 @@ func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ComponentCondition{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5483,7 +6044,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5494,7 +6055,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), + Ref: ref(v1.ComponentStatus{}.OpenAPIModelName()), }, }, }, @@ -5505,7 +6066,7 @@ func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ComponentStatus{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5534,7 +6095,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -5579,7 +6140,7 @@ func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -5678,7 +6239,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -5689,7 +6250,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ConfigMap"), + Ref: ref(v1.ConfigMap{}.OpenAPIModelName()), }, }, }, @@ -5700,7 +6261,7 @@ func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ConfigMap{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -5784,7 +6345,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -5801,7 +6362,7 @@ func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -5833,7 +6394,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -5857,7 +6418,7 @@ func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -5949,7 +6510,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -5962,13 +6523,13 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -5992,7 +6553,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -6002,7 +6563,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -6012,13 +6573,13 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, SchemaProps: spec.SchemaProps{ - Description: "Resources resize policy for the container.", + Description: "Resources resize policy for the container. This field cannot be set on ephemeral containers.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -6026,11 +6587,30 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", + Description: "RestartPolicy defines the restart behavior of individual containers in a pod. This overrides the pod-level restart policy. When this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Additionally, setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. The rules are evaluated in order. Once a rule matches a container exit condition, the remaining rules are ignored. If no rule matches the container exit condition, the Container-level restart policy determines the whether the container is restarted or not. Constraints on the rules: - At most 20 rules are allowed. - Rules can have the same action. - Identical rules are not forbidden in validations. When rules are specified, container MUST set RestartPolicy explicitly even it if matches the Pod's RestartPolicy.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -6049,7 +6629,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -6073,7 +6653,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -6082,25 +6662,25 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -6129,7 +6709,7 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -6158,7 +6738,45 @@ func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, + } +} + +func schema_k8sio_api_core_v1_ContainerExtendedResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerExtendedResourceRequest has the mapping of container name, extended resource name to the device request name.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "containerName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the container requesting resources.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "resourceName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the extended resource in that container which gets backed by DRA.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "requestName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the request in the special ResourceClaim which corresponds to the extended resource.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"containerName", "resourceName", "requestName"}, + }, + }, } } @@ -6284,6 +6902,76 @@ func schema_k8sio_api_core_v1_ContainerResizePolicy(ref common.ReferenceCallback } } +func schema_k8sio_api_core_v1_ContainerRestartRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerRestartRule describes how a container exit is handled.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "action": { + SchemaProps: spec.SchemaProps{ + Description: "Specifies the action taken on a container exit if the requirements are satisfied. The only possible value is \"Restart\" to restart the container.", + Type: []string{"string"}, + Format: "", + }, + }, + "exitCodes": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the exit codes to check on container exits.", + Ref: ref(v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()), + }, + }, + }, + Required: []string{"action"}, + }, + }, + Dependencies: []string{ + v1.ContainerRestartRuleOnExitCodes{}.OpenAPIModelName()}, + } +} + +func schema_k8sio_api_core_v1_ContainerRestartRuleOnExitCodes(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ContainerRestartRuleOnExitCodes describes the condition for handling an exited container based on its exit codes.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operator": { + SchemaProps: spec.SchemaProps{ + Description: "Represents the relationship between the container exit code(s) and the specified values. Possible values are: - In: the requirement is satisfied if the container exit code is in the\n set of specified values.\n- NotIn: the requirement is satisfied if the container exit code is\n not in the set of specified values.", + Type: []string{"string"}, + Format: "", + }, + }, + "values": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Specifies the set of values to check for container exit codes. At most 255 elements are allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + Required: []string{"operator"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -6294,26 +6982,26 @@ func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) commo "waiting": { SchemaProps: spec.SchemaProps{ Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), + Ref: ref(v1.ContainerStateWaiting{}.OpenAPIModelName()), }, }, "running": { SchemaProps: spec.SchemaProps{ Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), + Ref: ref(v1.ContainerStateRunning{}.OpenAPIModelName()), }, }, "terminated": { SchemaProps: spec.SchemaProps{ Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), + Ref: ref(v1.ContainerStateTerminated{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, + v1.ContainerStateRunning{}.OpenAPIModelName(), v1.ContainerStateTerminated{}.OpenAPIModelName(), v1.ContainerStateWaiting{}.OpenAPIModelName()}, } } @@ -6327,14 +7015,14 @@ func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -6377,13 +7065,13 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb "startedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "finishedAt": { SchemaProps: spec.SchemaProps{ Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "containerID": { @@ -6398,7 +7086,7 @@ func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -6448,14 +7136,14 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "State holds details about the container's current condition.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(v1.ContainerState{}.OpenAPIModelName()), }, }, "lastState": { SchemaProps: spec.SchemaProps{ Description: "LastTerminationState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), + Ref: ref(v1.ContainerState{}.OpenAPIModelName()), }, }, "ready": { @@ -6512,7 +7200,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -6521,7 +7209,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "resources": { SchemaProps: spec.SchemaProps{ Description: "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "volumeMounts": { @@ -6542,7 +7230,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMountStatus"), + Ref: ref(v1.VolumeMountStatus{}.OpenAPIModelName()), }, }, }, @@ -6551,7 +7239,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm "user": { SchemaProps: spec.SchemaProps{ Description: "User represents user identity information initially attached to the first process of the container", - Ref: ref("k8s.io/api/core/v1.ContainerUser"), + Ref: ref(v1.ContainerUser{}.OpenAPIModelName()), }, }, "allocatedResourcesStatus": { @@ -6572,7 +7260,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceStatus"), + Ref: ref(v1.ResourceStatus{}.OpenAPIModelName()), }, }, }, @@ -6591,7 +7279,7 @@ func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState", "k8s.io/api/core/v1.ContainerUser", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.ResourceStatus", "k8s.io/api/core/v1.VolumeMountStatus", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ContainerState{}.OpenAPIModelName(), v1.ContainerUser{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.ResourceStatus{}.OpenAPIModelName(), v1.VolumeMountStatus{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -6605,14 +7293,14 @@ func schema_k8sio_api_core_v1_ContainerUser(ref common.ReferenceCallback) common "linux": { SchemaProps: spec.SchemaProps{ Description: "Linux holds user identity information initially attached to the first process of the containers in Linux. Note that the actual running identity can be changed if the process has enough privilege to do so.", - Ref: ref("k8s.io/api/core/v1.LinuxContainerUser"), + Ref: ref(v1.LinuxContainerUser{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LinuxContainerUser"}, + v1.LinuxContainerUser{}.OpenAPIModelName()}, } } @@ -6658,7 +7346,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(v1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -6668,7 +7356,7 @@ func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + v1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -6690,13 +7378,13 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback "fieldRef": { SchemaProps: spec.SchemaProps{ Description: "Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(v1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(v1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "mode": { @@ -6711,7 +7399,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, + v1.ObjectFieldSelector{}.OpenAPIModelName(), v1.ResourceFieldSelector{}.OpenAPIModelName()}, } } @@ -6735,7 +7423,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), + Ref: ref(v1.DownwardAPIVolumeFile{}.OpenAPIModelName()), }, }, }, @@ -6752,7 +7440,7 @@ func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, + v1.DownwardAPIVolumeFile{}.OpenAPIModelName()}, } } @@ -6773,14 +7461,14 @@ func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) "sizeLimit": { SchemaProps: spec.SchemaProps{ Description: "sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -6816,7 +7504,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm "targetRef": { SchemaProps: spec.SchemaProps{ Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -6829,7 +7517,7 @@ func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -6902,7 +7590,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(v1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -6921,7 +7609,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), + Ref: ref(v1.EndpointAddress{}.OpenAPIModelName()), }, }, }, @@ -6940,7 +7628,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointPort"), + Ref: ref(v1.EndpointPort{}.OpenAPIModelName()), }, }, }, @@ -6950,7 +7638,7 @@ func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, + v1.EndpointAddress{}.OpenAPIModelName(), v1.EndpointPort{}.OpenAPIModelName()}, } } @@ -6979,7 +7667,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "subsets": { @@ -6995,7 +7683,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), + Ref: ref(v1.EndpointSubset{}.OpenAPIModelName()), }, }, }, @@ -7005,7 +7693,7 @@ func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.EndpointSubset{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -7034,7 +7722,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7045,7 +7733,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Endpoints"), + Ref: ref(v1.Endpoints{}.OpenAPIModelName()), }, }, }, @@ -7056,7 +7744,7 @@ func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Endpoints{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -7069,7 +7757,7 @@ func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common Properties: map[string]spec.Schema{ "prefix": { SchemaProps: spec.SchemaProps{ - Description: "Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER.", + Description: "Optional text to prepend to the name of each environment variable. May consist of any printable ASCII characters except '='.", Type: []string{"string"}, Format: "", }, @@ -7077,20 +7765,20 @@ func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common "configMapRef": { SchemaProps: spec.SchemaProps{ Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), + Ref: ref(v1.ConfigMapEnvSource{}.OpenAPIModelName()), }, }, "secretRef": { SchemaProps: spec.SchemaProps{ Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), + Ref: ref(v1.SecretEnvSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, + v1.ConfigMapEnvSource{}.OpenAPIModelName(), v1.SecretEnvSource{}.OpenAPIModelName()}, } } @@ -7103,7 +7791,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the environment variable. Must be a C_IDENTIFIER.", + Description: "Name of the environment variable. May consist of any printable ASCII characters except '='.", Default: "", Type: []string{"string"}, Format: "", @@ -7119,7 +7807,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP "valueFrom": { SchemaProps: spec.SchemaProps{ Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), + Ref: ref(v1.EnvVarSource{}.OpenAPIModelName()), }, }, }, @@ -7127,7 +7815,7 @@ func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, + v1.EnvVarSource{}.OpenAPIModelName()}, } } @@ -7141,32 +7829,38 @@ func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common. "fieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), + Ref: ref(v1.ObjectFieldSelector{}.OpenAPIModelName()), }, }, "resourceFieldRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", - Ref: ref("k8s.io/api/core/v1.ResourceFieldSelector"), + Ref: ref(v1.ResourceFieldSelector{}.OpenAPIModelName()), }, }, "configMapKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), + Ref: ref(v1.ConfigMapKeySelector{}.OpenAPIModelName()), }, }, "secretKeyRef": { SchemaProps: spec.SchemaProps{ Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), + Ref: ref(v1.SecretKeySelector{}.OpenAPIModelName()), + }, + }, + "fileKeyRef": { + SchemaProps: spec.SchemaProps{ + Description: "FileKeyRef selects a key of the env file. Requires the EnvFiles feature gate to be enabled.", + Ref: ref(v1.FileKeySelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, + v1.ConfigMapKeySelector{}.OpenAPIModelName(), v1.FileKeySelector{}.OpenAPIModelName(), v1.ObjectFieldSelector{}.OpenAPIModelName(), v1.ResourceFieldSelector{}.OpenAPIModelName(), v1.SecretKeySelector{}.OpenAPIModelName()}, } } @@ -7258,7 +7952,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -7271,13 +7965,13 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -7301,7 +7995,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -7311,7 +8005,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -7327,7 +8021,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -7335,11 +8029,30 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", + Description: "Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -7358,7 +8071,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -7382,7 +8095,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -7391,25 +8104,25 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -7438,7 +8151,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -7474,7 +8187,7 @@ func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, } } @@ -7566,7 +8279,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), + Ref: ref(v1.ContainerPort{}.OpenAPIModelName()), }, }, }, @@ -7579,13 +8292,13 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, SchemaProps: spec.SchemaProps{ - Description: "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + Description: "List of sources to populate environment variables in the container. The keys defined within a source may consist of any printable ASCII characters except '='. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), + Ref: ref(v1.EnvFromSource{}.OpenAPIModelName()), }, }, }, @@ -7609,7 +8322,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), + Ref: ref(v1.EnvVar{}.OpenAPIModelName()), }, }, }, @@ -7619,7 +8332,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), }, }, "resizePolicy": { @@ -7635,7 +8348,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), + Ref: ref(v1.ContainerResizePolicy{}.OpenAPIModelName()), }, }, }, @@ -7643,11 +8356,30 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, "restartPolicy": { SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", + Description: "Restart policy for the container to manage the restart behavior of each container within a pod. You cannot set this field on ephemeral containers.", Type: []string{"string"}, Format: "", }, }, + "restartPolicyRules": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Represents a list of rules to be checked to determine if the container should be restarted on exit. You cannot set this field on ephemeral containers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerRestartRule{}.OpenAPIModelName()), + }, + }, + }, + }, + }, "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -7666,7 +8398,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), + Ref: ref(v1.VolumeMount{}.OpenAPIModelName()), }, }, }, @@ -7690,7 +8422,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), + Ref: ref(v1.VolumeDevice{}.OpenAPIModelName()), }, }, }, @@ -7699,25 +8431,25 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "livenessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "readinessProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "startupProbe": { SchemaProps: spec.SchemaProps{ Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), + Ref: ref(v1.Probe{}.OpenAPIModelName()), }, }, "lifecycle": { SchemaProps: spec.SchemaProps{ Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), + Ref: ref(v1.Lifecycle{}.OpenAPIModelName()), }, }, "terminationMessagePath": { @@ -7746,7 +8478,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb "securityContext": { SchemaProps: spec.SchemaProps{ Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), + Ref: ref(v1.SecurityContext{}.OpenAPIModelName()), }, }, "stdin": { @@ -7775,7 +8507,7 @@ func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, + v1.ContainerPort{}.OpenAPIModelName(), v1.ContainerResizePolicy{}.OpenAPIModelName(), v1.ContainerRestartRule{}.OpenAPIModelName(), v1.EnvFromSource{}.OpenAPIModelName(), v1.EnvVar{}.OpenAPIModelName(), v1.Lifecycle{}.OpenAPIModelName(), v1.Probe{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.SecurityContext{}.OpenAPIModelName(), v1.VolumeDevice{}.OpenAPIModelName(), v1.VolumeMount{}.OpenAPIModelName()}, } } @@ -7789,14 +8521,14 @@ func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback "volumeClaimTemplate": { SchemaProps: spec.SchemaProps{ Description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), + Ref: ref(v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, + v1.PersistentVolumeClaimTemplate{}.OpenAPIModelName()}, } } @@ -7825,14 +8557,14 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "involvedObject": { SchemaProps: spec.SchemaProps{ Description: "The object that this event is about.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "reason": { @@ -7853,19 +8585,19 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "The component reporting this event. Should be a short machine understandable string.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), + Ref: ref(v1.EventSource{}.OpenAPIModelName()), }, }, "firstTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTimestamp": { SchemaProps: spec.SchemaProps{ Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "count": { @@ -7885,13 +8617,13 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "eventTime": { SchemaProps: spec.SchemaProps{ Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, "series": { SchemaProps: spec.SchemaProps{ Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), + Ref: ref(v1.EventSeries{}.OpenAPIModelName()), }, }, "action": { @@ -7904,7 +8636,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI "related": { SchemaProps: spec.SchemaProps{ Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "reportingComponent": { @@ -7928,7 +8660,7 @@ func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.EventSeries{}.OpenAPIModelName(), v1.EventSource{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), metav1.MicroTime{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -7957,7 +8689,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -7968,7 +8700,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Event"), + Ref: ref(v1.Event{}.OpenAPIModelName()), }, }, }, @@ -7979,7 +8711,7 @@ func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Event{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -8000,14 +8732,14 @@ func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.O "lastObservedTime": { SchemaProps: spec.SchemaProps{ Description: "Time of the last occurrence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), + Ref: ref(metav1.MicroTime{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, + metav1.MicroTime{}.OpenAPIModelName()}, } } @@ -8145,6 +8877,57 @@ func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) commo } } +func schema_k8sio_api_core_v1_FileKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FileKeySelector selects a key of the env file.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "volumeName": { + SchemaProps: spec.SchemaProps{ + Description: "The name of the volume mount containing the env file.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "The path within the volume from which to select the file. Must be relative and may not contain the '..' path or start with '..'.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "key": { + SchemaProps: spec.SchemaProps{ + Description: "The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except '='. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "optional": { + SchemaProps: spec.SchemaProps{ + Description: "Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod's containers.\n\nIf optional is set to false and the specified key does not exist, an error will be returned during Pod creation.", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"volumeName", "path", "key"}, + }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, + }, + } +} + func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -8170,7 +8953,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -8201,7 +8984,7 @@ func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -8230,7 +9013,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -8261,7 +9044,7 @@ func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -8454,7 +9237,7 @@ func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback Properties: map[string]spec.Schema{ "endpoints": { SchemaProps: spec.SchemaProps{ - Description: "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + Description: "endpoints is the endpoint name that details Glusterfs topology.", Default: "", Type: []string{"string"}, Format: "", @@ -8530,7 +9313,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), + Ref: ref(v1.HTTPHeader{}.OpenAPIModelName()), }, }, }, @@ -8541,7 +9324,7 @@ func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + v1.HTTPHeader{}.OpenAPIModelName(), "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, } } @@ -8759,7 +9542,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -8774,7 +9557,7 @@ func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -8868,7 +9651,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "initiatorName": { @@ -8883,7 +9666,7 @@ func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -8962,13 +9745,13 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope "postStart": { SchemaProps: spec.SchemaProps{ Description: "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(v1.LifecycleHandler{}.OpenAPIModelName()), }, }, "preStop": { SchemaProps: spec.SchemaProps{ Description: "PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - Ref: ref("k8s.io/api/core/v1.LifecycleHandler"), + Ref: ref(v1.LifecycleHandler{}.OpenAPIModelName()), }, }, "stopSignal": { @@ -8983,7 +9766,7 @@ func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LifecycleHandler"}, + v1.LifecycleHandler{}.OpenAPIModelName()}, } } @@ -8997,32 +9780,32 @@ func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) com "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for backward compatibility. There is no validation of this field and lifecycle hooks will fail at runtime when it is specified.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "sleep": { SchemaProps: spec.SchemaProps{ Description: "Sleep represents a duration that the container should sleep.", - Ref: ref("k8s.io/api/core/v1.SleepAction"), + Ref: ref(v1.SleepAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.SleepAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.SleepAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -9051,21 +9834,21 @@ func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), + Ref: ref(v1.LimitRangeSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.LimitRangeSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9092,7 +9875,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9106,7 +9889,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9120,7 +9903,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9134,7 +9917,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9148,7 +9931,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -9159,7 +9942,7 @@ func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -9188,7 +9971,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -9199,7 +9982,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRange"), + Ref: ref(v1.LimitRange{}.OpenAPIModelName()), }, }, }, @@ -9210,7 +9993,7 @@ func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.LimitRange{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -9234,7 +10017,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), + Ref: ref(v1.LimitRangeItem{}.OpenAPIModelName()), }, }, }, @@ -9245,7 +10028,7 @@ func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, + v1.LimitRangeItem{}.OpenAPIModelName()}, } } @@ -9324,7 +10107,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -9334,7 +10117,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -9345,7 +10128,7 @@ func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -9390,7 +10173,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PortStatus"), + Ref: ref(v1.PortStatus{}.OpenAPIModelName()), }, }, }, @@ -9400,7 +10183,7 @@ func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PortStatus"}, + v1.PortStatus{}.OpenAPIModelName()}, } } @@ -9424,7 +10207,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), + Ref: ref(v1.LoadBalancerIngress{}.OpenAPIModelName()), }, }, }, @@ -9434,7 +10217,7 @@ func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, + v1.LoadBalancerIngress{}.OpenAPIModelName()}, } } @@ -9585,28 +10368,28 @@ func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.Ope SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), + Ref: ref(v1.NamespaceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), + Ref: ref(v1.NamespaceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.NamespaceSpec{}.OpenAPIModelName(), v1.NamespaceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9636,7 +10419,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -9658,7 +10441,7 @@ func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -9687,7 +10470,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -9698,7 +10481,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Namespace"), + Ref: ref(v1.Namespace{}.OpenAPIModelName()), }, }, }, @@ -9709,7 +10492,7 @@ func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Namespace{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -9779,7 +10562,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), + Ref: ref(v1.NamespaceCondition{}.OpenAPIModelName()), }, }, }, @@ -9789,7 +10572,7 @@ func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceCondition"}, + v1.NamespaceCondition{}.OpenAPIModelName()}, } } @@ -9818,28 +10601,28 @@ func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSpec"), + Ref: ref(v1.NodeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeStatus"), + Ref: ref(v1.NodeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.NodeSpec{}.OpenAPIModelName(), v1.NodeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -9883,7 +10666,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. "requiredDuringSchedulingIgnoredDuringExecution": { SchemaProps: spec.SchemaProps{ Description: "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(v1.NodeSelector{}.OpenAPIModelName()), }, }, "preferredDuringSchedulingIgnoredDuringExecution": { @@ -9899,7 +10682,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), + Ref: ref(v1.PreferredSchedulingTerm{}.OpenAPIModelName()), }, }, }, @@ -9909,7 +10692,7 @@ func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, + v1.NodeSelector{}.OpenAPIModelName(), v1.PreferredSchedulingTerm{}.OpenAPIModelName()}, } } @@ -9939,13 +10722,13 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common "lastHeartbeatTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -9967,7 +10750,7 @@ func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -9981,14 +10764,14 @@ func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) com "configMap": { SchemaProps: spec.SchemaProps{ Description: "ConfigMap is a reference to a Node's ConfigMap", - Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), + Ref: ref(v1.ConfigMapNodeConfigSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, + v1.ConfigMapNodeConfigSource{}.OpenAPIModelName()}, } } @@ -10002,19 +10785,19 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com "assigned": { SchemaProps: spec.SchemaProps{ Description: "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "active": { SchemaProps: spec.SchemaProps{ Description: "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "lastKnownGood": { SchemaProps: spec.SchemaProps{ Description: "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "error": { @@ -10028,7 +10811,7 @@ func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, + v1.NodeConfigSource{}.OpenAPIModelName()}, } } @@ -10043,14 +10826,14 @@ func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Endpoint on which Kubelet is listening.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), + Ref: ref(v1.DaemonEndpoint{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, + v1.DaemonEndpoint{}.OpenAPIModelName()}, } } @@ -10099,7 +10882,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -10110,7 +10893,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Node"), + Ref: ref(v1.Node{}.OpenAPIModelName()), }, }, }, @@ -10121,7 +10904,7 @@ func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Node{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -10177,14 +10960,14 @@ func schema_k8sio_api_core_v1_NodeRuntimeHandler(ref common.ReferenceCallback) c "features": { SchemaProps: spec.SchemaProps{ Description: "Supported features.", - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"), + Ref: ref(v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeRuntimeHandlerFeatures"}, + v1.NodeRuntimeHandlerFeatures{}.OpenAPIModelName()}, } } @@ -10235,7 +11018,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(v1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -10251,7 +11034,7 @@ func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + v1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -10326,7 +11109,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(v1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -10345,7 +11128,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), + Ref: ref(v1.NodeSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -10360,7 +11143,7 @@ func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, + v1.NodeSelectorRequirement{}.OpenAPIModelName()}, } } @@ -10426,7 +11209,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Taint"), + Ref: ref(v1.Taint{}.OpenAPIModelName()), }, }, }, @@ -10435,7 +11218,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open "configSource": { SchemaProps: spec.SchemaProps{ Description: "Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), + Ref: ref(v1.NodeConfigSource{}.OpenAPIModelName()), }, }, "externalID": { @@ -10449,7 +11232,7 @@ func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, + v1.NodeConfigSource{}.OpenAPIModelName(), v1.Taint{}.OpenAPIModelName()}, } } @@ -10468,7 +11251,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -10482,7 +11265,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -10514,7 +11297,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeCondition"), + Ref: ref(v1.NodeCondition{}.OpenAPIModelName()), }, }, }, @@ -10538,7 +11321,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), + Ref: ref(v1.NodeAddress{}.OpenAPIModelName()), }, }, }, @@ -10548,14 +11331,14 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Endpoints of daemons running on the Node.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), + Ref: ref(v1.NodeDaemonEndpoints{}.OpenAPIModelName()), }, }, "nodeInfo": { SchemaProps: spec.SchemaProps{ Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/reference/node/node-status/#info", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), + Ref: ref(v1.NodeSystemInfo{}.OpenAPIModelName()), }, }, "images": { @@ -10571,7 +11354,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerImage"), + Ref: ref(v1.ContainerImage{}.OpenAPIModelName()), }, }, }, @@ -10610,7 +11393,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), + Ref: ref(v1.AttachedVolume{}.OpenAPIModelName()), }, }, }, @@ -10619,7 +11402,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "config": { SchemaProps: spec.SchemaProps{ Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", - Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), + Ref: ref(v1.NodeConfigStatus{}.OpenAPIModelName()), }, }, "runtimeHandlers": { @@ -10635,7 +11418,7 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeRuntimeHandler"), + Ref: ref(v1.NodeRuntimeHandler{}.OpenAPIModelName()), }, }, }, @@ -10644,14 +11427,34 @@ func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.Op "features": { SchemaProps: spec.SchemaProps{ Description: "Features describes the set of features implemented by the CRI implementation.", - Ref: ref("k8s.io/api/core/v1.NodeFeatures"), + Ref: ref(v1.NodeFeatures{}.OpenAPIModelName()), + }, + }, + "declaredFeatures": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "DeclaredFeatures represents the features related to feature gates that are declared by the node.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeFeatures", "k8s.io/api/core/v1.NodeRuntimeHandler", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.AttachedVolume{}.OpenAPIModelName(), v1.ContainerImage{}.OpenAPIModelName(), v1.NodeAddress{}.OpenAPIModelName(), v1.NodeCondition{}.OpenAPIModelName(), v1.NodeConfigStatus{}.OpenAPIModelName(), v1.NodeDaemonEndpoints{}.OpenAPIModelName(), v1.NodeFeatures{}.OpenAPIModelName(), v1.NodeRuntimeHandler{}.OpenAPIModelName(), v1.NodeSystemInfo{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -10765,7 +11568,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo "swap": { SchemaProps: spec.SchemaProps{ Description: "Swap Info reported by the node.", - Ref: ref("k8s.io/api/core/v1.NodeSwapStatus"), + Ref: ref(v1.NodeSwapStatus{}.OpenAPIModelName()), }, }, }, @@ -10773,7 +11576,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSwapStatus"}, + v1.NodeSwapStatus{}.OpenAPIModelName()}, } } @@ -10903,28 +11706,28 @@ func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) com SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), + Ref: ref(v1.PersistentVolumeSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), + Ref: ref(v1.PersistentVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeSpec{}.OpenAPIModelName(), v1.PersistentVolumeStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -10953,28 +11756,28 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(v1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), + Ref: ref(v1.PersistentVolumeClaimStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), v1.PersistentVolumeClaimStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11004,13 +11807,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "lastProbeTime is the time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -11032,7 +11835,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -11061,7 +11864,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -11072,7 +11875,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), + Ref: ref(v1.PersistentVolumeClaim{}.OpenAPIModelName()), }, }, }, @@ -11083,7 +11886,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PersistentVolumeClaim{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11118,14 +11921,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "selector": { SchemaProps: spec.SchemaProps{ Description: "selector is a label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + Description: "resources represents the minimum resources the volume should have. Users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeResourceRequirements"), + Ref: ref(v1.VolumeResourceRequirements{}.OpenAPIModelName()), }, }, "volumeName": { @@ -11153,18 +11956,18 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall "dataSource": { SchemaProps: spec.SchemaProps{ Description: "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), + Ref: ref(v1.TypedLocalObjectReference{}.OpenAPIModelName()), }, }, "dataSourceRef": { SchemaProps: spec.SchemaProps{ Description: "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - Ref: ref("k8s.io/api/core/v1.TypedObjectReference"), + Ref: ref(v1.TypedObjectReference{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).", + Description: "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string or nil value indicates that no VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, this field can be reset to its previous value (including nil) to cancel the modification. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/", Type: []string{"string"}, Format: "", }, @@ -11173,7 +11976,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/core/v1.TypedObjectReference", "k8s.io/api/core/v1.VolumeResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + v1.TypedLocalObjectReference{}.OpenAPIModelName(), v1.TypedObjectReference{}.OpenAPIModelName(), v1.VolumeResourceRequirements{}.OpenAPIModelName(), metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -11221,7 +12024,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11245,7 +12048,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), + Ref: ref(v1.PersistentVolumeClaimCondition{}.OpenAPIModelName()), }, }, }, @@ -11253,13 +12056,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, "allocatedResources": { SchemaProps: spec.SchemaProps{ - Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11272,7 +12075,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, }, SchemaProps: spec.SchemaProps{ - Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", + Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -11289,22 +12092,22 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCa }, "currentVolumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", + Description: "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim", Type: []string{"string"}, Format: "", }, }, "modifyVolumeStatus": { SchemaProps: spec.SchemaProps{ - Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", - Ref: ref("k8s.io/api/core/v1.ModifyVolumeStatus"), + Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.", + Ref: ref(v1.ModifyVolumeStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ModifyVolumeStatus", "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ModifyVolumeStatus{}.OpenAPIModelName(), v1.PersistentVolumeClaimCondition{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -11319,14 +12122,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference SchemaProps: spec.SchemaProps{ Description: "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), + Ref: ref(v1.PersistentVolumeClaimSpec{}.OpenAPIModelName()), }, }, }, @@ -11334,7 +12137,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PersistentVolumeClaimSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11392,7 +12195,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -11403,7 +12206,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), + Ref: ref(v1.PersistentVolume{}.OpenAPIModelName()), }, }, }, @@ -11414,7 +12217,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PersistentVolume{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -11428,140 +12231,140 @@ func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallbac "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(v1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(v1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(v1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(v1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(v1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(v1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), v1.CSIPersistentVolumeSource{}.OpenAPIModelName(), v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), v1.CinderPersistentVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexPersistentVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), v1.LocalVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDPersistentVolumeSource{}.OpenAPIModelName(), v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -11580,7 +12383,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -11589,133 +12392,133 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ Description: "glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), + Ref: ref(v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), + Ref: ref(v1.RBDPersistentVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", - Ref: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), + Ref: ref(v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), + Ref: ref(v1.CinderPersistentVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), + Ref: ref(v1.CephFSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), + Ref: ref(v1.FlexPersistentVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), + Ref: ref(v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), + Ref: ref(v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName()), }, }, "local": { SchemaProps: spec.SchemaProps{ Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), + Ref: ref(v1.LocalVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. More info: https://examples.k8s.io/volumes/storageos/README.md", - Ref: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), + Ref: ref(v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi represents storage that is handled by an external CSI driver.", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), + Ref: ref(v1.CSIPersistentVolumeSource{}.OpenAPIModelName()), }, }, "accessModes": { @@ -11747,7 +12550,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, SchemaProps: spec.SchemaProps{ Description: "claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, "persistentVolumeReclaimPolicy": { @@ -11795,13 +12598,13 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, "nodeAffinity": { SchemaProps: spec.SchemaProps{ - Description: "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", - Ref: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), + Description: "nodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume. This field is mutable if MutablePVNodeAffinity feature gate is enabled.", + Ref: ref(v1.VolumeNodeAffinity{}.OpenAPIModelName()), }, }, "volumeAttributesClassName": { SchemaProps: spec.SchemaProps{ - Description: "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).", + Description: "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process.", Type: []string{"string"}, Format: "", }, @@ -11810,7 +12613,7 @@ func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFilePersistentVolumeSource{}.OpenAPIModelName(), v1.CSIPersistentVolumeSource{}.OpenAPIModelName(), v1.CephFSPersistentVolumeSource{}.OpenAPIModelName(), v1.CinderPersistentVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexPersistentVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GlusterfsPersistentVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIPersistentVolumeSource{}.OpenAPIModelName(), v1.LocalVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDPersistentVolumeSource{}.OpenAPIModelName(), v1.ScaleIOPersistentVolumeSource{}.OpenAPIModelName(), v1.StorageOSPersistentVolumeSource{}.OpenAPIModelName(), v1.VolumeNodeAffinity{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -11846,14 +12649,14 @@ func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallbac "lastPhaseTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -11911,28 +12714,28 @@ func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(v1.PodSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(v1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodSpec{}.OpenAPIModelName(), v1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -11956,7 +12759,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -11975,7 +12778,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(v1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -11985,7 +12788,7 @@ func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName(), v1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -11999,7 +12802,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "namespaces": { @@ -12033,7 +12836,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm "namespaceSelector": { SchemaProps: spec.SchemaProps{ Description: "A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means \"this pod's namespace\". An empty selector ({}) matches all namespaces.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "matchLabelKeys": { @@ -12081,7 +12884,7 @@ func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -12105,7 +12908,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -12118,13 +12921,13 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm }, }, SchemaProps: spec.SchemaProps{ - Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + Description: "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and subtracting \"weight\" from the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), + Ref: ref(v1.WeightedPodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -12134,7 +12937,7 @@ func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName(), v1.WeightedPodAffinityTerm{}.OpenAPIModelName()}, } } @@ -12200,6 +13003,78 @@ func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) com } } +func schema_k8sio_api_core_v1_PodCertificateProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodCertificateProjection provides a private key and X.509 certificate in the pod filesystem.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "signerName": { + SchemaProps: spec.SchemaProps{ + Description: "Kubelet's generated CSRs will be addressed to this signer.", + Type: []string{"string"}, + Format: "", + }, + }, + "keyType": { + SchemaProps: spec.SchemaProps{ + Description: "The type of keypair Kubelet will generate for the pod.\n\nValid values are \"RSA3072\", \"RSA4096\", \"ECDSAP256\", \"ECDSAP384\", \"ECDSAP521\", and \"ED25519\".", + Type: []string{"string"}, + Format: "", + }, + }, + "maxExpirationSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "maxExpirationSeconds is the maximum lifetime permitted for the certificate.\n\nKubelet copies this value verbatim into the PodCertificateRequests it generates for this projection.\n\nIf omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver will reject values shorter than 3600 (1 hour). The maximum allowable value is 7862400 (91 days).\n\nThe signer implementation is then free to issue a certificate with any lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 seconds (1 hour). This constraint is enforced by kube-apiserver. `kubernetes.io` signers will never issue certificates with a lifetime longer than 24 hours.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "credentialBundlePath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the credential bundle at this path in the projected volume.\n\nThe credential bundle is a single file that contains multiple PEM blocks. The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private key.\n\nThe remaining blocks are CERTIFICATE blocks, containing the issued certificate chain from the signer (leaf and any intermediates).\n\nUsing credentialBundlePath lets your Pod's application code make a single atomic read that retrieves a consistent key and certificate chain. If you project them to separate files, your application code will need to additionally check that the leaf certificate was issued to the key.", + Type: []string{"string"}, + Format: "", + }, + }, + "keyPath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the key at this path in the projected volume.\n\nMost applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation.", + Type: []string{"string"}, + Format: "", + }, + }, + "certificateChainPath": { + SchemaProps: spec.SchemaProps{ + Description: "Write the certificate chain at this path in the projected volume.\n\nMost applications should use credentialBundlePath. When using keyPath and certificateChainPath, your application needs to check that the key and leaf certificate are consistent, because it is possible to read the files mid-rotation.", + Type: []string{"string"}, + Format: "", + }, + }, + "userAnnotations": { + SchemaProps: spec.SchemaProps{ + Description: "userAnnotations allow pod authors to pass additional information to the signer implementation. Kubernetes does not restrict or validate this metadata in any way.\n\nThese values are copied verbatim into the `spec.unverifiedUserAnnotations` field of the PodCertificateRequest objects that Kubelet creates.\n\nEntries are subject to the same validation as object metadata annotations, with the addition that all keys must be domain-prefixed. No restrictions are placed on values, except an overall size limitation on the entire field.\n\nSigners should document the keys and values they support. Signers should deny requests that contain keys they do not recognize.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + Required: []string{"signerName", "keyType"}, + }, + }, + } +} + func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -12217,7 +13092,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod condition was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -12233,13 +13108,13 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. "lastProbeTime": { SchemaProps: spec.SchemaProps{ Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -12261,7 +13136,7 @@ func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -12325,7 +13200,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), + Ref: ref(v1.PodDNSConfigOption{}.OpenAPIModelName()), }, }, }, @@ -12335,7 +13210,7 @@ func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, + v1.PodDNSConfigOption{}.OpenAPIModelName()}, } } @@ -12449,6 +13324,49 @@ func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) commo } } +func schema_k8sio_api_core_v1_PodExtendedResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "PodExtendedResourceClaimStatus is stored in the PodStatus for the extended resource requests backed by DRA. It stores the generated name for the corresponding special ResourceClaim created by the scheduler.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requestMappings": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "RequestMappings identifies the mapping of to device request in the generated ResourceClaim.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref(v1.ContainerExtendedResourceRequest{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "resourceClaimName": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"requestMappings", "resourceClaimName"}, + }, + }, + Dependencies: []string{ + v1.ContainerExtendedResourceRequest{}.OpenAPIModelName()}, + } +} + func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -12496,7 +13414,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -12507,7 +13425,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Pod"), + Ref: ref(v1.Pod{}.OpenAPIModelName()), }, }, }, @@ -12518,7 +13436,7 @@ func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Pod{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -12574,7 +13492,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common "sinceTime": { SchemaProps: spec.SchemaProps{ Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "timestamps": { @@ -12616,7 +13534,7 @@ func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -12842,13 +13760,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(v1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(v1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -12920,7 +13838,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Sysctl"), + Ref: ref(v1.Sysctl{}.OpenAPIModelName()), }, }, }, @@ -12937,13 +13855,13 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(v1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(v1.AppArmorProfile{}.OpenAPIModelName()), }, }, "seLinuxChangePolicy": { @@ -12957,7 +13875,7 @@ func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + v1.AppArmorProfile{}.OpenAPIModelName(), v1.SELinuxOptions{}.OpenAPIModelName(), v1.SeccompProfile{}.OpenAPIModelName(), v1.Sysctl{}.OpenAPIModelName(), v1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -12971,14 +13889,14 @@ func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common. "podController": { SchemaProps: spec.SchemaProps{ Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, + metav1.OwnerReference{}.OpenAPIModelName()}, } } @@ -13007,7 +13925,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Volume"), + Ref: ref(v1.Volume{}.OpenAPIModelName()), }, }, }, @@ -13031,7 +13949,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(v1.Container{}.OpenAPIModelName()), }, }, }, @@ -13055,7 +13973,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), + Ref: ref(v1.Container{}.OpenAPIModelName()), }, }, }, @@ -13079,7 +13997,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), + Ref: ref(v1.EphemeralContainer{}.OpenAPIModelName()), }, }, }, @@ -13166,7 +14084,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "hostNetwork": { SchemaProps: spec.SchemaProps{ - Description: "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + Description: "Host networking requested for this pod. Use the host's network namespace. When using HostNetwork you should specify ports so the scheduler is aware. When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. Default to false.", Type: []string{"boolean"}, Format: "", }, @@ -13195,7 +14113,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "securityContext": { SchemaProps: spec.SchemaProps{ Description: "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - Ref: ref("k8s.io/api/core/v1.PodSecurityContext"), + Ref: ref(v1.PodSecurityContext{}.OpenAPIModelName()), }, }, "imagePullSecrets": { @@ -13216,7 +14134,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -13239,7 +14157,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "affinity": { SchemaProps: spec.SchemaProps{ Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), + Ref: ref(v1.Affinity{}.OpenAPIModelName()), }, }, "schedulerName": { @@ -13262,7 +14180,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), + Ref: ref(v1.Toleration{}.OpenAPIModelName()), }, }, }, @@ -13286,7 +14204,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostAlias"), + Ref: ref(v1.HostAlias{}.OpenAPIModelName()), }, }, }, @@ -13309,7 +14227,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA "dnsConfig": { SchemaProps: spec.SchemaProps{ Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), + Ref: ref(v1.PodDNSConfig{}.OpenAPIModelName()), }, }, "readinessGates": { @@ -13325,7 +14243,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), + Ref: ref(v1.PodReadinessGate{}.OpenAPIModelName()), }, }, }, @@ -13361,7 +14279,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -13386,7 +14304,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), + Ref: ref(v1.TopologySpreadConstraint{}.OpenAPIModelName()), }, }, }, @@ -13401,8 +14319,8 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "os": { SchemaProps: spec.SchemaProps{ - Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", - Ref: ref("k8s.io/api/core/v1.PodOS"), + Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.resources - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[*].securityContext.appArmorProfile - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", + Ref: ref(v1.PodOS{}.OpenAPIModelName()), }, }, "hostUsers": { @@ -13430,7 +14348,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSchedulingGate"), + Ref: ref(v1.PodSchedulingGate{}.OpenAPIModelName()), }, }, }, @@ -13448,13 +14366,13 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, SchemaProps: spec.SchemaProps{ - Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", + Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaim"), + Ref: ref(v1.PodResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -13462,8 +14380,21 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, "resources": { SchemaProps: spec.SchemaProps{ - Description: "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\" and \"memory\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), + Description: "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\", \"memory\" and \"hugepages-\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.", + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), + }, + }, + "hostnameOverride": { + SchemaProps: spec.SchemaProps{ + Description: "HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false.\n\nThis field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled.", + Type: []string{"string"}, + Format: "", + }, + }, + "workloadRef": { + SchemaProps: spec.SchemaProps{ + Description: "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies.", + Ref: ref(v1.WorkloadReference{}.OpenAPIModelName()), }, }, }, @@ -13471,7 +14402,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodResourceClaim", "k8s.io/api/core/v1.PodSchedulingGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.Affinity{}.OpenAPIModelName(), v1.Container{}.OpenAPIModelName(), v1.EphemeralContainer{}.OpenAPIModelName(), v1.HostAlias{}.OpenAPIModelName(), v1.LocalObjectReference{}.OpenAPIModelName(), v1.PodDNSConfig{}.OpenAPIModelName(), v1.PodOS{}.OpenAPIModelName(), v1.PodReadinessGate{}.OpenAPIModelName(), v1.PodResourceClaim{}.OpenAPIModelName(), v1.PodSchedulingGate{}.OpenAPIModelName(), v1.PodSecurityContext{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), v1.Toleration{}.OpenAPIModelName(), v1.TopologySpreadConstraint{}.OpenAPIModelName(), v1.Volume{}.OpenAPIModelName(), v1.WorkloadReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -13484,7 +14415,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "observedGeneration": { SchemaProps: spec.SchemaProps{ - Description: "If set, this represents the .metadata.generation that the pod status was set based upon. This is an alpha field. Enable PodObservedGenerationTracking to be able to use this field.", + Description: "If set, this represents the .metadata.generation that the pod status was set based upon. The PodObservedGenerationTracking feature gate must be enabled to use this field.", Type: []string{"integer"}, Format: "int64", }, @@ -13515,7 +14446,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodCondition"), + Ref: ref(v1.PodCondition{}.OpenAPIModelName()), }, }, }, @@ -13564,7 +14495,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostIP"), + Ref: ref(v1.HostIP{}.OpenAPIModelName()), }, }, }, @@ -13595,7 +14526,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodIP"), + Ref: ref(v1.PodIP{}.OpenAPIModelName()), }, }, }, @@ -13604,7 +14535,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope "startTime": { SchemaProps: spec.SchemaProps{ Description: "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "initContainerStatuses": { @@ -13620,7 +14551,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -13639,7 +14570,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -13666,7 +14597,7 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), + Ref: ref(v1.ContainerStatus{}.OpenAPIModelName()), }, }, }, @@ -13697,17 +14628,43 @@ func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaimStatus"), + Ref: ref(v1.PodResourceClaimStatus{}.OpenAPIModelName()), + }, + }, + }, + }, + }, + "extendedResourceClaimStatus": { + SchemaProps: spec.SchemaProps{ + Description: "Status of extended resource claim backed by DRA.", + Ref: ref(v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName()), + }, + }, + "allocatedResources": { + SchemaProps: spec.SchemaProps{ + Description: "AllocatedResources is the total requests allocated for this pod by the node. If pod-level requests are not set, this will be the total requests aggregated across containers in the pod.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, }, }, + "resources": { + SchemaProps: spec.SchemaProps{ + Description: "Resources represents the compute resource requests and limits that have been applied at the pod level if pod-level requests or limits are set in PodSpec.Resources", + Ref: ref(v1.ResourceRequirements{}.OpenAPIModelName()), + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.HostIP", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodIP", "k8s.io/api/core/v1.PodResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.ContainerStatus{}.OpenAPIModelName(), v1.HostIP{}.OpenAPIModelName(), v1.PodCondition{}.OpenAPIModelName(), v1.PodExtendedResourceClaimStatus{}.OpenAPIModelName(), v1.PodIP{}.OpenAPIModelName(), v1.PodResourceClaimStatus{}.OpenAPIModelName(), v1.ResourceRequirements{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -13736,21 +14693,21 @@ func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), + Ref: ref(v1.PodStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13779,21 +14736,21 @@ func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "template": { SchemaProps: spec.SchemaProps{ Description: "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(v1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodTemplateSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13822,7 +14779,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -13833,7 +14790,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplate"), + Ref: ref(v1.PodTemplate{}.OpenAPIModelName()), }, }, }, @@ -13844,7 +14801,7 @@ func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.PodTemplate{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -13859,21 +14816,21 @@ func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), + Ref: ref(v1.PodSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.PodSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -13962,13 +14919,13 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The class of pods.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSignature"), + Ref: ref(v1.PodSignature{}.OpenAPIModelName()), }, }, "evictionTime": { SchemaProps: spec.SchemaProps{ Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -13990,7 +14947,7 @@ func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + v1.PodSignature{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -14013,7 +14970,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "A node selector term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), + Ref: ref(v1.NodeSelectorTerm{}.OpenAPIModelName()), }, }, }, @@ -14021,7 +14978,7 @@ func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, + v1.NodeSelectorTerm{}.OpenAPIModelName()}, } } @@ -14035,25 +14992,25 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(v1.GRPCAction{}.OpenAPIModelName()), }, }, "initialDelaySeconds": { @@ -14102,7 +15059,7 @@ func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.GRPCAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -14116,32 +15073,32 @@ func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common. "exec": { SchemaProps: spec.SchemaProps{ Description: "Exec specifies a command to execute in the container.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), + Ref: ref(v1.ExecAction{}.OpenAPIModelName()), }, }, "httpGet": { SchemaProps: spec.SchemaProps{ Description: "HTTPGet specifies an HTTP GET request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + Ref: ref(v1.HTTPGetAction{}.OpenAPIModelName()), }, }, "tcpSocket": { SchemaProps: spec.SchemaProps{ Description: "TCPSocket specifies a connection to a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), + Ref: ref(v1.TCPSocketAction{}.OpenAPIModelName()), }, }, "grpc": { SchemaProps: spec.SchemaProps{ Description: "GRPC specifies a GRPC HealthCheckRequest.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), + Ref: ref(v1.GRPCAction{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, + v1.ExecAction{}.OpenAPIModelName(), v1.GRPCAction{}.OpenAPIModelName(), v1.HTTPGetAction{}.OpenAPIModelName(), v1.TCPSocketAction{}.OpenAPIModelName()}, } } @@ -14165,7 +15122,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), + Ref: ref(v1.VolumeProjection{}.OpenAPIModelName()), }, }, }, @@ -14182,7 +15139,7 @@ func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, + v1.VolumeProjection{}.OpenAPIModelName()}, } } @@ -14313,7 +15270,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -14328,7 +15285,7 @@ func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -14401,7 +15358,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "readOnly": { @@ -14416,7 +15373,7 @@ func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -14445,7 +15402,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "range": { @@ -14468,7 +15425,7 @@ func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -14497,28 +15454,28 @@ func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback SchemaProps: spec.SchemaProps{ Description: "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), + Ref: ref(v1.ReplicationControllerSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), + Ref: ref(v1.ReplicationControllerStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ReplicationControllerSpec{}.OpenAPIModelName(), v1.ReplicationControllerStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -14548,7 +15505,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -14570,7 +15527,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.Referenc }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -14599,7 +15556,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -14610,7 +15567,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationController"), + Ref: ref(v1.ReplicationController{}.OpenAPIModelName()), }, }, }, @@ -14621,7 +15578,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCall }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ReplicationController{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -14672,14 +15629,14 @@ func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCall "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), + Ref: ref(v1.PodTemplateSpec{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, + v1.PodTemplateSpec{}.OpenAPIModelName()}, } } @@ -14744,7 +15701,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), + Ref: ref(v1.ReplicationControllerCondition{}.OpenAPIModelName()), }, }, }, @@ -14755,7 +15712,7 @@ func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, + v1.ReplicationControllerCondition{}.OpenAPIModelName()}, } } @@ -14813,7 +15770,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback "divisor": { SchemaProps: spec.SchemaProps{ Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -14826,7 +15783,7 @@ func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -14884,28 +15841,28 @@ func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), + Ref: ref(v1.ResourceQuotaSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), + Ref: ref(v1.ResourceQuotaStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ResourceQuotaSpec{}.OpenAPIModelName(), v1.ResourceQuotaStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -14934,7 +15891,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -14945,7 +15902,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), + Ref: ref(v1.ResourceQuota{}.OpenAPIModelName()), }, }, }, @@ -14956,7 +15913,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ResourceQuota{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -14975,7 +15932,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -15005,14 +15962,14 @@ func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) co "scopeSelector": { SchemaProps: spec.SchemaProps{ Description: "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", - Ref: ref("k8s.io/api/core/v1.ScopeSelector"), + Ref: ref(v1.ScopeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ScopeSelector{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -15031,7 +15988,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -15045,7 +16002,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -15055,7 +16012,7 @@ func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -15074,7 +16031,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -15088,7 +16045,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -15104,13 +16061,13 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, }, SchemaProps: spec.SchemaProps{ - Description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.", + Description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis field depends on the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceClaim"), + Ref: ref(v1.ResourceClaim{}.OpenAPIModelName()), }, }, }, @@ -15120,7 +16077,7 @@ func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceClaim", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + v1.ResourceClaim{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()}, } } @@ -15155,7 +16112,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceHealth"), + Ref: ref(v1.ResourceHealth{}.OpenAPIModelName()), }, }, }, @@ -15166,7 +16123,7 @@ func schema_k8sio_api_core_v1_ResourceStatus(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ResourceHealth"}, + v1.ResourceHealth{}.OpenAPIModelName()}, } } @@ -15237,7 +16194,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), + Ref: ref(v1.SecretReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -15296,7 +16253,7 @@ func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.Reference }, }, Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, + v1.SecretReference{}.OpenAPIModelName()}, } } @@ -15326,7 +16283,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, "sslEnabled": { @@ -15385,7 +16342,7 @@ func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -15409,7 +16366,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), + Ref: ref(v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -15424,7 +16381,7 @@ func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, + v1.ScopedResourceSelectorRequirement{}.OpenAPIModelName()}, } } @@ -15547,7 +16504,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "immutable": { @@ -15599,7 +16556,7 @@ func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -15698,7 +16655,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -15709,7 +16666,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Secret"), + Ref: ref(v1.Secret{}.OpenAPIModelName()), }, }, }, @@ -15720,7 +16677,7 @@ func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Secret{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -15752,7 +16709,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -15769,7 +16726,7 @@ func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) com }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -15832,7 +16789,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), + Ref: ref(v1.KeyToPath{}.OpenAPIModelName()), }, }, }, @@ -15856,7 +16813,7 @@ func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, + v1.KeyToPath{}.OpenAPIModelName()}, } } @@ -15870,7 +16827,7 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "capabilities": { SchemaProps: spec.SchemaProps{ Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), + Ref: ref(v1.Capabilities{}.OpenAPIModelName()), }, }, "privileged": { @@ -15883,13 +16840,13 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seLinuxOptions": { SchemaProps: spec.SchemaProps{ Description: "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), + Ref: ref(v1.SELinuxOptions{}.OpenAPIModelName()), }, }, "windowsOptions": { SchemaProps: spec.SchemaProps{ Description: "The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), + Ref: ref(v1.WindowsSecurityContextOptions{}.OpenAPIModelName()), }, }, "runAsUser": { @@ -15938,20 +16895,20 @@ func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) comm "seccompProfile": { SchemaProps: spec.SchemaProps{ Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), + Ref: ref(v1.SeccompProfile{}.OpenAPIModelName()), }, }, "appArmorProfile": { SchemaProps: spec.SchemaProps{ Description: "appArmorProfile is the AppArmor options to use by this container. If set, this profile overrides the pod's appArmorProfile. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.AppArmorProfile"), + Ref: ref(v1.AppArmorProfile{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AppArmorProfile", "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, + v1.AppArmorProfile{}.OpenAPIModelName(), v1.Capabilities{}.OpenAPIModelName(), v1.SELinuxOptions{}.OpenAPIModelName(), v1.SeccompProfile{}.OpenAPIModelName(), v1.WindowsSecurityContextOptions{}.OpenAPIModelName()}, } } @@ -15980,14 +16937,14 @@ func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "The reference to an object in the system.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -16016,28 +16973,28 @@ func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "spec": { SchemaProps: spec.SchemaProps{ Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), + Ref: ref(v1.ServiceSpec{}.OpenAPIModelName()), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), + Ref: ref(v1.ServiceStatus{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.ServiceSpec{}.OpenAPIModelName(), v1.ServiceStatus{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -16066,7 +17023,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, "secrets": { @@ -16087,7 +17044,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, @@ -16106,7 +17063,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, @@ -16123,7 +17080,7 @@ func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + v1.LocalObjectReference{}.OpenAPIModelName(), v1.ObjectReference{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -16152,7 +17109,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -16163,7 +17120,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), + Ref: ref(v1.ServiceAccount{}.OpenAPIModelName()), }, }, }, @@ -16174,7 +17131,7 @@ func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) c }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.ServiceAccount{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -16239,7 +17196,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -16250,7 +17207,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Service"), + Ref: ref(v1.Service{}.OpenAPIModelName()), }, }, }, @@ -16261,7 +17218,7 @@ func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + v1.Service{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()}, } } @@ -16385,7 +17342,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServicePort"), + Ref: ref(v1.ServicePort{}.OpenAPIModelName()), }, }, }, @@ -16534,7 +17491,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O "sessionAffinityConfig": { SchemaProps: spec.SchemaProps{ Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), + Ref: ref(v1.SessionAffinityConfig{}.OpenAPIModelName()), }, }, "ipFamilies": { @@ -16599,7 +17556,7 @@ func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, + v1.ServicePort{}.OpenAPIModelName(), v1.SessionAffinityConfig{}.OpenAPIModelName()}, } } @@ -16614,7 +17571,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), + Ref: ref(v1.LoadBalancerStatus{}.OpenAPIModelName()), }, }, "conditions": { @@ -16635,7 +17592,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), + Ref: ref(metav1.Condition{}.OpenAPIModelName()), }, }, }, @@ -16645,7 +17602,7 @@ func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, + v1.LoadBalancerStatus{}.OpenAPIModelName(), metav1.Condition{}.OpenAPIModelName()}, } } @@ -16659,14 +17616,14 @@ func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback "clientIP": { SchemaProps: spec.SchemaProps{ Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), + Ref: ref(v1.ClientIPConfig{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, + v1.ClientIPConfig{}.OpenAPIModelName()}, } } @@ -16730,14 +17687,14 @@ func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.Referen "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), + Ref: ref(v1.ObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, + v1.ObjectReference{}.OpenAPIModelName()}, } } @@ -16779,14 +17736,14 @@ func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback "secretRef": { SchemaProps: spec.SchemaProps{ Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + Ref: ref(v1.LocalObjectReference{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, + v1.LocalObjectReference{}.OpenAPIModelName()}, } } @@ -16882,8 +17839,8 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, "timeAdded": { SchemaProps: spec.SchemaProps{ - Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Description: "TimeAdded represents the time at which the taint was added.", + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, }, @@ -16891,7 +17848,7 @@ func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -16911,10 +17868,10 @@ func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.Op }, "operator": { SchemaProps: spec.SchemaProps{ - Description: "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`", + Description: "Operator represents a key's relationship to the value. Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`\n - `\"Gt\"`\n - `\"Lt\"`", Type: []string{"string"}, Format: "", - Enum: []interface{}{"Equal", "Exists"}, + Enum: []interface{}{"Equal", "Exists", "Gt", "Lt"}, }, }, "value": { @@ -17007,7 +17964,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), + Ref: ref(v1.TopologySelectorLabelRequirement{}.OpenAPIModelName()), }, }, }, @@ -17022,7 +17979,7 @@ func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) }, }, Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, + v1.TopologySelectorLabelRequirement{}.OpenAPIModelName()}, } } @@ -17061,7 +18018,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb "labelSelector": { SchemaProps: spec.SchemaProps{ Description: "LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), + Ref: ref(metav1.LabelSelector{}.OpenAPIModelName()), }, }, "minDomains": { @@ -17112,7 +18069,7 @@ func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, + metav1.LabelSelector{}.OpenAPIModelName()}, } } @@ -17220,181 +18177,181 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(v1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(v1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(v1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ - Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", + Ref: ref(v1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ - Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", + Ref: ref(v1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ - Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", + Ref: ref(v1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(v1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(v1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(v1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(v1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(v1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(v1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(v1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(v1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(v1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(v1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(v1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(v1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, @@ -17402,7 +18359,7 @@ func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAP }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFileVolumeSource{}.OpenAPIModelName(), v1.CSIVolumeSource{}.OpenAPIModelName(), v1.CephFSVolumeSource{}.OpenAPIModelName(), v1.CinderVolumeSource{}.OpenAPIModelName(), v1.ConfigMapVolumeSource{}.OpenAPIModelName(), v1.DownwardAPIVolumeSource{}.OpenAPIModelName(), v1.EmptyDirVolumeSource{}.OpenAPIModelName(), v1.EphemeralVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GitRepoVolumeSource{}.OpenAPIModelName(), v1.GlusterfsVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIVolumeSource{}.OpenAPIModelName(), v1.ImageVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.ProjectedVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDVolumeSource{}.OpenAPIModelName(), v1.ScaleIOVolumeSource{}.OpenAPIModelName(), v1.SecretVolumeSource{}.OpenAPIModelName(), v1.StorageOSVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -17556,14 +18513,14 @@ func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) c "required": { SchemaProps: spec.SchemaProps{ Description: "required specifies hard node constraints that must be met.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Ref: ref(v1.NodeSelector{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector"}, + v1.NodeSelector{}.OpenAPIModelName()}, } } @@ -17577,38 +18534,44 @@ func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) com "secret": { SchemaProps: spec.SchemaProps{ Description: "secret information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), + Ref: ref(v1.SecretProjection{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), + Ref: ref(v1.DownwardAPIProjection{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), + Ref: ref(v1.ConfigMapProjection{}.OpenAPIModelName()), }, }, "serviceAccountToken": { SchemaProps: spec.SchemaProps{ Description: "serviceAccountToken is information about the serviceAccountToken data to project", - Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), + Ref: ref(v1.ServiceAccountTokenProjection{}.OpenAPIModelName()), }, }, "clusterTrustBundle": { SchemaProps: spec.SchemaProps{ Description: "ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature gate.\n\nClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.\n\nKubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.", - Ref: ref("k8s.io/api/core/v1.ClusterTrustBundleProjection"), + Ref: ref(v1.ClusterTrustBundleProjection{}.OpenAPIModelName()), + }, + }, + "podCertificate": { + SchemaProps: spec.SchemaProps{ + Description: "Projects an auto-rotating credential bundle (private key and certificate chain) that the pod can use either as a TLS client or server.\n\nKubelet generates a private key and uses it to send a PodCertificateRequest to the named signer. Once the signer approves the request and issues a certificate chain, Kubelet writes the key and certificate chain to the pod filesystem. The pod does not start until certificates have been issued for each podCertificate projected volume source in its spec.\n\nKubelet will begin trying to rotate the certificate at the time indicated by the signer using the PodCertificateRequest.Status.BeginRefreshAt timestamp.\n\nKubelet can write a single file, indicated by the credentialBundlePath field, or separate files, indicated by the keyPath and certificateChainPath fields.\n\nThe credential bundle is a single file in PEM format. The first PEM entry is the private key (in PKCS#8 format), and the remaining PEM entries are the certificate chain issued by the signer (typically, signers will return their certificate chain in leaf-to-root order).\n\nPrefer using the credential bundle format, since your application code can read it atomically. If you use keyPath and certificateChainPath, your application must make two separate file reads. If these coincide with a certificate rotation, it is possible that the private key and leaf certificate you read may not correspond to each other. Your application will need to check for this condition, and re-read until they are consistent.\n\nThe named signer controls chooses the format of the certificate it issues; consult the signer implementation's documentation to learn how to use the certificates it issues.", + Ref: ref(v1.PodCertificateProjection{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.ClusterTrustBundleProjection", "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, + v1.ClusterTrustBundleProjection{}.OpenAPIModelName(), v1.ConfigMapProjection{}.OpenAPIModelName(), v1.DownwardAPIProjection{}.OpenAPIModelName(), v1.PodCertificateProjection{}.OpenAPIModelName(), v1.SecretProjection{}.OpenAPIModelName(), v1.ServiceAccountTokenProjection{}.OpenAPIModelName()}, } } @@ -17627,7 +18590,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -17641,7 +18604,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Ref: ref(resource.Quantity{}.OpenAPIModelName()), }, }, }, @@ -17651,7 +18614,7 @@ func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCal }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + resource.Quantity{}.OpenAPIModelName()}, } } @@ -17665,188 +18628,188 @@ func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common. "hostPath": { SchemaProps: spec.SchemaProps{ Description: "hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - Ref: ref("k8s.io/api/core/v1.HostPathVolumeSource"), + Ref: ref(v1.HostPathVolumeSource{}.OpenAPIModelName()), }, }, "emptyDir": { SchemaProps: spec.SchemaProps{ Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), + Ref: ref(v1.EmptyDirVolumeSource{}.OpenAPIModelName()), }, }, "gcePersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Ref: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), + Ref: ref(v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "awsElasticBlockStore": { SchemaProps: spec.SchemaProps{ Description: "awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Ref: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), + Ref: ref(v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName()), }, }, "gitRepo": { SchemaProps: spec.SchemaProps{ Description: "gitRepo represents a git repository at a particular revision. Deprecated: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", - Ref: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), + Ref: ref(v1.GitRepoVolumeSource{}.OpenAPIModelName()), }, }, "secret": { SchemaProps: spec.SchemaProps{ Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), + Ref: ref(v1.SecretVolumeSource{}.OpenAPIModelName()), }, }, "nfs": { SchemaProps: spec.SchemaProps{ Description: "nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), + Ref: ref(v1.NFSVolumeSource{}.OpenAPIModelName()), }, }, "iscsi": { SchemaProps: spec.SchemaProps{ - Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md", - Ref: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), + Description: "iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes/#iscsi", + Ref: ref(v1.ISCSIVolumeSource{}.OpenAPIModelName()), }, }, "glusterfs": { SchemaProps: spec.SchemaProps{ - Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. More info: https://examples.k8s.io/volumes/glusterfs/README.md", - Ref: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), + Description: "glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported.", + Ref: ref(v1.GlusterfsVolumeSource{}.OpenAPIModelName()), }, }, "persistentVolumeClaim": { SchemaProps: spec.SchemaProps{ Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), + Ref: ref(v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName()), }, }, "rbd": { SchemaProps: spec.SchemaProps{ - Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. More info: https://examples.k8s.io/volumes/rbd/README.md", - Ref: ref("k8s.io/api/core/v1.RBDVolumeSource"), + Description: "rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported.", + Ref: ref(v1.RBDVolumeSource{}.OpenAPIModelName()), }, }, "flexVolume": { SchemaProps: spec.SchemaProps{ Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), + Ref: ref(v1.FlexVolumeSource{}.OpenAPIModelName()), }, }, "cinder": { SchemaProps: spec.SchemaProps{ Description: "cinder represents a cinder volume attached and mounted on kubelets host machine. Deprecated: Cinder is deprecated. All operations for the in-tree cinder type are redirected to the cinder.csi.openstack.org CSI driver. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Ref: ref("k8s.io/api/core/v1.CinderVolumeSource"), + Ref: ref(v1.CinderVolumeSource{}.OpenAPIModelName()), }, }, "cephfs": { SchemaProps: spec.SchemaProps{ Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), + Ref: ref(v1.CephFSVolumeSource{}.OpenAPIModelName()), }, }, "flocker": { SchemaProps: spec.SchemaProps{ Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), + Ref: ref(v1.FlockerVolumeSource{}.OpenAPIModelName()), }, }, "downwardAPI": { SchemaProps: spec.SchemaProps{ Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), + Ref: ref(v1.DownwardAPIVolumeSource{}.OpenAPIModelName()), }, }, "fc": { SchemaProps: spec.SchemaProps{ Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), + Ref: ref(v1.FCVolumeSource{}.OpenAPIModelName()), }, }, "azureFile": { SchemaProps: spec.SchemaProps{ Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod. Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type are redirected to the file.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), + Ref: ref(v1.AzureFileVolumeSource{}.OpenAPIModelName()), }, }, "configMap": { SchemaProps: spec.SchemaProps{ Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), + Ref: ref(v1.ConfigMapVolumeSource{}.OpenAPIModelName()), }, }, "vsphereVolume": { SchemaProps: spec.SchemaProps{ Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type are redirected to the csi.vsphere.vmware.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), + Ref: ref(v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()), }, }, "quobyte": { SchemaProps: spec.SchemaProps{ Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime. Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), + Ref: ref(v1.QuobyteVolumeSource{}.OpenAPIModelName()), }, }, "azureDisk": { SchemaProps: spec.SchemaProps{ Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type are redirected to the disk.csi.azure.com CSI driver.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), + Ref: ref(v1.AzureDiskVolumeSource{}.OpenAPIModelName()), }, }, "photonPersistentDisk": { SchemaProps: spec.SchemaProps{ Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), + Ref: ref(v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName()), }, }, "projected": { SchemaProps: spec.SchemaProps{ Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), + Ref: ref(v1.ProjectedVolumeSource{}.OpenAPIModelName()), }, }, "portworxVolume": { SchemaProps: spec.SchemaProps{ Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine. Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type are redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate is on.", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), + Ref: ref(v1.PortworxVolumeSource{}.OpenAPIModelName()), }, }, "scaleIO": { SchemaProps: spec.SchemaProps{ Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), + Ref: ref(v1.ScaleIOVolumeSource{}.OpenAPIModelName()), }, }, "storageos": { SchemaProps: spec.SchemaProps{ Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), + Ref: ref(v1.StorageOSVolumeSource{}.OpenAPIModelName()), }, }, "csi": { SchemaProps: spec.SchemaProps{ Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers.", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), + Ref: ref(v1.CSIVolumeSource{}.OpenAPIModelName()), }, }, "ephemeral": { SchemaProps: spec.SchemaProps{ Description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), + Ref: ref(v1.EphemeralVolumeSource{}.OpenAPIModelName()), }, }, "image": { SchemaProps: spec.SchemaProps{ Description: "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. The volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.", - Ref: ref("k8s.io/api/core/v1.ImageVolumeSource"), + Ref: ref(v1.ImageVolumeSource{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.ImageVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, + v1.AWSElasticBlockStoreVolumeSource{}.OpenAPIModelName(), v1.AzureDiskVolumeSource{}.OpenAPIModelName(), v1.AzureFileVolumeSource{}.OpenAPIModelName(), v1.CSIVolumeSource{}.OpenAPIModelName(), v1.CephFSVolumeSource{}.OpenAPIModelName(), v1.CinderVolumeSource{}.OpenAPIModelName(), v1.ConfigMapVolumeSource{}.OpenAPIModelName(), v1.DownwardAPIVolumeSource{}.OpenAPIModelName(), v1.EmptyDirVolumeSource{}.OpenAPIModelName(), v1.EphemeralVolumeSource{}.OpenAPIModelName(), v1.FCVolumeSource{}.OpenAPIModelName(), v1.FlexVolumeSource{}.OpenAPIModelName(), v1.FlockerVolumeSource{}.OpenAPIModelName(), v1.GCEPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.GitRepoVolumeSource{}.OpenAPIModelName(), v1.GlusterfsVolumeSource{}.OpenAPIModelName(), v1.HostPathVolumeSource{}.OpenAPIModelName(), v1.ISCSIVolumeSource{}.OpenAPIModelName(), v1.ImageVolumeSource{}.OpenAPIModelName(), v1.NFSVolumeSource{}.OpenAPIModelName(), v1.PersistentVolumeClaimVolumeSource{}.OpenAPIModelName(), v1.PhotonPersistentDiskVolumeSource{}.OpenAPIModelName(), v1.PortworxVolumeSource{}.OpenAPIModelName(), v1.ProjectedVolumeSource{}.OpenAPIModelName(), v1.QuobyteVolumeSource{}.OpenAPIModelName(), v1.RBDVolumeSource{}.OpenAPIModelName(), v1.ScaleIOVolumeSource{}.OpenAPIModelName(), v1.SecretVolumeSource{}.OpenAPIModelName(), v1.StorageOSVolumeSource{}.OpenAPIModelName(), v1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName()}, } } @@ -17912,7 +18875,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba SchemaProps: spec.SchemaProps{ Description: "Required. A pod affinity term, associated with the corresponding weight.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), + Ref: ref(v1.PodAffinityTerm{}.OpenAPIModelName()), }, }, }, @@ -17920,7 +18883,7 @@ func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallba }, }, Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, + v1.PodAffinityTerm{}.OpenAPIModelName()}, } } @@ -17965,6 +18928,43 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference } } +func schema_k8sio_api_core_v1_WorkloadReference(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "podGroup": { + SchemaProps: spec.SchemaProps{ + Description: "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "podGroupReplicaKey": { + SchemaProps: spec.SchemaProps{ + Description: "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name", "podGroup"}, + }, + }, + } +} + func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.EmbedOpenAPIDefinitionIntoV2Extension(common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -18055,7 +19055,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, }, @@ -18065,7 +19065,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA SchemaProps: spec.SchemaProps{ Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Ref: ref(metav1.GroupVersionForDiscovery{}.OpenAPIModelName()), }, }, "serverAddressByClientCIDRs": { @@ -18081,7 +19081,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -18092,7 +19092,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.GroupVersionForDiscovery{}.OpenAPIModelName(), metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -18130,7 +19130,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + Ref: ref(metav1.APIGroup{}.OpenAPIModelName()), }, }, }, @@ -18141,7 +19141,7 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, + metav1.APIGroup{}.OpenAPIModelName()}, } } @@ -18309,7 +19309,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + Ref: ref(metav1.APIResource{}.OpenAPIModelName()), }, }, }, @@ -18320,7 +19320,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, + metav1.APIResource{}.OpenAPIModelName()}, } } @@ -18378,7 +19378,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Ref: ref(metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()), }, }, }, @@ -18389,7 +19389,7 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, + metav1.ServerAddressByClientCIDR{}.OpenAPIModelName()}, } } @@ -18490,7 +19490,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "reason": { @@ -18514,7 +19514,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.Time{}.OpenAPIModelName()}, } } @@ -18610,7 +19610,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. "preconditions": { SchemaProps: spec.SchemaProps{ Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), + Ref: ref(metav1.Preconditions{}.OpenAPIModelName()), }, }, "orphanDependents": { @@ -18658,7 +19658,7 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, + metav1.Preconditions{}.OpenAPIModelName()}, } } @@ -18970,15 +19970,12 @@ func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common. "Object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), }, }, }, Required: []string{"Type", "Object"}, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, } } @@ -19018,7 +20015,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Ref: ref(metav1.LabelSelectorRequirement{}.OpenAPIModelName()), }, }, }, @@ -19033,7 +20030,7 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, + metav1.LabelSelectorRequirement{}.OpenAPIModelName()}, } } @@ -19112,7 +20109,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19122,7 +20119,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -19133,7 +20130,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.ListMeta{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -19306,7 +20303,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "time": { SchemaProps: spec.SchemaProps{ Description: "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "fieldsType": { @@ -19319,7 +20316,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co "fieldsV1": { SchemaProps: spec.SchemaProps{ Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), + Ref: ref(metav1.FieldsV1{}.OpenAPIModelName()), }, }, "subresource": { @@ -19333,7 +20330,7 @@ func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.FieldsV1{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -19408,13 +20405,13 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope "creationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionTimestamp": { SchemaProps: spec.SchemaProps{ Description: "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + Ref: ref(metav1.Time{}.OpenAPIModelName()), }, }, "deletionGracePeriodSeconds": { @@ -19474,7 +20471,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Ref: ref(metav1.OwnerReference{}.OpenAPIModelName()), }, }, }, @@ -19514,7 +20511,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + Ref: ref(metav1.ManagedFieldsEntry{}.OpenAPIModelName()), }, }, }, @@ -19524,7 +20521,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + metav1.ManagedFieldsEntry{}.OpenAPIModelName(), metav1.OwnerReference{}.OpenAPIModelName(), metav1.Time{}.OpenAPIModelName()}, } } @@ -19618,14 +20615,14 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + metav1.ObjectMeta{}.OpenAPIModelName()}, } } @@ -19654,7 +20651,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "items": { @@ -19665,7 +20662,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Ref: ref(metav1.PartialObjectMetadata{}.OpenAPIModelName()), }, }, }, @@ -19676,7 +20673,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.PartialObjectMetadata{}.OpenAPIModelName()}, } } @@ -19875,7 +20872,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "status": { @@ -19900,14 +20897,9 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, "details": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, SchemaProps: spec.SchemaProps{ Description: "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), + Ref: ref(metav1.StatusDetails{}.OpenAPIModelName()), }, }, "code": { @@ -19921,7 +20913,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.StatusDetails{}.OpenAPIModelName()}, } } @@ -20007,7 +20999,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Ref: ref(metav1.StatusCause{}.OpenAPIModelName()), }, }, }, @@ -20024,7 +21016,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, + metav1.StatusCause{}.OpenAPIModelName()}, } } @@ -20053,7 +21045,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Ref: ref(metav1.ListMeta{}.OpenAPIModelName()), }, }, "columnDefinitions": { @@ -20069,7 +21061,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Ref: ref(metav1.TableColumnDefinition{}.OpenAPIModelName()), }, }, }, @@ -20088,7 +21080,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Ref: ref(metav1.TableRow{}.OpenAPIModelName()), }, }, }, @@ -20099,7 +21091,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, + metav1.ListMeta{}.OpenAPIModelName(), metav1.TableColumnDefinition{}.OpenAPIModelName(), metav1.TableRow{}.OpenAPIModelName()}, } } @@ -20230,7 +21222,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Ref: ref(metav1.TableRowCondition{}.OpenAPIModelName()), }, }, }, @@ -20239,7 +21231,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA "object": { SchemaProps: spec.SchemaProps{ Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -20247,7 +21239,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + metav1.TableRowCondition{}.OpenAPIModelName(), runtime.RawExtension{}.OpenAPIModelName()}, } } @@ -20442,7 +21434,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope "object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Ref: ref(runtime.RawExtension{}.OpenAPIModelName()), }, }, }, @@ -20450,7 +21442,7 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + runtime.RawExtension{}.OpenAPIModelName()}, } } diff --git a/pkg/git/git.go b/pkg/git/git.go index 6b324c84..47f62649 100644 --- a/pkg/git/git.go +++ b/pkg/git/git.go @@ -575,4 +575,4 @@ func (g *GoGit) CurrentReference() (string, error) { return "", fmt.Errorf("could not get git HEAD: %w", err) } return h.Hash().String(), nil -} \ No newline at end of file +} diff --git a/pkg/git/refs.go b/pkg/git/refs.go index 2ba0effe..80f56903 100644 --- a/pkg/git/refs.go +++ b/pkg/git/refs.go @@ -29,7 +29,6 @@ const ( BranchPrefixInLocalRepo = "refs/heads/" TagsPrefixInLocalRepo = "refs/tags/" TagsPrefixInRemoteRepo = "refs/tags/" - ) var ( diff --git a/pkg/output/prometheusserver/handler_prometheus.go b/pkg/output/prometheusserver/handler_prometheus.go index 6a0a6156..4b486b53 100644 --- a/pkg/output/prometheusserver/handler_prometheus.go +++ b/pkg/output/prometheusserver/handler_prometheus.go @@ -36,9 +36,9 @@ func (r *PrometheusServer) Collect(ch chan<- prometheus.Metric) { log := log.FromContext(ctx) runtimes := make([]targetruntimeview.TargetRuntimeView, 0) - r.targetManager.ForEachRuntime(func(rt targetruntimeview.TargetRuntimeView) { - runtimes = append(runtimes, rt) - }) + r.targetManager.ForEachRuntime(func(rt targetruntimeview.TargetRuntimeView) { + runtimes = append(runtimes, rt) + }) log.Info("prometheus collect", "targets", len(runtimes)) wg1 := new(sync.WaitGroup) diff --git a/pkg/output/prometheusserver/server.go b/pkg/output/prometheusserver/server.go index f912e76e..9ef33114 100644 --- a/pkg/output/prometheusserver/server.go +++ b/pkg/output/prometheusserver/server.go @@ -29,7 +29,6 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" targetruntimeview "github.com/sdcio/config-server/pkg/sdc/target/runtimeview" certutil "k8s.io/client-go/util/cert" - ) type Config struct { diff --git a/pkg/reconcilers/all/all.go b/pkg/reconcilers/all/all.go index ed606c30..15be5299 100644 --- a/pkg/reconcilers/all/all.go +++ b/pkg/reconcilers/all/all.go @@ -19,12 +19,12 @@ package all import ( _ "github.com/sdcio/config-server/pkg/reconcilers/configset" _ "github.com/sdcio/config-server/pkg/reconcilers/discoveryrule" + _ "github.com/sdcio/config-server/pkg/reconcilers/rollout" _ "github.com/sdcio/config-server/pkg/reconcilers/schema" + _ "github.com/sdcio/config-server/pkg/reconcilers/subscription" _ "github.com/sdcio/config-server/pkg/reconcilers/target" - _ "github.com/sdcio/config-server/pkg/reconcilers/targetrecovery" _ "github.com/sdcio/config-server/pkg/reconcilers/targetconfig" _ "github.com/sdcio/config-server/pkg/reconcilers/targetdatastore" - _ "github.com/sdcio/config-server/pkg/reconcilers/subscription" + _ "github.com/sdcio/config-server/pkg/reconcilers/targetrecovery" _ "github.com/sdcio/config-server/pkg/reconcilers/workspace" - _ "github.com/sdcio/config-server/pkg/reconcilers/rollout" ) diff --git a/pkg/reconcilers/configset/reconciler.go b/pkg/reconcilers/configset/reconciler.go index 81353dfb..308f3555 100644 --- a/pkg/reconcilers/configset/reconciler.go +++ b/pkg/reconcilers/configset/reconciler.go @@ -20,6 +20,7 @@ import ( "context" merrors "errors" "fmt" + "reflect" "sort" "strings" @@ -28,16 +29,17 @@ import ( condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" "github.com/sdcio/config-server/apis/config" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/eventhandler" "github.com/sdcio/config-server/pkg/reconcilers/resource" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -49,9 +51,10 @@ func init() { } const ( - crName = "configset" - reconcilerName = "ConfigSetController" - finalizer = "configset.config.sdcio.dev/finalizer" + crName = "configset" + fieldmanagerfinalizer = "ConfigSetController-finalizer" + reconcilerName = "ConfigSetController" + finalizer = "configset.config.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateDataStore = "cannot update datastore" @@ -62,21 +65,32 @@ const ( func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c interface{}) (map[schema.GroupVersionKind]chan event.GenericEvent, error) { r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := configv1alpha1apply.ConfigSet(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). Owns(&configv1alpha1.Config{}). For(&configv1alpha1.ConfigSet{}). - Watches(&invv1alpha1.Target{}, &eventhandler.TargetForConfigSet{Client: mgr.GetClient(), ControllerName: reconcilerName}). + Watches(&configv1alpha1.Target{}, &eventhandler.TargetForConfigSet{Client: mgr.GetClient(), ControllerName: reconcilerName}). Complete(r) } type reconciler struct { - client client.Client + client client.Client finalizer *resource.APIFinalizer - recorder record.EventRecorder + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -159,7 +173,7 @@ func (r *reconciler) unrollDownstreamTargets(ctx context.Context, configSet *con client.MatchingLabelsSelector{Selector: selector}, } - targetList := &invv1alpha1.TargetList{} + targetList := &configv1alpha1.TargetList{} if err := r.client.List(ctx, targetList, opts...); err != nil { return nil, err } @@ -184,9 +198,9 @@ func (r *reconciler) ensureConfigs(ctx context.Context, configSet *configv1alpha existingConfigs := r.getOrphanConfigsFromConfigSet(ctx, configSet) // TODO run in parallel and/or try 1 first to see if the validation works or not - TargetsStatus := make([]configv1alpha1.TargetStatus, len(targets)) + TargetsStatus := make([]configv1alpha1.ConfigSetTargetStatus, len(targets)) for i, target := range targets { - TargetsStatus[i] = configv1alpha1.TargetStatus{Name: target.Name} + TargetsStatus[i] = configv1alpha1.ConfigSetTargetStatus{Name: target.Name} var oldConfig *configv1alpha1.Config newConfig := buildConfig(ctx, configSet, target) @@ -247,7 +261,7 @@ func (r *reconciler) ensureConfigs(ctx context.Context, configSet *configv1alpha } if oldHash == newHash { - TargetsStatus[i] = configv1alpha1.TargetStatus{ + TargetsStatus[i] = configv1alpha1.ConfigSetTargetStatus{ Name: target.Name, Condition: oldConfig.GetCondition(condv1alpha1.ConditionTypeReady), } @@ -319,7 +333,7 @@ func buildConfig(_ context.Context, configSet *configv1alpha1.ConfigSet, target Kind: configSet.Kind, Name: configSet.Name, UID: configSet.UID, - Controller: ptr.To[bool](true), + Controller: ptr.To(true), }, }, }, @@ -327,6 +341,7 @@ func buildConfig(_ context.Context, configSet *configv1alpha1.ConfigSet, target Lifecycle: configSet.Spec.Lifecycle, Priority: configSet.Spec.Priority, Config: configSet.Spec.Config, + Revertive: configSet.Spec.Revertive, }, configv1alpha1.ConfigStatus{}, ) @@ -334,17 +349,25 @@ func buildConfig(_ context.Context, configSet *configv1alpha1.ConfigSet, target func (r *reconciler) handleSuccess(ctx context.Context, configSetOrig, configSet *configv1alpha1.ConfigSet) error { log := log.FromContext(ctx) - log.Debug("handleSuccess", "key", configSet.GetNamespacedName(), "status old", configSet.DeepCopy().Status) - // take a snapshot of the current object - patch := client.MergeFrom(configSetOrig) - // update status - configSet.SetConditions(condv1alpha1.Ready()) - r.recorder.Eventf(configSet, corev1.EventTypeNormal, configv1alpha1.ConfigSetKind, "ready") + newCond := condv1alpha1.Ready() + oldCond := configSetOrig.GetCondition(condv1alpha1.ConditionTypeReady) + + if newCond.Equal(oldCond) && reflect.DeepEqual(configSet.Status.Targets, configSetOrig.Status.Targets) { + log.Info("handleSuccess -> no change") + return nil + } - log.Debug("handleSuccess", "key", configSet.GetNamespacedName(), "status new", configSet.Status) + r.recorder.Eventf(configSet, nil, corev1.EventTypeNormal, configv1alpha1.ConfigSetKind, "ready", "") - return r.client.Status().Patch(ctx, configSet, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + statusApply := configv1alpha1apply.ConfigSetStatus(). + WithConditions(newCond). + WithTargets(targetStatusToApply(configSet.Status.Targets)...) + + applyConfig := configv1alpha1apply.ConfigSet(configSet.Name, configSet.Namespace). + WithStatus(statusApply) + + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) @@ -352,21 +375,34 @@ func (r *reconciler) handleSuccess(ctx context.Context, configSetOrig, configSet func (r *reconciler) handleError(ctx context.Context, configSetOrig, configSet *configv1alpha1.ConfigSet, msg string, err error) error { log := log.FromContext(ctx) - // take a snapshot of the current object - patch := client.MergeFrom(configSetOrig.DeepCopy()) - if err != nil { msg = fmt.Sprintf("%s err %s", msg, err.Error()) } - configSet.SetConditions(condv1alpha1.Failed(msg)) + + newCond := condv1alpha1.Failed(msg) + oldCond := configSetOrig.GetCondition(condv1alpha1.ConditionTypeReady) + + if newCond.Equal(oldCond) && reflect.DeepEqual(configSet.Status.Targets, configSetOrig.Status.Targets) { + log.Info("handleError -> no change") + return nil + } + log.Error(msg) - r.recorder.Eventf(configSet, corev1.EventTypeWarning, configv1alpha1.ConfigSetKind, msg) + r.recorder.Eventf(configSet, nil, corev1.EventTypeWarning, configv1alpha1.ConfigSetKind, msg, "") + + statusApply := configv1alpha1apply.ConfigSetStatus(). + WithConditions(newCond). + WithTargets(targetStatusToApply(configSet.Status.Targets)...) + + applyConfig := configv1alpha1apply.ConfigSet(configSet.Name, configSet.Namespace). + WithStatus(statusApply) - return r.client.Status().Patch(ctx, configSet, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) + } func (r *reconciler) determineOverallStatus(_ context.Context, configSet *configv1alpha1.ConfigSet) string { @@ -378,3 +414,13 @@ func (r *reconciler) determineOverallStatus(_ context.Context, configSet *config } return sb.String() } + +func targetStatusToApply(targets []configv1alpha1.ConfigSetTargetStatus) []*configv1alpha1apply.ConfigSetTargetStatusApplyConfiguration { + result := make([]*configv1alpha1apply.ConfigSetTargetStatusApplyConfiguration, 0, len(targets)) + for _, t := range targets { + result = append(result, configv1alpha1apply.ConfigSetTargetStatus(). + WithName(t.Name), + ) + } + return result +} diff --git a/pkg/reconcilers/ctrlconfig/config.go b/pkg/reconcilers/ctrlconfig/config.go index 1e196380..ecd86a99 100644 --- a/pkg/reconcilers/ctrlconfig/config.go +++ b/pkg/reconcilers/ctrlconfig/config.go @@ -20,11 +20,11 @@ import ( "context" "github.com/henderiw/logger/log" + dsmanager "github.com/sdcio/config-server/pkg/sdc/dataserver/manager" + targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/discovery" "sigs.k8s.io/controller-runtime/pkg/manager" - dsmanager "github.com/sdcio/config-server/pkg/sdc/dataserver/manager" - targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" ) type ControllerConfig struct { @@ -32,8 +32,8 @@ type ControllerConfig struct { //DataServerStore storebackend.Storer[sdcctx.DSContext] SchemaDir string WorkspaceDir string - DataServerManager *dsmanager.DSConnManager - TargetManager *targetmanager.TargetManager + DataServerManager *dsmanager.DSConnManager + TargetManager *targetmanager.TargetManager } func InitContext(ctx context.Context, controllerName string, req types.NamespacedName) context.Context { diff --git a/pkg/reconcilers/discoveryrule/profiles_test.go b/pkg/reconcilers/discoveryrule/profiles_test.go index 651a5b83..b4b8f734 100644 --- a/pkg/reconcilers/discoveryrule/profiles_test.go +++ b/pkg/reconcilers/discoveryrule/profiles_test.go @@ -42,7 +42,7 @@ func createFakeClient(secret, targetConnProfile, targetSyncProfile string) clien if err := clientgoscheme.AddToScheme(runScheme); err != nil { log.Error("cannot add scheme", "err", err) } - if err := invv1alpha1.AddToScheme(runScheme) ; err != nil { + if err := invv1alpha1.AddToScheme(runScheme); err != nil { log.Error("cannot add scheme", "err", err) } client := fake.NewClientBuilder().WithScheme(runScheme).Build() diff --git a/pkg/reconcilers/discoveryrule/reconciler.go b/pkg/reconcilers/discoveryrule/reconciler.go index 6d261010..b57789c8 100644 --- a/pkg/reconcilers/discoveryrule/reconciler.go +++ b/pkg/reconcilers/discoveryrule/reconciler.go @@ -28,15 +28,16 @@ import ( condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "github.com/sdcio/config-server/pkg/discovery/discoveryrule" + invv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/eventhandler" "github.com/sdcio/config-server/pkg/reconcilers/resource" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/record" - "k8s.io/utils/ptr" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -47,9 +48,10 @@ func init() { } const ( - crName = "discoveryrule" - reconcilerName = "DiscoveryRuleController" - finalizer = "discoveryrule.inv.sdcio.dev/finalizer" + crName = "discoveryrule" + fieldmanagerfinalizer = "DiscoveryRuleController-finalizer" + reconcilerName = "DiscoveryRuleController" + finalizer = "discoveryrule.inv.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateStatus = "cannot update status" @@ -63,9 +65,21 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := invv1alpha1apply.DiscoveryRule(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) r.discoveryStore = memstore.NewStore[discoveryrule.DiscoveryRule]() - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) + r.baseCtx = ctx return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). @@ -77,11 +91,12 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } type reconciler struct { - client client.Client + client client.Client finalizer *resource.APIFinalizer discoveryStore storebackend.Storer[discoveryrule.DiscoveryRule] - recorder record.EventRecorder + recorder events.EventRecorder + baseCtx context.Context // manager-scoped, lives until shutdown } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -115,7 +130,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } // stop and delete the discovery rule - dr.Stop(ctx) + dr.Stop(r.baseCtx) if err := r.discoveryStore.Delete(ctx, key); err != nil { return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, discoveryRuleOrig, "cannot delete discoveryRule from store", err), errUpdateStatus) @@ -137,6 +152,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, discoveryRuleOrig, "cannot add finalizer", err), errUpdateStatus) } + // check if the discovery rule is running isDRRunning := false dr, err := r.discoveryStore.Get(ctx, key) @@ -175,12 +191,12 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu // new discovery initialization -> create or update (we deleted the DRConfig before) if err := r.discoveryStore.Create(ctx, key, dr); err != nil { // given this is a ummutable field this means the CR will have to be deleted/recreated - return ctrl.Result{Requeue: true}, + return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, discoveryRuleOrig, "cannot get normalized discoveryRule", err), errUpdateStatus) } go func() { - if err := dr.Run(ctx); err != nil { + if err := dr.Run(r.baseCtx); err != nil { log.Error("run error", "err", err) } }() @@ -195,9 +211,9 @@ func (r *reconciler) HasChanged(ctx context.Context, newDRConfig, currentDRConfi if newDRConfig.DiscoveryProfile != nil { log.Info("HasChanged", - "CR RV", fmt.Sprintf("%s/%s", - newDRConfig.CR.GetResourceVersion(), - currentDRConfig.CR.GetResourceVersion(), + "CR Generation", fmt.Sprintf("%d/%d", + newDRConfig.CR.GetGeneration(), + currentDRConfig.CR.GetGeneration(), ), "DiscoveryProfile Secret RV", fmt.Sprintf("%s/%s", newDRConfig.DiscoveryProfile.SecretResourceVersion, @@ -210,13 +226,14 @@ func (r *reconciler) HasChanged(ctx context.Context, newDRConfig, currentDRConfi ) } else { log.Info("HasChanged", - "CR RV", fmt.Sprintf("%s/%s", - newDRConfig.CR.GetResourceVersion(), - currentDRConfig.CR.GetResourceVersion(), + "CR Generation", fmt.Sprintf("%d/%d", + newDRConfig.CR.GetGeneration(), + currentDRConfig.CR.GetGeneration(), ), ) } - if newDRConfig.CR.GetResourceVersion() != currentDRConfig.CR.GetResourceVersion() { + + if newDRConfig.CR.GetGeneration() != currentDRConfig.CR.GetGeneration() { return true } @@ -244,10 +261,10 @@ func (r *reconciler) HasChanged(ctx context.Context, newDRConfig, currentDRConfi if newDRConfig.TargetConnectionProfiles[i].SecretResourceVersion != currentDRConfig.TargetConnectionProfiles[i].SecretResourceVersion { return true } - if newDRConfig.TargetConnectionProfiles[i].Connectionprofile.ResourceVersion != currentDRConfig.TargetConnectionProfiles[i].Connectionprofile.ResourceVersion { + if newDRConfig.TargetConnectionProfiles[i].Connectionprofile.Generation != currentDRConfig.TargetConnectionProfiles[i].Connectionprofile.Generation { return true } - if newDRConfig.TargetConnectionProfiles[i].Syncprofile.ResourceVersion != currentDRConfig.TargetConnectionProfiles[i].Syncprofile.ResourceVersion { + if newDRConfig.TargetConnectionProfiles[i].Syncprofile.Generation != currentDRConfig.TargetConnectionProfiles[i].Syncprofile.Generation { return true } } @@ -258,20 +275,28 @@ func (r *reconciler) HasChanged(ctx context.Context, newDRConfig, currentDRConfi func (r *reconciler) handleSuccess(ctx context.Context, discoveryRule *invv1alpha1.DiscoveryRule, changed bool) error { log := log.FromContext(ctx) log.Debug("handleSuccess", "key", discoveryRule.GetNamespacedName(), "status old", discoveryRule.DeepCopy().Status) - // take a snapshot of the current object - //patch := client.MergeFrom(discoveryRule.DeepCopy()) - // update status - discoveryRule.ManagedFields = nil - discoveryRule.SetConditions(condv1alpha1.Ready()) + + newCond := condv1alpha1.Ready() + oldCond := discoveryRule.GetCondition(condv1alpha1.ConditionTypeReady) + + if newCond.Equal(oldCond) && !changed { + log.Info("handleSuccess -> no change") + return nil + } + + statusApply := invv1alpha1apply.DiscoveryRuleStatus(). + WithConditions(newCond) + if changed { - discoveryRule.Status.StartTime = ptr.To(metav1.Now()) - r.recorder.Eventf(discoveryRule, corev1.EventTypeNormal, invv1alpha1.DiscoveryRuleKind, "ready") + statusApply = statusApply.WithStartTime(metav1.Now()) + r.recorder.Eventf(discoveryRule, nil, corev1.EventTypeNormal, invv1alpha1.DiscoveryRuleKind, "ready", "") } - log.Debug("handleSuccess", "key", discoveryRule.GetNamespacedName(), "status new", discoveryRule.Status) + applyConfig := invv1alpha1apply.DiscoveryRule(discoveryRule.Name, discoveryRule.Namespace). + WithStatus(statusApply) - return r.client.Status().Patch(ctx, discoveryRule, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) @@ -279,20 +304,28 @@ func (r *reconciler) handleSuccess(ctx context.Context, discoveryRule *invv1alph func (r *reconciler) handleError(ctx context.Context, discoveryRule *invv1alpha1.DiscoveryRule, msg string, err error) error { log := log.FromContext(ctx) - // take a snapshot of the current object - //patch := client.MergeFrom(discoveryRule.DeepCopy()) if err != nil { msg = fmt.Sprintf("%s err %s", msg, err.Error()) } - discoveryRule.ManagedFields = nil - discoveryRule.Status.StartTime = ptr.To(metav1.Now()) - discoveryRule.SetConditions(condv1alpha1.Failed(msg)) + + newCond := condv1alpha1.Failed(msg) + oldCond := discoveryRule.GetCondition(condv1alpha1.ConditionTypeReady) + + // always update on error since StartTime changes + _ = oldCond + log.Error(msg) - r.recorder.Eventf(discoveryRule, corev1.EventTypeWarning, invv1alpha1.DiscoveryRuleKind, msg) + r.recorder.Eventf(discoveryRule, nil, corev1.EventTypeWarning, invv1alpha1.DiscoveryRuleKind, msg, "") + + applyConfig := invv1alpha1apply.DiscoveryRule(discoveryRule.Name, discoveryRule.Namespace). + WithStatus(invv1alpha1apply.DiscoveryRuleStatus(). + WithConditions(newCond). + WithStartTime(metav1.Now()), + ) - return r.client.Status().Patch(ctx, discoveryRule, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) diff --git a/pkg/reconcilers/eventhandler/watch_config_for_target.go b/pkg/reconcilers/eventhandler/watch_config_for_target.go index eac14eb5..fa95d69c 100644 --- a/pkg/reconcilers/eventhandler/watch_config_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_config_for_target.go @@ -64,7 +64,6 @@ func (r *ConfigForTargetEventHandler) add(ctx context.Context, obj runtime.Objec ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "config-event", Name: config.GetName()}) log := log.FromContext(ctx) - targetKey, err := config.GetTargetNamespaceName() if err != nil { log.Error(err.Error()) diff --git a/pkg/reconcilers/eventhandler/watch_deviation_for_config.go b/pkg/reconcilers/eventhandler/watch_deviation_for_config.go index f6c873cd..03b470c3 100644 --- a/pkg/reconcilers/eventhandler/watch_deviation_for_config.go +++ b/pkg/reconcilers/eventhandler/watch_deviation_for_config.go @@ -64,13 +64,12 @@ func (r *DeviationForConfigEventHandler) add(ctx context.Context, obj runtime.Ob ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "deviation-event", Name: deviation.GetName()}) log := log.FromContext(ctx) - for _, owner := range deviation.OwnerReferences { if owner.APIVersion == configv1alpha1.SchemeGroupVersion.String() && owner.Kind == configv1alpha1.ConfigKind { key := types.NamespacedName{ Namespace: deviation.Namespace, Name: deviation.Name, - } + } log.Info("event requeue config from deviation", "key", key.String()) queue.Add(reconcile.Request{NamespacedName: key}) } diff --git a/pkg/reconcilers/eventhandler/watch_deviation_for_target.go b/pkg/reconcilers/eventhandler/watch_deviation_for_target.go index 8104d1c3..73cc865f 100644 --- a/pkg/reconcilers/eventhandler/watch_deviation_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_deviation_for_target.go @@ -64,7 +64,6 @@ func (r *DeviationForTargetEventHandler) add(ctx context.Context, obj runtime.Ob ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "deviation-event", Name: deviation.GetName()}) log := log.FromContext(ctx) - targetKey, err := deviation.GetTargetNamespaceName() if err != nil { log.Error(err.Error()) diff --git a/pkg/reconcilers/eventhandler/watch_schema_for_target.go b/pkg/reconcilers/eventhandler/watch_schema_for_target.go index 0b798c15..ba307ff0 100644 --- a/pkg/reconcilers/eventhandler/watch_schema_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_schema_for_target.go @@ -21,6 +21,7 @@ import ( "fmt" "github.com/henderiw/logger/log" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -69,7 +70,7 @@ func (r *SchemaForTargetEventHandler) add(ctx context.Context, obj runtime.Objec opts := []client.ListOption{ client.InNamespace(cr.Namespace), } - targets := &invv1alpha1.TargetList{} + targets := &configv1alpha1.TargetList{} if err := r.Client.List(ctx, targets, opts...); err != nil { log.Error("cannot list targets", "error", err) return diff --git a/pkg/reconcilers/eventhandler/watch_secret_for_target.go b/pkg/reconcilers/eventhandler/watch_secret_for_target.go index c923dc9a..7ecf7f39 100644 --- a/pkg/reconcilers/eventhandler/watch_secret_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_secret_for_target.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/henderiw/logger/log" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -70,7 +70,7 @@ func (r *SecretForTargetEventHandler) add(ctx context.Context, obj runtime.Objec opts := []client.ListOption{ client.InNamespace(cr.Namespace), } - targets := &invv1alpha1.TargetList{} + targets := &configv1alpha1.TargetList{} if err := r.Client.List(ctx, targets, opts...); err != nil { log.Error("cannot list targets", "error", err) return diff --git a/pkg/reconcilers/eventhandler/watch_target_for_config.go b/pkg/reconcilers/eventhandler/watch_target_for_config.go index c9dcb1d3..b4c12d0c 100644 --- a/pkg/reconcilers/eventhandler/watch_target_for_config.go +++ b/pkg/reconcilers/eventhandler/watch_target_for_config.go @@ -22,7 +22,6 @@ import ( "github.com/henderiw/logger/log" "github.com/sdcio/config-server/apis/config" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -59,14 +58,14 @@ func (r *TargetForConfigEventHandler) Generic(ctx context.Context, evt event.Gen } func (r *TargetForConfigEventHandler) add(ctx context.Context, obj runtime.Object, queue adder) { - target, ok := obj.(*invv1alpha1.Target) + target, ok := obj.(*configv1alpha1.Target) if !ok { return } ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "target-event", Name: target.GetName()}) log := log.FromContext(ctx) - log.Debug("event", "gvk", invv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) + log.Debug("event", "gvk", configv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) // list all the configs of the particular target that got changed opts := []client.ListOption{ diff --git a/pkg/reconcilers/eventhandler/watch_target_for_configset.go b/pkg/reconcilers/eventhandler/watch_target_for_configset.go index aff505b9..a01f42bc 100644 --- a/pkg/reconcilers/eventhandler/watch_target_for_configset.go +++ b/pkg/reconcilers/eventhandler/watch_target_for_configset.go @@ -21,7 +21,6 @@ import ( "github.com/henderiw/logger/log" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -60,14 +59,14 @@ func (r *TargetForConfigSet) Generic(ctx context.Context, evt event.GenericEvent } func (r *TargetForConfigSet) add(ctx context.Context, obj runtime.Object, queue adder) { - target, ok := obj.(*invv1alpha1.Target) + target, ok := obj.(*configv1alpha1.Target) if !ok { return } ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "target-event", Name: target.GetName()}) log := log.FromContext(ctx) - log.Debug("event", "gvk", invv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) + log.Debug("event", "gvk", configv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) // list the configsets and see opts := []client.ListOption{ diff --git a/pkg/reconcilers/eventhandler/watch_target_for_subscription.go b/pkg/reconcilers/eventhandler/watch_target_for_subscription.go index c1a2718e..725d0bd3 100644 --- a/pkg/reconcilers/eventhandler/watch_target_for_subscription.go +++ b/pkg/reconcilers/eventhandler/watch_target_for_subscription.go @@ -20,6 +20,7 @@ import ( "context" "github.com/henderiw/logger/log" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -59,14 +60,14 @@ func (r *TargetForSubscriptionEventHandler) Generic(ctx context.Context, evt eve } func (r *TargetForSubscriptionEventHandler) add(ctx context.Context, obj runtime.Object, queue adder) { - target, ok := obj.(*invv1alpha1.Target) + target, ok := obj.(*configv1alpha1.Target) if !ok { return } ctx = ctrlconfig.InitContext(ctx, r.ControllerName, types.NamespacedName{Namespace: "target-event", Name: target.GetName()}) log := log.FromContext(ctx) - log.Debug("event", "gvk", invv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) + log.Debug("event", "gvk", configv1alpha1.TargetGroupVersionKind.String(), "name", target.GetName()) // list the configsets and see opts := []client.ListOption{ diff --git a/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_dr.go b/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_dr.go index 43dc3d57..3c1a9beb 100644 --- a/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_dr.go +++ b/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_dr.go @@ -30,7 +30,7 @@ import ( ) type TargetConnProfileForDiscoveryRuleEventHandler struct { - Client client.Client + Client client.Client } // Create enqueues a request @@ -68,7 +68,7 @@ func (r *TargetConnProfileForDiscoveryRuleEventHandler) add(ctx context.Context, opts := []client.ListOption{ client.InNamespace(cr.Namespace), } - drs := &invv1alpha1.DiscoveryRuleList{} + drs := &invv1alpha1.DiscoveryRuleList{} if err := r.Client.List(ctx, drs, opts...); err != nil { log.Error("cannot list discovery rules", "error", err) return diff --git a/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_target.go b/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_target.go index 7fb8553f..496c178b 100644 --- a/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_targetconnprofile_for_target.go @@ -21,6 +21,7 @@ import ( "fmt" "github.com/henderiw/logger/log" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -69,7 +70,7 @@ func (r *TargetConnProfileForTargetEventHandler) add(ctx context.Context, obj ru opts := []client.ListOption{ client.InNamespace(cr.Namespace), } - targets := &invv1alpha1.TargetList{} + targets := &configv1alpha1.TargetList{} if err := r.Client.List(ctx, targets, opts...); err != nil { log.Error("cannot list targets", "error", err) return diff --git a/pkg/reconcilers/eventhandler/watch_targetsyncprofile_for_target.go b/pkg/reconcilers/eventhandler/watch_targetsyncprofile_for_target.go index a1aa2f0a..c1e2e00f 100644 --- a/pkg/reconcilers/eventhandler/watch_targetsyncprofile_for_target.go +++ b/pkg/reconcilers/eventhandler/watch_targetsyncprofile_for_target.go @@ -21,6 +21,7 @@ import ( "fmt" "github.com/henderiw/logger/log" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -69,7 +70,7 @@ func (r *TargetSyncProfileForTargetEventHandler) add(ctx context.Context, obj ru opts := []client.ListOption{ client.InNamespace(cr.Namespace), } - targets := &invv1alpha1.TargetList{} + targets := &configv1alpha1.TargetList{} if err := r.Client.List(ctx, targets, opts...); err != nil { log.Error("cannot list targets", "error", err) return diff --git a/pkg/reconcilers/resource/errors.go b/pkg/reconcilers/resource/errors.go index 1c6425f8..5706a7cf 100644 --- a/pkg/reconcilers/resource/errors.go +++ b/pkg/reconcilers/resource/errors.go @@ -20,10 +20,6 @@ import ( "k8s.io/apimachinery/pkg/api/errors" ) -const ( - errUpdateObject = "cannot update k8s resource" -) - type ErrorIs func(err error) bool func Ignore(is ErrorIs, err error) error { diff --git a/pkg/reconcilers/resource/fake.go b/pkg/reconcilers/resource/fake.go index d9cb9e85..5c584d06 100644 --- a/pkg/reconcilers/resource/fake.go +++ b/pkg/reconcilers/resource/fake.go @@ -33,6 +33,9 @@ type MockGetFn func(ctx context.Context, key client.ObjectKey, obj client.Object // A MockListFn is used to mock client.Client's List implementation. type MockListFn func(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error +// A MockApplyFn is used to mock client.Client's Apply implementation. +type MockApplyFn func(ctx context.Context, cfg runtime.ApplyConfiguration, opts ...client.ApplyOption) error + // A MockCreateFn is used to mock client.Client's Create implementation. type MockCreateFn func(ctx context.Context, obj client.Object, opts ...client.CreateOption) error @@ -60,6 +63,9 @@ type MockSubResourceUpdateFn func(ctx context.Context, obj client.Object, opts . // A MockSubResourcePatchFn is used to mock client.SubResourceClient's patch implementation. type MockSubResourcePatchFn func(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error +// A MockSubResourceApplyFn is used to mock client.SubResourceClient's apply implementation. +type MockSubResourceApplyFn func(ctx context.Context, cfg runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error + // A MockSchemeFn is used to mock client.Client's Scheme implementation. type MockSchemeFn func() *runtime.Scheme @@ -71,6 +77,21 @@ type ObjectFn func(obj client.Object) error // ObjectListFn to test or update the contents of an ObjectList. type ObjectListFn func(obj client.ObjectList) error +// An ApplyConfigurationFn operates on the supplied ApplyConfiguration. +type ApplyConfigurationFn func(cfg runtime.ApplyConfiguration) error + +// NewMockApplyFn returns a MockApplyFn that returns the supplied error. +func NewMockApplyFn(err error, afn ...ApplyConfigurationFn) MockApplyFn { + return func(_ context.Context, cfg runtime.ApplyConfiguration, _ ...client.ApplyOption) error { + for _, fn := range afn { + if err := fn(cfg); err != nil { + return err + } + } + return err + } +} + // NewMockGetFn returns a MockGetFn that returns the supplied error. func NewMockGetFn(err error, ofn ...ObjectFn) MockGetFn { return func(_ context.Context, _ client.ObjectKey, obj client.Object) error { @@ -191,6 +212,18 @@ func NewMockSubResourcePatchFn(err error, ofn ...ObjectFn) MockSubResourcePatchF } } +// NewMockSubResourceApplyFn returns a MockSubResourceApplyFn that returns the supplied error. +func NewMockSubResourceApplyFn(err error, afn ...ApplyConfigurationFn) MockSubResourceApplyFn { + return func(_ context.Context, cfg runtime.ApplyConfiguration, _ ...client.SubResourceApplyOption) error { + for _, fn := range afn { + if err := fn(cfg); err != nil { + return err + } + } + return err + } +} + // NewMockSchemeFn returns a MockSchemeFn that returns the scheme func NewMockSchemeFn(scheme *runtime.Scheme) MockSchemeFn { return func() *runtime.Scheme { @@ -205,6 +238,7 @@ func NewMockSchemeFn(scheme *runtime.Scheme) MockSchemeFn { type MockClient struct { MockGet MockGetFn MockList MockListFn + MockApply MockApplyFn MockCreate MockCreateFn MockDelete MockDeleteFn MockDeleteAllOf MockDeleteAllOfFn @@ -214,11 +248,13 @@ type MockClient struct { MockStatusCreate MockSubResourceCreateFn MockStatusUpdate MockSubResourceUpdateFn MockStatusPatch MockSubResourcePatchFn + MockStatusApply MockSubResourceApplyFn MockSubResourceGet MockSubResourceGetFn MockSubResourceCreate MockSubResourceCreateFn MockSubResourceUpdate MockSubResourceUpdateFn MockSubResourcePatch MockSubResourcePatchFn + MockSubResourceApply MockSubResourceApplyFn MockScheme MockSchemeFn } @@ -229,19 +265,33 @@ func NewMockClient() *MockClient { return &MockClient{ MockGet: NewMockGetFn(nil), MockList: NewMockListFn(nil), + MockApply: NewMockApplyFn(nil), MockCreate: NewMockCreateFn(nil), MockDelete: NewMockDeleteFn(nil), MockDeleteAllOf: NewMockDeleteAllOfFn(nil), MockUpdate: NewMockUpdateFn(nil), MockPatch: NewMockPatchFn(nil), + MockStatusCreate: NewMockSubResourceCreateFn(nil), MockStatusUpdate: NewMockSubResourceUpdateFn(nil), MockStatusPatch: NewMockSubResourcePatchFn(nil), + MockStatusApply: NewMockSubResourceApplyFn(nil), + + MockSubResourceGet: nil, // Initialize to nil as it's optional + MockSubResourceCreate: NewMockSubResourceCreateFn(nil), + MockSubResourceUpdate: NewMockSubResourceUpdateFn(nil), + MockSubResourcePatch: NewMockSubResourcePatchFn(nil), + MockSubResourceApply: NewMockSubResourceApplyFn(nil), MockScheme: NewMockSchemeFn(nil), } } +// Apply calls MockClient's MockApply function. +func (c *MockClient) Apply(ctx context.Context, cfg runtime.ApplyConfiguration, opts ...client.ApplyOption) error { + return c.MockApply(ctx, cfg, opts...) +} + // Get calls MockClient's MockGet function. func (c *MockClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, _ ...client.GetOption) error { return c.MockGet(ctx, key, obj) @@ -283,16 +333,18 @@ func (c *MockClient) Status() client.SubResourceWriter { MockCreate: c.MockStatusCreate, MockUpdate: c.MockStatusUpdate, MockPatch: c.MockStatusPatch, + MockApply: c.MockStatusApply, } } -// SubResource is unimplemented. It panics if called. -func (c *MockClient) SubResource(_ string) client.SubResourceClient { +// SubResource returns a client for the specified subresource +func (c *MockClient) SubResource(subResource string) client.SubResourceClient { return &MockSubResourceClient{ MockGet: c.MockSubResourceGet, MockCreate: c.MockSubResourceCreate, MockUpdate: c.MockSubResourceUpdate, MockPatch: c.MockSubResourcePatch, + MockApply: c.MockSubResourceApply, } } @@ -314,16 +366,20 @@ func (c *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error) { return false, nil } -// MockSubResourceClient provides mock functionality for status sub-resource +// MockSubResourceClient provides mock functionality for sub-resources type MockSubResourceClient struct { MockGet MockSubResourceGetFn MockCreate MockSubResourceCreateFn MockUpdate MockSubResourceUpdateFn MockPatch MockSubResourcePatchFn + MockApply MockSubResourceApplyFn } // Get a sub-resource func (m *MockSubResourceClient) Get(ctx context.Context, obj, subResource client.Object, opts ...client.SubResourceGetOption) error { + if m.MockGet == nil { + return nil + } return m.MockGet(ctx, obj, subResource, opts...) } @@ -341,3 +397,8 @@ func (m *MockSubResourceClient) Update(ctx context.Context, obj client.Object, o func (m *MockSubResourceClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error { return m.MockPatch(ctx, obj, patch, opts...) } + +// Apply a sub-resource +func (m *MockSubResourceClient) Apply(ctx context.Context, cfg runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error { + return m.MockApply(ctx, cfg, opts...) +} diff --git a/pkg/reconcilers/resource/finalizer.go b/pkg/reconcilers/resource/finalizer.go index 4fe583d0..b8fe9b5b 100644 --- a/pkg/reconcilers/resource/finalizer.go +++ b/pkg/reconcilers/resource/finalizer.go @@ -18,104 +18,68 @@ package resource import ( "context" - "fmt" - "github.com/pkg/errors" + "github.com/henderiw/logger/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" ) -// Finalizer manages the lifecycle of the finalizer on a k8s object +// ApplyConfigFn builds a typed apply configuration for the given object. +// When finalizers is non-empty, they should be set on the apply config. +type ApplyConfigFn func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration + type Finalizer interface { - AddFinalizer(ctx context.Context, obj client.Object) error - RemoveFinalizer(ctx context.Context, obj client.Object) error + AddFinalizer(ctx context.Context, obj runtime.ApplyConfiguration) error + RemoveFinalizer(ctx context.Context, obj runtime.ApplyConfiguration) error } -// An APIFinalizer manages the lifecycle of a finalizer on a k8s object. type APIFinalizer struct { - client client.Client - reconcilerName string - finalizer string + client client.Client + fieldManager string + finalizer string + buildApply ApplyConfigFn } -// NewAPIFinalizer returns a new APIFinalizer. -func NewAPIFinalizer(c client.Client, finalizer, reconcilerName string) *APIFinalizer { - return &APIFinalizer{client: c, finalizer: finalizer, reconcilerName: reconcilerName} +func NewAPIFinalizer(c client.Client, finalizer, fieldManager string, buildApply ApplyConfigFn) *APIFinalizer { + return &APIFinalizer{ + client: c, + finalizer: finalizer, + fieldManager: fieldManager, + buildApply: buildApply, + } } -// AddFinalizer to the supplied Managed resource. func (r *APIFinalizer) AddFinalizer(ctx context.Context, obj client.Object) error { - // take a snapshot of the current object - origObj := obj.DeepCopyObject() - - // Again assert to client.Object to manipulate metadata and finalizers - copiedObj, ok := origObj.(client.Object) - if !ok { - return fmt.Errorf("deep copied object does not implement client.Object") - } - - patch := client.MergeFrom(copiedObj) - if FinalizerExists(obj, r.finalizer) { return nil } - AddFinalizer(obj, r.finalizer) - return errors.Wrap(r.Update(ctx, obj, patch), errUpdateObject) -} + log.FromContext(ctx).Info("SSA applying finalizer", "fieldManager", r.fieldManager, "finalizer", r.finalizer) + applyConfig := r.buildApply(obj.GetName(), obj.GetNamespace(), r.finalizer) + + log.FromContext(ctx).Info("SSA applying finalizer", "fieldManager", r.fieldManager, "applyConfig", applyConfig) -func (r *APIFinalizer) Update(ctx context.Context, obj client.Object, patch client.Patch) error { - return r.client.Patch(ctx, obj, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: r.reconcilerName, - }, + return r.client.Apply(ctx, applyConfig, &client.ApplyOptions{ + FieldManager: r.fieldManager, }) } func (r *APIFinalizer) RemoveFinalizer(ctx context.Context, obj client.Object) error { - // take a snapshot of the current object - origObj := obj.DeepCopyObject() - - // Again assert to client.Object to manipulate metadata and finalizers - copiedObj, ok := origObj.(client.Object) - if !ok { - return fmt.Errorf("deep copied object does not implement client.Object") - } - patch := client.MergeFrom(copiedObj) - if !FinalizerExists(obj, r.finalizer) { return nil } - RemoveFinalizer(obj, r.finalizer) - return errors.Wrap(r.Update(ctx, obj, patch), errUpdateObject) -} + // Apply with no finalizers — SSA removes only what this field manager owns + applyConfig := r.buildApply(obj.GetName(), obj.GetNamespace()) -// AddFinalizer to the supplied k8s object's metadata. -func AddFinalizer(o metav1.Object, finalizer string) { - f := o.GetFinalizers() - for _, e := range f { - if e == finalizer { - return - } - } - o.SetFinalizers(append(f, finalizer)) -} + log.FromContext(ctx).Info("SSA removing finalizer", "fieldManager", r.fieldManager, "applyConfig", applyConfig) -// RemoveFinalizer from the supplied k8s object's metadata. -func RemoveFinalizer(o metav1.Object, finalizer string) { - f := o.GetFinalizers() - for i, e := range f { - if e == finalizer { - f = append(f[:i], f[i+1:]...) - } - } - o.SetFinalizers(f) + return r.client.Apply(ctx, applyConfig, &client.ApplyOptions{ + FieldManager: r.fieldManager, + }) } -// FinalizerExists checks whether a certain finalizer is already set -// on the aupplied object func FinalizerExists(o metav1.Object, finalizer string) bool { - f := o.GetFinalizers() - for _, e := range f { + for _, e := range o.GetFinalizers() { if e == finalizer { return true } diff --git a/pkg/reconcilers/resource/finalizer_test.go b/pkg/reconcilers/resource/finalizer_test.go deleted file mode 100644 index 9ce78e51..00000000 --- a/pkg/reconcilers/resource/finalizer_test.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Copyright 2024 Nokia. - -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. -*/ - -package resource - -import ( - "testing" - - "github.com/google/go-cmp/cmp" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestAddFinalizer(t *testing.T) { - finalizer := "fin" - funalizer := "fun" - - type args struct { - o metav1.Object - finalizer string - } - - cases := map[string]struct { - args args - want []string - }{ - "NoExistingFinalizers": { - args: args{ - o: &corev1.Pod{}, - finalizer: finalizer, - }, - want: []string{finalizer}, - }, - "FinalizerAlreadyExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{finalizer}, - }, - }, - finalizer: finalizer, - }, - want: []string{finalizer}, - }, - "AnotherFinalizerExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{funalizer}, - }, - }, - finalizer: finalizer, - }, - want: []string{funalizer, finalizer}, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - AddFinalizer(tc.args.o, tc.args.finalizer) - - got := tc.args.o.GetFinalizers() - if diff := cmp.Diff(tc.want, got); diff != "" { - t.Errorf("tc.args.o.GetFinalizers(...): -want, +got:\n%s", diff) - } - }) - } -} - -func TestRemoveFinalizer(t *testing.T) { - finalizer := "fin" - funalizer := "fun" - - type args struct { - o metav1.Object - finalizer string - } - - cases := map[string]struct { - args args - want []string - }{ - "NoExistingFinalizers": { - args: args{ - o: &corev1.Pod{}, - finalizer: finalizer, - }, - want: nil, - }, - "FinalizerExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{finalizer}, - }, - }, - finalizer: finalizer, - }, - want: []string{}, - }, - "AnotherFinalizerExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{finalizer, funalizer}, - }, - }, - finalizer: finalizer, - }, - want: []string{funalizer}, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - RemoveFinalizer(tc.args.o, tc.args.finalizer) - - got := tc.args.o.GetFinalizers() - if diff := cmp.Diff(tc.want, got); diff != "" { - t.Errorf("tc.args.o.GetFinalizers(...): -want, +got:\n%s", diff) - } - }) - } -} - -func TestFinalizerExists(t *testing.T) { - finalizer := "fin" - funalizer := "fun" - - type args struct { - o metav1.Object - finalizer string - } - - cases := map[string]struct { - args args - want bool - }{ - "NoExistingFinalizers": { - args: args{ - o: &corev1.Pod{}, - finalizer: finalizer, - }, - want: false, - }, - "FinalizerExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{finalizer}, - }, - }, - finalizer: finalizer, - }, - want: true, - }, - "AnotherFinalizerExists": { - args: args{ - o: &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Finalizers: []string{funalizer}, - }, - }, - finalizer: finalizer, - }, - want: false, - }, - } - - for name, tc := range cases { - t.Run(name, func(t *testing.T) { - if diff := cmp.Diff(tc.want, FinalizerExists(tc.args.o, tc.args.finalizer)); diff != "" { - t.Errorf("tc.args.o.GetFinalizers(...): -want, +got:\n%s", diff) - } - }) - } -} diff --git a/pkg/reconcilers/rollout/reconciler.go b/pkg/reconcilers/rollout/reconciler.go index bd2e9fc5..d67120ae 100644 --- a/pkg/reconcilers/rollout/reconciler.go +++ b/pkg/reconcilers/rollout/reconciler.go @@ -32,6 +32,7 @@ import ( configapi "github.com/sdcio/config-server/apis/config" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + invv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" "github.com/sdcio/config-server/pkg/git/auth/secret" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" @@ -39,9 +40,10 @@ import ( workspacereader "github.com/sdcio/config-server/pkg/workspace" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" @@ -54,12 +56,13 @@ func init() { } const ( - crName = "rollout" - reconcilerName = "RolloutController" - finalizer = "rollout.inv.sdcio.dev/finalizer" + crName = "rollout" + fieldmanagerfinalizer = "RolloutController-finalizer" + reconcilerName = "RolloutController" + finalizer = "rollout.inv.sdcio.dev/finalizer" // errors - errGetCr = "cannot get cr" - errUpdateStatus = "cannot update status" + errGetCr = "cannot get cr" + errUpdateStatus = "cannot update status" ) // SetupWithManager sets up the controller with the Manager. @@ -71,7 +74,18 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := invv1alpha1apply.Rollout(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) // initializes the directory r.workspaceReader, err = workspacereader.NewReader( cfg.WorkspaceDir, @@ -82,7 +96,7 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i if err != nil { return nil, pkgerrors.Wrap(err, "cannot initialize RolloutController") } - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). @@ -91,10 +105,10 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } type reconciler struct { - client client.Client + client client.Client finalizer *resource.APIFinalizer workspaceReader *workspacereader.Reader - recorder record.EventRecorder + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -325,23 +339,36 @@ func (r *reconciler) handleStatus( err error, ) (ctrl.Result, error) { log := log.FromContext(ctx).With("ref", rollout.Spec.Ref) - //patch := client.MergeFrom(rollout.DeepCopy()) + if err != nil { condition.Message = fmt.Sprintf("%s err %s", condition.Message, err.Error()) } - rollout.ManagedFields = nil - rollout.SetConditions(condition) - rollout.Status.Targets = getTargetStatus(ctx, targetStatus) + + newTargets := getTargetStatus(ctx, targetStatus) + oldCond := rollout.GetCondition(condv1alpha1.ConditionType(condition.Type)) + + if condition.Equal(oldCond) && reflect.DeepEqual(newTargets, rollout.Status.Targets) { + log.Info("handleStatus -> no change") + return ctrl.Result{Requeue: requeue}, nil + } if condition.Type == string(condv1alpha1.ConditionTypeReady) { - r.recorder.Eventf(rollout, corev1.EventTypeNormal, crName, fmt.Sprintf("ready ref %s", rollout.Spec.Ref)) + r.recorder.Eventf(rollout, nil, corev1.EventTypeNormal, crName, fmt.Sprintf("ready ref %s", rollout.Spec.Ref), "") } else { log.Error(condition.Message) - r.recorder.Eventf(rollout, corev1.EventTypeWarning, crName, condition.Message) + r.recorder.Eventf(rollout, nil, corev1.EventTypeWarning, crName, condition.Message, "") } + + statusApply := invv1alpha1apply.RolloutStatus(). + WithConditions(condition). + WithTargets(rolloutTargetStatusToApply(newTargets)...) + + applyConfig := invv1alpha1apply.Rollout(rollout.Name, rollout.Namespace). + WithStatus(statusApply) + result := ctrl.Result{Requeue: requeue} - return result, pkgerrors.Wrap(r.client.Status().Patch(ctx, rollout, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return result, pkgerrors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) @@ -367,3 +394,13 @@ func getTargetStatus(ctx context.Context, storeTargetStatus storebackend.Storer[ }) return targetStatus } + +func rolloutTargetStatusToApply(targets []invv1alpha1.RolloutTargetStatus) []*invv1alpha1apply.RolloutTargetStatusApplyConfiguration { + result := make([]*invv1alpha1apply.RolloutTargetStatusApplyConfiguration, 0, len(targets)) + for _, t := range targets { + result = append(result, invv1alpha1apply.RolloutTargetStatus(). + WithName(t.Name), + ) + } + return result +} diff --git a/pkg/reconcilers/rollout/transaction.go b/pkg/reconcilers/rollout/transaction.go index dea142cb..73c01cd6 100644 --- a/pkg/reconcilers/rollout/transaction.go +++ b/pkg/reconcilers/rollout/transaction.go @@ -27,23 +27,24 @@ import ( memstore "github.com/henderiw/apiserver-store/pkg/storebackend/memory" "github.com/henderiw/logger/log" "github.com/sdcio/config-server/apis/config" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" + sdcpb "github.com/sdcio/sdc-protos/sdcpb" v1 "k8s.io/api/flowcontrol/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" - dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" - sdcpb "github.com/sdcio/sdc-protos/sdcpb" ) type transactionManager struct { newTargetUpdateConfigStore storebackend.Storer[storebackend.Storer[*config.Config]] newTargetDeleteConfigStore storebackend.Storer[storebackend.Storer[*config.Config]] //targetHandler target.TargetHandler - client client.Client - globalTimeout time.Duration - targetTimeout time.Duration - skipUnavailableTarget bool + client client.Client + globalTimeout time.Duration + targetTimeout time.Duration + skipUnavailableTarget bool // derived targets sets.Set[types.NamespacedName] targetStatus storebackend.Storer[invv1alpha1.RolloutTargetStatus] @@ -59,7 +60,7 @@ func NewTransactionManager( tm := &transactionManager{ newTargetUpdateConfigStore: newTargetUpdateConfigStore, newTargetDeleteConfigStore: newTargetDeleteConfigStore, - client: client, + client: client, globalTimeout: globalTimeout, targetTimeout: targetTimeout, targetStatus: memstore.NewStore[invv1alpha1.RolloutTargetStatus](), @@ -96,16 +97,14 @@ func (r *transactionManager) TransactToAllTargets(ctx context.Context, transacti errChan := make(chan error, r.targets.Len()) done := make(chan struct{}) - - for _, targetKey := range r.targets.UnsortedList() { - t := &invv1alpha1.Target{} - if err := r.client.Get(ctx, targetKey, t); err != nil { + t := &configv1alpha1.Target{} + if err := r.client.Get(ctx, targetKey, t); err != nil { // target unavailable -> we continue for now targetStatus := invv1alpha1.RolloutTargetStatus{Name: targetKey.String()} targetStatus.SetConditions(invv1alpha1.ConfigApplyUnavailable(fmt.Sprintf("target unavailable %s", err.Error()))) _ = r.targetStatus.Update(ctx, storebackend.KeyFromNSN(targetKey), targetStatus) - if r.skipUnavailableTarget { + if r.skipUnavailableTarget { globalCancel() return r.targetStatus, fmt.Errorf("transaction aborted: target %s is unavailable", targetKey.String()) } @@ -116,14 +115,13 @@ func (r *transactionManager) TransactToAllTargets(ctx context.Context, transacti targetStatus := invv1alpha1.RolloutTargetStatus{Name: targetKey.String()} targetStatus.SetConditions(invv1alpha1.ConfigApplyUnavailable("target not ready")) _ = r.targetStatus.Update(ctx, storebackend.KeyFromNSN(targetKey), targetStatus) - if r.skipUnavailableTarget { + if r.skipUnavailableTarget { globalCancel() return r.targetStatus, fmt.Errorf("transaction aborted: target %s is not ready", targetKey.String()) } continue } - wg.Add(1) go func(targetKey types.NamespacedName) { targetStatus := invv1alpha1.RolloutTargetStatus{Name: targetKey.String()} @@ -200,7 +198,7 @@ func (r *transactionManager) RollbackTargets(ctx context.Context, transactionID } else { targetStatus.SetConditions(invv1alpha1.ConfigCancelReady()) } - if err := r.targetStatus.Update(ctx, storebackend.KeyFromNSN(targetKey), targetStatus); err != nil { + if err := r.targetStatus.Update(ctx, storebackend.KeyFromNSN(targetKey), targetStatus); err != nil { log.Error("target status update failed", "err", err) } }(targetKey) @@ -273,7 +271,7 @@ func (r *transactionManager) cancel(ctx context.Context, targetKey types.Namespa return err } return nil - }) + }) close(done) }() @@ -315,7 +313,7 @@ func (r *transactionManager) confirm(ctx context.Context, targetKey types.Namesp return err } return nil - }) + }) close(done) }() @@ -378,7 +376,7 @@ func (r *transactionManager) applyConfigToTarget(ctx context.Context, targetKey return err } return nil - }) + }) close(done) }() diff --git a/pkg/reconcilers/rollout/transaction_test.go b/pkg/reconcilers/rollout/transaction_test.go index 0024e5f4..8102cafb 100644 --- a/pkg/reconcilers/rollout/transaction_test.go +++ b/pkg/reconcilers/rollout/transaction_test.go @@ -195,4 +195,4 @@ func getTransctionManager(targets map[string]*target.MockContext, updates, delet return NewTransactionManager(updateStore, deleteStore, nil, 5*time.Second, 2*time.Second, true) } -*/ \ No newline at end of file +*/ diff --git a/pkg/reconcilers/schema/reconciler.go b/pkg/reconcilers/schema/reconciler.go index 904965ec..b62c9959 100644 --- a/pkg/reconcilers/schema/reconciler.go +++ b/pkg/reconcilers/schema/reconciler.go @@ -28,6 +28,7 @@ import ( condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" sdcerrors "github.com/sdcio/config-server/pkg/errors" + invv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" "github.com/sdcio/config-server/pkg/git/auth/secret" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" @@ -38,8 +39,9 @@ import ( sdcpb "github.com/sdcio/sdc-protos/sdcpb" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" @@ -52,16 +54,15 @@ func init() { } const ( - crName = "schema" - reconcilerName = "SchemaController" - finalizer = "schema.inv.sdcio.dev/finalizer" + crName = "schema" + fieldmanagerfinalizer = "SchemaController-finalizer" + reconcilerName = "SchemaController" + finalizer = "schema.inv.sdcio.dev/finalizer" // errors - errGetCr = "cannot get cr" - errUpdateStatus = "cannot update status" + errGetCr = "cannot get cr" + errUpdateStatus = "cannot update status" ) - - // SetupWithManager sets up the controller with the Manager. func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c interface{}) (map[schema.GroupVersionKind]chan event.GenericEvent, error) { var err error @@ -71,7 +72,18 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := invv1alpha1apply.Schema(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) // initializes the directory r.schemaBasePath = cfg.SchemaDir r.schemaLoader, err = schemaloader.NewLoader( @@ -84,7 +96,7 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i if err != nil { return nil, pkgerrors.Wrap(err, "cannot initialize schemaloader") } - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). @@ -94,12 +106,12 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } type reconciler struct { - client client.Client + client client.Client finalizer *resource.APIFinalizer schemaLoader *schemaloader.Loader schemaBasePath string - recorder record.EventRecorder + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -138,7 +150,6 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu } }() - // check if the schema exists; this is == nil check; in case of err it does not exist if _, err := schemaclient.GetSchemaDetails(ctx, &sdcpb.GetSchemaDetailsRequest{ Schema: spec.GetSchema(), @@ -177,14 +188,20 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu } if !dirExists { - // we set the loading condition to know loading started - schema.SetConditions(invv1alpha1.Loading()) - if err := r.client.Status().Update(ctx, schema); err != nil { - // we always retry when status fails -> optimistic concurrency + // SSA apply for loading condition + loadingApply := invv1alpha1apply.Schema(schema.Name, schema.Namespace). + WithStatus(invv1alpha1apply.SchemaStatus(). + WithConditions(invv1alpha1.Loading()), + ) + if err := r.client.Status().Apply(ctx, loadingApply, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ + FieldManager: reconcilerName, + }, + }); err != nil { return r.handleError(ctx, schemaOrig, "cannot update status", err) } - r.recorder.Eventf(schema, corev1.EventTypeNormal, - "schema", "loading") + r.recorder.Eventf(schema, nil, corev1.EventTypeNormal, + "schema", "loading", "") repoStatuses, err := r.schemaLoader.Load(ctx, spec.GetKey()) if err != nil { return r.handleError(ctx, schemaOrig, "cannot load schema", err) @@ -249,18 +266,31 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu func (r *reconciler) handleSuccess(ctx context.Context, schema *invv1alpha1.Schema, updatedStatus *invv1alpha1.SchemaStatus) (ctrl.Result, error) { log := log.FromContext(ctx) log.Debug("handleSuccess", "key", schema.GetNamespacedName(), "status old", schema.DeepCopy().Status) - // take a snapshot of the current object - patch := client.MergeFrom(schema.DeepCopy()) - // update status - schema.Status = *updatedStatus - //schema.ManagedFields = nil - schema.SetConditions(condv1alpha1.Ready()) - r.recorder.Eventf(schema, corev1.EventTypeNormal, invv1alpha1.SchemaKind, "ready") - - log.Debug("handleSuccess", "key", schema.GetNamespacedName(), "status new", schema.Status) - - return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Patch(ctx, schema, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + + newCond := condv1alpha1.Ready() + oldCond := schema.GetCondition(condv1alpha1.ConditionTypeReady) + + // no-change guard includes both condition and repositories + if newCond.Equal(oldCond) && reflect.DeepEqual(updatedStatus.Repositories, schema.Status.Repositories) { + log.Info("handleSuccess -> no change") + return ctrl.Result{}, nil + } + + r.recorder.Eventf(schema, nil, corev1.EventTypeNormal, invv1alpha1.SchemaKind, "ready", "") + + statusApply := invv1alpha1apply.SchemaStatus(). + WithConditions(newCond) + + // only set repositories if populated + if len(updatedStatus.Repositories) > 0 { + statusApply = statusApply.WithRepositories(repoStatusToApply(updatedStatus.Repositories)...) + } + + applyConfig := invv1alpha1apply.Schema(schema.Name, schema.Namespace). + WithStatus(statusApply) + + return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) @@ -269,26 +299,50 @@ func (r *reconciler) handleSuccess(ctx context.Context, schema *invv1alpha1.Sche func (r *reconciler) handleError(ctx context.Context, schema *invv1alpha1.Schema, msg string, err error) (ctrl.Result, error) { log := log.FromContext(ctx) - // take a snapshot of the current object - patch := client.MergeFrom(schema.DeepCopy()) - if err != nil { msg = fmt.Sprintf("%s err %s", msg, err.Error()) } - schema.ManagedFields = nil - schema.SetConditions(condv1alpha1.Failed(msg)) + + newCond := condv1alpha1.Failed(msg) + oldCond := schema.GetCondition(condv1alpha1.ConditionTypeReady) + + if newCond.Equal(oldCond) { + log.Info("handleError -> no change") + return ctrl.Result{}, nil + } + log.Error(msg) - r.recorder.Eventf(schema, corev1.EventTypeWarning, crName, msg) + r.recorder.Eventf(schema, nil, corev1.EventTypeWarning, crName, msg, "") + + applyConfig := invv1alpha1apply.Schema(schema.Name, schema.Namespace). + WithStatus(invv1alpha1apply.SchemaStatus(). + WithConditions(newCond), + ) var unrecoverableError *sdcerrors.UnrecoverableError result := ctrl.Result{} if errors.As(err, &unrecoverableError) { - result = ctrl.Result{Requeue: false} // unrecoverable error - setting an error here would result in ignoring a request to not requeue + result = ctrl.Result{Requeue: false} } - return result, pkgerrors.Wrap(r.client.Status().Patch(ctx, schema, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return result, pkgerrors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) } + +func repoStatusToApply(repos []invv1alpha1.SchemaRepositoryStatus) []*invv1alpha1apply.SchemaRepositoryStatusApplyConfiguration { + result := make([]*invv1alpha1apply.SchemaRepositoryStatusApplyConfiguration, 0, len(repos)) + for _, r := range repos { + a := invv1alpha1apply.SchemaRepositoryStatus() + if r.RepoURL != "" { + a.WithRepoURL(r.RepoURL) + } + if r.Reference != "" { + a.WithReference(r.Reference) + } + result = append(result, a) + } + return result +} diff --git a/pkg/reconcilers/subscription/reconciler.go b/pkg/reconcilers/subscription/reconciler.go index 70febf6a..ef6ef11a 100644 --- a/pkg/reconcilers/subscription/reconciler.go +++ b/pkg/reconcilers/subscription/reconciler.go @@ -24,18 +24,21 @@ import ( "github.com/henderiw/logger/log" pkgerrors "github.com/pkg/errors" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + invv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/eventhandler" "github.com/sdcio/config-server/pkg/reconcilers/resource" + targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" - targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" ) func init() { @@ -43,9 +46,10 @@ func init() { } const ( - crName = "subscription" - reconcilerName = "SubscriptionController" - finalizer = "subscription.inv.sdcio.dev/finalizer" + crName = "subscription" + fieldmanagerfinalizer = "SubscriptionController-finalizer" + reconcilerName = "SubscriptionController" + finalizer = "subscription.inv.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateDataStore = "cannot update datastore" @@ -60,22 +64,33 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := invv1alpha1apply.Subscription(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) r.targetMgr = cfg.TargetManager - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). For(&invv1alpha1.Subscription{}). - Watches(&invv1alpha1.Target{}, &eventhandler.TargetForSubscriptionEventHandler{Client: mgr.GetClient(), ControllerName: reconcilerName}). + Watches(&configv1alpha1.Target{}, &eventhandler.TargetForSubscriptionEventHandler{Client: mgr.GetClient(), ControllerName: reconcilerName}). Complete(r) } type reconciler struct { - client client.Client - finalizer *resource.APIFinalizer - targetMgr *targetmanager.TargetManager - recorder record.EventRecorder + client client.Client + finalizer *resource.APIFinalizer + targetMgr *targetmanager.TargetManager + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -95,9 +110,8 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu subscriptionOrig := subscription.DeepCopy() - if !subscription.GetDeletionTimestamp().IsZero() { - + if err := r.targetMgr.RemoveSubscription(ctx, subscription); err != nil { return r.handleError(ctx, subscription, "cannot delete state from target collector", err) } @@ -125,17 +139,26 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu func (r *reconciler) handleSuccess(ctx context.Context, state *invv1alpha1.Subscription, targets []string) (ctrl.Result, error) { log := log.FromContext(ctx) log.Debug("handleSuccess", "key", state.GetNamespacedName(), "status old", state.DeepCopy().Status) - // take a snapshot of the current object - //patch := client.MergeFrom(state.DeepCopy()) - // update status - state.SetConditions(condv1alpha1.Ready()) - state.SetTargets(targets) - r.recorder.Eventf(state, corev1.EventTypeNormal, invv1alpha1.SubscriptionKind, "ready") - log.Debug("handleSuccess", "key", state.GetNamespacedName(), "status new", state.Status) + newCond := condv1alpha1.Ready() + oldCond := state.GetCondition(condv1alpha1.ConditionTypeReady) + + // no-change guard + if newCond.Equal(oldCond) && reflect.DeepEqual(targets, state.Status.Targets) { + log.Info("handleSuccess -> no change") + return ctrl.Result{}, nil + } + + r.recorder.Eventf(state, nil, corev1.EventTypeNormal, invv1alpha1.SubscriptionKind, "ready", "") - return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Patch(ctx, state, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + applyConfig := invv1alpha1apply.Subscription(state.Name, state.Namespace). + WithStatus(invv1alpha1apply.SubscriptionStatus(). + WithConditions(newCond). + WithTargets(targets...), + ) + + return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) @@ -144,19 +167,28 @@ func (r *reconciler) handleSuccess(ctx context.Context, state *invv1alpha1.Subsc func (r *reconciler) handleError(ctx context.Context, state *invv1alpha1.Subscription, msg string, err error) (ctrl.Result, error) { log := log.FromContext(ctx) - // take a snapshot of the current object - patch := client.MergeFrom(state.DeepCopy()) - if err != nil { msg = fmt.Sprintf("%s err %s", msg, err.Error()) } - state.ManagedFields = nil - state.SetConditions(condv1alpha1.Failed(msg)) + + newCond := condv1alpha1.Failed(msg) + oldCond := state.GetCondition(condv1alpha1.ConditionTypeReady) + + if newCond.Equal(oldCond) { + log.Info("handleError -> no change") + return ctrl.Result{}, nil + } + log.Error(msg) - r.recorder.Eventf(state, corev1.EventTypeWarning, crName, msg) + r.recorder.Eventf(state, nil, corev1.EventTypeWarning, crName, msg, "") + + applyConfig := invv1alpha1apply.Subscription(state.Name, state.Namespace). + WithStatus(invv1alpha1apply.SubscriptionStatus(). + WithConditions(newCond), + ) - return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Patch(ctx, state, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return ctrl.Result{}, pkgerrors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) diff --git a/pkg/reconcilers/target/reconciler.go b/pkg/reconcilers/target/reconciler.go index cbcbcc00..75008f40 100644 --- a/pkg/reconcilers/target/reconciler.go +++ b/pkg/reconcilers/target/reconciler.go @@ -23,14 +23,15 @@ import ( "github.com/henderiw/logger/log" pkgerrors "github.com/pkg/errors" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/resource" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -41,9 +42,10 @@ func init() { } const ( - crName = "target" - reconcilerName = "TargetController" - finalizer = "target.inv.sdcio.dev/finalizer" + crName = "target" + fieldmanagerfinalizer = "TargetController-finalizer" + reconcilerName = "TargetController" + finalizer = "target.inv.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateDataStore = "cannot update datastore" @@ -53,19 +55,30 @@ const ( // SetupWithManager sets up the controller with the Manager. func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c interface{}) (map[schema.GroupVersionKind]chan event.GenericEvent, error) { r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := configv1alpha1apply.Target(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). - For(&invv1alpha1.Target{}). + For(&configv1alpha1.Target{}). Complete(r) } type reconciler struct { client client.Client finalizer *resource.APIFinalizer - recorder record.EventRecorder + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -73,7 +86,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu log := log.FromContext(ctx) log.Info("reconcile") - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, req.NamespacedName, target); err != nil { // if the resource no longer exists the reconcile loop is done if resource.IgnoreNotFound(err) != nil { @@ -89,7 +102,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu changed, newReady, err := r.updateCondition(ctx, target) if err != nil { - return ctrl.Result{}, pkgerrors.Wrap(err, errUpdateStatus) + return ctrl.Result{RequeueAfter: 5 * time.Second}, pkgerrors.Wrap(err, errUpdateStatus) } // "One more kick": if after computing/updating Ready it is still not ready, @@ -103,24 +116,12 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } -func (r *reconciler) updateCondition(ctx context.Context, target *invv1alpha1.Target) (changed bool, newReady bool, err error) { +func (r *reconciler) updateCondition(ctx context.Context, target *configv1alpha1.Target) (changed bool, newReady bool, err error) { log := log.FromContext(ctx) log.Debug("handleSuccess", "key", target.GetNamespacedName(), "status old", target.DeepCopy().Status) - // Build SSA patch object for /status - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - // set new conditions - newTarget.SetOverallStatus(target) - oldCond := target.GetCondition(condv1alpha1.ConditionTypeReady) - newCond := newTarget.GetCondition(condv1alpha1.ConditionTypeReady) + newCond := configv1alpha1.GetOverallStatus(target) changed = !newCond.Equal(oldCond) newReady = newCond.IsTrue() @@ -134,13 +135,18 @@ func (r *reconciler) updateCondition(ctx context.Context, target *invv1alpha1.Ta // Optional: emit different event types if newReady { - r.recorder.Eventf(newTarget, corev1.EventTypeNormal, invv1alpha1.TargetKind, "ready") + r.recorder.Eventf(target, nil, corev1.EventTypeNormal, configv1alpha1.TargetKind, "ready", "") } else { - r.recorder.Eventf(newTarget, corev1.EventTypeWarning, invv1alpha1.TargetKind, "not ready") + r.recorder.Eventf(target, nil, corev1.EventTypeWarning, configv1alpha1.TargetKind, "not ready", "") } - if err := r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond), + ) + + if err := r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }); err != nil { diff --git a/pkg/reconcilers/targetconfig/reconciler.go b/pkg/reconcilers/targetconfig/reconciler.go index 2bde2002..07658f88 100644 --- a/pkg/reconcilers/targetconfig/reconciler.go +++ b/pkg/reconcilers/targetconfig/reconciler.go @@ -26,15 +26,16 @@ import ( "github.com/henderiw/logger/log" "github.com/pkg/errors" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/eventhandler" "github.com/sdcio/config-server/pkg/reconcilers/resource" targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -46,7 +47,7 @@ func init() { const ( crName = "targetconfig" - fieldmanagerfinalizer = "targetconfigfinalizer" + fieldmanagerfinalizer = "TargetConfigController-finalizer" reconcilerName = "TargetConfigController" finalizer = "targetconfig.inv.sdcio.dev/finalizer" // errors @@ -72,14 +73,25 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := configv1alpha1apply.Target(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) r.targetMgr = cfg.TargetManager - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) r.transactor = targetmanager.NewTransactor(r.client, "transactor") return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). - For(&invv1alpha1.Target{}). + For(&configv1alpha1.Target{}). Watches(&configv1alpha1.Config{}, &eventhandler.ConfigForTargetEventHandler{Client: mgr.GetClient(), ControllerName: reconcilerName}). Complete(r) } @@ -89,7 +101,7 @@ type reconciler struct { discoveryClient *discovery.DiscoveryClient finalizer *resource.APIFinalizer targetMgr *targetmanager.TargetManager - recorder record.EventRecorder + recorder events.EventRecorder transactor *targetmanager.Transactor } @@ -105,7 +117,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu targetKey := storebackend.KeyFromNSN(req.NamespacedName) - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, req.NamespacedName, target); err != nil { // if the resource no longer exists the reconcile loop is done if resource.IgnoreNotFound(err) != nil { @@ -116,18 +128,18 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu } targetOrig := target.DeepCopy() - if !target.GetDeletionTimestamp().IsZero() { + if !targetOrig.GetDeletionTimestamp().IsZero() { if err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetFailed("target not available"), + configv1alpha1.TargetForConfigFailed("target not available"), ); err != nil { return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, targetOrig, "cannot update config status", err), errUpdateStatus) } // remove the finalizer - if err := r.finalizer.RemoveFinalizer(ctx, target); err != nil { + if err := r.finalizer.RemoveFinalizer(ctx, targetOrig); err != nil { return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, targetOrig, "cannot delete finalizer", err), errUpdateStatus) } @@ -136,16 +148,16 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } - if err := r.finalizer.AddFinalizer(ctx, target); err != nil { + if err := r.finalizer.AddFinalizer(ctx, targetOrig); err != nil { return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, targetOrig, "cannot add finalizer", err), errUpdateStatus) } - if !target.IsReady() { + if !targetOrig.IsReady() { err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetFailed("target not ready"), + configv1alpha1.TargetForConfigFailed("target not ready"), ) return ctrl.Result{RequeueAfter: 5 * time.Second}, errors.Wrap(r.handleError(ctx, targetOrig, @@ -159,7 +171,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetFailed("target not ready (no dsctx yet)"), + configv1alpha1.TargetForConfigFailed("target not ready (no dsctx yet)"), ) return ctrl.Result{RequeueAfter: 5 * time.Second}, errors.Wrap(r.handleError(ctx, targetOrig, @@ -172,7 +184,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetFailed("target not ready (no dsctx client)"), + configv1alpha1.TargetForConfigFailed("target not ready (no dsctx client)"), ) return ctrl.Result{RequeueAfter: 5 * time.Second}, errors.Wrap(r.handleError(ctx, targetOrig, @@ -187,20 +199,20 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetFailed("target not recovered"), + configv1alpha1.TargetForConfigFailed("target not recovered"), ) log.Info("config transaction -> target not recovered yet") - return ctrl.Result{}, err + return ctrl.Result{RequeueAfter: 5 * time.Second}, err } - retry, err := r.transactor.Transact(ctx, target, dsctx) + retry, err := r.transactor.Transact(ctx, targetOrig, dsctx, configv1alpha1.TargetForConfigReady("target ready")) if err != nil { log.Warn("config transaction failed", "retry", retry, "err", err) if retry { if err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetReady("target ready"), + configv1alpha1.TargetForConfigReady("target ready"), ); err != nil { return ctrl.Result{}, errors.Wrap(r.handleError(ctx, targetOrig, "", err), errUpdateStatus) } @@ -217,7 +229,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu if err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetReady("target ready"), + configv1alpha1.TargetForConfigReady("target ready"), ); err != nil { return ctrl.Result{}, errors.Wrap(r.handleError(ctx, targetOrig, "", err), errUpdateStatus) } @@ -231,25 +243,28 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu if err := r.transactor.SetConfigsTargetConditionForTarget( ctx, targetOrig, - configv1alpha1.TargetReady("target ready"), + configv1alpha1.TargetForConfigReady("target ready"), ); err != nil { return ctrl.Result{}, errors.Wrap(r.handleError(ctx, targetOrig, "", err), errUpdateStatus) } return ctrl.Result{}, errors.Wrap(r.handleSuccess(ctx, targetOrig), errUpdateStatus) } -func (r *reconciler) handleSuccess(ctx context.Context, target *invv1alpha1.Target) error { +func (r *reconciler) handleSuccess(ctx context.Context, target *configv1alpha1.Target) error { log := log.FromContext(ctx) log.Debug("handleSuccess", "key", target.GetNamespacedName(), "status old", target.DeepCopy().Status) return nil } -func (r *reconciler) handleError(ctx context.Context, target *invv1alpha1.Target, msg string, err error) error { +func (r *reconciler) handleError(ctx context.Context, target *configv1alpha1.Target, msg string, err error) error { log := log.FromContext(ctx) if err != nil { - msg = fmt.Sprintf("%s err %s", msg, err.Error()) + msg = fmt.Sprintf("%q err %q", msg, err.Error()) + } + if len(msg) > 128 { + msg = msg[:128] } log.Warn("config transaction failed", "msg", msg, "err", err) diff --git a/pkg/reconcilers/targetdatastore/reconciler.go b/pkg/reconcilers/targetdatastore/reconciler.go index 87d002ea..6c2cd818 100644 --- a/pkg/reconcilers/targetdatastore/reconciler.go +++ b/pkg/reconcilers/targetdatastore/reconciler.go @@ -26,7 +26,9 @@ import ( "github.com/henderiw/logger/log" "github.com/pkg/errors" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/eventhandler" @@ -36,9 +38,10 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -49,9 +52,10 @@ func init() { } const ( - crName = "targetdatastore" - reconcilerName = "TargetDataStoreController" - finalizer = "targetdatastore.inv.sdcio.dev/finalizer" + crName = "targetdatastore" + fieldmanagerfinalizer = "TargetDataStoreController-finalizer" + reconcilerName = "TargetDataStoreController" + finalizer = "targetdatastore.inv.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateDataStore = "cannot update datastore" @@ -73,13 +77,24 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := configv1alpha1apply.Target(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) r.targetMgr = cfg.TargetManager - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). - For(&invv1alpha1.Target{}). + For(&configv1alpha1.Target{}). Watches(&invv1alpha1.TargetConnectionProfile{}, &eventhandler.TargetConnProfileForTargetEventHandler{Client: mgr.GetClient()}). Watches(&invv1alpha1.TargetSyncProfile{}, &eventhandler.TargetSyncProfileForTargetEventHandler{Client: mgr.GetClient()}). Watches(&corev1.Secret{}, &eventhandler.SecretForTargetEventHandler{Client: mgr.GetClient()}). @@ -88,10 +103,10 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } type reconciler struct { - client client.Client - finalizer *resource.APIFinalizer - targetMgr *targetmanager.TargetManager - recorder record.EventRecorder + client client.Client + finalizer *resource.APIFinalizer + targetMgr *targetmanager.TargetManager + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -101,7 +116,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu targetKey := storebackend.KeyFromNSN(req.NamespacedName) - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, req.NamespacedName, target); err != nil { // if the resource no longer exists the reconcile loop is done if resource.IgnoreNotFound(err) != nil { @@ -113,16 +128,16 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu targetOrig := target.DeepCopy() - if !target.GetDeletionTimestamp().IsZero() { + if !targetOrig.GetDeletionTimestamp().IsZero() { if len(target.GetFinalizers()) > 1 { // this should be the last finalizer to be removed as this deletes the target from the targetStore - log.Debug("requeue delete, not all finalizers removed", "finalizers", target.GetFinalizers()) + log.Debug("requeue delete, not all finalizers removed", "finalizers", targetOrig.GetFinalizers()) return ctrl.Result{Requeue: true}, errors.Wrap(r.handleError(ctx, targetOrig, "deleting target, not all finalizers removed", nil, true), errUpdateStatus) } log.Debug("deleting targetstore...") // check if this is the last one -> if so stop the client to the dataserver - + if r.targetMgr != nil { r.targetMgr.ClearDesired(ctx, targetKey) r.targetMgr.Delete(ctx, targetKey) @@ -145,8 +160,8 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu // We dont act as long the target is not discoveredReady (ready state is handled by the discovery controller) // Ready -> NotReady: happens only when the discovery fails => we keep the target as is do not delete the datatore/etc - log.Info("target discovery ready condition", "status", target.Status.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady).Status) - if target.Status.GetCondition(invv1alpha1.ConditionTypeDiscoveryReady).Status != metav1.ConditionTrue { + log.Info("target discovery ready condition", "status", targetOrig.GetCondition(configv1alpha1.ConditionTypeTargetDiscoveryReady).Status) + if target.Status.GetCondition(configv1alpha1.ConditionTypeTargetDiscoveryReady).Status != metav1.ConditionTrue { if r.targetMgr != nil { r.targetMgr.ClearDesired(ctx, targetKey) } @@ -175,129 +190,110 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu } // Compute desired hash (must be stable) - hash := targetmanager.ComputeCreateDSHash(dsReq, usedRefs) + hash := targetmanager.ComputeCreateDSHash(dsReq, usedRefs) // Drive runtime r.targetMgr.ApplyDesired(ctx, targetKey, dsReq, usedRefs, hash) - + // Read runtime status rt := r.targetMgr.GetOrCreate(targetKey) st := rt.Status() switch st.Phase { - case targetmanager.PhaseRunning: - return ctrl.Result{}, errors.Wrap(r.handleSuccess(ctx, targetOrig, usedRefs), errUpdateStatus) + case targetmanager.PhaseRunning: + return ctrl.Result{}, errors.Wrap(r.handleSuccess(ctx, targetOrig, usedRefs), errUpdateStatus) - case targetmanager.PhaseWaitingForDS, targetmanager.PhaseEnsuringDatastore, targetmanager.PhasePending: - // not ready yet; update status as failed/degraded but requeue soon - msg := fmt.Sprintf("runtime phase=%s dsReady=%t dsStoreReady=%t err=%s", - st.Phase, st.DSReady, st.DSStoreReady, st.LastError) + case targetmanager.PhaseWaitingForDS, targetmanager.PhaseEnsuringDatastore, targetmanager.PhasePending: + // not ready yet; update status as failed/degraded but requeue soon + msg := fmt.Sprintf("runtime phase=%s dsReady=%t dsStoreReady=%t err=%s", + st.Phase, st.DSReady, st.DSStoreReady, st.LastError) - _ = r.handleError(ctx, targetOrig, msg, nil, false) - return ctrl.Result{RequeueAfter: 5 * time.Second}, nil + _ = r.handleError(ctx, targetOrig, msg, nil, false) + return ctrl.Result{RequeueAfter: 5 * time.Second}, nil - case targetmanager.PhaseDegraded: - msg := fmt.Sprintf("runtime degraded: %s", st.LastError) - _ = r.handleError(ctx, targetOrig, msg, nil, false) - return ctrl.Result{RequeueAfter: 5 * time.Second}, nil + case targetmanager.PhaseDegraded: + msg := fmt.Sprintf("runtime degraded: %s", st.LastError) + _ = r.handleError(ctx, targetOrig, msg, nil, false) + return ctrl.Result{RequeueAfter: 5 * time.Second}, nil - default: - _ = r.handleError(ctx, targetOrig, "runtime unknown phase", nil, false) - return ctrl.Result{RequeueAfter: 5 * time.Second}, nil - } + default: + _ = r.handleError(ctx, targetOrig, "runtime unknown phase", nil, false) + return ctrl.Result{RequeueAfter: 5 * time.Second}, nil + } } - -func (r *reconciler) handleSuccess(ctx context.Context, target *invv1alpha1.Target, usedRefs *invv1alpha1.TargetStatusUsedReferences) error { +func (r *reconciler) handleSuccess(ctx context.Context, target *configv1alpha1.Target, usedRefs *configv1alpha1.TargetStatusUsedReferences) error { log := log.FromContext(ctx) //log.Info("handleSuccess", "key", target.GetNamespacedName(), "status old", target.DeepCopy().Status) // take a snapshot of the current object - //patch := client.MergeFrom(target.DeepCopy()) - // update status - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - // set new conditions - newTarget.SetConditions(invv1alpha1.DatastoreReady()) - newTarget.Status.UsedReferences = usedRefs - - oldCond := target.GetCondition(invv1alpha1.ConditionTypeDatastoreReady) - newCond := newTarget.GetCondition(invv1alpha1.ConditionTypeDatastoreReady) - - changed := !newCond.Equal(oldCond) + newCond := configv1alpha1.TargetDatastoreReady() + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetDatastoreReady) // we don't update the resource if no condition changed - if !changed && - equality.Semantic.DeepEqual(newTarget.Status.UsedReferences, target.Status.UsedReferences) { + if newCond.Equal(oldCond) && + equality.Semantic.DeepEqual(usedRefs, target.Status.UsedReferences) { log.Info("handleSuccess -> no change") return nil } log.Info("handleSuccess", - "condition change", newTarget.GetCondition(invv1alpha1.ConditionTypeDatastoreReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeDatastoreReady)), - "shared ref change", equality.Semantic.DeepEqual(newTarget.Status.UsedReferences, target.Status.UsedReferences), + "condition change", !newCond.Equal(oldCond), + "usedRefs change", !equality.Semantic.DeepEqual(usedRefs, target.Status.UsedReferences), ) - r.recorder.Eventf(newTarget, corev1.EventTypeNormal, invv1alpha1.TargetKind, "datastore ready") + r.recorder.Eventf(target, nil, corev1.EventTypeNormal, configv1alpha1.TargetKind, "datastore ready", "") - log.Debug("handleSuccess", "key", newTarget.GetNamespacedName(), "status new", target.Status) + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond). + WithUsedReferences(usedRefsToApply(usedRefs)), + ) - return r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) } -func (r *reconciler) handleError(ctx context.Context, target *invv1alpha1.Target, msg string, err error, resetUsedRefs bool) error { +func (r *reconciler) handleError(ctx context.Context, target *configv1alpha1.Target, msg string, err error, resetUsedRefs bool) error { log := log.FromContext(ctx) - // take a snapshot of the current object - //patch := client.MergeFrom(target.DeepCopy()) if err != nil { - msg = fmt.Sprintf("%s err %s", msg, err.Error()) + msg = fmt.Sprintf("%q err %q", msg, err.Error()) } - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - - // set new conditions - newTarget.SetConditions(invv1alpha1.DatastoreFailed(msg)) - //target.SetOverallStatus() - if resetUsedRefs { - newTarget.Status.UsedReferences = nil + if len(msg) > 128 { + msg = msg[:128] } - oldCond := target.GetCondition(invv1alpha1.ConditionTypeDatastoreReady) - newCond := newTarget.GetCondition(invv1alpha1.ConditionTypeDatastoreReady) + newCond := configv1alpha1.TargetDatastoreFailed(msg) + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetDatastoreReady) - changed := !newCond.Equal(oldCond) + var newUsedRefs *configv1alpha1.TargetStatusUsedReferences + if !resetUsedRefs { + newUsedRefs = target.Status.UsedReferences + } - // we don't update the resource if no condition changed - if !changed && - equality.Semantic.DeepEqual(newTarget.Status.UsedReferences, target.Status.UsedReferences) { + if newCond.Equal(oldCond) && + equality.Semantic.DeepEqual(newUsedRefs, target.Status.UsedReferences) { log.Info("handleError -> no change") return nil } + log.Info("handleError", - "condition change", newTarget.GetCondition(invv1alpha1.ConditionTypeDatastoreReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeDatastoreReady)), - "shared ref change", equality.Semantic.DeepEqual(newTarget.Status.UsedReferences, target.Status.UsedReferences), + "condition change", !newCond.Equal(oldCond), + "usedRefs change", !equality.Semantic.DeepEqual(newUsedRefs, target.Status.UsedReferences), ) - log.Error(msg, "error", err) - r.recorder.Eventf(newTarget, corev1.EventTypeWarning, invv1alpha1.TargetKind, msg) + r.recorder.Eventf(target, nil, corev1.EventTypeWarning, configv1alpha1.TargetKind, msg, "") - return r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond). + WithUsedReferences(usedRefsToApply(newUsedRefs)), + ) + + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }) @@ -333,7 +329,7 @@ func (r *reconciler) getSecret(ctx context.Context, key types.NamespacedName) (* return secret, nil } -func (r *reconciler) isSchemaReady(ctx context.Context, target *invv1alpha1.Target) (bool, string, error) { +func (r *reconciler) isSchemaReady(ctx context.Context, target *configv1alpha1.Target) (bool, string, error) { //log := log.FromContext(ctx) schemaList := &invv1alpha1.SchemaList{} opts := []client.ListOption{ @@ -358,8 +354,8 @@ func (r *reconciler) isSchemaReady(ctx context.Context, target *invv1alpha1.Targ } -func (r *reconciler) getCreateDataStoreRequest(ctx context.Context, target *invv1alpha1.Target) (*sdcpb.CreateDataStoreRequest, *invv1alpha1.TargetStatusUsedReferences, error) { - usedReferences := &invv1alpha1.TargetStatusUsedReferences{} +func (r *reconciler) getCreateDataStoreRequest(ctx context.Context, target *configv1alpha1.Target) (*sdcpb.CreateDataStoreRequest, *configv1alpha1.TargetStatusUsedReferences, error) { + usedReferences := &configv1alpha1.TargetStatusUsedReferences{} syncProfile, err := r.getSyncProfile(ctx, types.NamespacedName{Namespace: target.GetNamespace(), Name: *target.Spec.SyncProfile}) if err != nil { @@ -425,13 +421,13 @@ func (r *reconciler) getCreateDataStoreRequest(ctx context.Context, target *invv } if connProfile.Spec.Protocol == invv1alpha1.Protocol_GNMI { - targetName:= "" + targetName := "" if connProfile.Spec.TargetName != nil { targetName = *connProfile.Spec.TargetName } req.Target.ProtocolOptions = &sdcpb.Target_GnmiOpts{ GnmiOpts: &sdcpb.GnmiOptions{ - Encoding: string(connProfile.Encoding()), + Encoding: string(connProfile.Encoding()), TargetName: targetName, }, } @@ -455,3 +451,23 @@ func (r *reconciler) getCreateDataStoreRequest(ctx context.Context, target *invv return req, usedReferences, nil } + +func usedRefsToApply(refs *configv1alpha1.TargetStatusUsedReferences) *configv1alpha1apply.TargetStatusUsedReferencesApplyConfiguration { + if refs == nil { + return nil + } + a := configv1alpha1apply.TargetStatusUsedReferences() + if refs.SecretResourceVersion != "" { + a.WithSecretResourceVersion(refs.SecretResourceVersion) + } + if refs.TLSSecretResourceVersion != "" { + a.WithTLSSecretResourceVersion(refs.TLSSecretResourceVersion) + } + if refs.ConnectionProfileResourceVersion != "" { + a.WithConnectionProfileResourceVersion(refs.ConnectionProfileResourceVersion) + } + if refs.SyncProfileResourceVersion != "" { + a.WithSyncProfileResourceVersion(refs.SyncProfileResourceVersion) + } + return a +} diff --git a/pkg/reconcilers/targetrecovery/reconciler.go b/pkg/reconcilers/targetrecovery/reconciler.go index b9b64222..a39d73c9 100644 --- a/pkg/reconcilers/targetrecovery/reconciler.go +++ b/pkg/reconcilers/targetrecovery/reconciler.go @@ -26,16 +26,17 @@ import ( "github.com/henderiw/logger/log" "github.com/pkg/errors" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" "github.com/sdcio/config-server/pkg/reconcilers/resource" targetmanager "github.com/sdcio/config-server/pkg/sdc/target/manager" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/discovery" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" + "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/event" @@ -47,7 +48,7 @@ func init() { const ( crName = "targetrecoveryconfig" - fieldmanagerfinalizer = "targetrecoveryconfigfinalizer" + fieldmanagerfinalizer = "TargetRecoveryConfigController-finalizer" reconcilerName = "TargetRecoveryConfigController" finalizer = "targetrecoveryserver.inv.sdcio.dev/finalizer" // errors @@ -74,14 +75,25 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := configv1alpha1apply.Target(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) r.targetMgr = cfg.TargetManager - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) r.transactor = targetmanager.NewTransactor(r.client, "transactor") return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). - For(&invv1alpha1.Target{}). + For(&configv1alpha1.Target{}). Complete(r) } @@ -90,7 +102,7 @@ type reconciler struct { discoveryClient *discovery.DiscoveryClient finalizer *resource.APIFinalizer targetMgr *targetmanager.TargetManager - recorder record.EventRecorder + recorder events.EventRecorder transactor *targetmanager.Transactor } @@ -106,7 +118,7 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu targetKey := storebackend.KeyFromNSN(req.NamespacedName) - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, req.NamespacedName, target); err != nil { // if the resource no longer exists the reconcile loop is done if resource.IgnoreNotFound(err) != nil { @@ -156,88 +168,66 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, errors.Wrap(r.handleSuccess(ctx, targetOrig, msg), errUpdateStatus) } -func (r *reconciler) handleSuccess(ctx context.Context, target *invv1alpha1.Target, msg *string) error { +func (r *reconciler) handleSuccess(ctx context.Context, target *configv1alpha1.Target, msg *string) error { log := log.FromContext(ctx) - log.Debug("handleSuccess", "key", target.GetNamespacedName(), "status old", target.DeepCopy().Status) - // take a snapshot of the current object - //patch := client.MergeFrom(target.DeepCopy()) - // update status - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - // set new conditions newMsg := "" if msg != nil { newMsg = *msg } - newTarget.SetConditions(invv1alpha1.ConfigReady(newMsg)) + newCond := configv1alpha1.TargetConfigRecoveryReady(newMsg) + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetConfigRecoveryReady) - oldCond := target.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady) - newCond := newTarget.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady) - - changed := !newCond.Equal(oldCond) - - // we don't update the resource if no condition changed - if !changed { - // we don't update the resource if no condition changed + if newCond.Equal(oldCond) { log.Info("handleSuccess -> no change") return nil } - log.Info("handleSuccess -> change", - "condition change", newTarget.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady))) - r.recorder.Eventf(newTarget, corev1.EventTypeNormal, invv1alpha1.TargetKind, "config recovery ready") + log.Info("handleSuccess -> change", "condition change", true) + r.recorder.Eventf(target, nil, corev1.EventTypeNormal, configv1alpha1.TargetKind, "config recovery ready", "") - return r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond), + ) + + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, + Force: ptr.To(true), }, }) } -func (r *reconciler) handleError(ctx context.Context, target *invv1alpha1.Target, msg string, err error) error { +func (r *reconciler) handleError(ctx context.Context, target *configv1alpha1.Target, msg string, err error) error { log := log.FromContext(ctx) - // take a snapshot of the current object - //patch := client.MergeFrom(target.DeepCopy()) if err != nil { - msg = fmt.Sprintf("%s err %s", msg, err.Error()) + msg = fmt.Sprintf("%q err %q", msg, err.Error()) } - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - // set new conditions - newTarget.SetConditions(invv1alpha1.ConfigFailed(msg)) - - log.Warn(msg, "error", err) - oldCond := target.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady) - newCond := newTarget.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady) - - changed := !newCond.Equal(oldCond) + if len(msg) > 128 { + msg = msg[:128] + } + newCond := configv1alpha1.TargetConfigRecoveryFailed(msg) + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetConfigRecoveryReady) - if !changed { - // we don't update the resource if no condition changed + if newCond.Equal(oldCond) { log.Info("handleError -> no change") return nil } - r.recorder.Eventf(newTarget, corev1.EventTypeWarning, invv1alpha1.TargetKind, msg) - log.Info("handleError -> change", - "condition change", newTarget.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady).Equal(target.GetCondition(invv1alpha1.ConditionTypeConfigRecoveryReady))) + log.Warn(msg, "error", err) + log.Info("handleError -> change", "condition change", true) + r.recorder.Eventf(target, nil, corev1.EventTypeWarning, configv1alpha1.TargetKind, msg, "") + + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond), + ) - return r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, + Force: ptr.To(true), }, }) } diff --git a/pkg/reconcilers/workspace/reconciler.go b/pkg/reconcilers/workspace/reconciler.go index bfca2247..2825b80c 100644 --- a/pkg/reconcilers/workspace/reconciler.go +++ b/pkg/reconcilers/workspace/reconciler.go @@ -25,6 +25,7 @@ import ( "github.com/pkg/errors" condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + invv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/inv/v1alpha1" "github.com/sdcio/config-server/pkg/git/auth/secret" "github.com/sdcio/config-server/pkg/reconcilers" "github.com/sdcio/config-server/pkg/reconcilers/ctrlconfig" @@ -33,8 +34,9 @@ import ( workspaceloader "github.com/sdcio/config-server/pkg/workspace" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/record" + "k8s.io/client-go/tools/events" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" @@ -47,9 +49,10 @@ func init() { } const ( - crName = "workspace" - reconcilerName = "WorkspaceController" - finalizer = "workspace.inv.sdcio.dev/finalizer" + crName = "workspace" + fieldmanagerfinalizer = "WorkspaceControllerFinalizer" + reconcilerName = "WorkspaceController" + finalizer = "workspace.inv.sdcio.dev/finalizer" // errors errGetCr = "cannot get cr" errUpdateDataStore = "cannot update datastore" @@ -65,7 +68,18 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } r.client = mgr.GetClient() - r.finalizer = resource.NewAPIFinalizer(mgr.GetClient(), finalizer, reconcilerName) + r.finalizer = resource.NewAPIFinalizer( + mgr.GetClient(), + finalizer, + fieldmanagerfinalizer, + func(name, namespace string, finalizers ...string) runtime.ApplyConfiguration { + ac := invv1alpha1apply.Workspace(name, namespace) + if len(finalizers) > 0 { + ac.WithFinalizers(finalizers...) + } + return ac + }, + ) // initializes the directory r.workspaceLoader, err = workspaceloader.NewLoader( cfg.WorkspaceDir, @@ -76,7 +90,7 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i if err != nil { return nil, errors.Wrap(err, "cannot initialize WorkspaceController") } - r.recorder = mgr.GetEventRecorderFor(reconcilerName) + r.recorder = mgr.GetEventRecorder(reconcilerName) return nil, ctrl.NewControllerManagedBy(mgr). Named(reconcilerName). @@ -87,11 +101,11 @@ func (r *reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, c i } type reconciler struct { - client client.Client + client client.Client finalizer *resource.APIFinalizer workspaceLoader *workspaceloader.Loader - recorder record.EventRecorder + recorder events.EventRecorder } func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -177,106 +191,31 @@ func (r *reconciler) handleStatus( ) (ctrl.Result, error) { log := log.FromContext(ctx) - //patch := client.MergeFrom(workspace.DeepCopy()) - if err != nil { condition.Message = fmt.Sprintf("%s err %s", condition.Message, err.Error()) } - workspace.ManagedFields = nil - workspace.SetConditions(condition) + oldCond := workspace.GetCondition(condv1alpha1.ConditionType(condition.Type)) + if condition.Equal(oldCond) { + return ctrl.Result{Requeue: requeue}, nil + } - // Determine event type based on condition type if condition.Type == string(condv1alpha1.ConditionTypeReady) { - r.recorder.Eventf(workspace, corev1.EventTypeNormal, crName, fmt.Sprintf("ready ref %s", workspace.Spec.Ref)) + r.recorder.Eventf(workspace, nil, corev1.EventTypeNormal, crName, fmt.Sprintf("ready ref %s", workspace.Spec.Ref), "") } else { log.Error(condition.Message) - r.recorder.Eventf(workspace, corev1.EventTypeWarning, crName, condition.Message) - } - - result := ctrl.Result{Requeue: requeue} - return result, errors.Wrap(r.client.Status().Patch(ctx, workspace, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, - }, - }), errUpdateStatus) -} - -/* - -func (r *reconciler) handleSuccess(ctx context.Context, workspace *invv1alpha1.Workspace) (ctrl.Result, error) { - log := log.FromContext(ctx) - log.Debug("handleSuccess", "key", workspace.GetNamespacedName(), "status old", workspace.DeepCopy().Status) - // take a snapshot of the current object - patch := client.MergeFrom(workspace.DeepCopy()) - // update status - workspace.SetConditions(condv1alpha1.Ready()) - r.recorder.Eventf(workspace, corev1.EventTypeNormal, crName, "ready") - - log.Debug("handleSuccess", "key", workspace.GetNamespacedName(), "status new", workspace.Status) - - return ctrl.Result{}, errors.Wrap(r.Client.Status().Patch(ctx, workspace, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, - }, - }), errUpdateStatus) -} - -func (r *reconciler) handleFailed(ctx context.Context, workspace *invv1alpha1.Workspace, msg string) (ctrl.Result, error) { - log := log.FromContext(ctx) - log.Debug("handleFailure", "key", workspace.GetNamespacedName(), "status old", workspace.DeepCopy().Status) - // take a snapshot of the current object - patch := client.MergeFrom(workspace.DeepCopy()) - // update status - workspace.SetConditions(condv1alpha1.Failed(msg)) - r.recorder.Eventf(workspace, corev1.EventTypeNormal, crName, "failed") - - log.Debug("handleFailure", "key", workspace.GetNamespacedName(), "status new", workspace.Status) - - return ctrl.Result{}, errors.Wrap(r.Client.Status().Patch(ctx, workspace, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, - }, - }), errUpdateStatus) -} - -func (r *reconciler) handleRollout(ctx context.Context, workspace *invv1alpha1.Workspace, msg string) (ctrl.Result, error) { - log := log.FromContext(ctx) - - // take a snapshot of the current object - patch := client.MergeFrom(workspace.DeepCopy()) - - workspace.SetConditions(condv1alpha1.Rollout(msg)) - log.Debug(msg) - r.recorder.Eventf(workspace, corev1.EventTypeNormal, crName, msg) - - result := ctrl.Result{} - return result, errors.Wrap(r.Client.Status().Patch(ctx, workspace, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: reconcilerName, - }, - }), errUpdateStatus) -} - -func (r *reconciler) handleError(ctx context.Context, workspace *invv1alpha1.Workspace, msg string, err error) (ctrl.Result, error) { - log := log.FromContext(ctx) - - // take a snapshot of the current object - patch := client.MergeFrom(workspace.DeepCopy()) - - if err != nil { - msg = fmt.Sprintf("%s err %s", msg, err.Error()) + r.recorder.Eventf(workspace, nil, corev1.EventTypeWarning, crName, condition.Message, "") } - workspace.SetConditions(condv1alpha1.Failed(msg)) - log.Error(msg) - r.recorder.Eventf(workspace, corev1.EventTypeWarning, crName, msg) + applyConfig := invv1alpha1apply.Workspace(workspace.Name, workspace.Namespace). + WithStatus(invv1alpha1apply.WorkspaceStatus(). + WithConditions(condition), + ) - result := ctrl.Result{Requeue: true} - return result, errors.Wrap(r.Client.Status().Patch(ctx, workspace, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + result := ctrl.Result{Requeue: requeue} + return result, errors.Wrap(r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: reconcilerName, }, }), errUpdateStatus) } -*/ diff --git a/pkg/registry/configblame/store.go b/pkg/registry/configblame/store.go index d08e8923..b9b4b6c9 100644 --- a/pkg/registry/configblame/store.go +++ b/pkg/registry/configblame/store.go @@ -18,6 +18,7 @@ package configblame import ( "context" + "sync" "github.com/henderiw/apiserver-builder/pkg/builder/resource" builderrest "github.com/henderiw/apiserver-builder/pkg/builder/rest" @@ -82,6 +83,7 @@ func NewREST( CategoryList: obj.GetCategories(), ShortNameList: obj.GetShortNames(), Storage: nil, + KeyLocks: &sync.Map{}, } options := &generic.StoreOptions{ RESTOptions: optsGetter, diff --git a/pkg/registry/configblame/strategy_resource.go b/pkg/registry/configblame/strategy_resource.go index ac54c1c2..6ed5ca32 100644 --- a/pkg/registry/configblame/strategy_resource.go +++ b/pkg/registry/configblame/strategy_resource.go @@ -27,23 +27,22 @@ import ( watchermanager "github.com/henderiw/apiserver-store/pkg/watcher-manager" "github.com/henderiw/logger/log" "github.com/sdcio/config-server/apis/config" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" "github.com/sdcio/config-server/pkg/registry/options" + dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" + sdcpb "github.com/sdcio/sdc-protos/sdcpb" + "google.golang.org/protobuf/encoding/protojson" apierrors "k8s.io/apimachinery/pkg/api/errors" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" - dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" - sdcpb "github.com/sdcio/sdc-protos/sdcpb" - "google.golang.org/protobuf/encoding/protojson" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) // NewStrategy creates and returns a strategy instance @@ -150,7 +149,7 @@ func (r *strategy) Delete(ctx context.Context, key types.NamespacedName, obj run return obj, nil } -func (r *strategy) getConfigBlame(ctx context.Context, target *invv1alpha1.Target, key types.NamespacedName) (*config.ConfigBlame, error) { +func (r *strategy) getConfigBlame(ctx context.Context, target *configv1alpha1.Target, key types.NamespacedName) (*config.ConfigBlame, error) { if !target.IsReady() { return nil, apierrors.NewNotFound(r.gr, key.Name) } @@ -171,7 +170,6 @@ func (r *strategy) getConfigBlame(ctx context.Context, target *invv1alpha1.Targe } }() - // check if the schema exists; this is == nil check; in case of err it does not exist rsp, err := dsclient.BlameConfig(ctx, &sdcpb.BlameConfigRequest{ DatastoreName: storebackend.KeyFromNSN(key).String(), @@ -228,40 +226,29 @@ func (r *strategy) getConfigBlame(ctx context.Context, target *invv1alpha1.Targe } func (r *strategy) Get(ctx context.Context, key types.NamespacedName) (runtime.Object, error) { - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, key, target); err != nil { return nil, apierrors.NewNotFound(r.gr, key.Name) } return r.getConfigBlame(ctx, target, key) } -func (r *strategy) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { +func (r *strategy) List(ctx context.Context, opts *metainternalversion.ListOptions) (runtime.Object, error) { log := log.FromContext(ctx) - filter, err := parseFieldSelector(ctx, options.FieldSelector) + filter, err := options.ParseFieldSelector(ctx, opts.FieldSelector) if err != nil { return nil, err } - namespace, ok := genericapirequest.NamespaceFrom(ctx) - if ok { - if filter != nil { - filter.Namespace = namespace - } else { - filter = &Filter{ - Namespace: namespace, - } - } - } - newListObj := r.obj.NewList() v, err := utils.GetListPrt(newListObj) if err != nil { return nil, err } - targets := &invv1alpha1.TargetList{} - if err := r.client.List(ctx, targets); err != nil { + targets := &configv1alpha1.TargetList{} + if err := r.client.List(ctx, targets, options.ListOptsFromInternal(filter, opts)...); err != nil { return nil, err } @@ -287,6 +274,7 @@ func (r *strategy) Watch(ctx context.Context, options *metainternalversion.ListO cancel: cancel, resultChan: make(chan watch.Event), watcherManager: r.watcherManager, + obj: r.obj, } go w.listAndWatch(ctx, r, options) diff --git a/pkg/registry/configblame/watcher.go b/pkg/registry/configblame/watcher.go index a85f451e..7638f8a8 100644 --- a/pkg/registry/configblame/watcher.go +++ b/pkg/registry/configblame/watcher.go @@ -173,6 +173,20 @@ func (r *watcher) innerListAndWatch(ctx context.Context, l rest.RESTListStrategy r.sendWatchEvent(ctx, ev) } + // Send bookmark event to signal initial list is complete + /* + bookmarkObj := r.obj.New() + accessor, _ := meta.Accessor(bookmarkObj) + // Set resourceVersion so the client knows where it is + if accessor.GetResourceVersion() == "" { + accessor.SetResourceVersion("0") + } + r.sendWatchEvent(ctx, watch.Event{ + Type: watch.Bookmark, + Object: bookmarkObj, + }) + */ + log.Debug("moving into streaming mode") r.eventCallback = func(eventType watch.EventType, obj runtime.Object) bool { accessor, _ := meta.Accessor(obj) diff --git a/pkg/registry/generic/store.go b/pkg/registry/generic/store.go index 6d912087..b2e30892 100644 --- a/pkg/registry/generic/store.go +++ b/pkg/registry/generic/store.go @@ -19,6 +19,7 @@ package generic import ( "context" "fmt" + "sync" "github.com/henderiw/apiserver-builder/pkg/builder/resource" builderrest "github.com/henderiw/apiserver-builder/pkg/builder/rest" @@ -44,11 +45,23 @@ func NewStorageProvider(ctx context.Context, obj resource.InternalObject, opts * return NewREST(obj, scheme, watcherManager, optsGetter, opts) }, } + // status subresources if statusobj, ok := obj.(resource.ObjectWithStatusSubResource); ok { sp.StatusSubResourceStorageProviderFn = func(scheme *runtime.Scheme, store rest.Storage) (rest.Storage, error) { return NewStatusREST(statusobj, scheme, watcherManager, opts, store) } } + + // arbitrary subresources + if arb, ok := obj.(resource.ObjectWithArbitrarySubResource); ok { + sp.ArbitrarySubresourceHandlerProviders = make(map[string]builderrest.SubResourceStorageProviderFn) + for _, sub := range arb.GetArbitrarySubResources() { + sub := sub + sp.ArbitrarySubresourceHandlerProviders[sub.SubResourceName()] = func(scheme *runtime.Scheme, store rest.Storage) (rest.Storage, error) { + return sub.NewStorage(scheme, store) + } + } + } // Add addtional subresources return sp } @@ -108,12 +121,14 @@ func NewREST( CategoryList: obj.GetCategories(), ShortNameList: obj.GetShortNames(), Storage: storage, + KeyLocks: &sync.Map{}, } - options := &generic.StoreOptions{ + storeOptions := &generic.StoreOptions{ RESTOptions: optsGetter, AttrFunc: utils.GetAttrs, } - if err := store.CompleteWithOptions(options); err != nil { + + if err := store.CompleteWithOptions(storeOptions); err != nil { return nil, err } return store, nil @@ -135,6 +150,8 @@ func NewStatusREST( statusStore := *registryStore statusStore.CreateStrategy = nil statusStore.DeleteStrategy = nil + statusStore.CategoryList = nil + statusStore.ShortNameList = nil statusStrategy := NewStatusStrategy(obj, scheme, registryStore.Storage, watcherManager, opts) statusStore.UpdateStrategy = statusStrategy statusStore.ResetFieldsStrategy = statusStrategy diff --git a/pkg/registry/generic/strategy_resource.go b/pkg/registry/generic/strategy_resource.go index 49ec8e97..be2d5af6 100644 --- a/pkg/registry/generic/strategy_resource.go +++ b/pkg/registry/generic/strategy_resource.go @@ -18,6 +18,7 @@ package generic import ( "context" + "fmt" "github.com/henderiw/apiserver-builder/pkg/builder/resource" "github.com/henderiw/apiserver-builder/pkg/builder/utils" @@ -25,6 +26,7 @@ import ( "github.com/henderiw/apiserver-store/pkg/storebackend" watchermanager "github.com/henderiw/apiserver-store/pkg/watcher-manager" "github.com/henderiw/logger/log" + "github.com/sdcio/config-server/apis/condition" "github.com/sdcio/config-server/pkg/registry/options" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -35,10 +37,15 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) +type conditionsGetter interface { + GetConditions() []condition.Condition +} + // NewStrategy creates and returns a strategy instance func NewStrategy( obj resource.InternalObject, @@ -86,6 +93,15 @@ func (r *strategy) Get(ctx context.Context, key types.NamespacedName) (runtime.O if err != nil { return nil, apierrors.NewNotFound(r.gr, key.Name) } + /* + accessor, _ := meta.Accessor(obj) + log.FromContext(ctx).Info("strategy.Get", + "key", key, + "managedFieldsCount", len(accessor.GetManagedFields()), + "labelsCount", len(accessor.GetLabels()), + "finalizersCount", len(accessor.GetFinalizers()), + ) + */ return obj, nil } @@ -104,6 +120,10 @@ func (r *strategy) InvokeCreate(ctx context.Context, obj runtime.Object, recursi } func (r *strategy) Create(ctx context.Context, key types.NamespacedName, obj runtime.Object, dryrun bool) (runtime.Object, error) { + if shouldLog(obj) { + logObject(ctx, "Create", key, obj) + } + if dryrun { if r.opts != nil && r.opts.DryRunCreateFn != nil { return r.opts.DryRunCreateFn(ctx, key, obj, dryrun) @@ -130,7 +150,7 @@ func (r *strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object r.obj.PrepareForUpdate(ctx, obj, old) } -func (r *strategy) AllowCreateOnUpdate() bool { return false } +func (r *strategy) AllowCreateOnUpdate() bool { return true } func (r *strategy) AllowUnconditionalUpdate() bool { return false } @@ -143,6 +163,11 @@ func (r *strategy) InvokeUpdate(ctx context.Context, obj, old runtime.Object, re } func (r *strategy) Update(ctx context.Context, key types.NamespacedName, obj, old runtime.Object, dryrun bool) (runtime.Object, error) { + if shouldLog(obj) { + logObject(ctx, "Update New", key, obj) + logObject(ctx, "Update Old", key, old) + } + if r.obj.IsEqual(ctx, obj, old) { return obj, nil } @@ -232,6 +257,14 @@ func (r *strategy) List(ctx context.Context, options *metainternalversion.ListOp return } + // Always enforce namespace scoping for namespace-scoped resources + if r.obj.NamespaceScoped() { + ns, ok := genericapirequest.NamespaceFrom(ctx) + if ok && ns != "" && accessor.GetNamespace() != ns { + return + } + } + if options.LabelSelector != nil || filter != nil { f := true if options.LabelSelector != nil { @@ -296,3 +329,30 @@ func (r *strategy) notifyWatcher(ctx context.Context, event watch.Event) { r.watcherManager.WatchChan() <- event } + +func shouldLog(obj runtime.Object) bool { + return true + //return obj.GetObjectKind().GroupVersionKind().Kind == "Target" +} + +func logObject(ctx context.Context, op string, key types.NamespacedName, obj runtime.Object) { + accessor, _ := meta.Accessor(obj) + l := log.FromContext(ctx).With( + "op", op, + "key", key, + "kind", obj.GetObjectKind().GroupVersionKind().Kind, + "resourceVersion", accessor.GetResourceVersion(), + "generation", accessor.GetGeneration(), + "managedFields", len(accessor.GetManagedFields()), + "finalizers", accessor.GetFinalizers(), + ) + if cg, ok := obj.(conditionsGetter); ok { + conditions := cg.GetConditions() + condSummary := make([]string, 0, len(conditions)) + for _, c := range conditions { + condSummary = append(condSummary, fmt.Sprintf("%s=%s(%s)", c.Type, c.Status, c.Message)) + } + l = l.With("conditions", condSummary) + } + l.Info("strategy") +} diff --git a/pkg/registry/generic/strategy_status.go b/pkg/registry/generic/strategy_status.go index e1d6c354..657d1306 100644 --- a/pkg/registry/generic/strategy_status.go +++ b/pkg/registry/generic/strategy_status.go @@ -33,7 +33,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/storage/names" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) // NewStatusStrategy creates and returns a sttaus strategy instance @@ -91,6 +91,12 @@ func (r *statusStrategy) InvokeUpdate(ctx context.Context, obj, old runtime.Obje } func (r *statusStrategy) Update(ctx context.Context, key types.NamespacedName, obj, old runtime.Object, dryrun bool) (runtime.Object, error) { + + if shouldLog(obj) { + logObject(ctx, "Update Status New", key, obj) + logObject(ctx, "Update Status Old", key, old) + } + // check if there is a change if r.obj.IsStatusEqual(ctx, obj, old) { return obj, nil diff --git a/pkg/registry/generic/watcher.go b/pkg/registry/generic/watcher.go index 4c616174..98d21e31 100644 --- a/pkg/registry/generic/watcher.go +++ b/pkg/registry/generic/watcher.go @@ -173,6 +173,20 @@ func (r *watcher) innerListAndWatch(ctx context.Context, l rest.RESTListStrategy r.sendWatchEvent(ctx, ev) } + // Send bookmark event to signal initial list is complete + /* + bookmarkObj := r.obj.New() + accessor, _ := meta.Accessor(bookmarkObj) + // Set resourceVersion so the client knows where it is + if accessor.GetResourceVersion() == "" { + accessor.SetResourceVersion("0") + } + r.sendWatchEvent(ctx, watch.Event{ + Type: watch.Bookmark, + Object: bookmarkObj, + }) + */ + log.Debug("moving into streaming mode") r.eventCallback = func(eventType watch.EventType, obj runtime.Object) bool { accessor, _ := meta.Accessor(obj) diff --git a/pkg/registry/configblame/fieldselector.go b/pkg/registry/options/fieldselector.go similarity index 74% rename from pkg/registry/configblame/fieldselector.go rename to pkg/registry/options/fieldselector.go index ea4b82c8..d27810ec 100644 --- a/pkg/registry/configblame/fieldselector.go +++ b/pkg/registry/options/fieldselector.go @@ -14,16 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -package configblame +package options import ( "context" "fmt" apierrors "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/selection" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "sigs.k8s.io/controller-runtime/pkg/client" ) // Filter @@ -36,7 +38,7 @@ type Filter struct { } // parseFieldSelector parses client-provided fields.Selector into a packageFilter -func parseFieldSelector(ctx context.Context, fieldSelector fields.Selector) (*Filter, error) { +func ParseFieldSelector(ctx context.Context, fieldSelector fields.Selector) (*Filter, error) { var filter *Filter // add the namespace to the list @@ -80,3 +82,27 @@ func parseFieldSelector(ctx context.Context, fieldSelector fields.Selector) (*Fi return filter, nil } + +func ListOptsFromInternal(filter *Filter, opts *metainternalversion.ListOptions) []client.ListOption { + listOpts := []client.ListOption{} + + if filter != nil && filter.Namespace != "" { + listOpts = append(listOpts, client.InNamespace(filter.Namespace)) + } + + if opts != nil { + if opts.LabelSelector != nil { + listOpts = append(listOpts, client.MatchingLabelsSelector{ + Selector: opts.LabelSelector, + }) + } + if opts.Limit > 0 { + listOpts = append(listOpts, client.Limit(opts.Limit)) + } + if opts.Continue != "" { + listOpts = append(listOpts, client.Continue(opts.Continue)) + } + } + + return listOpts +} diff --git a/pkg/registry/options/options.go b/pkg/registry/options/options.go index 19934007..a68afb3f 100644 --- a/pkg/registry/options/options.go +++ b/pkg/registry/options/options.go @@ -39,7 +39,7 @@ type Options struct { Type StorageType DB *badger.DB // Target - Client client.Client + Client client.Client // specific functions DryRunCreateFn func(ctx context.Context, key types.NamespacedName, obj runtime.Object, dryrun bool) (runtime.Object, error) DryRunUpdateFn func(ctx context.Context, key types.NamespacedName, obj, old runtime.Object, dryrun bool) (runtime.Object, error) diff --git a/pkg/registry/runningconfig/fieldselector.go b/pkg/registry/runningconfig/fieldselector.go deleted file mode 100644 index db1d34ea..00000000 --- a/pkg/registry/runningconfig/fieldselector.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2024 Nokia. - -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. -*/ - -package runningconfig - -import ( - "context" - "fmt" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/selection" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" -) - -// Filter -type Filter struct { - // Name filters by the name of the objects - Name string - - // Namespace filters by the namespace of the objects - Namespace string -} - -// parseFieldSelector parses client-provided fields.Selector into a packageFilter -func parseFieldSelector(ctx context.Context, fieldSelector fields.Selector) (*Filter, error) { - var filter *Filter - - // add the namespace to the list - namespace, ok := genericapirequest.NamespaceFrom(ctx) - if fieldSelector == nil { - if ok { - return &Filter{Namespace: namespace}, nil - } - return filter, nil - } - - requirements := fieldSelector.Requirements() - for _, requirement := range requirements { - filter = &Filter{} - switch requirement.Operator { - case selection.Equals, selection.DoesNotExist: - if requirement.Value == "" { - return filter, apierrors.NewBadRequest(fmt.Sprintf("unsupported fieldSelector value %q for field %q with operator %q", requirement.Value, requirement.Field, requirement.Operator)) - } - default: - return filter, apierrors.NewBadRequest(fmt.Sprintf("unsupported fieldSelector operator %q for field %q", requirement.Operator, requirement.Field)) - } - - switch requirement.Field { - case "metadata.name": - filter.Name = requirement.Value - case "metadata.namespace": - filter.Namespace = requirement.Value - default: - return filter, apierrors.NewBadRequest(fmt.Sprintf("unknown fieldSelector field %q", requirement.Field)) - } - } - // add namespace to the filter selector if specified - if ok { - if filter != nil { - filter.Namespace = namespace - } else { - filter = &Filter{Namespace: namespace} - } - } - - return filter, nil -} diff --git a/pkg/registry/runningconfig/store.go b/pkg/registry/runningconfig/store.go index bf0456e2..ac4d96ca 100644 --- a/pkg/registry/runningconfig/store.go +++ b/pkg/registry/runningconfig/store.go @@ -18,6 +18,7 @@ package runningconfig import ( "context" + "sync" "github.com/henderiw/apiserver-builder/pkg/builder/resource" builderrest "github.com/henderiw/apiserver-builder/pkg/builder/rest" @@ -82,6 +83,7 @@ func NewREST( CategoryList: obj.GetCategories(), ShortNameList: obj.GetShortNames(), Storage: nil, + KeyLocks: &sync.Map{}, } options := &generic.StoreOptions{ RESTOptions: optsGetter, diff --git a/pkg/registry/runningconfig/strategy_resource.go b/pkg/registry/runningconfig/strategy_resource.go index 8851f76f..70154da9 100644 --- a/pkg/registry/runningconfig/strategy_resource.go +++ b/pkg/registry/runningconfig/strategy_resource.go @@ -27,7 +27,7 @@ import ( watchermanager "github.com/henderiw/apiserver-store/pkg/watcher-manager" "github.com/henderiw/logger/log" "github.com/sdcio/config-server/apis/config" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" "github.com/sdcio/config-server/pkg/registry/options" dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" sdcpb "github.com/sdcio/sdc-protos/sdcpb" @@ -39,10 +39,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/storage/names" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" ) // NewStrategy creates and returns a strategy instance @@ -149,7 +148,7 @@ func (r *strategy) Delete(ctx context.Context, key types.NamespacedName, obj run return obj, nil } -func (r *strategy) getRunningConfig(ctx context.Context, target *invv1alpha1.Target, key types.NamespacedName) (*config.RunningConfig, error) { +func (r *strategy) getRunningConfig(ctx context.Context, target *configv1alpha1.Target, key types.NamespacedName) (*config.RunningConfig, error) { if !target.IsReady() { return nil, apierrors.NewNotFound(r.gr, key.Name) } @@ -201,40 +200,29 @@ func (r *strategy) getRunningConfig(ctx context.Context, target *invv1alpha1.Tar } func (r *strategy) Get(ctx context.Context, key types.NamespacedName) (runtime.Object, error) { - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, key, target); err != nil { return nil, apierrors.NewNotFound(r.gr, key.Name) } return r.getRunningConfig(ctx, target, key) } -func (r *strategy) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { +func (r *strategy) List(ctx context.Context, opts *metainternalversion.ListOptions) (runtime.Object, error) { log := log.FromContext(ctx) - filter, err := parseFieldSelector(ctx, options.FieldSelector) + filter, err := options.ParseFieldSelector(ctx, opts.FieldSelector) if err != nil { return nil, err } - namespace, ok := genericapirequest.NamespaceFrom(ctx) - if ok { - if filter != nil { - filter.Namespace = namespace - } else { - filter = &Filter{ - Namespace: namespace, - } - } - } - newListObj := r.obj.NewList() v, err := utils.GetListPrt(newListObj) if err != nil { return nil, err } - targets := &invv1alpha1.TargetList{} - if err := r.client.List(ctx, targets); err != nil { + targets := &configv1alpha1.TargetList{} + if err := r.client.List(ctx, targets, options.ListOptsFromInternal(filter, opts)...); err != nil { return nil, err } @@ -260,6 +248,7 @@ func (r *strategy) Watch(ctx context.Context, options *metainternalversion.ListO cancel: cancel, resultChan: make(chan watch.Event), watcherManager: r.watcherManager, + obj: r.obj, } go w.listAndWatch(ctx, r, options) diff --git a/pkg/registry/runningconfig/watcher.go b/pkg/registry/runningconfig/watcher.go index 74118985..c0dbfd7b 100644 --- a/pkg/registry/runningconfig/watcher.go +++ b/pkg/registry/runningconfig/watcher.go @@ -173,6 +173,20 @@ func (r *watcher) innerListAndWatch(ctx context.Context, l rest.RESTListStrategy r.sendWatchEvent(ctx, ev) } + // Send bookmark event to signal initial list is complete + /* + bookmarkObj := r.obj.New() + accessor, _ := meta.Accessor(bookmarkObj) + // Set resourceVersion so the client knows where it is + if accessor.GetResourceVersion() == "" { + accessor.SetResourceVersion("0") + } + r.sendWatchEvent(ctx, watch.Event{ + Type: watch.Bookmark, + Object: bookmarkObj, + }) + */ + log.Debug("moving into streaming mode") r.eventCallback = func(eventType watch.EventType, obj runtime.Object) bool { accessor, _ := meta.Accessor(obj) diff --git a/pkg/registry/store/store.go b/pkg/registry/store/store.go index eba3c196..4696f42d 100644 --- a/pkg/registry/store/store.go +++ b/pkg/registry/store/store.go @@ -56,7 +56,7 @@ func CreateFileStore(scheme *runtime.Scheme, obj resource.Object, prefix string) return nil, err } - return file.NewStore(&storebackend.Config[runtime.Object]{ + return file.NewStore[runtime.Object](&storebackend.Config{ GroupResource: gr, Prefix: prefix, Codec: codec, @@ -76,7 +76,7 @@ func CreateKVStore(db *badger.DB, scheme *runtime.Scheme, obj resource.Object) ( if err != nil { return nil, err } - return badgerdb.NewStore(db, &storebackend.Config[runtime.Object]{ + return badgerdb.NewStore[runtime.Object](db, &storebackend.Config{ GroupResource: gr, Codec: codec, NewFunc: obj.New, diff --git a/pkg/schema/gitdownloader.go b/pkg/schema/gitdownloader.go index 52f0767c..8d7ee447 100644 --- a/pkg/schema/gitdownloader.go +++ b/pkg/schema/gitdownloader.go @@ -45,7 +45,7 @@ func newGitDownloader(destDir, namespace string, schemaRepo *invv1alpha1.SchemaS func (l *gitDownloader) Download(ctx context.Context) (string, error) { log := log.FromContext(ctx) - repo, err := git.NewRepo(l.schemaRepo.RepositoryURL) + repo, err := git.NewRepo(l.schemaRepo.RepoURL) if err != nil { return "", err } diff --git a/pkg/schema/loader.go b/pkg/schema/loader.go index 6bd3ba50..0ca1f57f 100644 --- a/pkg/schema/loader.go +++ b/pkg/schema/loader.go @@ -144,7 +144,7 @@ func (r *Loader) Load(ctx context.Context, key string) ([]invv1alpha1.SchemaRepo if err != nil { errs = append(errs, err) } - repoStatuses = append(repoStatuses, invv1alpha1.SchemaRepositoryStatus{RepoURL: schemaRepo.RepositoryURL, Reference: reference}) + repoStatuses = append(repoStatuses, invv1alpha1.SchemaRepositoryStatus{RepoURL: schemaRepo.RepoURL, Reference: reference}) } err = errors.Join(errs...) @@ -160,10 +160,10 @@ func (r *Loader) download(ctx context.Context, schema *invv1alpha1.Schema, schem // for now we only use git, but in the future we can extend this to use other downloaders e.g. OCI/... downloader := newGitDownloader(r.tmpDir, schema.Namespace, schemaRepo, r.credentialResolver) - sem := r.repoMgr.GetOrAdd(schemaRepo.RepositoryURL) + sem := r.repoMgr.GetOrAdd(schemaRepo.RepoURL) // Attempt to acquire the semaphore if err := sem.Acquire(ctx, 1); err != nil { - return "", fmt.Errorf("failed to acquire semaphore for %s: %w", schemaRepo.RepositoryURL, err) + return "", fmt.Errorf("failed to acquire semaphore for %s: %w", schemaRepo.RepoURL, err) } defer sem.Release(1) @@ -172,7 +172,7 @@ func (r *Loader) download(ctx context.Context, schema *invv1alpha1.Schema, schem return "", err } - localPath, err := downloader.LocalPath(schemaRepo.RepositoryURL) + localPath, err := downloader.LocalPath(schemaRepo.RepoURL) if err != nil { return "", err } diff --git a/pkg/sdc/ctx/schemaserver_context.go b/pkg/sdc/ctx/schemaserver_context.go deleted file mode 100644 index 6bce8f9a..00000000 --- a/pkg/sdc/ctx/schemaserver_context.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright 2024 Nokia. - -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. -*/ - -package sdcctx - -/* - -import ( - "context" - "os" - "time" - - "github.com/henderiw/apiserver-store/pkg/storebackend" - "github.com/henderiw/logger/log" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" - ssclient "github.com/sdcio/config-server/pkg/sdc/schemaserver/client" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -type SSContext struct { - Config *ssclient.Config - SSClient ssclient.Client // schemaserver client - client client.Client - cancelWatch context.CancelFunc -} - -const ( - localDataServerAddress = "localhost:56000" - SchemaServerAddress = "data-server-0.schema-server.sdc-system.svc.cluster.local:56000" -) - -func CreateSchemaServerClient(ctx context.Context, schemaServerStore storebackend.Storer[SSContext], client client.Client) error { - log := log.FromContext(ctx) - - // For the schema server we first check if the SDC_SCHEMA_SERVER was et if not we could also use - // the SDC_DATA_SERVER as fallback. If none are set it is the default address (localhost) - schemaServerAddress := SchemaServerAddress - if address, found := os.LookupEnv("SDC_SCHEMA_SERVER"); found { - schemaServerAddress = address - } else { - if address, found := os.LookupEnv("SDC_DATA_SERVER"); found { - schemaServerAddress = address - } - } - - ssConfig := &ssclient.Config{ - Address: schemaServerAddress, - } - ssClient, err := ssclient.New(ssConfig) - if err != nil { - log.Error("cannot initialize schemaserver client", "err", err) - return err - } - if err := ssClient.Start(ctx); err != nil { - log.Error("cannot start schemaserver client", "err", err) - return err - } - - watchCtx, cancelWatch := context.WithCancel(ctx) - ssCtx := SSContext{ - Config: ssConfig, - SSClient: ssClient, - cancelWatch: cancelWatch, - client: client, - } - - go ssCtx.watchSchemaServerConnection(watchCtx) - - if err := schemaServerStore.Create(ctx, storebackend.ToKey(schemaServerAddress), ssCtx); err != nil { - log.Error("cannot store schema context in schemaserver", "err", err) - return err - } - log.Info("schemaserver client created") - return nil -} - -func (r *SSContext) watchSchemaServerConnection(ctx context.Context) { - log := log.FromContext(ctx) - prevState := r.SSClient.IsConnectionReady() - - ticker := time.NewTicker(10 * time.Second) - defer ticker.Stop() - - for { - select { - case <-ctx.Done(): - log.Info("Stopping schema server connection watcher") - return - case <-ticker.C: - currentState := r.SSClient.IsConnectionReady() - if currentState != prevState { - log.Info("Schema server connection state changed", "ready", currentState) - - schemaList := &invv1alpha1.SchemaList{} - if err := r.client.List(ctx, schemaList); err != nil { - log.Error("cannot get schemas", "error", err) - } - - for _, schema := range schemaList.Items { - patch := client.MergeFrom(schema.DeepCopy()) - if currentState { - schema.SetConditions(invv1alpha1.SchemaServerReady()) - } else { - schema.SetConditions(invv1alpha1.SchemaServerFailed()) - } - if err := r.client.Status().Patch(ctx, &schema, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ - FieldManager: "schema server watcher", - }, - }); err != nil { - log.Error("cannot get schemas", "error", err) - } - } - prevState = currentState - } - } - } -} - -func DeleteSchemaServerClient(ctx context.Context, schemaServerStore storebackend.Storer[SSContext], schemaServerAddress string) error { - log := log.FromContext(ctx) - - ssCtx, err := schemaServerStore.Get(ctx, storebackend.ToKey(schemaServerAddress)) - if err != nil { - log.Error("cannot retrieve schema context", "err", err) - return err - } - - ssCtx.cancelWatch() // Stop the watcher - - if err := schemaServerStore.Delete(ctx, storebackend.ToKey(schemaServerAddress)); err != nil { - log.Error("cannot delete schema context", "err", err) - return err - } - - log.Info("schemaserver client deleted") - return nil -} -*/ \ No newline at end of file diff --git a/pkg/sdc/dataserver/client/client.go b/pkg/sdc/dataserver/client/client.go index 4810d7f5..60f5167d 100644 --- a/pkg/sdc/dataserver/client/client.go +++ b/pkg/sdc/dataserver/client/client.go @@ -31,21 +31,40 @@ import ( //"google.golang.org/grpc/keepalive" ) -const dataServerAddress = "data-server.sdc-system.svc.cluster.local:56000" -const localDataServerAddress = "localhost:56000" +const ( + defaultDataServerService = "data-server" + defaultDataServerPort = "56000" + defaultNamespace = "sdc-system" +) func GetDataServerAddress() string { - if address, found := os.LookupEnv("SDC_DATA_SERVER"); found { - return address - } - return dataServerAddress + return getDataServerAddress(false) } func GetLocalDataServerAddress() string { + return getDataServerAddress(true) +} + +func getDataServerAddress(local bool) string { if address, found := os.LookupEnv("SDC_DATA_SERVER"); found { - return address + return address + } + + ns := envOrDefault("POD_NAMESPACE", defaultNamespace) + svc := envOrDefault("SDC_DATA_SERVER_SERVICE", defaultDataServerService) + port := envOrDefault("SDC_DATA_SERVER_PORT", defaultDataServerPort) + + if local { + return fmt.Sprintf("localhost:%s", port) } - return localDataServerAddress + return fmt.Sprintf("%s.%s.svc.cluster.local:%s", svc, ns, port) +} + +func envOrDefault(key, fallback string) string { + if v, ok := os.LookupEnv(key); ok && v != "" { + return v + } + return fallback } type Config struct { @@ -62,7 +81,7 @@ type Config struct { MaxMsgSize int } -func defaukltConfig(cfg *Config) { +func defaultConfig(cfg *Config) { if cfg == nil { cfg = &Config{Address: GetDataServerAddress()} } @@ -99,7 +118,7 @@ func OneShot( cfg *Config, fn func(ctx context.Context, c sdcpb.DataServerClient) error, ) error { - defaukltConfig(cfg) + defaultConfig(cfg) conn, err := dial(ctx, cfg) if err != nil { return err @@ -144,7 +163,7 @@ func NewEphemeral( ctx context.Context, cfg *Config, ) (sdcpb.DataServerClient, func() error, error) { - defaukltConfig(cfg) + defaultConfig(cfg) conn, err := dial(ctx, cfg) if err != nil { return nil, nil, err @@ -171,7 +190,7 @@ type Client interface { } func New(cfg *Config) (Client, error) { - defaukltConfig(cfg) + defaultConfig(cfg) // default cancel is a no-op so Stop() is always safe return &client{cfg: cfg, cancel: func() {}}, nil } @@ -188,7 +207,7 @@ const DSConnectionStatusNotConnected = "DATASERVER_NOT_CONNECTED" // dial creates a gRPC connection with a timeout and proper options, // using the modern grpc.NewClient API. func dial(ctx context.Context, cfg *Config) (*grpc.ClientConn, error) { - defaukltConfig(cfg) + defaultConfig(cfg) dialCtx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() diff --git a/pkg/sdc/dataserver/client/fake_client.go b/pkg/sdc/dataserver/client/fake_client.go index f5306dc7..16fb7377 100644 --- a/pkg/sdc/dataserver/client/fake_client.go +++ b/pkg/sdc/dataserver/client/fake_client.go @@ -30,16 +30,16 @@ func NewFakeClient() Client { type fakeclient struct{} -func (r *fakeclient) IsConnectionReady() bool {return true} +func (r *fakeclient) IsConnectionReady() bool { return true } -func (r *fakeclient) IsConnected() bool {return true} +func (r *fakeclient) IsConnected() bool { return true } func (r *fakeclient) ConnState() connectivity.State { - return connectivity.Ready + return connectivity.Ready } func (r *fakeclient) WaitForStateChange(ctx context.Context, s connectivity.State) bool { - return true + return true } func (r *fakeclient) Connect() {} @@ -91,4 +91,4 @@ func (r *fakeclient) WatchDeviations(ctx context.Context, in *sdcpb.WatchDeviati func (r *fakeclient) BlameConfig(ctx context.Context, in *sdcpb.BlameConfigRequest, opts ...grpc.CallOption) (*sdcpb.BlameConfigResponse, error) { return &sdcpb.BlameConfigResponse{}, nil -} \ No newline at end of file +} diff --git a/pkg/sdc/schemaserver/client/client.go b/pkg/sdc/schemaserver/client/client.go index c1402a94..e45673b5 100644 --- a/pkg/sdc/schemaserver/client/client.go +++ b/pkg/sdc/schemaserver/client/client.go @@ -19,8 +19,8 @@ package client import ( "context" "fmt" - "time" "os" + "time" "github.com/henderiw/logger/log" sdcpb "github.com/sdcio/sdc-protos/sdcpb" @@ -159,7 +159,6 @@ type Client interface { sdcpb.SchemaServerClient } - func New(cfg *Config) (Client, error) { defaultConfig(cfg) // default cancel is a no-op so Stop() is always safe @@ -311,4 +310,4 @@ func (r *client) ExpandPath(ctx context.Context, in *sdcpb.ExpandPathRequest, op // GetSchemaElements returns the schema of each path element func (r *client) GetSchemaElements(ctx context.Context, in *sdcpb.GetSchemaRequest, opts ...grpc.CallOption) (sdcpb.SchemaServer_GetSchemaElementsClient, error) { return r.schemaclient.GetSchemaElements(ctx, in, opts...) -} \ No newline at end of file +} diff --git a/pkg/sdc/target/manager/collector.go b/pkg/sdc/target/manager/collector.go index 6731f336..7ca417ee 100644 --- a/pkg/sdc/target/manager/collector.go +++ b/pkg/sdc/target/manager/collector.go @@ -39,7 +39,7 @@ type Collector struct { targetKey storebackend.Key subChan chan struct{} subscriptions *Subscriptions - cache cache.Cache + cache cache.Cache m sync.RWMutex target *target.Target @@ -47,9 +47,9 @@ type Collector struct { paths map[invv1alpha1.Encoding][]Path // collector lifetime - cancel context.CancelFunc + cancel context.CancelFunc - // subscription lifetime (ONLY for curr + // subscription lifetime (ONLY for curr subscriptionCancel context.CancelFunc } @@ -59,15 +59,15 @@ func NewCollector(targetKey storebackend.Key, subscriptions *Subscriptions) *Col targetKey: targetKey, subscriptions: subscriptions, subChan: make(chan struct{}), - cache: cache, + cache: cache, } } func (r *Collector) NotifySubscriptionChanged() { - select { - case r.subChan <- struct{}{}: - default: - } + select { + case r.subChan <- struct{}{}: + default: + } } func (r *Collector) SetPort(port uint) { @@ -109,81 +109,80 @@ func (r *Collector) Stop(ctx context.Context) { r.target.StopSubscriptions() if err := r.target.Close(); err != nil { log.Error("close error", "err", err) - } + } r.target = nil } r.paths = nil } - func (r *Collector) Start(ctx context.Context, req *sdcpb.CreateDataStoreRequest) error { - // stop existing (safe) - r.Stop(ctx) - - r.m.Lock() - // start collector lifetime - runCtx, cancel := context.WithCancel(ctx) - r.cancel = cancel - - log := log.FromContext(ctx).With("name", "targetCollector", "target", r.targetKey.String()) - - // build target (needs port) - tOpts := []gapi.TargetOption{ - gapi.Name(r.targetKey.String()), - gapi.Address(fmt.Sprintf("%s:%d", req.Target.Address, req.Target.Port)), - gapi.Username(string(req.Target.Credentials.Username)), - gapi.Password(string(req.Target.Credentials.Password)), - gapi.Timeout(5 * time.Second), - } - if req.Target.Tls == nil { - tOpts = append(tOpts, gapi.Insecure(true)) - } else { - tOpts = append(tOpts, gapi.SkipVerify(req.Target.Tls.SkipVerify)) - tOpts = append(tOpts, gapi.TLSCA(req.Target.Tls.Ca)) - tOpts = append(tOpts, gapi.TLSCert(req.Target.Tls.Cert)) - tOpts = append(tOpts, gapi.TLSKey(req.Target.Tls.Key)) - } - - var err error - r.target, err = gapi.NewTarget(tOpts...) - if err != nil { - r.cancel = nil - r.m.Unlock() - log.Error("cannot create gnmi target", "err", err) - return err - } - if err := r.target.CreateGNMIClient(runCtx); err != nil { - _ = r.target.Close() - r.target = nil - r.cancel = nil - r.m.Unlock() - log.Error("cannot create gnmi client", "err", err) - return err - } - - // reset path snapshot so first update triggers - r.paths = nil - r.m.Unlock() - - go r.start(runCtx) - return nil + // stop existing (safe) + r.Stop(ctx) + + r.m.Lock() + // start collector lifetime + runCtx, cancel := context.WithCancel(ctx) + r.cancel = cancel + + log := log.FromContext(ctx).With("name", "targetCollector", "target", r.targetKey.String()) + + // build target (needs port) + tOpts := []gapi.TargetOption{ + gapi.Name(r.targetKey.String()), + gapi.Address(fmt.Sprintf("%s:%d", req.Target.Address, req.Target.Port)), + gapi.Username(string(req.Target.Credentials.Username)), + gapi.Password(string(req.Target.Credentials.Password)), + gapi.Timeout(5 * time.Second), + } + if req.Target.Tls == nil { + tOpts = append(tOpts, gapi.Insecure(true)) + } else { + tOpts = append(tOpts, gapi.SkipVerify(req.Target.Tls.SkipVerify)) + tOpts = append(tOpts, gapi.TLSCA(req.Target.Tls.Ca)) + tOpts = append(tOpts, gapi.TLSCert(req.Target.Tls.Cert)) + tOpts = append(tOpts, gapi.TLSKey(req.Target.Tls.Key)) + } + + var err error + r.target, err = gapi.NewTarget(tOpts...) + if err != nil { + r.cancel = nil + r.m.Unlock() + log.Error("cannot create gnmi target", "err", err) + return err + } + if err := r.target.CreateGNMIClient(runCtx); err != nil { + _ = r.target.Close() + r.target = nil + r.cancel = nil + r.m.Unlock() + log.Error("cannot create gnmi client", "err", err) + return err + } + + // reset path snapshot so first update triggers + r.paths = nil + r.m.Unlock() + + go r.start(runCtx) + return nil } func (r *Collector) start(ctx context.Context) { - log := log.FromContext(ctx).With("name", "targetCollector", "target", r.targetKey.String()) - log.Info("start collector") - - // initial apply - r.update(ctx) - - for { - select { - case <-ctx.Done(): - return - case <-r.subChan: - r.update(ctx) - } - } + log := log.FromContext(ctx).With("name", "targetCollector", "target", r.targetKey.String()) + log.Info("start collector") + + // initial apply + r.update(ctx) + + for { + select { + case <-ctx.Done(): + return + case <-r.subChan: + r.update(ctx) + } + } } func (r *Collector) update(ctx context.Context) { @@ -194,20 +193,20 @@ func (r *Collector) update(ctx context.Context) { if r.subscriptions == nil { log.Debug("no subscriptions") - r.stopSubscriptionLocked() - r.paths = nil - return + r.stopSubscriptionLocked() + r.paths = nil + return } - + newPaths := r.subscriptions.GetPaths() log.Debug("subscription update received", "newPaths", newPaths) - + if !r.hasPathsChanged(newPaths) { log.Debug("subscription did not change") return } log.Debug("subscription changed", "newPaths", newPaths, "existingPaths", r.paths) - + // stop current subscription loop r.stopSubscriptionLocked() @@ -237,38 +236,37 @@ func (r *Collector) stopSubscriptionLocked() { } } - func (r *Collector) hasPathsChanged(newPaths map[invv1alpha1.Encoding][]Path) bool { // IMPORTANT: caller holds r.m.Lock() old := r.paths - if old == nil && len(newPaths) == 0 { - return false - } - if len(old) != len(newPaths) { - return true - } - for enc, np := range newPaths { - op, ok := old[enc] - if !ok { - return true - } - if len(op) != len(np) { - return true - } - // If order is not guaranteed, you should sort; see section 4 below. - for i := range op { - if op[i].Path != np[i].Path || op[i].Interval != np[i].Interval { - return true - } - } - } - return false + if old == nil && len(newPaths) == 0 { + return false + } + if len(old) != len(newPaths) { + return true + } + for enc, np := range newPaths { + op, ok := old[enc] + if !ok { + return true + } + if len(op) != len(np) { + return true + } + // If order is not guaranteed, you should sort; see section 4 below. + for i := range op { + if op[i].Path != np[i].Path || op[i].Interval != np[i].Interval { + return true + } + } + } + return false } func (r *Collector) StopSubscription(ctx context.Context) { log := log.FromContext(ctx).With("name", "targetCollector", "target", r.targetKey.String()) log.Info("stop subscription") - + r.m.Lock() defer r.m.Unlock() diff --git a/pkg/sdc/target/manager/deviation_watcher.go b/pkg/sdc/target/manager/deviation_watcher.go index 6ddf6d06..09a25496 100644 --- a/pkg/sdc/target/manager/deviation_watcher.go +++ b/pkg/sdc/target/manager/deviation_watcher.go @@ -26,7 +26,9 @@ import ( "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/henderiw/logger/log" "github.com/pkg/errors" + "github.com/sdcio/config-server/apis/config" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" sdcpb "github.com/sdcio/sdc-protos/sdcpb" "google.golang.org/grpc/codes" @@ -39,27 +41,27 @@ import ( const ( unManagedConfigDeviation = "__" - fieldManagerDeviation = "ConfigController" + fieldManagerDeviation = "ConfigController" ) type DeviationWatcher struct { - key storebackend.Key // target key - client client.Client // k8 client - dsclient dsclient.Client // datastore client + key storebackend.Key // target key + client client.Client // k8 client + dsclient dsclient.Client // datastore client m sync.RWMutex cancel context.CancelFunc } func NewDeviationWatcher( - key storebackend.Key, - client client.Client, + key storebackend.Key, + client client.Client, dsclient dsclient.Client, ) *DeviationWatcher { return &DeviationWatcher{ - key: key, - client: client, - dsclient: dsclient, + key: key, + client: client, + dsclient: dsclient, } } @@ -137,11 +139,11 @@ func (r *DeviationWatcher) start(ctx context.Context) { if started { log.Error("protocol violation start on start") /* - if err := stream.CloseSend(); err != nil { - log.Error("stream failed", "err", err) - } // to check if this works on the client side to inform the server to stop sending - stream = nil - time.Sleep(time.Second * 1) //- resilience for server crash + if err := stream.CloseSend(); err != nil { + log.Error("stream failed", "err", err) + } // to check if this works on the client side to inform the server to stop sending + stream = nil + time.Sleep(time.Second * 1) //- resilience for server crash */ continue } @@ -154,11 +156,11 @@ func (r *DeviationWatcher) start(ctx context.Context) { if !started { log.Error("protocol violation update without start") /* - if err := stream.CloseSend(); err != nil { - log.Error("stream failed", "err", err) - } // to check if this works on the client side to inform the server to stop sending - stream = nil - time.Sleep(time.Second * 1) //- resilience for server crash + if err := stream.CloseSend(); err != nil { + log.Error("stream failed", "err", err) + } // to check if this works on the client side to inform the server to stop sending + stream = nil + time.Sleep(time.Second * 1) //- resilience for server crash */ continue } @@ -182,11 +184,11 @@ func (r *DeviationWatcher) start(ctx context.Context) { log.Error("protocol violation end without start") /* - if err := stream.CloseSend(); err != nil { - log.Error("stream failed", "err", err) - } // to check if this works on the client side to inform the server to stop sending - stream = nil - time.Sleep(time.Second * 1) //- resilience for server crash + if err := stream.CloseSend(); err != nil { + log.Error("stream failed", "err", err) + } // to check if this works on the client side to inform the server to stop sending + stream = nil + time.Sleep(time.Second * 1) //- resilience for server crash */ continue } @@ -213,8 +215,10 @@ func (r *DeviationWatcher) processDeviations(ctx context.Context, deviations map configDevs := ConvertSdcpbDeviations2ConfigDeviations(ctx, devs) nsn := r.key.NamespacedName + typ := configv1alpha1.DeviationType_CONFIG if configName == unManagedConfigDeviation { log.Info("target device deviations", "devs", len(configDevs)) + typ = configv1alpha1.DeviationType_TARGET } else { parts := strings.SplitN(configName, ".", 2) nsn = types.NamespacedName{ @@ -227,7 +231,7 @@ func (r *DeviationWatcher) processDeviations(ctx context.Context, deviations map } log.Info("config deviations", "nsn", nsn, "devs", len(configDevs)) } - r.processConfigDeviations(ctx, nsn, configDevs) + r.processConfigDeviations(ctx, nsn, configDevs, typ) } } @@ -235,6 +239,7 @@ func (r *DeviationWatcher) processConfigDeviations( ctx context.Context, nsn types.NamespacedName, deviations []configv1alpha1.ConfigDeviation, + typ configv1alpha1.DeviationType, ) { log := log.FromContext(ctx) @@ -242,26 +247,26 @@ func (r *DeviationWatcher) processConfigDeviations( return deviations[i].Path < deviations[j].Path }) - deviation := &configv1alpha1.Deviation{} - if err := r.client.Get(ctx, nsn, deviation); err != nil { - log.Error("cannot get intent for recieved deviation", "config", nsn, "err", err) - return - } + applyConfig := configv1alpha1apply.Deviation(nsn.Name, nsn.Namespace). + WithLabels(map[string]string{ + config.TargetNameKey: r.key.Name, + config.TargetNamespaceKey: r.key.Namespace, + }). + WithSpec(configv1alpha1apply.DeviationSpec(). + WithDeviationType(typ). + WithDeviations(configDeviationsToApply(deviations)...), + ) log.Info("patch deviations", "nsn", nsn, "devs", len(deviations)) - patch := client.MergeFrom(deviation.DeepObjectCopy()) - - deviation.Spec.Deviations = deviations - - if err := r.client.Patch(ctx, deviation, patch, &client.PatchOptions{ + if err := r.client.Apply(ctx, applyConfig, &client.ApplyOptions{ FieldManager: fieldManagerDeviation, + Force: ptr.To(true), }); err != nil { - log.Error("cannot update intent for recieved deviation", "config", nsn) + log.Error("cannot update intent for received deviation", "config", nsn, "err", err) } } - func (r *DeviationWatcher) clearTargetDeviation( ctx context.Context, ) { @@ -274,19 +279,20 @@ func (r *DeviationWatcher) clearTargetDeviation( return } // If already clear, do nothing (avoids useless writes) - if len(deviation.Spec.Deviations) == 0 { - return - } + if len(deviation.Spec.Deviations) == 0 { + return + } log.Info("clear deviations", "nsn", nsn) - patch := client.MergeFrom(deviation.DeepObjectCopy()) - deviation.Spec.Deviations = nil + applyConfig := configv1alpha1apply.Deviation(nsn.Name, nsn.Namespace). + WithSpec(configv1alpha1apply.DeviationSpec()) + // empty spec with no deviations — SSA with Force will clear the field - if err := r.client.Patch(ctx, deviation, patch, &client.PatchOptions{ + if err := r.client.Apply(ctx, applyConfig, &client.ApplyOptions{ FieldManager: fieldManagerDeviation, }); err != nil { - log.Error("cannot update intent for recieved deviation", "config", nsn) + log.Error("cannot clear deviation", "config", nsn, "err", err) } } @@ -308,7 +314,7 @@ func ConvertSdcpbDeviations2ConfigDeviations(ctx context.Context, devs []*sdcpb. deviations = append(deviations, configv1alpha1.ConfigDeviation{ Path: dev.GetPath().ToXPath(false), DesiredValue: desiredValue, - CurrentValue: currentValue, + ActualValue: currentValue, Reason: dev.GetReason().String(), }) @@ -327,3 +333,20 @@ func getDeviationString(val *sdcpb.TypedValue) (*string, error) { } return v, nil } + +func configDeviationsToApply(devs []configv1alpha1.ConfigDeviation) []*configv1alpha1apply.ConfigDeviationApplyConfiguration { + result := make([]*configv1alpha1apply.ConfigDeviationApplyConfiguration, 0, len(devs)) + for _, d := range devs { + a := configv1alpha1apply.ConfigDeviation(). + WithPath(d.Path). + WithReason(d.Reason) + if d.DesiredValue != nil { + a = a.WithDesiredValue(*d.DesiredValue) + } + if d.ActualValue != nil { + a = a.WithActualValue(*d.ActualValue) + } + result = append(result, a) + } + return result +} diff --git a/pkg/sdc/target/manager/dryrun.go b/pkg/sdc/target/manager/dryrun.go index b14da70c..d2deddf0 100644 --- a/pkg/sdc/target/manager/dryrun.go +++ b/pkg/sdc/target/manager/dryrun.go @@ -22,7 +22,7 @@ import ( "github.com/sdcio/config-server/apis/condition" "github.com/sdcio/config-server/apis/config" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" sdcpb "github.com/sdcio/sdc-protos/sdcpb" "k8s.io/apimachinery/pkg/runtime" @@ -37,7 +37,7 @@ func RunDryRunTransaction( ctx context.Context, key types.NamespacedName, c *config.Config, - target *invv1alpha1.Target, + target *configv1alpha1.Target, intents []*sdcpb.TransactionIntent, dryrun bool, ) (runtime.Object, error) { @@ -58,7 +58,7 @@ func RunDryRunTransaction( }() req := &sdcpb.TransactionSetRequest{ - TransactionId: GetGVKNSN(c), + TransactionId: config.GetGVKNSN(c), DatastoreName: key.String(), DryRun: dryrun, Timeout: ptr.To(int32(60)), diff --git a/pkg/sdc/target/manager/error.go b/pkg/sdc/target/manager/error.go index c5d26f95..77ca9e07 100644 --- a/pkg/sdc/target/manager/error.go +++ b/pkg/sdc/target/manager/error.go @@ -57,4 +57,4 @@ func (e *LookupError) Error() string { func (e *LookupError) Unwrap() error { return e.WrappedError -} \ No newline at end of file +} diff --git a/pkg/sdc/target/manager/exports.go b/pkg/sdc/target/manager/exports.go index ba065be8..60c1b8f4 100644 --- a/pkg/sdc/target/manager/exports.go +++ b/pkg/sdc/target/manager/exports.go @@ -50,4 +50,3 @@ func (t *TargetRuntime) PromLabels() []prompb.Label { } return labels } - diff --git a/pkg/sdc/target/manager/manager.go b/pkg/sdc/target/manager/manager.go index a5327ae3..8633ac2c 100644 --- a/pkg/sdc/target/manager/manager.go +++ b/pkg/sdc/target/manager/manager.go @@ -20,10 +20,10 @@ import ( "context" "crypto/sha256" "encoding/hex" - "sync" + "errors" "fmt" "sort" - "errors" + "sync" "github.com/henderiw/apiserver-store/pkg/storebackend" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" @@ -34,8 +34,8 @@ import ( sdcpb "github.com/sdcio/sdc-protos/sdcpb" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" - "sigs.k8s.io/controller-runtime/pkg/client" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" ) type TargetManager struct { @@ -71,7 +71,7 @@ func (m *TargetManager) ApplyDesired( ctx context.Context, key storebackend.Key, req *sdcpb.CreateDataStoreRequest, - refs *invv1alpha1.TargetStatusUsedReferences, + refs *configv1alpha1.TargetStatusUsedReferences, hash string, ) { rt := m.GetOrCreate(key) @@ -167,7 +167,7 @@ func (m *TargetManager) GetRuntimeForTarget(_ context.Context, key storebackend. return m.targets[key] } -func ComputeCreateDSHash(req *sdcpb.CreateDataStoreRequest, refs *invv1alpha1.TargetStatusUsedReferences) string { +func ComputeCreateDSHash(req *sdcpb.CreateDataStoreRequest, refs *configv1alpha1.TargetStatusUsedReferences) string { h := sha256.New() // hash the request deterministically @@ -208,41 +208,49 @@ func (m *TargetManager) listRuntimes() []*TargetRuntime { } func (m *TargetManager) ForEachRuntime(fn func(runtimeview.TargetRuntimeView)) { - for _, rt := range m.listRuntimes() { - fn(rt) - } + for _, rt := range m.listRuntimes() { + fn(rt) + } } func (m *TargetManager) ApplySubscription(ctx context.Context, sub *invv1alpha1.Subscription) ([]string, error) { - targets, err := m.getDownstreamTargets(ctx, sub) // optional helper - if err != nil { return nil, err } - - var errs error - for _, tn := range targets { - key := storebackend.KeyFromNSN(client.ObjectKey{Namespace: sub.Namespace, Name: tn}) - rt := m.GetRuntimeForTarget(ctx, key) - if rt == nil { continue } - if err := rt.UpsertSubscription(ctx, sub); err != nil { - errs = errors.Join(errs, err) - } - } - return targets, errs + targets, err := m.getDownstreamTargets(ctx, sub) // optional helper + if err != nil { + return nil, err + } + + var errs error + for _, tn := range targets { + key := storebackend.KeyFromNSN(client.ObjectKey{Namespace: sub.Namespace, Name: tn}) + rt := m.GetRuntimeForTarget(ctx, key) + if rt == nil { + continue + } + if err := rt.UpsertSubscription(ctx, sub); err != nil { + errs = errors.Join(errs, err) + } + } + return targets, errs } func (m *TargetManager) RemoveSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error { - targets, err := m.getDownstreamTargets(ctx, sub) - if err != nil { return err } - - var errs error - for _, tn := range targets { - key := storebackend.KeyFromNSN(client.ObjectKey{Namespace: sub.Namespace, Name: tn}) - rt := m.GetRuntimeForTarget(ctx, key) - if rt == nil { continue } - if err := rt.DeleteSubscription(ctx, sub); err != nil { - errs = errors.Join(errs, err) - } - } - return errs + targets, err := m.getDownstreamTargets(ctx, sub) + if err != nil { + return err + } + + var errs error + for _, tn := range targets { + key := storebackend.KeyFromNSN(client.ObjectKey{Namespace: sub.Namespace, Name: tn}) + rt := m.GetRuntimeForTarget(ctx, key) + if rt == nil { + continue + } + if err := rt.DeleteSubscription(ctx, sub); err != nil { + errs = errors.Join(errs, err) + } + } + return errs } // getDownstreamTargets list the targets @@ -256,7 +264,7 @@ func (r *TargetManager) getDownstreamTargets(ctx context.Context, sub *invv1alph client.MatchingLabelsSelector{Selector: selector}, } - targetList := &invv1alpha1.TargetList{} + targetList := &configv1alpha1.TargetList{} if err := r.k8s.List(ctx, targetList, opts...); err != nil { return nil, err } @@ -269,4 +277,4 @@ func (r *TargetManager) getDownstreamTargets(ctx context.Context, sub *invv1alph } sort.Strings(targets) return targets, nil -} \ No newline at end of file +} diff --git a/pkg/sdc/target/manager/runtime.go b/pkg/sdc/target/manager/runtime.go index d9745bbe..7da847b5 100644 --- a/pkg/sdc/target/manager/runtime.go +++ b/pkg/sdc/target/manager/runtime.go @@ -23,17 +23,17 @@ import ( "sync" "time" - //"github.com/henderiw/logger/log" "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/henderiw/logger/log" + condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" dsclient "github.com/sdcio/config-server/pkg/sdc/dataserver/client" dsmanager "github.com/sdcio/config-server/pkg/sdc/dataserver/manager" sdcpb "github.com/sdcio/sdc-protos/sdcpb" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -59,7 +59,7 @@ type TargetRuntime struct { // desired (from reconciler) desiredMu sync.RWMutex desired *sdcpb.CreateDataStoreRequest - desiredRefs *invv1alpha1.TargetStatusUsedReferences + desiredRefs *configv1alpha1.TargetStatusUsedReferences desiredHash string // running state @@ -104,7 +104,7 @@ func NewTargetRuntime(key storebackend.Key, ds *dsmanager.DSConnManager, k8s cli } } -func (r *TargetRuntime) SetDesired(req *sdcpb.CreateDataStoreRequest, refs *invv1alpha1.TargetStatusUsedReferences, hash string) { +func (r *TargetRuntime) SetDesired(req *sdcpb.CreateDataStoreRequest, refs *configv1alpha1.TargetStatusUsedReferences, hash string) { r.desiredMu.Lock() r.desired = req r.desiredRefs = refs @@ -583,56 +583,57 @@ func (r *TargetRuntime) pushConnIfChanged(ctx context.Context, connected bool, m log.Info("pushConnIfChanged entry") r.statusMu.Lock() - // throttle flaps if r.lastConnValid && r.lastConn == connected && time.Since(r.lastPushed) < 2*time.Second { r.statusMu.Unlock() return } - r.lastPushed = time.Now() - r.lastConnValid = true - r.lastConn = connected + //we're about to push, but don't mark as "done" yet unless apply succeeds + pushing := connected + pushingMsg := msg r.statusMu.Unlock() - // get from informer cache - target := &invv1alpha1.Target{} + target := &configv1alpha1.Target{} if err := r.client.Get(ctx, r.key.NamespacedName, target); err != nil { log.Error("target fetch failed", "error", err) return } - newTarget := invv1alpha1.BuildTarget( - metav1.ObjectMeta{ - Namespace: target.Namespace, - Name: target.Name, - }, - invv1alpha1.TargetSpec{}, - invv1alpha1.TargetStatus{}, - ) - - // mutate only what you own in status - // (use your existing helpers, but mutate `target`, not a separate object) + var newCond condv1alpha1.Condition if connected { - newTarget.SetConditions(invv1alpha1.TargetConnectionReady()) + newCond = configv1alpha1.TargetConnectionReady() } else { - newTarget.SetConditions(invv1alpha1.TargetConnectionFailed(msg)) + newCond = configv1alpha1.TargetConnectionFailed(msg) } - // if no effective status change, skip write - oldCond := target.GetCondition(invv1alpha1.ConditionTypeTargetConnectionReady) - newCond := newTarget.GetCondition(invv1alpha1.ConditionTypeTargetConnectionReady) - changed := !newCond.Equal(oldCond) - if !changed { + oldCond := target.GetCondition(configv1alpha1.ConditionTypeTargetConnectionReady) + if newCond.Equal(oldCond) { log.Info("pushConnIfChanged -> no change", "connected", connected, "phase", r.Status().Phase, "msg", msg, ) + // Already correct in storage — mark as pushed so we don't retry needlessly + r.statusMu.Lock() + r.lastConnValid = true + r.lastConn = pushing + r.lastPushed = time.Now() + r.statusMu.Unlock() return } - // PATCH /status using MergeFrom - if err := r.client.Status().Patch(ctx, newTarget, client.Apply, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + log.Info("pushConnIfChanged -> applying", + "connected", pushing, + "phase", r.Status().Phase, + "msg", pushingMsg, + ) + + applyConfig := configv1alpha1apply.Target(target.Name, target.Namespace). + WithStatus(configv1alpha1apply.TargetStatus(). + WithConditions(newCond), + ) + + if err := r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: fieldManagerTargetRuntime, }, }); err != nil { @@ -640,6 +641,13 @@ func (r *TargetRuntime) pushConnIfChanged(ctx context.Context, connected bool, m return } + // Only mark as successfully pushed AFTER Apply succeeds + r.statusMu.Lock() + r.lastConnValid = true + r.lastConn = pushing + r.lastPushed = time.Now() + r.statusMu.Unlock() + log.Info("pushConnIfChanged -> updated", "connected", connected, "phase", r.Status().Phase, diff --git a/pkg/sdc/target/manager/transactor.go b/pkg/sdc/target/manager/transactor.go index 9c032f5b..63770424 100644 --- a/pkg/sdc/target/manager/transactor.go +++ b/pkg/sdc/target/manager/transactor.go @@ -30,7 +30,7 @@ import ( condv1alpha1 "github.com/sdcio/config-server/apis/condition/v1alpha1" "github.com/sdcio/config-server/apis/config" configv1alpha1 "github.com/sdcio/config-server/apis/config/v1alpha1" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + configv1alpha1apply "github.com/sdcio/config-server/pkg/generated/applyconfiguration/config/v1alpha1" "github.com/sdcio/config-server/pkg/reconcilers/resource" sdcpb "github.com/sdcio/sdc-protos/sdcpb" "google.golang.org/grpc/codes" @@ -61,7 +61,7 @@ func NewTransactor(client client.Client, fieldManager string) *Transactor { } } -func (r *Transactor) RecoverConfigs(ctx context.Context, target *invv1alpha1.Target, dsctx *DatastoreHandle) (*string, error) { +func (r *Transactor) RecoverConfigs(ctx context.Context, target *configv1alpha1.Target, dsctx *DatastoreHandle) (*string, error) { log := log.FromContext(ctx) log.Debug("RecoverConfigs") configList, err := r.ListConfigsPerTarget(ctx, target) @@ -100,13 +100,13 @@ func (r *Transactor) RecoverConfigs(ctx context.Context, target *invv1alpha1.Tar log.Debug("recovered configs", "count", len(configs)) if err := r.SetConfigsTargetConditionForTarget( - ctx, - target, - configv1alpha1.ConfigReady("target recovered"), - ); err != nil { - // recovery succeeded but we failed to patch status -> surface it - return ptr.To("recovered, but failed to update config status"), err - } + ctx, + target, + configv1alpha1.ConfigReady("target recovered"), + ); err != nil { + // recovery succeeded but we failed to patch status -> surface it + return ptr.To("recovered, but failed to update config status"), err + } return nil, nil } @@ -123,16 +123,16 @@ func (r *Transactor) recoverIntents( } intents := make([]*sdcpb.TransactionIntent, 0, len(configs)) - for _, config := range configs { - update, err := GetIntentUpdate(ctx, key, config, false) + for _, cfg := range configs { + update, err := config.GetIntentUpdate(cfg, false) if err != nil { return "", err } intents = append(intents, &sdcpb.TransactionIntent{ - Intent: GetGVKNSN(config), - Priority: int32(config.Spec.Priority), - Update: update, - NonRevertive: !config.IsRevertive(), + Intent: config.GetGVKNSN(cfg), + Priority: int32(cfg.Spec.Priority), + Update: update, + NonRevertive: !cfg.IsRevertive(), PreviouslyApplied: true, }) } @@ -175,7 +175,12 @@ func (r *Transactor) TransactionSet( return msg, nil } -func (r *Transactor) Transact(ctx context.Context, target *invv1alpha1.Target, dsctx *DatastoreHandle) (bool, error) { +func (r *Transactor) Transact( + ctx context.Context, + target *configv1alpha1.Target, + dsctx *DatastoreHandle, + targetCond condv1alpha1.Condition, +) (bool, error) { log := log.FromContext(ctx) log.Debug("Transact") // get all configs for the target @@ -251,7 +256,7 @@ func (r *Transactor) Transact(ctx context.Context, target *invv1alpha1.Target, d return true, err } - if err := r.updateConfigWithSuccess(ctx, config, dsctx.Schema, ""); err != nil { + if err := r.updateConfigWithSuccess(ctx, config, dsctx.Schema, targetCond, ""); err != nil { return true, err } } @@ -284,28 +289,28 @@ func (r *Transactor) setIntents( intents := make([]*sdcpb.TransactionIntent, 0) - for key, config := range configsToUpdate { + for key, cfg := range configsToUpdate { configsToUpdateSet.Insert(key) - update, err := GetIntentUpdate(ctx, targetKey, config, true) + update, err := config.GetIntentUpdate(cfg, true) if err != nil { log.Error("Transaction getIntentUpdate config", "error", err) return nil, err } intents = append(intents, &sdcpb.TransactionIntent{ - Intent: GetGVKNSN(config), - Priority: int32(config.Spec.Priority), - Update: update, - NonRevertive: !config.IsRevertive(), + Intent: config.GetGVKNSN(cfg), + Priority: int32(cfg.Spec.Priority), + Update: update, + NonRevertive: !cfg.IsRevertive(), }) } - for key, config := range configsToDelete { + for key, cfg := range configsToDelete { configsToDeleteSet.Insert(key) intents = append(intents, &sdcpb.TransactionIntent{ - Intent: GetGVKNSN(config), - //Priority: int32(config.Spec.Priority), + Intent: config.GetGVKNSN(cfg), Delete: true, DeleteIgnoreNoExist: true, - Orphan: config.Orphan(), + Orphan: cfg.Orphan(), + // Dont set priority, dont set non revertive }) } @@ -333,17 +338,14 @@ func (r *Transactor) updateConfigWithError(ctx context.Context, config *configv1 log := log.FromContext(ctx) log.Warn("updateConfigWithError", "config", config.GetName(), "recoverable", recoverable, "msg", msg, "err", err) - configOrig := config.DeepCopy() - patch := client.MergeFrom(configOrig) - if err != nil { msg = fmt.Sprintf("%s err %s", msg, err.Error()) } config.SetFinalizers([]string{finalizer}) + var cond condv1alpha1.Condition if recoverable { - // IMPRTANT TO USE THIS TYPE - config.SetConditions(configv1alpha1.ConfigFailed(msg)) + cond = configv1alpha1.ConfigFailed(msg) } else { newMessage := condv1alpha1.UnrecoverableMessage{ ResourceVersion: config.GetResourceVersion(), @@ -353,12 +355,21 @@ func (r *Transactor) updateConfigWithError(ctx context.Context, config *configv1 if err != nil { return err } - config.Status.DeviationGeneration = nil - config.SetConditions(condv1alpha1.FailedUnRecoverable(string(newmsg))) + cond = condv1alpha1.FailedUnRecoverable(string(newmsg)) + } + + statusApply := configv1alpha1apply.ConfigStatus(). + WithConditions(cond) + + if !recoverable { + statusApply = statusApply.WithDeviationGeneration(0) } - return r.client.Status().Patch(ctx, config, patch, &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{ + applyConfig := configv1alpha1apply.Config(config.Name, config.Namespace). + WithStatus(statusApply) + + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ FieldManager: r.fieldManager, }, }) @@ -386,35 +397,47 @@ func (r *Transactor) updateConfigWithSuccess( ctx context.Context, cfg *configv1alpha1.Config, schema *configv1alpha1.ConfigStatusLastKnownGoodSchema, + targetCond condv1alpha1.Condition, msg string, ) error { log := log.FromContext(ctx) log.Debug("updateConfigWithSuccess", "config", cfg.GetName()) - // THE TYPE IS IMPORTANT here - cond := configv1alpha1.ConfigReady(msg) - - return r.patchStatusIfChanged(ctx, cfg, func(c *configv1alpha1.Config) { - c.SetConditions(cond) - c.Status.LastKnownGoodSchema = schema - c.Status.AppliedConfig = &c.Spec - c.SetOverallStatus() - }, func(old, new *configv1alpha1.Config) bool { - // only write if the ready condition or these fields changed - if !new.GetCondition(condv1alpha1.ConditionTypeReady).Equal(old.GetCondition(condv1alpha1.ConditionTypeReady)) { - return true - } - if !reflect.DeepEqual(old.Status.LastKnownGoodSchema, new.Status.LastKnownGoodSchema) { - return true - } - if !reflect.DeepEqual(old.Status.AppliedConfig, new.Status.AppliedConfig) { - return true - } - return false + configCond := configv1alpha1.ConfigReady(msg) + + // capture + oldConfigCond := cfg.GetCondition(condv1alpha1.ConditionType(configCond.Type)) + oldTargetCond := cfg.GetCondition(condv1alpha1.ConditionType(targetCond.Type)) + + // compute overall from both conditions + cfg.SetConditions(configCond, targetCond) + cfg.SetOverallStatus() + overallCond := cfg.GetCondition(condv1alpha1.ConditionTypeReady) + + // check against OLD state + if configCond.Equal(oldConfigCond) && + targetCond.Equal(oldTargetCond) && + reflect.DeepEqual(schema, cfg.Status.LastKnownGoodSchema) && + reflect.DeepEqual(&cfg.Spec, cfg.Status.AppliedConfig) { + return nil + } + + statusApply := configv1alpha1apply.ConfigStatus(). + WithConditions(configCond, targetCond, overallCond). + WithLastKnownGoodSchema(schemaToApply(schema)). + WithAppliedConfig(configSpecToApply(&cfg.Spec)) + + applyConfig := configv1alpha1apply.Config(cfg.Name, cfg.Namespace). + WithStatus(statusApply) + + return r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ + FieldManager: r.fieldManager, + }, }) } -func (r *Transactor) ListConfigsPerTarget(ctx context.Context, target *invv1alpha1.Target) (*config.ConfigList, error) { +func (r *Transactor) ListConfigsPerTarget(ctx context.Context, target *configv1alpha1.Target) (*config.ConfigList, error) { ctx = genericapirequest.WithNamespace(ctx, target.GetNamespace()) opts := []client.ListOption{ @@ -472,22 +495,6 @@ func toV1Alpha1Config(cfg *config.Config) (*configv1alpha1.Config, error) { return out, nil } -/* -func (r *Transactor) patchStatus( - ctx context.Context, - obj client.Object, - mutate func(), -) error { - orig := obj.DeepCopyObject().(client.Object) - mutate() - return r.client.Status().Patch(ctx, obj, client.MergeFrom(orig), - &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{FieldManager: r.fieldManager}, - }, - ) -} -*/ - func (r *Transactor) patchMetadata( ctx context.Context, obj client.Object, @@ -518,7 +525,7 @@ func getConfigsToTransact( // Classify configs: update / delete / non-recoverable / noop for i := range configList.Items { cfg := &configList.Items[i] - key := GetGVKNSN(cfg) + key := config.GetGVKNSN(cfg) switch { case !cfg.IsRecoverable(ctx): @@ -720,30 +727,9 @@ func analyzeIntentResponse(err error, rsp *sdcpb.TransactionSetResponse) Transac return result } -func (r *Transactor) patchStatusIfChanged( - ctx context.Context, - cfg *configv1alpha1.Config, - mutate func(c *configv1alpha1.Config), - changed func(old, new *configv1alpha1.Config) bool, -) error { - orig := cfg.DeepCopy() - - mutate(cfg) - - if changed != nil && !changed(orig, cfg) { - return nil - } - - return r.client.Status().Patch(ctx, cfg, client.MergeFrom(orig), - &client.SubResourcePatchOptions{ - PatchOptions: client.PatchOptions{FieldManager: r.fieldManager}, - }, - ) -} - func (r *Transactor) SetConfigsTargetConditionForTarget( ctx context.Context, - target *invv1alpha1.Target, + target *configv1alpha1.Target, targetCond condv1alpha1.Condition, ) error { //log := log.FromContext(ctx) @@ -755,34 +741,113 @@ func (r *Transactor) SetConfigsTargetConditionForTarget( } for i := range cfgList.Items { - // convert to v1alpha1 for patching v1cfg, err := toV1Alpha1Config(&cfgList.Items[i]) if err != nil { return err } - err = r.patchStatusIfChanged(ctx, v1cfg, func(c *configv1alpha1.Config) { - // 1) set TargetReady condition - c.SetConditions(targetCond) - // 2) derive overall Ready from ConfigReady + TargetReady - c.SetOverallStatus() - }, func(old, new *configv1alpha1.Config) bool { - // compare the two condition types you may change - oldT := old.GetCondition(condv1alpha1.ConditionType(targetCond.Type)) - newT := new.GetCondition(condv1alpha1.ConditionType(targetCond.Type)) - if !newT.Equal(oldT) { - return true - } + oldTargetCond := v1cfg.GetCondition(condv1alpha1.ConditionType(targetCond.Type)) + oldReadyCond := v1cfg.GetCondition(condv1alpha1.ConditionTypeReady) - // 2) did overall Ready change? - oldR := old.GetCondition(condv1alpha1.ConditionTypeReady) - newR := new.GetCondition(condv1alpha1.ConditionTypeReady) - return !newR.Equal(oldR) - }) - if err != nil { + // compute new overall ready + v1cfg.SetConditions(targetCond) + v1cfg.SetOverallStatus() + newReadyCond := v1cfg.GetCondition(condv1alpha1.ConditionTypeReady) + + if targetCond.Equal(oldTargetCond) && newReadyCond.Equal(oldReadyCond) { + continue + } + + // Preserve ALL existing status fields to avoid stripping them + configCond := v1cfg.GetCondition(condv1alpha1.ConditionType( + configv1alpha1.ConfigReady("").Type, + )) + + statusApply := configv1alpha1apply.ConfigStatus(). + WithConditions(targetCond, configCond, newReadyCond) + + // preserve schema + appliedConfig so SSA doesn't strip them + if v1cfg.Status.LastKnownGoodSchema != nil { + statusApply = statusApply.WithLastKnownGoodSchema( + schemaToApply(v1cfg.Status.LastKnownGoodSchema)) + } + if v1cfg.Status.AppliedConfig != nil { + statusApply = statusApply.WithAppliedConfig( + configSpecToApply(v1cfg.Status.AppliedConfig)) + } + + applyConfig := configv1alpha1apply.Config(v1cfg.Name, v1cfg.Namespace). + WithStatus(statusApply) + + if err := r.client.Status().Apply(ctx, applyConfig, &client.SubResourceApplyOptions{ + ApplyOptions: client.ApplyOptions{ + FieldManager: r.fieldManager, + }, + }); err != nil { return err } } - return nil } + +func schemaToApply(s *configv1alpha1.ConfigStatusLastKnownGoodSchema) *configv1alpha1apply.ConfigStatusLastKnownGoodSchemaApplyConfiguration { + if s == nil { + return nil + } + a := configv1alpha1apply.ConfigStatusLastKnownGoodSchema() + if s.Type != "" { + a.WithType(s.Type) + } + if s.Vendor != "" { + a.WithVendor(s.Vendor) + } + if s.Version != "" { + a.WithVersion(s.Version) + } + return a +} + +func configSpecToApply(s *configv1alpha1.ConfigSpec) *configv1alpha1apply.ConfigSpecApplyConfiguration { + if s == nil { + return nil + } + revertive := false + if s.Revertive != nil { + revertive = *s.Revertive + } + + a := configv1alpha1apply.ConfigSpec(). + WithPriority(s.Priority). + WithRevertive(revertive) + + if s.Lifecycle != nil { + a.WithLifecycle(lifecycleToApply(s.Lifecycle)) + } + + for i := range s.Config { + a.WithConfig(configBlobToApply(&s.Config[i])) + } + return a +} + +func lifecycleToApply(l *configv1alpha1.Lifecycle) *configv1alpha1apply.LifecycleApplyConfiguration { + if l == nil { + return nil + } + a := configv1alpha1apply.Lifecycle() + a.WithDeletionPolicy(l.DeletionPolicy) + + return a +} + +func configBlobToApply(b *configv1alpha1.ConfigBlob) *configv1alpha1apply.ConfigBlobApplyConfiguration { + if b == nil { + return nil + } + a := configv1alpha1apply.ConfigBlob() + if b.Path != "" { + a.WithPath(b.Path) + } + a.WithValue(b.Value) + return a +} diff --git a/pkg/sdc/target/manager/utils.go b/pkg/sdc/target/manager/utils.go index dc167d5b..9cb12038 100644 --- a/pkg/sdc/target/manager/utils.go +++ b/pkg/sdc/target/manager/utils.go @@ -18,53 +18,17 @@ package targetmanager import ( "context" - "fmt" "errors" + "fmt" "strings" - "github.com/henderiw/apiserver-store/pkg/storebackend" "github.com/henderiw/logger/log" - "github.com/sdcio/config-server/apis/config" sdcpb "github.com/sdcio/sdc-protos/sdcpb" - "sigs.k8s.io/controller-runtime/pkg/client" - "google.golang.org/protobuf/encoding/prototext" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/prototext" ) -func GetGVKNSN(obj client.Object) string { - return fmt.Sprintf("%s.%s", obj.GetNamespace(), obj.GetName()) -} - -// useSpec indicates to use the spec as the confifSpec, typically set to true; when set to false it means we are recovering -// the config -func GetIntentUpdate(ctx context.Context, key storebackend.Key, config *config.Config, useSpec bool) ([]*sdcpb.Update, error) { - logger := log.FromContext(ctx) - update := make([]*sdcpb.Update, 0, len(config.Spec.Config)) - configSpec := config.Spec.Config - if !useSpec && config.Status.AppliedConfig != nil { - update = make([]*sdcpb.Update, 0, len(config.Status.AppliedConfig.Config)) - configSpec = config.Status.AppliedConfig.Config - } - - for _, config := range configSpec { - path, err := sdcpb.ParsePath(config.Path) - if err != nil { - return nil, fmt.Errorf("create data failed for target %s, path %s invalid", key.String(), config.Path) - } - logger.Debug("setIntent", "configSpec", string(config.Value.Raw)) - update = append(update, &sdcpb.Update{ - Path: path, - Value: &sdcpb.TypedValue{ - Value: &sdcpb.TypedValue_JsonVal{ - JsonVal: config.Value.Raw, - }, - }, - }) - } - return update, nil -} - // processTransactionResponse returns the warnings as a string and aggregates the errors in a single error and classifies them // as recoverable or non recoverable. func processTransactionResponse(ctx context.Context, rsp *sdcpb.TransactionSetResponse, rsperr error) (string, error) { @@ -107,4 +71,4 @@ func processTransactionResponse(ctx context.Context, rsp *sdcpb.TransactionSetRe } log.Debug("transaction response", "rsp", prototext.Format(rsp), "msg", msg, "error", err) return msg, err -} \ No newline at end of file +} diff --git a/pkg/sdc/target/runtimeview/runtimeview.go b/pkg/sdc/target/runtimeview/runtimeview.go index 3e7b870e..33dd5738 100644 --- a/pkg/sdc/target/runtimeview/runtimeview.go +++ b/pkg/sdc/target/runtimeview/runtimeview.go @@ -17,17 +17,17 @@ limitations under the License. package runtimeview import ( - "github.com/henderiw/apiserver-store/pkg/storebackend" - "github.com/openconfig/gnmic/pkg/cache" - "github.com/prometheus/prometheus/prompb" + "github.com/henderiw/apiserver-store/pkg/storebackend" + "github.com/openconfig/gnmic/pkg/cache" + "github.com/prometheus/prometheus/prompb" ) type TargetRuntimeView interface { - Key() storebackend.Key - Cache() cache.Cache - PromLabels() []prompb.Label + Key() storebackend.Key + Cache() cache.Cache + PromLabels() []prompb.Label } type TargetManager interface { - ForEachRuntime(func(TargetRuntimeView)) -} \ No newline at end of file + ForEachRuntime(func(TargetRuntimeView)) +} diff --git a/pkg/sdc/target/subscriptionview/subscriptionview.go b/pkg/sdc/target/subscriptionview/subscriptionview.go index 1bbc6aad..f9bbb8b3 100644 --- a/pkg/sdc/target/subscriptionview/subscriptionview.go +++ b/pkg/sdc/target/subscriptionview/subscriptionview.go @@ -16,15 +16,14 @@ limitations under the License. package subscriptionview - import ( - "context" + "context" - invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" + invv1alpha1 "github.com/sdcio/config-server/apis/inv/v1alpha1" ) // Only what the reconciler needs. type TargetSubscriptionManager interface { - ApplySubscription(ctx context.Context, sub *invv1alpha1.Subscription) error - RemoveSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error -} \ No newline at end of file + ApplySubscription(ctx context.Context, sub *invv1alpha1.Subscription) error + RemoveSubscription(ctx context.Context, sub *invv1alpha1.Subscription) error +} diff --git a/pkg/workspace/loader.go b/pkg/workspace/loader.go index 01fe62b1..2ca78314 100644 --- a/pkg/workspace/loader.go +++ b/pkg/workspace/loader.go @@ -48,7 +48,7 @@ func NewLoader(workspaceDir string, credentialResolver auth.CredentialResolver) func (r *Loader) EnsureCommit(ctx context.Context, workspace *invv1alpha1.Workspace) (string, error) { log := log.FromContext(ctx) - repo, err := git.NewRepo(workspace.Spec.RepositoryURL) + repo, err := git.NewRepo(workspace.Spec.RepoURL) if err != nil { return "", err } diff --git a/pkg/workspace/reader.go b/pkg/workspace/reader.go index 4d861a5e..b1724bba 100644 --- a/pkg/workspace/reader.go +++ b/pkg/workspace/reader.go @@ -50,7 +50,7 @@ func NewReader(workspaceDir string, credentialResolver auth.CredentialResolver) func (r *Reader) GetConfigs(ctx context.Context, rollout *invv1alpha1.Rollout) (storebackend.Storer[storebackend.Storer[*config.Config]], error) { log := log.FromContext(ctx) - repo, err := git.NewRepo(rollout.Spec.RepositoryURL) + repo, err := git.NewRepo(rollout.Spec.RepoURL) if err != nil { return nil, err } diff --git a/tools/apiserver-runtime-gen/main.go b/tools/apiserver-runtime-gen/main.go index 37ba4df7..6a38ca4b 100644 --- a/tools/apiserver-runtime-gen/main.go +++ b/tools/apiserver-runtime-gen/main.go @@ -244,14 +244,26 @@ func doGen() error { } } + if gen["applyconfiguration-gen"] { + applyArgs := []string{ + "--output-dir", "pkg/generated/applyconfiguration", + "--output-pkg", fmt.Sprintf("%s/pkg/generated/applyconfiguration", module), + } + applyArgs = append(applyArgs, clientgenVersions...) + err := run(getCmd("applyconfiguration-gen", applyArgs...)) + if err != nil { + return err + } + } + return nil } var ( - generators []string - header string - module string - versions []string + generators []string + header string + module string + versions []string //rawVersions []string clean, install bool ) @@ -259,7 +271,7 @@ var ( func main() { cmd.Flags().BoolVar(&clean, "clean", true, "Delete temporary directory for code generation.") - options := []string{"client-gen", "deepcopy-gen", "informer-gen", "lister-gen", "openapi-gen", "go-to-protobuf"} + options := []string{"client-gen", "deepcopy-gen", "informer-gen", "lister-gen", "openapi-gen", "go-to-protobuf", "applyconfiguration-gen"} defaultGen := []string{"deepcopy-gen", "openapi-gen"} cmd.Flags().StringSliceVarP(&generators, "generator", "g", defaultGen, fmt.Sprintf("Code generator to install and run. Options: %v.", options)) diff --git a/tools/fix-openapi-gvk/main.go b/tools/fix-openapi-gvk/main.go new file mode 100644 index 00000000..80c4936b --- /dev/null +++ b/tools/fix-openapi-gvk/main.go @@ -0,0 +1,252 @@ +/* +Copyright 2026 Nokia. + +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. +*/ + +// fix-openapi-gvk injects x-kubernetes-group-version-kind extensions into +// zz_generated.openapi.go for top-level resource types. openapi-gen omits +// these extensions, but NewTypeConverter requires them to register types by GVK. +// +// VendorExtensible is an embedded field of spec.Schema, so it must be injected +// INSIDE spec.Schema{} before its closing brace, not at the OpenAPIDefinition level. +// +// Only types whose properties include "kind", "apiVersion" and "metadata" are +// considered top-level resources and get the extension injected. +// List types (names ending in "List") are excluded. +// Only functions matching --prefix are processed, so types from other API groups +// are left untouched. The API version is derived from the prefix automatically. +// +// Usage: +// +// go run ./tools/fix-openapi-gvk/main.go \ +// --file pkg/generated/openapi/zz_generated.openapi.go \ +// --group config.sdcio.dev \ +// --prefix config_server_apis_config_v1alpha1 +package main + +import ( + "flag" + "fmt" + "os" + "regexp" + "strings" +) + +var ( + filePath = flag.String("file", "", "path to zz_generated.openapi.go") + group = flag.String("group", "", "API group, e.g. config.sdcio.dev") + prefix = flag.String("prefix", "", "underscore-delimited package prefix from function names, e.g. config_server_apis_config_v1alpha1") +) + +// versionRe matches Kubernetes-style API versions like v1, v1alpha1, v1beta2. +var versionRe = regexp.MustCompile(`^v\d+(?:(?:alpha|beta)\d+)?$`) + +// extractVersion returns the API version from the prefix by finding the last +// segment that matches a k8s version pattern (e.g. v1alpha1, v1beta1, v1). +func extractVersion(pfx string) (string, error) { + parts := strings.Split(pfx, "_") + for i := len(parts) - 1; i >= 0; i-- { + if versionRe.MatchString(parts[i]) { + return parts[i], nil + } + } + return "", fmt.Errorf("no API version found in prefix %q (expected segment like v1, v1alpha1, v1beta2)", pfx) +} + +func vendorBlock(g, k, v string) string { + return fmt.Sprintf( + "\t\t\tVendorExtensible: spec.VendorExtensible{\n"+ + "\t\t\t\tExtensions: spec.Extensions{\n"+ + "\t\t\t\t\t\"x-kubernetes-group-version-kind\": []interface{}{\n"+ + "\t\t\t\t\t\tmap[string]interface{}{\"group\": %q, \"kind\": %q, \"version\": %q},\n"+ + "\t\t\t\t\t},\n"+ + "\t\t\t\t},\n"+ + "\t\t\t},", + g, k, v) +} + +// isRootType returns true if the function body contains "kind", "apiVersion" +// and "metadata" as property keys — the hallmark of a top-level k8s resource. +func isRootType(funcBody string) bool { + return strings.Contains(funcBody, `"kind"`) && + strings.Contains(funcBody, `"apiVersion"`) && + strings.Contains(funcBody, `"metadata"`) +} + +func main() { + flag.Parse() + if *filePath == "" || *group == "" || *prefix == "" { + fmt.Fprintln(os.Stderr, "usage: fix-openapi-gvk --file --group --prefix ") + fmt.Fprintln(os.Stderr, "") + fmt.Fprintln(os.Stderr, " --prefix underscore-delimited package path from function names") + fmt.Fprintln(os.Stderr, " e.g. config_server_apis_config_v1alpha1") + fmt.Fprintln(os.Stderr, " the API version (v1alpha1) is derived automatically") + os.Exit(1) + } + + version, err := extractVersion(*prefix) + if err != nil { + fmt.Fprintf(os.Stderr, "error: %v\n", err) + os.Exit(1) + } + fmt.Printf("derived API version: %s\n", version) + + src, err := os.ReadFile(*filePath) + if err != nil { + fmt.Fprintf(os.Stderr, "error reading %s: %v\n", *filePath, err) + os.Exit(1) + } + + // Match schema function definitions. + funcRe := regexp.MustCompile(`(?m)^func (schema_[a-zA-Z0-9_]+)\(ref `) + + schemaOpenRe := regexp.MustCompile(`^\t\tSchema:\s+spec\.Schema\{`) + + // Build the expected function name prefix: "schema_" + user-supplied prefix + "_" + funcPrefix := "schema_" + *prefix + "_" + + lines := strings.Split(string(src), "\n") + out := make([]string, 0, len(lines)+50) + injected := 0 + skippedList := 0 + skippedPrefix := 0 + + i := 0 + for i < len(lines) { + line := lines[i] + m := funcRe.FindStringSubmatch(line) + if m == nil { + out = append(out, line) + i++ + continue + } + + funcName := m[1] + + // Kind = last underscore-delimited segment + parts := strings.Split(funcName, "_") + kind := parts[len(parts)-1] + + // Collect entire function body + funcLines := []string{line} + depth := 0 + i++ + for i < len(lines) { + fl := lines[i] + funcLines = append(funcLines, fl) + for _, ch := range fl { + switch ch { + case '{': + depth++ + case '}': + depth-- + } + } + i++ + if depth == 0 { + break + } + } + + funcBody := strings.Join(funcLines, "\n") + + // --- Filter: only process functions matching the prefix --- + if !strings.HasPrefix(funcName, funcPrefix) { + out = append(out, funcLines...) + skippedPrefix++ + continue + } + + // --- Filter: skip List types --- + if strings.HasSuffix(kind, "List") { + out = append(out, funcLines...) + skippedList++ + fmt.Printf("skipped List type: %s\n", kind) + continue + } + + // Already patched? + if strings.Contains(funcBody, "x-kubernetes-group-version-kind") { + out = append(out, funcLines...) + continue + } + + // Only inject for root types (have kind/apiVersion/metadata properties) + if !isRootType(funcBody) { + out = append(out, funcLines...) + continue + } + + // Find the Schema: spec.Schema{ line, then find its matching closing }, + // and insert VendorExtensible just before that closing line. + schemaLineIdx := -1 + for j, fl := range funcLines { + if schemaOpenRe.MatchString(fl) { + schemaLineIdx = j + break + } + } + + if schemaLineIdx < 0 { + fmt.Fprintf(os.Stderr, "WARNING: no Schema: spec.Schema{ found in %s, skipping\n", kind) + out = append(out, funcLines...) + continue + } + + // Track brace depth from the Schema line to find its closing }, + schemaDepth := 0 + schemaCloseIdx := -1 + for j := schemaLineIdx; j < len(funcLines); j++ { + fl := funcLines[j] + for _, ch := range fl { + switch ch { + case '{': + schemaDepth++ + case '}': + schemaDepth-- + } + } + if schemaDepth == 0 { + schemaCloseIdx = j + break + } + } + + if schemaCloseIdx < 0 { + fmt.Fprintf(os.Stderr, "WARNING: could not find closing of Schema{} in %s, skipping\n", kind) + out = append(out, funcLines...) + continue + } + + // Insert VendorExtensible before the closing line of Schema{} + var patchedLines []string + for j, fl := range funcLines { + if j == schemaCloseIdx { + patchedLines = append(patchedLines, vendorBlock(*group, kind, version)) + } + patchedLines = append(patchedLines, fl) + } + + out = append(out, patchedLines...) + injected++ + fmt.Printf("injected GVK extension: %s\n", kind) + } + + if err := os.WriteFile(*filePath, []byte(strings.Join(out, "\n")), 0644); err != nil { + fmt.Fprintf(os.Stderr, "error writing %s: %v\n", *filePath, err) + os.Exit(1) + } + + fmt.Printf("done: injected %d, skipped %d List types, skipped %d non-matching prefix\n", injected, skippedList, skippedPrefix) +}