mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-23 05:37:13 +00:00
apiserver: generate code for apf flowcontrol v1 API
run: - hack/update-codegen.sh - hack/update-openapi-spec.sh Kubernetes-commit: 5972037ffd6c1aea0f1c99ed430d1d78204a48a0
This commit is contained in:
parent
30eba26adb
commit
20fd67fa15
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FlowDistinguisherMethodApplyConfiguration represents an declarative configuration of the FlowDistinguisherMethod type for use
|
||||||
|
// with apply.
|
||||||
|
type FlowDistinguisherMethodApplyConfiguration struct {
|
||||||
|
Type *v1.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 v1.FlowDistinguisherMethodType) *FlowDistinguisherMethodApplyConfiguration {
|
||||||
|
b.Type = &value
|
||||||
|
return b
|
||||||
|
}
|
256
applyconfigurations/flowcontrol/v1/flowschema.go
Normal file
256
applyconfigurations/flowcontrol/v1/flowschema.go
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
apiflowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
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/v1")
|
||||||
|
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 *apiflowcontrolv1.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 *apiflowcontrolv1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) {
|
||||||
|
return extractFlowSchema(flowSchema, fieldManager, "status")
|
||||||
|
}
|
||||||
|
|
||||||
|
func extractFlowSchema(flowSchema *apiflowcontrolv1.FlowSchema, fieldManager string, subresource string) (*FlowSchemaApplyConfiguration, error) {
|
||||||
|
b := &FlowSchemaApplyConfiguration{}
|
||||||
|
err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1.FlowSchema"), fieldManager, b, subresource)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
b.WithName(flowSchema.Name)
|
||||||
|
|
||||||
|
b.WithKind("FlowSchema")
|
||||||
|
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1")
|
||||||
|
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
|
||||||
|
}
|
80
applyconfigurations/flowcontrol/v1/flowschemacondition.go
Normal file
80
applyconfigurations/flowcontrol/v1/flowschemacondition.go
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FlowSchemaConditionApplyConfiguration represents an declarative configuration of the FlowSchemaCondition type for use
|
||||||
|
// with apply.
|
||||||
|
type FlowSchemaConditionApplyConfiguration struct {
|
||||||
|
Type *v1.FlowSchemaConditionType `json:"type,omitempty"`
|
||||||
|
Status *v1.ConditionStatus `json:"status,omitempty"`
|
||||||
|
LastTransitionTime *metav1.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 v1.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 v1.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 metav1.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
|
||||||
|
}
|
71
applyconfigurations/flowcontrol/v1/flowschemaspec.go
Normal file
71
applyconfigurations/flowcontrol/v1/flowschemaspec.go
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
44
applyconfigurations/flowcontrol/v1/flowschemastatus.go
Normal file
44
applyconfigurations/flowcontrol/v1/flowschemastatus.go
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
39
applyconfigurations/flowcontrol/v1/groupsubject.go
Normal file
39
applyconfigurations/flowcontrol/v1/groupsubject.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// LimitedPriorityLevelConfigurationApplyConfiguration represents an declarative configuration of the LimitedPriorityLevelConfiguration type for use
|
||||||
|
// with apply.
|
||||||
|
type LimitedPriorityLevelConfigurationApplyConfiguration struct {
|
||||||
|
NominalConcurrencyShares *int32 `json:"nominalConcurrencyShares,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{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 *LimitedPriorityLevelConfigurationApplyConfiguration) WithNominalConcurrencyShares(value int32) *LimitedPriorityLevelConfigurationApplyConfiguration {
|
||||||
|
b.NominalConcurrencyShares = &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
|
||||||
|
}
|
52
applyconfigurations/flowcontrol/v1/limitresponse.go
Normal file
52
applyconfigurations/flowcontrol/v1/limitresponse.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// LimitResponseApplyConfiguration represents an declarative configuration of the LimitResponse type for use
|
||||||
|
// with apply.
|
||||||
|
type LimitResponseApplyConfiguration struct {
|
||||||
|
Type *v1.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 v1.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
|
||||||
|
}
|
52
applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go
Normal file
52
applyconfigurations/flowcontrol/v1/nonresourcepolicyrule.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
256
applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
256
applyconfigurations/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
apiflowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
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/v1")
|
||||||
|
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 *apiflowcontrolv1.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 *apiflowcontrolv1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
||||||
|
return extractPriorityLevelConfiguration(priorityLevelConfiguration, fieldManager, "status")
|
||||||
|
}
|
||||||
|
|
||||||
|
func extractPriorityLevelConfiguration(priorityLevelConfiguration *apiflowcontrolv1.PriorityLevelConfiguration, fieldManager string, subresource string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
||||||
|
b := &PriorityLevelConfigurationApplyConfiguration{}
|
||||||
|
err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration"), fieldManager, b, subresource)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
b.WithName(priorityLevelConfiguration.Name)
|
||||||
|
|
||||||
|
b.WithKind("PriorityLevelConfiguration")
|
||||||
|
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1")
|
||||||
|
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
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PriorityLevelConfigurationConditionApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationCondition type for use
|
||||||
|
// with apply.
|
||||||
|
type PriorityLevelConfigurationConditionApplyConfiguration struct {
|
||||||
|
Type *v1.PriorityLevelConfigurationConditionType `json:"type,omitempty"`
|
||||||
|
Status *v1.ConditionStatus `json:"status,omitempty"`
|
||||||
|
LastTransitionTime *metav1.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 v1.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 v1.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 metav1.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
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// PriorityLevelConfigurationSpecApplyConfiguration represents an declarative configuration of the PriorityLevelConfigurationSpec type for use
|
||||||
|
// with apply.
|
||||||
|
type PriorityLevelConfigurationSpecApplyConfiguration struct {
|
||||||
|
Type *v1.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 v1.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
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
57
applyconfigurations/flowcontrol/v1/queuingconfiguration.go
Normal file
57
applyconfigurations/flowcontrol/v1/queuingconfiguration.go
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
83
applyconfigurations/flowcontrol/v1/resourcepolicyrule.go
Normal file
83
applyconfigurations/flowcontrol/v1/resourcepolicyrule.go
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
48
applyconfigurations/flowcontrol/v1/serviceaccountsubject.go
Normal file
48
applyconfigurations/flowcontrol/v1/serviceaccountsubject.go
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
70
applyconfigurations/flowcontrol/v1/subject.go
Normal file
70
applyconfigurations/flowcontrol/v1/subject.go
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SubjectApplyConfiguration represents an declarative configuration of the Subject type for use
|
||||||
|
// with apply.
|
||||||
|
type SubjectApplyConfiguration struct {
|
||||||
|
Kind *v1.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 v1.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
|
||||||
|
}
|
39
applyconfigurations/flowcontrol/v1/usersubject.go
Normal file
39
applyconfigurations/flowcontrol/v1/usersubject.go
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
@ -8852,6 +8852,334 @@ 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.v1.ExemptPriorityLevelConfiguration
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: lendablePercent
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
- name: nominalConcurrencyShares
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: type
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.FlowSchemaSpec
|
||||||
|
default: {}
|
||||||
|
- name: status
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.FlowSchemaStatus
|
||||||
|
default: {}
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.FlowSchemaSpec
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: distinguisherMethod
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod
|
||||||
|
- name: matchingPrecedence
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
default: 0
|
||||||
|
- name: priorityLevelConfiguration
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference
|
||||||
|
default: {}
|
||||||
|
- name: rules
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects
|
||||||
|
elementRelationship: atomic
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.FlowSchemaStatus
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: conditions
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.FlowSchemaCondition
|
||||||
|
elementRelationship: associative
|
||||||
|
keys:
|
||||||
|
- type
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.GroupSubject
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: name
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.LimitResponse
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: queuing
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.QueuingConfiguration
|
||||||
|
- name: type
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
unions:
|
||||||
|
- discriminator: type
|
||||||
|
fields:
|
||||||
|
- fieldName: queuing
|
||||||
|
discriminatorValue: Queuing
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: borrowingLimitPercent
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
- name: lendablePercent
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
- name: limitResponse
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.LimitResponse
|
||||||
|
default: {}
|
||||||
|
- name: nominalConcurrencyShares
|
||||||
|
type:
|
||||||
|
scalar: numeric
|
||||||
|
default: 0
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.PolicyRulesWithSubjects
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: nonResourceRules
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.NonResourcePolicyRule
|
||||||
|
elementRelationship: atomic
|
||||||
|
- name: resourceRules
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.ResourcePolicyRule
|
||||||
|
elementRelationship: atomic
|
||||||
|
- name: subjects
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.Subject
|
||||||
|
elementRelationship: atomic
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.PriorityLevelConfigurationSpec
|
||||||
|
default: {}
|
||||||
|
- name: status
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationStatus
|
||||||
|
default: {}
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.PriorityLevelConfigurationReference
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: name
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: exempt
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration
|
||||||
|
- name: limited
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration
|
||||||
|
- name: type
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
unions:
|
||||||
|
- discriminator: type
|
||||||
|
fields:
|
||||||
|
- fieldName: exempt
|
||||||
|
discriminatorValue: Exempt
|
||||||
|
- fieldName: limited
|
||||||
|
discriminatorValue: Limited
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationStatus
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: conditions
|
||||||
|
type:
|
||||||
|
list:
|
||||||
|
elementType:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationCondition
|
||||||
|
elementRelationship: associative
|
||||||
|
keys:
|
||||||
|
- type
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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.v1.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.v1.ServiceAccountSubject
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: name
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: namespace
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.Subject
|
||||||
|
map:
|
||||||
|
fields:
|
||||||
|
- name: group
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.GroupSubject
|
||||||
|
- name: kind
|
||||||
|
type:
|
||||||
|
scalar: string
|
||||||
|
default: ""
|
||||||
|
- name: serviceAccount
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.ServiceAccountSubject
|
||||||
|
- name: user
|
||||||
|
type:
|
||||||
|
namedType: io.k8s.api.flowcontrol.v1.UserSubject
|
||||||
|
unions:
|
||||||
|
- discriminator: kind
|
||||||
|
fields:
|
||||||
|
- fieldName: group
|
||||||
|
discriminatorValue: Group
|
||||||
|
- fieldName: serviceAccount
|
||||||
|
discriminatorValue: ServiceAccount
|
||||||
|
- fieldName: user
|
||||||
|
discriminatorValue: User
|
||||||
|
- name: io.k8s.api.flowcontrol.v1.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,6 +43,7 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -91,6 +92,7 @@ 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"
|
||||||
|
applyconfigurationsflowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||||
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,6 +1074,50 @@ 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=v1
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("ExemptPriorityLevelConfiguration"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.ExemptPriorityLevelConfigurationApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.FlowDistinguisherMethodApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("FlowSchema"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.FlowSchemaApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("FlowSchemaCondition"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.FlowSchemaConditionApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("FlowSchemaSpec"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.FlowSchemaSpecApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("FlowSchemaStatus"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.FlowSchemaStatusApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("GroupSubject"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.GroupSubjectApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("LimitedPriorityLevelConfiguration"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.LimitedPriorityLevelConfigurationApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("LimitResponse"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.LimitResponseApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("NonResourcePolicyRule"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.NonResourcePolicyRuleApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PolicyRulesWithSubjects"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PolicyRulesWithSubjectsApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PriorityLevelConfiguration"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PriorityLevelConfigurationApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationCondition"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PriorityLevelConfigurationConditionApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationReference"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PriorityLevelConfigurationReferenceApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationSpec"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PriorityLevelConfigurationSpecApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("PriorityLevelConfigurationStatus"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.PriorityLevelConfigurationStatusApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("QueuingConfiguration"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.QueuingConfigurationApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("ResourcePolicyRule"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.ResourcePolicyRuleApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("ServiceAccountSubject"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.ServiceAccountSubjectApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("Subject"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.SubjectApplyConfiguration{}
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithKind("UserSubject"):
|
||||||
|
return &applyconfigurationsflowcontrolv1.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{}
|
||||||
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||||||
package flowcontrol
|
package flowcontrol
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
v1 "k8s.io/client-go/informers/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -27,6 +28,8 @@ 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 {
|
||||||
|
// V1 provides access to shared informers for resources in V1.
|
||||||
|
V1() v1.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.
|
||||||
@ -46,6 +49,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// V1 returns a new v1.Interface.
|
||||||
|
func (g *group) V1() v1.Interface {
|
||||||
|
return v1.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)
|
||||||
|
89
informers/flowcontrol/v1/flowschema.go
Normal file
89
informers/flowcontrol/v1/flowschema.go
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "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"
|
||||||
|
v1 "k8s.io/client-go/listers/flowcontrol/v1"
|
||||||
|
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() v1.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 metav1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.FlowcontrolV1().FlowSchemas().List(context.TODO(), options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.FlowcontrolV1().FlowSchemas().Watch(context.TODO(), options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&flowcontrolv1.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(&flowcontrolv1.FlowSchema{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *flowSchemaInformer) Lister() v1.FlowSchemaLister {
|
||||||
|
return v1.NewFlowSchemaLister(f.Informer().GetIndexer())
|
||||||
|
}
|
52
informers/flowcontrol/v1/interface.go
Normal file
52
informers/flowcontrol/v1/interface.go
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
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}
|
||||||
|
}
|
89
informers/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
89
informers/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
time "time"
|
||||||
|
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "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"
|
||||||
|
v1 "k8s.io/client-go/listers/flowcontrol/v1"
|
||||||
|
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() v1.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 metav1.ListOptions) (runtime.Object, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.FlowcontrolV1().PriorityLevelConfigurations().List(context.TODO(), options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.FlowcontrolV1().PriorityLevelConfigurations().Watch(context.TODO(), options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&flowcontrolv1.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(&flowcontrolv1.PriorityLevelConfiguration{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *priorityLevelConfigurationInformer) Lister() v1.PriorityLevelConfigurationLister {
|
||||||
|
return v1.NewPriorityLevelConfigurationLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -45,6 +45,7 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -258,6 +259,12 @@ 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=v1
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithResource("flowschemas"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1().FlowSchemas().Informer()}, nil
|
||||||
|
case flowcontrolv1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1().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,6 +52,7 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -108,6 +109,7 @@ type Interface interface {
|
|||||||
EventsV1() eventsv1.EventsV1Interface
|
EventsV1() eventsv1.EventsV1Interface
|
||||||
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
||||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||||
|
FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface
|
||||||
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
|
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
|
||||||
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
|
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
|
||||||
FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface
|
FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface
|
||||||
@ -163,6 +165,7 @@ type Clientset struct {
|
|||||||
eventsV1 *eventsv1.EventsV1Client
|
eventsV1 *eventsv1.EventsV1Client
|
||||||
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
||||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||||
|
flowcontrolV1 *flowcontrolv1.FlowcontrolV1Client
|
||||||
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
|
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
|
||||||
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
|
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
|
||||||
flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3Client
|
flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3Client
|
||||||
@ -331,6 +334,11 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter
|
|||||||
return c.extensionsV1beta1
|
return c.extensionsV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FlowcontrolV1 retrieves the FlowcontrolV1Client
|
||||||
|
func (c *Clientset) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface {
|
||||||
|
return c.flowcontrolV1
|
||||||
|
}
|
||||||
|
|
||||||
// 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
|
||||||
@ -596,6 +604,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
cs.flowcontrolV1, err = flowcontrolv1.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
|
||||||
@ -730,6 +742,7 @@ 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.flowcontrolV1 = flowcontrolv1.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,6 +82,8 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1"
|
||||||
|
fakeflowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1/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"
|
||||||
@ -322,6 +324,11 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter
|
|||||||
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
return &fakeextensionsv1beta1.FakeExtensionsV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FlowcontrolV1 retrieves the FlowcontrolV1Client
|
||||||
|
func (c *Clientset) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface {
|
||||||
|
return &fakeflowcontrolv1.FakeFlowcontrolV1{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,6 +48,7 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -109,6 +110,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
eventsv1.AddToScheme,
|
eventsv1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
|
flowcontrolv1.AddToScheme,
|
||||||
flowcontrolv1beta1.AddToScheme,
|
flowcontrolv1beta1.AddToScheme,
|
||||||
flowcontrolv1beta2.AddToScheme,
|
flowcontrolv1beta2.AddToScheme,
|
||||||
flowcontrolv1beta3.AddToScheme,
|
flowcontrolv1beta3.AddToScheme,
|
||||||
|
@ -48,6 +48,7 @@ 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"
|
||||||
|
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||||
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"
|
||||||
@ -109,6 +110,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
eventsv1.AddToScheme,
|
eventsv1.AddToScheme,
|
||||||
eventsv1beta1.AddToScheme,
|
eventsv1beta1.AddToScheme,
|
||||||
extensionsv1beta1.AddToScheme,
|
extensionsv1beta1.AddToScheme,
|
||||||
|
flowcontrolv1.AddToScheme,
|
||||||
flowcontrolv1beta1.AddToScheme,
|
flowcontrolv1beta1.AddToScheme,
|
||||||
flowcontrolv1beta2.AddToScheme,
|
flowcontrolv1beta2.AddToScheme,
|
||||||
flowcontrolv1beta3.AddToScheme,
|
flowcontrolv1beta3.AddToScheme,
|
||||||
|
20
kubernetes/typed/flowcontrol/v1/doc.go
Normal file
20
kubernetes/typed/flowcontrol/v1/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
20
kubernetes/typed/flowcontrol/v1/fake/doc.go
Normal file
20
kubernetes/typed/flowcontrol/v1/fake/doc.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
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
|
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
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 (
|
||||||
|
v1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FakeFlowcontrolV1 struct {
|
||||||
|
*testing.Fake
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeFlowcontrolV1) FlowSchemas() v1.FlowSchemaInterface {
|
||||||
|
return &FakeFlowSchemas{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FakeFlowcontrolV1) PriorityLevelConfigurations() v1.PriorityLevelConfigurationInterface {
|
||||||
|
return &FakePriorityLevelConfigurations{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
|
// with API server by this client implementation.
|
||||||
|
func (c *FakeFlowcontrolV1) RESTClient() rest.Interface {
|
||||||
|
var ret *rest.RESTClient
|
||||||
|
return ret
|
||||||
|
}
|
178
kubernetes/typed/flowcontrol/v1/fake/fake_flowschema.go
Normal file
178
kubernetes/typed/flowcontrol/v1/fake/fake_flowschema.go
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "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"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeFlowSchemas implements FlowSchemaInterface
|
||||||
|
type FakeFlowSchemas struct {
|
||||||
|
Fake *FakeFlowcontrolV1
|
||||||
|
}
|
||||||
|
|
||||||
|
var flowschemasResource = v1.SchemeGroupVersion.WithResource("flowschemas")
|
||||||
|
|
||||||
|
var flowschemasKind = v1.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 metav1.GetOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(flowschemasResource, name), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 metav1.ListOptions) (result *v1.FlowSchemaList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(flowschemasResource, flowschemasKind, opts), &v1.FlowSchemaList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1.FlowSchemaList{ListMeta: obj.(*v1.FlowSchemaList).ListMeta}
|
||||||
|
for _, item := range obj.(*v1.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 metav1.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 *v1.FlowSchema, opts metav1.CreateOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(flowschemasResource, flowSchema), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *v1.FlowSchema, opts metav1.UpdateOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(flowschemasResource, flowSchema), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *v1.FlowSchema, opts metav1.UpdateOptions) (*v1.FlowSchema, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateSubresourceAction(flowschemasResource, "status", flowSchema), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 metav1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteActionWithOptions(flowschemasResource, name, opts), &v1.FlowSchema{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeFlowSchemas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(flowschemasResource, listOpts)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1.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 metav1.PatchOptions, subresources ...string) (result *v1.FlowSchema, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(flowschemasResource, name, pt, data, subresources...), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.FlowSchema), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema.
|
||||||
|
func (c *FakeFlowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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"), &v1.FlowSchema{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.FlowSchema), err
|
||||||
|
}
|
@ -0,0 +1,178 @@
|
|||||||
|
/*
|
||||||
|
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"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "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"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakePriorityLevelConfigurations implements PriorityLevelConfigurationInterface
|
||||||
|
type FakePriorityLevelConfigurations struct {
|
||||||
|
Fake *FakeFlowcontrolV1
|
||||||
|
}
|
||||||
|
|
||||||
|
var prioritylevelconfigurationsResource = v1.SchemeGroupVersion.WithResource("prioritylevelconfigurations")
|
||||||
|
|
||||||
|
var prioritylevelconfigurationsKind = v1.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 metav1.GetOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(prioritylevelconfigurationsResource, name), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 metav1.ListOptions) (result *v1.PriorityLevelConfigurationList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(prioritylevelconfigurationsResource, prioritylevelconfigurationsKind, opts), &v1.PriorityLevelConfigurationList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1.PriorityLevelConfigurationList{ListMeta: obj.(*v1.PriorityLevelConfigurationList).ListMeta}
|
||||||
|
for _, item := range obj.(*v1.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 metav1.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 *v1.PriorityLevelConfiguration, opts metav1.CreateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(prioritylevelconfigurationsResource, priorityLevelConfiguration), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*v1.PriorityLevelConfiguration, error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateSubresourceAction(prioritylevelconfigurationsResource, "status", priorityLevelConfiguration), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 metav1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteActionWithOptions(prioritylevelconfigurationsResource, name, opts), &v1.PriorityLevelConfiguration{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakePriorityLevelConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(prioritylevelconfigurationsResource, listOpts)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1.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 metav1.PatchOptions, subresources ...string) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(prioritylevelconfigurationsResource, name, pt, data, subresources...), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.PriorityLevelConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration.
|
||||||
|
func (c *FakePriorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.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 *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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"), &v1.PriorityLevelConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1.PriorityLevelConfiguration), err
|
||||||
|
}
|
112
kubernetes/typed/flowcontrol/v1/flowcontrol_client.go
Normal file
112
kubernetes/typed/flowcontrol/v1/flowcontrol_client.go
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
"k8s.io/client-go/kubernetes/scheme"
|
||||||
|
rest "k8s.io/client-go/rest"
|
||||||
|
)
|
||||||
|
|
||||||
|
type FlowcontrolV1Interface interface {
|
||||||
|
RESTClient() rest.Interface
|
||||||
|
FlowSchemasGetter
|
||||||
|
PriorityLevelConfigurationsGetter
|
||||||
|
}
|
||||||
|
|
||||||
|
// FlowcontrolV1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group.
|
||||||
|
type FlowcontrolV1Client struct {
|
||||||
|
restClient rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FlowcontrolV1Client) FlowSchemas() FlowSchemaInterface {
|
||||||
|
return newFlowSchemas(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *FlowcontrolV1Client) PriorityLevelConfigurations() PriorityLevelConfigurationInterface {
|
||||||
|
return newPriorityLevelConfigurations(c)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfig creates a new FlowcontrolV1Client for the given config.
|
||||||
|
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||||
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
|
func NewForConfig(c *rest.Config) (*FlowcontrolV1Client, 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 FlowcontrolV1Client 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) (*FlowcontrolV1Client, 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 &FlowcontrolV1Client{client}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewForConfigOrDie creates a new FlowcontrolV1Client for the given config and
|
||||||
|
// panics if there is an error in the config.
|
||||||
|
func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1Client {
|
||||||
|
client, err := NewForConfig(c)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return client
|
||||||
|
}
|
||||||
|
|
||||||
|
// New creates a new FlowcontrolV1Client for the given RESTClient.
|
||||||
|
func New(c rest.Interface) *FlowcontrolV1Client {
|
||||||
|
return &FlowcontrolV1Client{c}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setConfigDefaults(config *rest.Config) error {
|
||||||
|
gv := v1.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 *FlowcontrolV1Client) RESTClient() rest.Interface {
|
||||||
|
if c == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return c.restClient
|
||||||
|
}
|
243
kubernetes/typed/flowcontrol/v1/flowschema.go
Normal file
243
kubernetes/typed/flowcontrol/v1/flowschema.go
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
json "encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||||
|
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 *v1.FlowSchema, opts metav1.CreateOptions) (*v1.FlowSchema, error)
|
||||||
|
Update(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (*v1.FlowSchema, error)
|
||||||
|
UpdateStatus(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (*v1.FlowSchema, error)
|
||||||
|
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||||
|
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.FlowSchema, error)
|
||||||
|
List(ctx context.Context, opts metav1.ListOptions) (*v1.FlowSchemaList, error)
|
||||||
|
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FlowSchema, err error)
|
||||||
|
Apply(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error)
|
||||||
|
ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error)
|
||||||
|
FlowSchemaExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// flowSchemas implements FlowSchemaInterface
|
||||||
|
type flowSchemas struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newFlowSchemas returns a FlowSchemas
|
||||||
|
func newFlowSchemas(c *FlowcontrolV1Client) *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 metav1.GetOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
result = &v1.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 metav1.ListOptions) (result *v1.FlowSchemaList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.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 metav1.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 *v1.FlowSchema, opts metav1.CreateOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
result = &v1.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 *v1.FlowSchema, opts metav1.UpdateOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
result = &v1.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 *v1.FlowSchema, opts metav1.UpdateOptions) (result *v1.FlowSchema, err error) {
|
||||||
|
result = &v1.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 metav1.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 metav1.DeleteOptions, listOpts metav1.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 metav1.PatchOptions, subresources ...string) (result *v1.FlowSchema, err error) {
|
||||||
|
result = &v1.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 *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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 = &v1.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 *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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 = &v1.FlowSchema{}
|
||||||
|
err = c.client.Patch(types.ApplyPatchType).
|
||||||
|
Resource("flowschemas").
|
||||||
|
Name(*name).
|
||||||
|
SubResource("status").
|
||||||
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
|
Body(data).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
23
kubernetes/typed/flowcontrol/v1/generated_expansion.go
Normal file
23
kubernetes/typed/flowcontrol/v1/generated_expansion.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
type FlowSchemaExpansion interface{}
|
||||||
|
|
||||||
|
type PriorityLevelConfigurationExpansion interface{}
|
243
kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
243
kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
@ -0,0 +1,243 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
json "encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||||
|
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 *v1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||||
|
Update(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||||
|
UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||||
|
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||||
|
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||||
|
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PriorityLevelConfiguration, error)
|
||||||
|
List(ctx context.Context, opts metav1.ListOptions) (*v1.PriorityLevelConfigurationList, error)
|
||||||
|
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityLevelConfiguration, err error)
|
||||||
|
Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error)
|
||||||
|
ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error)
|
||||||
|
PriorityLevelConfigurationExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// priorityLevelConfigurations implements PriorityLevelConfigurationInterface
|
||||||
|
type priorityLevelConfigurations struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newPriorityLevelConfigurations returns a PriorityLevelConfigurations
|
||||||
|
func newPriorityLevelConfigurations(c *FlowcontrolV1Client) *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 metav1.GetOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
result = &v1.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 metav1.ListOptions) (result *v1.PriorityLevelConfigurationList, err error) {
|
||||||
|
var timeout time.Duration
|
||||||
|
if opts.TimeoutSeconds != nil {
|
||||||
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
|
}
|
||||||
|
result = &v1.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 metav1.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 *v1.PriorityLevelConfiguration, opts metav1.CreateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
result = &v1.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 *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
result = &v1.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 *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
result = &v1.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 metav1.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 metav1.DeleteOptions, listOpts metav1.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 metav1.PatchOptions, subresources ...string) (result *v1.PriorityLevelConfiguration, err error) {
|
||||||
|
result = &v1.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 *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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 = &v1.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 *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.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 = &v1.PriorityLevelConfiguration{}
|
||||||
|
err = c.client.Patch(types.ApplyPatchType).
|
||||||
|
Resource("prioritylevelconfigurations").
|
||||||
|
Name(*name).
|
||||||
|
SubResource("status").
|
||||||
|
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||||
|
Body(data).
|
||||||
|
Do(ctx).
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
27
listers/flowcontrol/v1/expansion_generated.go
Normal file
27
listers/flowcontrol/v1/expansion_generated.go
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
// FlowSchemaListerExpansion allows custom methods to be added to
|
||||||
|
// FlowSchemaLister.
|
||||||
|
type FlowSchemaListerExpansion interface{}
|
||||||
|
|
||||||
|
// PriorityLevelConfigurationListerExpansion allows custom methods to be added to
|
||||||
|
// PriorityLevelConfigurationLister.
|
||||||
|
type PriorityLevelConfigurationListerExpansion interface{}
|
68
listers/flowcontrol/v1/flowschema.go
Normal file
68
listers/flowcontrol/v1/flowschema.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
"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 []*v1.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) (*v1.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 []*v1.FlowSchema, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1.FlowSchema))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the FlowSchema from the index for a given name.
|
||||||
|
func (s *flowSchemaLister) Get(name string) (*v1.FlowSchema, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1.Resource("flowschema"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1.FlowSchema), nil
|
||||||
|
}
|
68
listers/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
68
listers/flowcontrol/v1/prioritylevelconfiguration.go
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
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 v1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1 "k8s.io/api/flowcontrol/v1"
|
||||||
|
"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 []*v1.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) (*v1.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 []*v1.PriorityLevelConfiguration, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1.PriorityLevelConfiguration))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the PriorityLevelConfiguration from the index for a given name.
|
||||||
|
func (s *priorityLevelConfigurationLister) Get(name string) (*v1.PriorityLevelConfiguration, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1.Resource("prioritylevelconfiguration"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1.PriorityLevelConfiguration), nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user