mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 06:31:35 +00:00
Merge pull request #120259 from SataQiu/clean-apf-20230830
apf: remove v1alpha1 API Kubernetes-commit: efadb94a74d64cb821e990700c5bd05a805857ac
This commit is contained in:
commit
f28f485cb4
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// ExemptPriorityLevelConfigurationApplyConfiguration represents an declarative configuration of the ExemptPriorityLevelConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type ExemptPriorityLevelConfigurationApplyConfiguration struct {
|
|
||||||
NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,omitempty"`
|
|
||||||
LendablePercent *int32 `json:"lendablePercent,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExemptPriorityLevelConfigurationApplyConfiguration constructs an declarative configuration of the ExemptPriorityLevelConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func ExemptPriorityLevelConfiguration() *ExemptPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
return &ExemptPriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNominalConcurrencyShares sets the NominalConcurrencyShares field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NominalConcurrencyShares field is set to the value of the last call.
|
|
||||||
func (b *ExemptPriorityLevelConfigurationApplyConfiguration) WithNominalConcurrencyShares(value int32) *ExemptPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.NominalConcurrencyShares = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLendablePercent sets the LendablePercent field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the LendablePercent field is set to the value of the last call.
|
|
||||||
func (b *ExemptPriorityLevelConfigurationApplyConfiguration) WithLendablePercent(value int32) *ExemptPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.LendablePercent = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowDistinguisherMethodApplyConfiguration represents an declarative configuration of the FlowDistinguisherMethod type for use
|
|
||||||
// with apply.
|
|
||||||
type FlowDistinguisherMethodApplyConfiguration struct {
|
|
||||||
Type *v1alpha1.FlowDistinguisherMethodType `json:"type,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowDistinguisherMethodApplyConfiguration constructs an declarative configuration of the FlowDistinguisherMethod type for use with
|
|
||||||
// apply.
|
|
||||||
func FlowDistinguisherMethod() *FlowDistinguisherMethodApplyConfiguration {
|
|
||||||
return &FlowDistinguisherMethodApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowDistinguisherMethodApplyConfiguration) WithType(value v1alpha1.FlowDistinguisherMethodType) *FlowDistinguisherMethodApplyConfiguration {
|
|
||||||
b.Type = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,256 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowSchemaApplyConfiguration represents an declarative configuration of the FlowSchema type for use
|
|
||||||
// with apply.
|
|
||||||
type FlowSchemaApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *FlowSchemaSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
Status *FlowSchemaStatusApplyConfiguration `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchema constructs an declarative configuration of the FlowSchema type for use with
|
|
||||||
// apply.
|
|
||||||
func FlowSchema(name string) *FlowSchemaApplyConfiguration {
|
|
||||||
b := &FlowSchemaApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithKind("FlowSchema")
|
|
||||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractFlowSchema extracts the applied configuration owned by fieldManager from
|
|
||||||
// flowSchema. If no managedFields are found in flowSchema for fieldManager, a
|
|
||||||
// FlowSchemaApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractFlowSchema provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractFlowSchema(flowSchema *flowcontrolv1alpha1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) {
|
|
||||||
return extractFlowSchema(flowSchema, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractFlowSchemaStatus is the same as ExtractFlowSchema except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractFlowSchemaStatus(flowSchema *flowcontrolv1alpha1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) {
|
|
||||||
return extractFlowSchema(flowSchema, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractFlowSchema(flowSchema *flowcontrolv1alpha1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) {
|
|
||||||
b := &FlowSchemaApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1alpha1.FlowSchema"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(flowSchema.Name)
|
|
||||||
|
|
||||||
b.WithKind("FlowSchema")
|
|
||||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
|
||||||
return b, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowSchemaApplyConfiguration) WithKind(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithAPIVersion(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithName(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithGenerateName(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithNamespace(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithUID(value types.UID) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithResourceVersion(value string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithGeneration(value int64) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *FlowSchemaApplyConfiguration) WithLabels(entries map[string]string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowSchemaApplyConfiguration) WithAnnotations(entries map[string]string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowSchemaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.OwnerReferences = append(b.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 *FlowSchemaApplyConfiguration) WithFinalizers(values ...string) *FlowSchemaApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.Finalizers = append(b.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *FlowSchemaApplyConfiguration) 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 *FlowSchemaApplyConfiguration) WithSpec(value *FlowSchemaSpecApplyConfiguration) *FlowSchemaApplyConfiguration {
|
|
||||||
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 *FlowSchemaApplyConfiguration) WithStatus(value *FlowSchemaStatusApplyConfiguration) *FlowSchemaApplyConfiguration {
|
|
||||||
b.Status = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowSchemaConditionApplyConfiguration represents an declarative configuration of the FlowSchemaCondition type for use
|
|
||||||
// with apply.
|
|
||||||
type FlowSchemaConditionApplyConfiguration struct {
|
|
||||||
Type *v1alpha1.FlowSchemaConditionType `json:"type,omitempty"`
|
|
||||||
Status *v1alpha1.ConditionStatus `json:"status,omitempty"`
|
|
||||||
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
Reason *string `json:"reason,omitempty"`
|
|
||||||
Message *string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchemaConditionApplyConfiguration constructs an declarative configuration of the FlowSchemaCondition type for use with
|
|
||||||
// apply.
|
|
||||||
func FlowSchemaCondition() *FlowSchemaConditionApplyConfiguration {
|
|
||||||
return &FlowSchemaConditionApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowSchemaConditionApplyConfiguration) WithType(value v1alpha1.FlowSchemaConditionType) *FlowSchemaConditionApplyConfiguration {
|
|
||||||
b.Type = &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 *FlowSchemaConditionApplyConfiguration) WithStatus(value v1alpha1.ConditionStatus) *FlowSchemaConditionApplyConfiguration {
|
|
||||||
b.Status = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
|
|
||||||
func (b *FlowSchemaConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *FlowSchemaConditionApplyConfiguration {
|
|
||||||
b.LastTransitionTime = &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 *FlowSchemaConditionApplyConfiguration) WithReason(value string) *FlowSchemaConditionApplyConfiguration {
|
|
||||||
b.Reason = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Message field is set to the value of the last call.
|
|
||||||
func (b *FlowSchemaConditionApplyConfiguration) WithMessage(value string) *FlowSchemaConditionApplyConfiguration {
|
|
||||||
b.Message = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// FlowSchemaSpecApplyConfiguration represents an declarative configuration of the FlowSchemaSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type FlowSchemaSpecApplyConfiguration struct {
|
|
||||||
PriorityLevelConfiguration *PriorityLevelConfigurationReferenceApplyConfiguration `json:"priorityLevelConfiguration,omitempty"`
|
|
||||||
MatchingPrecedence *int32 `json:"matchingPrecedence,omitempty"`
|
|
||||||
DistinguisherMethod *FlowDistinguisherMethodApplyConfiguration `json:"distinguisherMethod,omitempty"`
|
|
||||||
Rules []PolicyRulesWithSubjectsApplyConfiguration `json:"rules,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchemaSpecApplyConfiguration constructs an declarative configuration of the FlowSchemaSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func FlowSchemaSpec() *FlowSchemaSpecApplyConfiguration {
|
|
||||||
return &FlowSchemaSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPriorityLevelConfiguration sets the PriorityLevelConfiguration field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the PriorityLevelConfiguration field is set to the value of the last call.
|
|
||||||
func (b *FlowSchemaSpecApplyConfiguration) WithPriorityLevelConfiguration(value *PriorityLevelConfigurationReferenceApplyConfiguration) *FlowSchemaSpecApplyConfiguration {
|
|
||||||
b.PriorityLevelConfiguration = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMatchingPrecedence sets the MatchingPrecedence field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the MatchingPrecedence field is set to the value of the last call.
|
|
||||||
func (b *FlowSchemaSpecApplyConfiguration) WithMatchingPrecedence(value int32) *FlowSchemaSpecApplyConfiguration {
|
|
||||||
b.MatchingPrecedence = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDistinguisherMethod sets the DistinguisherMethod field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DistinguisherMethod field is set to the value of the last call.
|
|
||||||
func (b *FlowSchemaSpecApplyConfiguration) WithDistinguisherMethod(value *FlowDistinguisherMethodApplyConfiguration) *FlowSchemaSpecApplyConfiguration {
|
|
||||||
b.DistinguisherMethod = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRules adds the given value to the Rules 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 Rules field.
|
|
||||||
func (b *FlowSchemaSpecApplyConfiguration) WithRules(values ...*PolicyRulesWithSubjectsApplyConfiguration) *FlowSchemaSpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRules")
|
|
||||||
}
|
|
||||||
b.Rules = append(b.Rules, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// FlowSchemaStatusApplyConfiguration represents an declarative configuration of the FlowSchemaStatus type for use
|
|
||||||
// with apply.
|
|
||||||
type FlowSchemaStatusApplyConfiguration struct {
|
|
||||||
Conditions []FlowSchemaConditionApplyConfiguration `json:"conditions,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchemaStatusApplyConfiguration constructs an declarative configuration of the FlowSchemaStatus type for use with
|
|
||||||
// apply.
|
|
||||||
func FlowSchemaStatus() *FlowSchemaStatusApplyConfiguration {
|
|
||||||
return &FlowSchemaStatusApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *FlowSchemaStatusApplyConfiguration) WithConditions(values ...*FlowSchemaConditionApplyConfiguration) *FlowSchemaStatusApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConditions")
|
|
||||||
}
|
|
||||||
b.Conditions = append(b.Conditions, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// GroupSubjectApplyConfiguration represents an declarative configuration of the GroupSubject type for use
|
|
||||||
// with apply.
|
|
||||||
type GroupSubjectApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GroupSubjectApplyConfiguration constructs an declarative configuration of the GroupSubject type for use with
|
|
||||||
// apply.
|
|
||||||
func GroupSubject() *GroupSubjectApplyConfiguration {
|
|
||||||
return &GroupSubjectApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *GroupSubjectApplyConfiguration) WithName(value string) *GroupSubjectApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// LimitedPriorityLevelConfigurationApplyConfiguration represents an declarative configuration of the LimitedPriorityLevelConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type LimitedPriorityLevelConfigurationApplyConfiguration struct {
|
|
||||||
AssuredConcurrencyShares *int32 `json:"assuredConcurrencyShares,omitempty"`
|
|
||||||
LimitResponse *LimitResponseApplyConfiguration `json:"limitResponse,omitempty"`
|
|
||||||
LendablePercent *int32 `json:"lendablePercent,omitempty"`
|
|
||||||
BorrowingLimitPercent *int32 `json:"borrowingLimitPercent,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LimitedPriorityLevelConfigurationApplyConfiguration constructs an declarative configuration of the LimitedPriorityLevelConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func LimitedPriorityLevelConfiguration() *LimitedPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
return &LimitedPriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAssuredConcurrencyShares sets the AssuredConcurrencyShares field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AssuredConcurrencyShares field is set to the value of the last call.
|
|
||||||
func (b *LimitedPriorityLevelConfigurationApplyConfiguration) WithAssuredConcurrencyShares(value int32) *LimitedPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.AssuredConcurrencyShares = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLimitResponse sets the LimitResponse field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the LimitResponse field is set to the value of the last call.
|
|
||||||
func (b *LimitedPriorityLevelConfigurationApplyConfiguration) WithLimitResponse(value *LimitResponseApplyConfiguration) *LimitedPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.LimitResponse = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLendablePercent sets the LendablePercent field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the LendablePercent field is set to the value of the last call.
|
|
||||||
func (b *LimitedPriorityLevelConfigurationApplyConfiguration) WithLendablePercent(value int32) *LimitedPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.LendablePercent = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBorrowingLimitPercent sets the BorrowingLimitPercent field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the BorrowingLimitPercent field is set to the value of the last call.
|
|
||||||
func (b *LimitedPriorityLevelConfigurationApplyConfiguration) WithBorrowingLimitPercent(value int32) *LimitedPriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.BorrowingLimitPercent = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// LimitResponseApplyConfiguration represents an declarative configuration of the LimitResponse type for use
|
|
||||||
// with apply.
|
|
||||||
type LimitResponseApplyConfiguration struct {
|
|
||||||
Type *v1alpha1.LimitResponseType `json:"type,omitempty"`
|
|
||||||
Queuing *QueuingConfigurationApplyConfiguration `json:"queuing,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// LimitResponseApplyConfiguration constructs an declarative configuration of the LimitResponse type for use with
|
|
||||||
// apply.
|
|
||||||
func LimitResponse() *LimitResponseApplyConfiguration {
|
|
||||||
return &LimitResponseApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *LimitResponseApplyConfiguration) WithType(value v1alpha1.LimitResponseType) *LimitResponseApplyConfiguration {
|
|
||||||
b.Type = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQueuing sets the Queuing field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Queuing field is set to the value of the last call.
|
|
||||||
func (b *LimitResponseApplyConfiguration) WithQueuing(value *QueuingConfigurationApplyConfiguration) *LimitResponseApplyConfiguration {
|
|
||||||
b.Queuing = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// NonResourcePolicyRuleApplyConfiguration represents an declarative configuration of the NonResourcePolicyRule type for use
|
|
||||||
// with apply.
|
|
||||||
type NonResourcePolicyRuleApplyConfiguration struct {
|
|
||||||
Verbs []string `json:"verbs,omitempty"`
|
|
||||||
NonResourceURLs []string `json:"nonResourceURLs,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NonResourcePolicyRuleApplyConfiguration constructs an declarative configuration of the NonResourcePolicyRule type for use with
|
|
||||||
// apply.
|
|
||||||
func NonResourcePolicyRule() *NonResourcePolicyRuleApplyConfiguration {
|
|
||||||
return &NonResourcePolicyRuleApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithVerbs adds the given value to the Verbs 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 Verbs field.
|
|
||||||
func (b *NonResourcePolicyRuleApplyConfiguration) WithVerbs(values ...string) *NonResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Verbs = append(b.Verbs, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNonResourceURLs adds the given value to the NonResourceURLs 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 NonResourceURLs field.
|
|
||||||
func (b *NonResourcePolicyRuleApplyConfiguration) WithNonResourceURLs(values ...string) *NonResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.NonResourceURLs = append(b.NonResourceURLs, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// PolicyRulesWithSubjectsApplyConfiguration represents an declarative configuration of the PolicyRulesWithSubjects type for use
|
|
||||||
// with apply.
|
|
||||||
type PolicyRulesWithSubjectsApplyConfiguration struct {
|
|
||||||
Subjects []SubjectApplyConfiguration `json:"subjects,omitempty"`
|
|
||||||
ResourceRules []ResourcePolicyRuleApplyConfiguration `json:"resourceRules,omitempty"`
|
|
||||||
NonResourceRules []NonResourcePolicyRuleApplyConfiguration `json:"nonResourceRules,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PolicyRulesWithSubjectsApplyConfiguration constructs an declarative configuration of the PolicyRulesWithSubjects type for use with
|
|
||||||
// apply.
|
|
||||||
func PolicyRulesWithSubjects() *PolicyRulesWithSubjectsApplyConfiguration {
|
|
||||||
return &PolicyRulesWithSubjectsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSubjects adds the given value to the Subjects 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 Subjects field.
|
|
||||||
func (b *PolicyRulesWithSubjectsApplyConfiguration) WithSubjects(values ...*SubjectApplyConfiguration) *PolicyRulesWithSubjectsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithSubjects")
|
|
||||||
}
|
|
||||||
b.Subjects = append(b.Subjects, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceRules adds the given value to the ResourceRules 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 ResourceRules field.
|
|
||||||
func (b *PolicyRulesWithSubjectsApplyConfiguration) WithResourceRules(values ...*ResourcePolicyRuleApplyConfiguration) *PolicyRulesWithSubjectsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithResourceRules")
|
|
||||||
}
|
|
||||||
b.ResourceRules = append(b.ResourceRules, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNonResourceRules adds the given value to the NonResourceRules 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 NonResourceRules field.
|
|
||||||
func (b *PolicyRulesWithSubjectsApplyConfiguration) WithNonResourceRules(values ...*NonResourcePolicyRuleApplyConfiguration) *PolicyRulesWithSubjectsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithNonResourceRules")
|
|
||||||
}
|
|
||||||
b.NonResourceRules = append(b.NonResourceRules, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,256 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationApplyConfiguration represents an declarative configuration of the PriorityLevelConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type PriorityLevelConfigurationApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *PriorityLevelConfigurationSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
Status *PriorityLevelConfigurationStatusApplyConfiguration `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfiguration constructs an declarative configuration of the PriorityLevelConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b := &PriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithKind("PriorityLevelConfiguration")
|
|
||||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from
|
|
||||||
// priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a
|
|
||||||
// PriorityLevelConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractPriorityLevelConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
|
||||||
return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractPriorityLevelConfigurationStatus is the same as ExtractPriorityLevelConfiguration except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractPriorityLevelConfigurationStatus(priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
|
||||||
return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
|
||||||
b := &PriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(priorityLevelConfiguration.Name)
|
|
||||||
|
|
||||||
b.WithKind("PriorityLevelConfiguration")
|
|
||||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
|
||||||
return b, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationApplyConfiguration) WithKind(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithAPIVersion(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithName(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithGenerateName(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithNamespace(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithUID(value types.UID) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithResourceVersion(value string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithGeneration(value int64) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.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 *PriorityLevelConfigurationApplyConfiguration) WithLabels(entries map[string]string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.OwnerReferences = append(b.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 *PriorityLevelConfigurationApplyConfiguration) WithFinalizers(values ...string) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.Finalizers = append(b.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *PriorityLevelConfigurationApplyConfiguration) 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 *PriorityLevelConfigurationApplyConfiguration) WithSpec(value *PriorityLevelConfigurationSpecApplyConfiguration) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
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 *PriorityLevelConfigurationApplyConfiguration) WithStatus(value *PriorityLevelConfigurationStatusApplyConfiguration) *PriorityLevelConfigurationApplyConfiguration {
|
|
||||||
b.Status = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationConditionApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationCondition type for use
|
|
||||||
// with apply.
|
|
||||||
type PriorityLevelConfigurationConditionApplyConfiguration struct {
|
|
||||||
Type *v1alpha1.PriorityLevelConfigurationConditionType `json:"type,omitempty"`
|
|
||||||
Status *v1alpha1.ConditionStatus `json:"status,omitempty"`
|
|
||||||
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
|
|
||||||
Reason *string `json:"reason,omitempty"`
|
|
||||||
Message *string `json:"message,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationConditionApplyConfiguration constructs an declarative configuration of the PriorityLevelConfigurationCondition type for use with
|
|
||||||
// apply.
|
|
||||||
func PriorityLevelConfigurationCondition() *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
return &PriorityLevelConfigurationConditionApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationConditionApplyConfiguration) WithType(value v1alpha1.PriorityLevelConfigurationConditionType) *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
b.Type = &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 *PriorityLevelConfigurationConditionApplyConfiguration) WithStatus(value v1alpha1.ConditionStatus) *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
b.Status = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the LastTransitionTime field is set to the value of the last call.
|
|
||||||
func (b *PriorityLevelConfigurationConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
b.LastTransitionTime = &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 *PriorityLevelConfigurationConditionApplyConfiguration) WithReason(value string) *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
b.Reason = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMessage sets the Message field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Message field is set to the value of the last call.
|
|
||||||
func (b *PriorityLevelConfigurationConditionApplyConfiguration) WithMessage(value string) *PriorityLevelConfigurationConditionApplyConfiguration {
|
|
||||||
b.Message = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationReferenceApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationReference type for use
|
|
||||||
// with apply.
|
|
||||||
type PriorityLevelConfigurationReferenceApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationReferenceApplyConfiguration constructs an declarative configuration of the PriorityLevelConfigurationReference type for use with
|
|
||||||
// apply.
|
|
||||||
func PriorityLevelConfigurationReference() *PriorityLevelConfigurationReferenceApplyConfiguration {
|
|
||||||
return &PriorityLevelConfigurationReferenceApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationReferenceApplyConfiguration) WithName(value string) *PriorityLevelConfigurationReferenceApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationSpecApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type PriorityLevelConfigurationSpecApplyConfiguration struct {
|
|
||||||
Type *v1alpha1.PriorityLevelEnablement `json:"type,omitempty"`
|
|
||||||
Limited *LimitedPriorityLevelConfigurationApplyConfiguration `json:"limited,omitempty"`
|
|
||||||
Exempt *ExemptPriorityLevelConfigurationApplyConfiguration `json:"exempt,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationSpecApplyConfiguration constructs an declarative configuration of the PriorityLevelConfigurationSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func PriorityLevelConfigurationSpec() *PriorityLevelConfigurationSpecApplyConfiguration {
|
|
||||||
return &PriorityLevelConfigurationSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationSpecApplyConfiguration) WithType(value v1alpha1.PriorityLevelEnablement) *PriorityLevelConfigurationSpecApplyConfiguration {
|
|
||||||
b.Type = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLimited sets the Limited field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Limited field is set to the value of the last call.
|
|
||||||
func (b *PriorityLevelConfigurationSpecApplyConfiguration) WithLimited(value *LimitedPriorityLevelConfigurationApplyConfiguration) *PriorityLevelConfigurationSpecApplyConfiguration {
|
|
||||||
b.Limited = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithExempt sets the Exempt field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Exempt field is set to the value of the last call.
|
|
||||||
func (b *PriorityLevelConfigurationSpecApplyConfiguration) WithExempt(value *ExemptPriorityLevelConfigurationApplyConfiguration) *PriorityLevelConfigurationSpecApplyConfiguration {
|
|
||||||
b.Exempt = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationStatusApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationStatus type for use
|
|
||||||
// with apply.
|
|
||||||
type PriorityLevelConfigurationStatusApplyConfiguration struct {
|
|
||||||
Conditions []PriorityLevelConfigurationConditionApplyConfiguration `json:"conditions,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationStatusApplyConfiguration constructs an declarative configuration of the PriorityLevelConfigurationStatus type for use with
|
|
||||||
// apply.
|
|
||||||
func PriorityLevelConfigurationStatus() *PriorityLevelConfigurationStatusApplyConfiguration {
|
|
||||||
return &PriorityLevelConfigurationStatusApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *PriorityLevelConfigurationStatusApplyConfiguration) WithConditions(values ...*PriorityLevelConfigurationConditionApplyConfiguration) *PriorityLevelConfigurationStatusApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConditions")
|
|
||||||
}
|
|
||||||
b.Conditions = append(b.Conditions, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// QueuingConfigurationApplyConfiguration represents an declarative configuration of the QueuingConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type QueuingConfigurationApplyConfiguration struct {
|
|
||||||
Queues *int32 `json:"queues,omitempty"`
|
|
||||||
HandSize *int32 `json:"handSize,omitempty"`
|
|
||||||
QueueLengthLimit *int32 `json:"queueLengthLimit,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// QueuingConfigurationApplyConfiguration constructs an declarative configuration of the QueuingConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func QueuingConfiguration() *QueuingConfigurationApplyConfiguration {
|
|
||||||
return &QueuingConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQueues sets the Queues field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Queues field is set to the value of the last call.
|
|
||||||
func (b *QueuingConfigurationApplyConfiguration) WithQueues(value int32) *QueuingConfigurationApplyConfiguration {
|
|
||||||
b.Queues = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHandSize sets the HandSize field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the HandSize field is set to the value of the last call.
|
|
||||||
func (b *QueuingConfigurationApplyConfiguration) WithHandSize(value int32) *QueuingConfigurationApplyConfiguration {
|
|
||||||
b.HandSize = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQueueLengthLimit sets the QueueLengthLimit field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the QueueLengthLimit field is set to the value of the last call.
|
|
||||||
func (b *QueuingConfigurationApplyConfiguration) WithQueueLengthLimit(value int32) *QueuingConfigurationApplyConfiguration {
|
|
||||||
b.QueueLengthLimit = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,83 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// ResourcePolicyRuleApplyConfiguration represents an declarative configuration of the ResourcePolicyRule type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourcePolicyRuleApplyConfiguration struct {
|
|
||||||
Verbs []string `json:"verbs,omitempty"`
|
|
||||||
APIGroups []string `json:"apiGroups,omitempty"`
|
|
||||||
Resources []string `json:"resources,omitempty"`
|
|
||||||
ClusterScope *bool `json:"clusterScope,omitempty"`
|
|
||||||
Namespaces []string `json:"namespaces,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourcePolicyRuleApplyConfiguration constructs an declarative configuration of the ResourcePolicyRule type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourcePolicyRule() *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
return &ResourcePolicyRuleApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithVerbs adds the given value to the Verbs 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 Verbs field.
|
|
||||||
func (b *ResourcePolicyRuleApplyConfiguration) WithVerbs(values ...string) *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Verbs = append(b.Verbs, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIGroups adds the given value to the APIGroups 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 APIGroups field.
|
|
||||||
func (b *ResourcePolicyRuleApplyConfiguration) WithAPIGroups(values ...string) *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.APIGroups = append(b.APIGroups, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResources adds the given value to the Resources 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 Resources field.
|
|
||||||
func (b *ResourcePolicyRuleApplyConfiguration) WithResources(values ...string) *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Resources = append(b.Resources, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithClusterScope sets the ClusterScope field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ClusterScope field is set to the value of the last call.
|
|
||||||
func (b *ResourcePolicyRuleApplyConfiguration) WithClusterScope(value bool) *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
b.ClusterScope = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespaces adds the given value to the Namespaces 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 Namespaces field.
|
|
||||||
func (b *ResourcePolicyRuleApplyConfiguration) WithNamespaces(values ...string) *ResourcePolicyRuleApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Namespaces = append(b.Namespaces, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// ServiceAccountSubjectApplyConfiguration represents an declarative configuration of the ServiceAccountSubject type for use
|
|
||||||
// with apply.
|
|
||||||
type ServiceAccountSubjectApplyConfiguration struct {
|
|
||||||
Namespace *string `json:"namespace,omitempty"`
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ServiceAccountSubjectApplyConfiguration constructs an declarative configuration of the ServiceAccountSubject type for use with
|
|
||||||
// apply.
|
|
||||||
func ServiceAccountSubject() *ServiceAccountSubjectApplyConfiguration {
|
|
||||||
return &ServiceAccountSubjectApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *ServiceAccountSubjectApplyConfiguration) WithNamespace(value string) *ServiceAccountSubjectApplyConfiguration {
|
|
||||||
b.Namespace = &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 *ServiceAccountSubjectApplyConfiguration) WithName(value string) *ServiceAccountSubjectApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SubjectApplyConfiguration represents an declarative configuration of the Subject type for use
|
|
||||||
// with apply.
|
|
||||||
type SubjectApplyConfiguration struct {
|
|
||||||
Kind *v1alpha1.SubjectKind `json:"kind,omitempty"`
|
|
||||||
User *UserSubjectApplyConfiguration `json:"user,omitempty"`
|
|
||||||
Group *GroupSubjectApplyConfiguration `json:"group,omitempty"`
|
|
||||||
ServiceAccount *ServiceAccountSubjectApplyConfiguration `json:"serviceAccount,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SubjectApplyConfiguration constructs an declarative configuration of the Subject type for use with
|
|
||||||
// apply.
|
|
||||||
func Subject() *SubjectApplyConfiguration {
|
|
||||||
return &SubjectApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *SubjectApplyConfiguration) WithKind(value v1alpha1.SubjectKind) *SubjectApplyConfiguration {
|
|
||||||
b.Kind = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUser sets the User field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the User field is set to the value of the last call.
|
|
||||||
func (b *SubjectApplyConfiguration) WithUser(value *UserSubjectApplyConfiguration) *SubjectApplyConfiguration {
|
|
||||||
b.User = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGroup sets the Group field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Group field is set to the value of the last call.
|
|
||||||
func (b *SubjectApplyConfiguration) WithGroup(value *GroupSubjectApplyConfiguration) *SubjectApplyConfiguration {
|
|
||||||
b.Group = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithServiceAccount sets the ServiceAccount field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ServiceAccount field is set to the value of the last call.
|
|
||||||
func (b *SubjectApplyConfiguration) WithServiceAccount(value *ServiceAccountSubjectApplyConfiguration) *SubjectApplyConfiguration {
|
|
||||||
b.ServiceAccount = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// UserSubjectApplyConfiguration represents an declarative configuration of the UserSubject type for use
|
|
||||||
// with apply.
|
|
||||||
type UserSubjectApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// UserSubjectApplyConfiguration constructs an declarative configuration of the UserSubject type for use with
|
|
||||||
// apply.
|
|
||||||
func UserSubject() *UserSubjectApplyConfiguration {
|
|
||||||
return &UserSubjectApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *UserSubjectApplyConfiguration) WithName(value string) *UserSubjectApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -8895,334 +8895,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: maxUnavailable
|
- name: maxUnavailable
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
|
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.ExemptPriorityLevelConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: lendablePercent
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: nominalConcurrencyShares
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: type
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchema
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec
|
|
||||||
default: {}
|
|
||||||
- name: status
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: lastTransitionTime
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
|
||||||
default: {}
|
|
||||||
- name: message
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: reason
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: status
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: type
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: distinguisherMethod
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod
|
|
||||||
- name: matchingPrecedence
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: priorityLevelConfiguration
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference
|
|
||||||
default: {}
|
|
||||||
- name: rules
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: conditions
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition
|
|
||||||
elementRelationship: associative
|
|
||||||
keys:
|
|
||||||
- type
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.GroupSubject
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.LimitResponse
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: queuing
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration
|
|
||||||
- name: type
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
unions:
|
|
||||||
- discriminator: type
|
|
||||||
fields:
|
|
||||||
- fieldName: queuing
|
|
||||||
discriminatorValue: Queuing
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: assuredConcurrencyShares
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: borrowingLimitPercent
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: lendablePercent
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: limitResponse
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.LimitResponse
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: nonResourceURLs
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: verbs
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: nonResourceRules
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: resourceRules
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: subjects
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.Subject
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec
|
|
||||||
default: {}
|
|
||||||
- name: status
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: lastTransitionTime
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
|
||||||
default: {}
|
|
||||||
- name: message
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: reason
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: status
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: type
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: exempt
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.ExemptPriorityLevelConfiguration
|
|
||||||
- name: limited
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration
|
|
||||||
- name: type
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
unions:
|
|
||||||
- discriminator: type
|
|
||||||
fields:
|
|
||||||
- fieldName: exempt
|
|
||||||
discriminatorValue: Exempt
|
|
||||||
- fieldName: limited
|
|
||||||
discriminatorValue: Limited
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: conditions
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition
|
|
||||||
elementRelationship: associative
|
|
||||||
keys:
|
|
||||||
- type
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: handSize
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: queueLengthLimit
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: queues
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiGroups
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: clusterScope
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: namespaces
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: resources
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: verbs
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: associative
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: namespace
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.Subject
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: group
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.GroupSubject
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: serviceAccount
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject
|
|
||||||
- name: user
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.flowcontrol.v1alpha1.UserSubject
|
|
||||||
unions:
|
|
||||||
- discriminator: kind
|
|
||||||
fields:
|
|
||||||
- fieldName: group
|
|
||||||
discriminatorValue: Group
|
|
||||||
- fieldName: serviceAccount
|
|
||||||
discriminatorValue: ServiceAccount
|
|
||||||
- fieldName: user
|
|
||||||
discriminatorValue: User
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.UserSubject
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration
|
- name: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
@ -43,7 +43,6 @@ import (
|
|||||||
eventsv1 "k8s.io/api/events/v1"
|
eventsv1 "k8s.io/api/events/v1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||||
v1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
v1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||||
@ -92,7 +91,6 @@ import (
|
|||||||
applyconfigurationseventsv1 "k8s.io/client-go/applyconfigurations/events/v1"
|
applyconfigurationseventsv1 "k8s.io/client-go/applyconfigurations/events/v1"
|
||||||
applyconfigurationseventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1"
|
applyconfigurationseventsv1beta1 "k8s.io/client-go/applyconfigurations/events/v1beta1"
|
||||||
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
applyconfigurationsextensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||||
applyconfigurationsflowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
|
||||||
applyconfigurationsflowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1"
|
applyconfigurationsflowcontrolv1beta1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta1"
|
||||||
applyconfigurationsflowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2"
|
applyconfigurationsflowcontrolv1beta2 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta2"
|
||||||
flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3"
|
flowcontrolv1beta3 "k8s.io/client-go/applyconfigurations/flowcontrol/v1beta3"
|
||||||
@ -1072,50 +1070,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("Scale"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("Scale"):
|
||||||
return &applyconfigurationsextensionsv1beta1.ScaleApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.ScaleApplyConfiguration{}
|
||||||
|
|
||||||
// Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("ExemptPriorityLevelConfiguration"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.ExemptPriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.FlowDistinguisherMethodApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchema"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaCondition"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaConditionApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaSpec"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaSpecApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowSchemaStatus"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.FlowSchemaStatusApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("GroupSubject"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.GroupSubjectApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("LimitedPriorityLevelConfiguration"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.LimitedPriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("LimitResponse"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.LimitResponseApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("NonResourcePolicyRule"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.NonResourcePolicyRuleApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PolicyRulesWithSubjects"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PolicyRulesWithSubjectsApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfiguration"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationCondition"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationConditionApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationReference"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationReferenceApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationSpec"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationSpecApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationStatus"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationStatusApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("QueuingConfiguration"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.QueuingConfigurationApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("ResourcePolicyRule"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.ResourcePolicyRuleApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("ServiceAccountSubject"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.ServiceAccountSubjectApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("Subject"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.SubjectApplyConfiguration{}
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("UserSubject"):
|
|
||||||
return &applyconfigurationsflowcontrolv1alpha1.UserSubjectApplyConfiguration{}
|
|
||||||
|
|
||||||
// Group=flowcontrol.apiserver.k8s.io, Version=v1beta1
|
// Group=flowcontrol.apiserver.k8s.io, Version=v1beta1
|
||||||
case flowcontrolv1beta1.SchemeGroupVersion.WithKind("ExemptPriorityLevelConfiguration"):
|
case flowcontrolv1beta1.SchemeGroupVersion.WithKind("ExemptPriorityLevelConfiguration"):
|
||||||
return &applyconfigurationsflowcontrolv1beta1.ExemptPriorityLevelConfigurationApplyConfiguration{}
|
return &applyconfigurationsflowcontrolv1beta1.ExemptPriorityLevelConfigurationApplyConfiguration{}
|
||||||
|
4
go.mod
4
go.mod
@ -23,7 +23,7 @@ require (
|
|||||||
golang.org/x/term v0.10.0
|
golang.org/x/term v0.10.0
|
||||||
golang.org/x/time v0.3.0
|
golang.org/x/time v0.3.0
|
||||||
google.golang.org/protobuf v1.31.0
|
google.golang.org/protobuf v1.31.0
|
||||||
k8s.io/api v0.0.0-20230901043045-d68a18351c00
|
k8s.io/api v0.0.0-20230901043046-faec07c7cc89
|
||||||
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013
|
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013
|
||||||
k8s.io/klog/v2 v2.100.1
|
k8s.io/klog/v2 v2.100.1
|
||||||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
|
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
|
||||||
@ -60,6 +60,6 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
k8s.io/api => k8s.io/api v0.0.0-20230901043045-d68a18351c00
|
k8s.io/api => k8s.io/api v0.0.0-20230901043046-faec07c7cc89
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013
|
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -146,8 +146,8 @@ 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.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 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/api v0.0.0-20230901043045-d68a18351c00 h1:plDl2FaMrSOtZgQQfiE4PwlUH1sTuQ92EY7aMnxRciI=
|
k8s.io/api v0.0.0-20230901043046-faec07c7cc89 h1:qgk2nx6RBhIWmGYpmsbP9nuOFK/ZHpzKS2Bk13dYzqU=
|
||||||
k8s.io/api v0.0.0-20230901043045-d68a18351c00/go.mod h1:qunKCI5HG1/XacwNcIwUHAFWPw6hFmIP5fb13hHJARM=
|
k8s.io/api v0.0.0-20230901043046-faec07c7cc89/go.mod h1:qunKCI5HG1/XacwNcIwUHAFWPw6hFmIP5fb13hHJARM=
|
||||||
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013 h1:SWrddEv3aWWseUfiT42ziJUc8Gck/2Iqltz0Z+ctTB8=
|
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013 h1:SWrddEv3aWWseUfiT42ziJUc8Gck/2Iqltz0Z+ctTB8=
|
||||||
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013/go.mod h1:4XSLsQ98qjSQA9IF1M+KnXoc+E7kiualOL0cx3GFYZI=
|
k8s.io/apimachinery v0.0.0-20230901041540-0d057e543013/go.mod h1:4XSLsQ98qjSQA9IF1M+KnXoc+E7kiualOL0cx3GFYZI=
|
||||||
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||||
|
@ -19,7 +19,6 @@ limitations under the License.
|
|||||||
package flowcontrol
|
package flowcontrol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
v1alpha1 "k8s.io/client-go/informers/flowcontrol/v1alpha1"
|
|
||||||
v1beta1 "k8s.io/client-go/informers/flowcontrol/v1beta1"
|
v1beta1 "k8s.io/client-go/informers/flowcontrol/v1beta1"
|
||||||
v1beta2 "k8s.io/client-go/informers/flowcontrol/v1beta2"
|
v1beta2 "k8s.io/client-go/informers/flowcontrol/v1beta2"
|
||||||
v1beta3 "k8s.io/client-go/informers/flowcontrol/v1beta3"
|
v1beta3 "k8s.io/client-go/informers/flowcontrol/v1beta3"
|
||||||
@ -28,8 +27,6 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to each of this group's versions.
|
// Interface provides access to each of this group's versions.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
|
||||||
V1alpha1() v1alpha1.Interface
|
|
||||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
V1beta1() v1beta1.Interface
|
V1beta1() v1beta1.Interface
|
||||||
// V1beta2 provides access to shared informers for resources in V1beta2.
|
// V1beta2 provides access to shared informers for resources in V1beta2.
|
||||||
@ -49,11 +46,6 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// V1alpha1 returns a new v1alpha1.Interface.
|
|
||||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
|
||||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
// V1beta1 returns a new v1beta1.Interface.
|
// V1beta1 returns a new v1beta1.Interface.
|
||||||
func (g *group) V1beta1() v1beta1.Interface {
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
time "time"
|
|
||||||
|
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
|
||||||
v1alpha1 "k8s.io/client-go/listers/flowcontrol/v1alpha1"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowSchemaInformer provides access to a shared informer and lister for
|
|
||||||
// FlowSchemas.
|
|
||||||
type FlowSchemaInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() v1alpha1.FlowSchemaLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type flowSchemaInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFlowSchemaInformer constructs a new informer for FlowSchema type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFlowSchemaInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredFlowSchemaInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredFlowSchemaInformer constructs a new informer for FlowSchema type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredFlowSchemaInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.FlowcontrolV1alpha1().FlowSchemas().List(context.TODO(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.FlowcontrolV1alpha1().FlowSchemas().Watch(context.TODO(), options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&flowcontrolv1alpha1.FlowSchema{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *flowSchemaInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredFlowSchemaInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *flowSchemaInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&flowcontrolv1alpha1.FlowSchema{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *flowSchemaInformer) Lister() v1alpha1.FlowSchemaLister {
|
|
||||||
return v1alpha1.NewFlowSchemaLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
|
||||||
type Interface interface {
|
|
||||||
// FlowSchemas returns a FlowSchemaInformer.
|
|
||||||
FlowSchemas() FlowSchemaInformer
|
|
||||||
// PriorityLevelConfigurations returns a PriorityLevelConfigurationInformer.
|
|
||||||
PriorityLevelConfigurations() PriorityLevelConfigurationInformer
|
|
||||||
}
|
|
||||||
|
|
||||||
type version struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
namespace string
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// New returns a new Interface.
|
|
||||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
|
||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchemas returns a FlowSchemaInformer.
|
|
||||||
func (v *version) FlowSchemas() FlowSchemaInformer {
|
|
||||||
return &flowSchemaInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurations returns a PriorityLevelConfigurationInformer.
|
|
||||||
func (v *version) PriorityLevelConfigurations() PriorityLevelConfigurationInformer {
|
|
||||||
return &priorityLevelConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
time "time"
|
|
||||||
|
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
|
||||||
v1alpha1 "k8s.io/client-go/listers/flowcontrol/v1alpha1"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationInformer provides access to a shared informer and lister for
|
|
||||||
// PriorityLevelConfigurations.
|
|
||||||
type PriorityLevelConfigurationInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() v1alpha1.PriorityLevelConfigurationLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type priorityLevelConfigurationInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPriorityLevelConfigurationInformer constructs a new informer for PriorityLevelConfiguration type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewPriorityLevelConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredPriorityLevelConfigurationInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredPriorityLevelConfigurationInformer constructs a new informer for PriorityLevelConfiguration type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredPriorityLevelConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(context.TODO(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(context.TODO(), options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&flowcontrolv1alpha1.PriorityLevelConfiguration{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *priorityLevelConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredPriorityLevelConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *priorityLevelConfigurationInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&flowcontrolv1alpha1.PriorityLevelConfiguration{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *priorityLevelConfigurationInformer) Lister() v1alpha1.PriorityLevelConfigurationLister {
|
|
||||||
return v1alpha1.NewPriorityLevelConfigurationLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -45,7 +45,6 @@ import (
|
|||||||
eventsv1 "k8s.io/api/events/v1"
|
eventsv1 "k8s.io/api/events/v1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||||
v1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
v1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||||
@ -259,12 +258,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("replicasets"):
|
case extensionsv1beta1.SchemeGroupVersion.WithResource("replicasets"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
|
||||||
|
|
||||||
// Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("flowschemas"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().FlowSchemas().Informer()}, nil
|
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil
|
|
||||||
|
|
||||||
// Group=flowcontrol.apiserver.k8s.io, Version=v1beta1
|
// Group=flowcontrol.apiserver.k8s.io, Version=v1beta1
|
||||||
case flowcontrolv1beta1.SchemeGroupVersion.WithResource("flowschemas"):
|
case flowcontrolv1beta1.SchemeGroupVersion.WithResource("flowschemas"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1beta1().FlowSchemas().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1beta1().FlowSchemas().Informer()}, nil
|
||||||
|
@ -52,7 +52,6 @@ import (
|
|||||||
eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
|
eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
|
||||||
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
|
||||||
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
|
||||||
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
|
||||||
flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3"
|
flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3"
|
||||||
@ -109,7 +108,6 @@ type Interface interface {
|
|||||||
EventsV1() eventsv1.EventsV1Interface
|
EventsV1() eventsv1.EventsV1Interface
|
||||||
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
||||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||||
FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
|
|
||||||
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
|
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
|
||||||
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
|
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
|
||||||
FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface
|
FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface
|
||||||
@ -165,7 +163,6 @@ type Clientset struct {
|
|||||||
eventsV1 *eventsv1.EventsV1Client
|
eventsV1 *eventsv1.EventsV1Client
|
||||||
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
||||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||||
flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
|
|
||||||
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
|
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
|
||||||
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
|
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
|
||||||
flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3Client
|
flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3Client
|
||||||
@ -334,11 +331,6 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter
|
|||||||
return c.extensionsV1beta1
|
return c.extensionsV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client
|
|
||||||
func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface {
|
|
||||||
return c.flowcontrolV1alpha1
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
|
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
|
||||||
func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
|
func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
|
||||||
return c.flowcontrolV1beta1
|
return c.flowcontrolV1beta1
|
||||||
@ -604,10 +596,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.flowcontrolV1alpha1, err = flowcontrolv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
cs.flowcontrolV1beta1, err = flowcontrolv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
cs.flowcontrolV1beta1, err = flowcontrolv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -742,7 +730,6 @@ func New(c rest.Interface) *Clientset {
|
|||||||
cs.eventsV1 = eventsv1.New(c)
|
cs.eventsV1 = eventsv1.New(c)
|
||||||
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
||||||
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
||||||
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)
|
|
||||||
cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
|
cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
|
||||||
cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c)
|
cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c)
|
||||||
cs.flowcontrolV1beta3 = flowcontrolv1beta3.New(c)
|
cs.flowcontrolV1beta3 = flowcontrolv1beta3.New(c)
|
||||||
|
@ -82,8 +82,6 @@ import (
|
|||||||
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
|
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
|
||||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||||
fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
|
fakeextensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake"
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
|
||||||
fakeflowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake"
|
|
||||||
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
|
||||||
fakeflowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake"
|
fakeflowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1/fake"
|
||||||
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
|
||||||
@ -324,11 +322,6 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter
|
|||||||
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client
|
|
||||||
func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface {
|
|
||||||
return &fakeflowcontrolv1alpha1.FakeFlowcontrolV1alpha1{Fake: &c.Fake}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
|
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
|
||||||
func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
|
func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
|
||||||
return &fakeflowcontrolv1beta1.FakeFlowcontrolV1beta1{Fake: &c.Fake}
|
return &fakeflowcontrolv1beta1.FakeFlowcontrolV1beta1{Fake: &c.Fake}
|
||||||
|
@ -48,7 +48,6 @@ import (
|
|||||||
eventsv1 "k8s.io/api/events/v1"
|
eventsv1 "k8s.io/api/events/v1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||||
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||||
@ -110,7 +109,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
eventsv1.AddToScheme,
|
eventsv1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
flowcontrolv1alpha1.AddToScheme,
|
|
||||||
flowcontrolv1beta1.AddToScheme,
|
flowcontrolv1beta1.AddToScheme,
|
||||||
flowcontrolv1beta2.AddToScheme,
|
flowcontrolv1beta2.AddToScheme,
|
||||||
flowcontrolv1beta3.AddToScheme,
|
flowcontrolv1beta3.AddToScheme,
|
||||||
|
@ -48,7 +48,6 @@ import (
|
|||||||
eventsv1 "k8s.io/api/events/v1"
|
eventsv1 "k8s.io/api/events/v1"
|
||||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||||
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||||
@ -110,7 +109,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
eventsv1.AddToScheme,
|
eventsv1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
flowcontrolv1alpha1.AddToScheme,
|
|
||||||
flowcontrolv1beta1.AddToScheme,
|
flowcontrolv1beta1.AddToScheme,
|
||||||
flowcontrolv1beta2.AddToScheme,
|
flowcontrolv1beta2.AddToScheme,
|
||||||
flowcontrolv1beta3.AddToScheme,
|
flowcontrolv1beta3.AddToScheme,
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
// This package has the automatically generated typed clients.
|
|
||||||
package v1alpha1
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
// Package fake has the automatically generated clients.
|
|
||||||
package fake
|
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FakeFlowcontrolV1alpha1 struct {
|
|
||||||
*testing.Fake
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeFlowcontrolV1alpha1) FlowSchemas() v1alpha1.FlowSchemaInterface {
|
|
||||||
return &FakeFlowSchemas{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeFlowcontrolV1alpha1) PriorityLevelConfigurations() v1alpha1.PriorityLevelConfigurationInterface {
|
|
||||||
return &FakePriorityLevelConfigurations{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
|
||||||
// with API server by this client implementation.
|
|
||||||
func (c *FakeFlowcontrolV1alpha1) RESTClient() rest.Interface {
|
|
||||||
var ret *rest.RESTClient
|
|
||||||
return ret
|
|
||||||
}
|
|
@ -1,178 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeFlowSchemas implements FlowSchemaInterface
|
|
||||||
type FakeFlowSchemas struct {
|
|
||||||
Fake *FakeFlowcontrolV1alpha1
|
|
||||||
}
|
|
||||||
|
|
||||||
var flowschemasResource = v1alpha1.SchemeGroupVersion.WithResource("flowschemas")
|
|
||||||
|
|
||||||
var flowschemasKind = v1alpha1.SchemeGroupVersion.WithKind("FlowSchema")
|
|
||||||
|
|
||||||
// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any.
|
|
||||||
func (c *FakeFlowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors.
|
|
||||||
func (c *FakeFlowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1alpha1.FlowSchemaList{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1alpha1.FlowSchemaList{ListMeta: obj.(*v1alpha1.FlowSchemaList).ListMeta}
|
|
||||||
for _, item := range obj.(*v1alpha1.FlowSchemaList).Items {
|
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
|
||||||
list.Items = append(list.Items, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested flowSchemas.
|
|
||||||
func (c *FakeFlowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewRootWatchAction(flowschemasResource, opts))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
|
||||||
func (c *FakeFlowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
|
||||||
func (c *FakeFlowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
|
||||||
func (c *FakeFlowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakeFlowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1alpha1.FlowSchema{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1alpha1.FlowSchemaList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched flowSchema.
|
|
||||||
func (c *FakeFlowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema.
|
|
||||||
func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
if flowSchema == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(flowSchema)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := flowSchema.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *FakeFlowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
if flowSchema == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(flowSchema)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := flowSchema.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.FlowSchema{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), err
|
|
||||||
}
|
|
@ -1,178 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface
|
|
||||||
type FakePriorityLevelConfigurations struct {
|
|
||||||
Fake *FakeFlowcontrolV1alpha1
|
|
||||||
}
|
|
||||||
|
|
||||||
var prioritylevelconfigurationsResource = v1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations")
|
|
||||||
|
|
||||||
var prioritylevelconfigurationsKind = v1alpha1.SchemeGroupVersion.WithKind("PriorityLevelConfiguration")
|
|
||||||
|
|
||||||
// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors.
|
|
||||||
func (c *FakePriorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1alpha1.PriorityLevelConfigurationList{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1alpha1.PriorityLevelConfigurationList{ListMeta: obj.(*v1alpha1.PriorityLevelConfigurationList).ListMeta}
|
|
||||||
for _, item := range obj.(*v1alpha1.PriorityLevelConfigurationList).Items {
|
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
|
||||||
list.Items = append(list.Items, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewRootWatchAction(prioritylevelconfigurationsResource, opts))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
|
||||||
func (c *FakePriorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1alpha1.PriorityLevelConfigurationList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched priorityLevelConfiguration.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration.
|
|
||||||
func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
if priorityLevelConfiguration == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(priorityLevelConfiguration)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := priorityLevelConfiguration.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *FakePriorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
if priorityLevelConfiguration == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(priorityLevelConfiguration)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := priorityLevelConfiguration.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PriorityLevelConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), err
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
"k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FlowcontrolV1alpha1Interface interface {
|
|
||||||
RESTClient() rest.Interface
|
|
||||||
FlowSchemasGetter
|
|
||||||
PriorityLevelConfigurationsGetter
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowcontrolV1alpha1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group.
|
|
||||||
type FlowcontrolV1alpha1Client struct {
|
|
||||||
restClient rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FlowcontrolV1alpha1Client) FlowSchemas() FlowSchemaInterface {
|
|
||||||
return newFlowSchemas(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FlowcontrolV1alpha1Client) PriorityLevelConfigurations() PriorityLevelConfigurationInterface {
|
|
||||||
return newPriorityLevelConfigurations(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new FlowcontrolV1alpha1Client for the given config.
|
|
||||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
|
||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
|
||||||
func NewForConfig(c *rest.Config) (*FlowcontrolV1alpha1Client, error) {
|
|
||||||
config := *c
|
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
httpClient, err := rest.HTTPClientFor(&config)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return NewForConfigAndClient(&config, httpClient)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfigAndClient creates a new FlowcontrolV1alpha1Client for the given config and http client.
|
|
||||||
// Note the http client provided takes precedence over the configured transport values.
|
|
||||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1alpha1Client, error) {
|
|
||||||
config := *c
|
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &FlowcontrolV1alpha1Client{client}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfigOrDie creates a new FlowcontrolV1alpha1Client for the given config and
|
|
||||||
// panics if there is an error in the config.
|
|
||||||
func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1alpha1Client {
|
|
||||||
client, err := NewForConfig(c)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return client
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new FlowcontrolV1alpha1Client for the given RESTClient.
|
|
||||||
func New(c rest.Interface) *FlowcontrolV1alpha1Client {
|
|
||||||
return &FlowcontrolV1alpha1Client{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
|
||||||
gv := v1alpha1.SchemeGroupVersion
|
|
||||||
config.GroupVersion = &gv
|
|
||||||
config.APIPath = "/apis"
|
|
||||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
|
||||||
|
|
||||||
if config.UserAgent == "" {
|
|
||||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
|
||||||
// with API server by this client implementation.
|
|
||||||
func (c *FlowcontrolV1alpha1Client) RESTClient() rest.Interface {
|
|
||||||
if c == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return c.restClient
|
|
||||||
}
|
|
@ -1,243 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowSchemasGetter has a method to return a FlowSchemaInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type FlowSchemasGetter interface {
|
|
||||||
FlowSchemas() FlowSchemaInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// FlowSchemaInterface has methods to work with FlowSchema resources.
|
|
||||||
type FlowSchemaInterface interface {
|
|
||||||
Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (*v1alpha1.FlowSchema, error)
|
|
||||||
Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error)
|
|
||||||
UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, 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) (*v1alpha1.FlowSchema, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FlowSchemaList, 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 *v1alpha1.FlowSchema, err error)
|
|
||||||
Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error)
|
|
||||||
ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error)
|
|
||||||
FlowSchemaExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// flowSchemas implements FlowSchemaInterface
|
|
||||||
type flowSchemas struct {
|
|
||||||
client rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
// newFlowSchemas returns a FlowSchemas
|
|
||||||
func newFlowSchemas(c *FlowcontrolV1alpha1Client) *flowSchemas {
|
|
||||||
return &flowSchemas{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any.
|
|
||||||
func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors.
|
|
||||||
func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
result = &v1alpha1.FlowSchemaList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("flowschemas").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested flowSchemas.
|
|
||||||
func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Resource("flowschemas").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Watch(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
|
||||||
func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("flowschemas").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(flowSchema).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
|
||||||
func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(flowSchema.Name).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(flowSchema).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
|
||||||
func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(flowSchema.Name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(flowSchema).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(name).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
var timeout time.Duration
|
|
||||||
if listOpts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("flowschemas").
|
|
||||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched flowSchema.
|
|
||||||
func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(name).
|
|
||||||
SubResource(subresources...).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema.
|
|
||||||
func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
if flowSchema == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(flowSchema)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := flowSchema.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(*name).
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
|
||||||
if flowSchema == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(flowSchema)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
name := flowSchema.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
|
|
||||||
result = &v1alpha1.FlowSchema{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Resource("flowschemas").
|
|
||||||
Name(*name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
type FlowSchemaExpansion interface{}
|
|
||||||
|
|
||||||
type PriorityLevelConfigurationExpansion interface{}
|
|
@ -1,243 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type PriorityLevelConfigurationsGetter interface {
|
|
||||||
PriorityLevelConfigurations() PriorityLevelConfigurationInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationInterface has methods to work with PriorityLevelConfiguration resources.
|
|
||||||
type PriorityLevelConfigurationInterface interface {
|
|
||||||
Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (*v1alpha1.PriorityLevelConfiguration, error)
|
|
||||||
Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error)
|
|
||||||
UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, 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) (*v1alpha1.PriorityLevelConfiguration, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityLevelConfigurationList, 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 *v1alpha1.PriorityLevelConfiguration, err error)
|
|
||||||
Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error)
|
|
||||||
ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error)
|
|
||||||
PriorityLevelConfigurationExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// priorityLevelConfigurations implements PriorityLevelConfigurationInterface
|
|
||||||
type priorityLevelConfigurations struct {
|
|
||||||
client rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
// newPriorityLevelConfigurations returns a PriorityLevelConfigurations
|
|
||||||
func newPriorityLevelConfigurations(c *FlowcontrolV1alpha1Client) *priorityLevelConfigurations {
|
|
||||||
return &priorityLevelConfigurations{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any.
|
|
||||||
func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors.
|
|
||||||
func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
result = &v1alpha1.PriorityLevelConfigurationList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations.
|
|
||||||
func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Watch(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
|
||||||
func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(priorityLevelConfiguration).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
|
||||||
func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(priorityLevelConfiguration.Name).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(priorityLevelConfiguration).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
|
||||||
func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(priorityLevelConfiguration.Name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(priorityLevelConfiguration).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(name).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
var timeout time.Duration
|
|
||||||
if listOpts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched priorityLevelConfiguration.
|
|
||||||
func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(name).
|
|
||||||
SubResource(subresources...).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration.
|
|
||||||
func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
if priorityLevelConfiguration == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(priorityLevelConfiguration)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := priorityLevelConfiguration.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(*name).
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplyStatus was generated because the type contains a Status member.
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
if priorityLevelConfiguration == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(priorityLevelConfiguration)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
name := priorityLevelConfiguration.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
|
|
||||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Resource("prioritylevelconfigurations").
|
|
||||||
Name(*name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
// FlowSchemaListerExpansion allows custom methods to be added to
|
|
||||||
// FlowSchemaLister.
|
|
||||||
type FlowSchemaListerExpansion interface{}
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationListerExpansion allows custom methods to be added to
|
|
||||||
// PriorityLevelConfigurationLister.
|
|
||||||
type PriorityLevelConfigurationListerExpansion interface{}
|
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FlowSchemaLister helps list FlowSchemas.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type FlowSchemaLister interface {
|
|
||||||
// List lists all FlowSchemas in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error)
|
|
||||||
// Get retrieves the FlowSchema from the index for a given name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*v1alpha1.FlowSchema, error)
|
|
||||||
FlowSchemaListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// flowSchemaLister implements the FlowSchemaLister interface.
|
|
||||||
type flowSchemaLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFlowSchemaLister returns a new FlowSchemaLister.
|
|
||||||
func NewFlowSchemaLister(indexer cache.Indexer) FlowSchemaLister {
|
|
||||||
return &flowSchemaLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all FlowSchemas in the indexer.
|
|
||||||
func (s *flowSchemaLister) List(selector labels.Selector) (ret []*v1alpha1.FlowSchema, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1alpha1.FlowSchema))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the FlowSchema from the index for a given name.
|
|
||||||
func (s *flowSchemaLister) Get(name string) (*v1alpha1.FlowSchema, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v1alpha1.Resource("flowschema"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.FlowSchema), nil
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PriorityLevelConfigurationLister helps list PriorityLevelConfigurations.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type PriorityLevelConfigurationLister interface {
|
|
||||||
// List lists all PriorityLevelConfigurations in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error)
|
|
||||||
// Get retrieves the PriorityLevelConfiguration from the index for a given name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*v1alpha1.PriorityLevelConfiguration, error)
|
|
||||||
PriorityLevelConfigurationListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// priorityLevelConfigurationLister implements the PriorityLevelConfigurationLister interface.
|
|
||||||
type priorityLevelConfigurationLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPriorityLevelConfigurationLister returns a new PriorityLevelConfigurationLister.
|
|
||||||
func NewPriorityLevelConfigurationLister(indexer cache.Indexer) PriorityLevelConfigurationLister {
|
|
||||||
return &priorityLevelConfigurationLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all PriorityLevelConfigurations in the indexer.
|
|
||||||
func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.PriorityLevelConfiguration, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1alpha1.PriorityLevelConfiguration))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the PriorityLevelConfiguration from the index for a given name.
|
|
||||||
func (s *priorityLevelConfigurationLister) Get(name string) (*v1alpha1.PriorityLevelConfiguration, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v1alpha1.Resource("prioritylevelconfiguration"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.PriorityLevelConfiguration), nil
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user