mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-26 15:12:06 +00:00
client-go: remove extensions psp only
Kubernetes-commit: e41b1bff5853c616f7872ccf36fbefa480f72892
This commit is contained in:
parent
674e53a7cb
commit
be1f5d4ebb
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// AllowedCSIDriverApplyConfiguration represents an declarative configuration of the AllowedCSIDriver type for use
|
|
||||||
// with apply.
|
|
||||||
type AllowedCSIDriverApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllowedCSIDriverApplyConfiguration constructs an declarative configuration of the AllowedCSIDriver type for use with
|
|
||||||
// apply.
|
|
||||||
func AllowedCSIDriver() *AllowedCSIDriverApplyConfiguration {
|
|
||||||
return &AllowedCSIDriverApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *AllowedCSIDriverApplyConfiguration) WithName(value string) *AllowedCSIDriverApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// AllowedFlexVolumeApplyConfiguration represents an declarative configuration of the AllowedFlexVolume type for use
|
|
||||||
// with apply.
|
|
||||||
type AllowedFlexVolumeApplyConfiguration struct {
|
|
||||||
Driver *string `json:"driver,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllowedFlexVolumeApplyConfiguration constructs an declarative configuration of the AllowedFlexVolume type for use with
|
|
||||||
// apply.
|
|
||||||
func AllowedFlexVolume() *AllowedFlexVolumeApplyConfiguration {
|
|
||||||
return &AllowedFlexVolumeApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Driver field is set to the value of the last call.
|
|
||||||
func (b *AllowedFlexVolumeApplyConfiguration) WithDriver(value string) *AllowedFlexVolumeApplyConfiguration {
|
|
||||||
b.Driver = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// AllowedHostPathApplyConfiguration represents an declarative configuration of the AllowedHostPath type for use
|
|
||||||
// with apply.
|
|
||||||
type AllowedHostPathApplyConfiguration struct {
|
|
||||||
PathPrefix *string `json:"pathPrefix,omitempty"`
|
|
||||||
ReadOnly *bool `json:"readOnly,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllowedHostPathApplyConfiguration constructs an declarative configuration of the AllowedHostPath type for use with
|
|
||||||
// apply.
|
|
||||||
func AllowedHostPath() *AllowedHostPathApplyConfiguration {
|
|
||||||
return &AllowedHostPathApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPathPrefix sets the PathPrefix field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the PathPrefix field is set to the value of the last call.
|
|
||||||
func (b *AllowedHostPathApplyConfiguration) WithPathPrefix(value string) *AllowedHostPathApplyConfiguration {
|
|
||||||
b.PathPrefix = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithReadOnly sets the ReadOnly field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ReadOnly field is set to the value of the last call.
|
|
||||||
func (b *AllowedHostPathApplyConfiguration) WithReadOnly(value bool) *AllowedHostPathApplyConfiguration {
|
|
||||||
b.ReadOnly = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FSGroupStrategyOptionsApplyConfiguration represents an declarative configuration of the FSGroupStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type FSGroupStrategyOptionsApplyConfiguration struct {
|
|
||||||
Rule *v1beta1.FSGroupStrategyType `json:"rule,omitempty"`
|
|
||||||
Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// FSGroupStrategyOptionsApplyConfiguration constructs an declarative configuration of the FSGroupStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func FSGroupStrategyOptions() *FSGroupStrategyOptionsApplyConfiguration {
|
|
||||||
return &FSGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRule sets the Rule field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Rule field is set to the value of the last call.
|
|
||||||
func (b *FSGroupStrategyOptionsApplyConfiguration) WithRule(value v1beta1.FSGroupStrategyType) *FSGroupStrategyOptionsApplyConfiguration {
|
|
||||||
b.Rule = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRanges adds the given value to the Ranges 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 Ranges field.
|
|
||||||
func (b *FSGroupStrategyOptionsApplyConfiguration) WithRanges(values ...*IDRangeApplyConfiguration) *FSGroupStrategyOptionsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRanges")
|
|
||||||
}
|
|
||||||
b.Ranges = append(b.Ranges, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// HostPortRangeApplyConfiguration represents an declarative configuration of the HostPortRange type for use
|
|
||||||
// with apply.
|
|
||||||
type HostPortRangeApplyConfiguration struct {
|
|
||||||
Min *int32 `json:"min,omitempty"`
|
|
||||||
Max *int32 `json:"max,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// HostPortRangeApplyConfiguration constructs an declarative configuration of the HostPortRange type for use with
|
|
||||||
// apply.
|
|
||||||
func HostPortRange() *HostPortRangeApplyConfiguration {
|
|
||||||
return &HostPortRangeApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMin sets the Min field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Min field is set to the value of the last call.
|
|
||||||
func (b *HostPortRangeApplyConfiguration) WithMin(value int32) *HostPortRangeApplyConfiguration {
|
|
||||||
b.Min = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMax sets the Max field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Max field is set to the value of the last call.
|
|
||||||
func (b *HostPortRangeApplyConfiguration) WithMax(value int32) *HostPortRangeApplyConfiguration {
|
|
||||||
b.Max = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// IDRangeApplyConfiguration represents an declarative configuration of the IDRange type for use
|
|
||||||
// with apply.
|
|
||||||
type IDRangeApplyConfiguration struct {
|
|
||||||
Min *int64 `json:"min,omitempty"`
|
|
||||||
Max *int64 `json:"max,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// IDRangeApplyConfiguration constructs an declarative configuration of the IDRange type for use with
|
|
||||||
// apply.
|
|
||||||
func IDRange() *IDRangeApplyConfiguration {
|
|
||||||
return &IDRangeApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMin sets the Min field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Min field is set to the value of the last call.
|
|
||||||
func (b *IDRangeApplyConfiguration) WithMin(value int64) *IDRangeApplyConfiguration {
|
|
||||||
b.Min = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMax sets the Max field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Max field is set to the value of the last call.
|
|
||||||
func (b *IDRangeApplyConfiguration) WithMax(value int64) *IDRangeApplyConfiguration {
|
|
||||||
b.Max = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,247 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSecurityPolicyApplyConfiguration represents an declarative configuration of the PodSecurityPolicy type for use
|
|
||||||
// with apply.
|
|
||||||
type PodSecurityPolicyApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *PodSecurityPolicySpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSecurityPolicy constructs an declarative configuration of the PodSecurityPolicy type for use with
|
|
||||||
// apply.
|
|
||||||
func PodSecurityPolicy(name string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
b := &PodSecurityPolicyApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithKind("PodSecurityPolicy")
|
|
||||||
b.WithAPIVersion("extensions/v1beta1")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractPodSecurityPolicy extracts the applied configuration owned by fieldManager from
|
|
||||||
// podSecurityPolicy. If no managedFields are found in podSecurityPolicy for fieldManager, a
|
|
||||||
// PodSecurityPolicyApplyConfiguration 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.
|
|
||||||
// podSecurityPolicy must be a unmodified PodSecurityPolicy API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractPodSecurityPolicy 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 ExtractPodSecurityPolicy(podSecurityPolicy *extensionsv1beta1.PodSecurityPolicy, fieldManager string) (*PodSecurityPolicyApplyConfiguration, error) {
|
|
||||||
return extractPodSecurityPolicy(podSecurityPolicy, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractPodSecurityPolicyStatus is the same as ExtractPodSecurityPolicy except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractPodSecurityPolicyStatus(podSecurityPolicy *extensionsv1beta1.PodSecurityPolicy, fieldManager string) (*PodSecurityPolicyApplyConfiguration, error) {
|
|
||||||
return extractPodSecurityPolicy(podSecurityPolicy, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractPodSecurityPolicy(podSecurityPolicy *extensionsv1beta1.PodSecurityPolicy, fieldManager string, subresource string) (*PodSecurityPolicyApplyConfiguration, error) {
|
|
||||||
b := &PodSecurityPolicyApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(podSecurityPolicy, internal.Parser().Type("io.k8s.api.extensions.v1beta1.PodSecurityPolicy"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(podSecurityPolicy.Name)
|
|
||||||
|
|
||||||
b.WithKind("PodSecurityPolicy")
|
|
||||||
b.WithAPIVersion("extensions/v1beta1")
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithKind(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithAPIVersion(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithName(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithGenerateName(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithNamespace(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithUID(value types.UID) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithResourceVersion(value string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithGeneration(value int64) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithLabels(entries map[string]string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
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 *PodSecurityPolicyApplyConfiguration) WithFinalizers(values ...string) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.Finalizers = append(b.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *PodSecurityPolicyApplyConfiguration) 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 *PodSecurityPolicyApplyConfiguration) WithSpec(value *PodSecurityPolicySpecApplyConfiguration) *PodSecurityPolicyApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,285 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/api/core/v1"
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSecurityPolicySpecApplyConfiguration represents an declarative configuration of the PodSecurityPolicySpec type for use
|
|
||||||
// with apply.
|
|
||||||
type PodSecurityPolicySpecApplyConfiguration struct {
|
|
||||||
Privileged *bool `json:"privileged,omitempty"`
|
|
||||||
DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty"`
|
|
||||||
RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty"`
|
|
||||||
AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty"`
|
|
||||||
Volumes []v1beta1.FSType `json:"volumes,omitempty"`
|
|
||||||
HostNetwork *bool `json:"hostNetwork,omitempty"`
|
|
||||||
HostPorts []HostPortRangeApplyConfiguration `json:"hostPorts,omitempty"`
|
|
||||||
HostPID *bool `json:"hostPID,omitempty"`
|
|
||||||
HostIPC *bool `json:"hostIPC,omitempty"`
|
|
||||||
SELinux *SELinuxStrategyOptionsApplyConfiguration `json:"seLinux,omitempty"`
|
|
||||||
RunAsUser *RunAsUserStrategyOptionsApplyConfiguration `json:"runAsUser,omitempty"`
|
|
||||||
RunAsGroup *RunAsGroupStrategyOptionsApplyConfiguration `json:"runAsGroup,omitempty"`
|
|
||||||
SupplementalGroups *SupplementalGroupsStrategyOptionsApplyConfiguration `json:"supplementalGroups,omitempty"`
|
|
||||||
FSGroup *FSGroupStrategyOptionsApplyConfiguration `json:"fsGroup,omitempty"`
|
|
||||||
ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"`
|
|
||||||
DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty"`
|
|
||||||
AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"`
|
|
||||||
AllowedHostPaths []AllowedHostPathApplyConfiguration `json:"allowedHostPaths,omitempty"`
|
|
||||||
AllowedFlexVolumes []AllowedFlexVolumeApplyConfiguration `json:"allowedFlexVolumes,omitempty"`
|
|
||||||
AllowedCSIDrivers []AllowedCSIDriverApplyConfiguration `json:"allowedCSIDrivers,omitempty"`
|
|
||||||
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty"`
|
|
||||||
ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty"`
|
|
||||||
AllowedProcMountTypes []v1.ProcMountType `json:"allowedProcMountTypes,omitempty"`
|
|
||||||
RuntimeClass *RuntimeClassStrategyOptionsApplyConfiguration `json:"runtimeClass,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSecurityPolicySpecApplyConfiguration constructs an declarative configuration of the PodSecurityPolicySpec type for use with
|
|
||||||
// apply.
|
|
||||||
func PodSecurityPolicySpec() *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
return &PodSecurityPolicySpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPrivileged sets the Privileged field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Privileged field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithPrivileged(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.Privileged = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaultAddCapabilities adds the given value to the DefaultAddCapabilities 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 DefaultAddCapabilities field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithDefaultAddCapabilities(values ...v1.Capability) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.DefaultAddCapabilities = append(b.DefaultAddCapabilities, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequiredDropCapabilities adds the given value to the RequiredDropCapabilities 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 RequiredDropCapabilities field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithRequiredDropCapabilities(values ...v1.Capability) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.RequiredDropCapabilities = append(b.RequiredDropCapabilities, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedCapabilities adds the given value to the AllowedCapabilities 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 AllowedCapabilities field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedCapabilities(values ...v1.Capability) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.AllowedCapabilities = append(b.AllowedCapabilities, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithVolumes adds the given value to the Volumes 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 Volumes field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithVolumes(values ...v1beta1.FSType) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Volumes = append(b.Volumes, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHostNetwork sets the HostNetwork field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the HostNetwork field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithHostNetwork(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.HostNetwork = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHostPorts adds the given value to the HostPorts 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 HostPorts field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithHostPorts(values ...*HostPortRangeApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithHostPorts")
|
|
||||||
}
|
|
||||||
b.HostPorts = append(b.HostPorts, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHostPID sets the HostPID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the HostPID field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithHostPID(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.HostPID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHostIPC sets the HostIPC field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the HostIPC field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithHostIPC(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.HostIPC = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSELinux sets the SELinux field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the SELinux field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithSELinux(value *SELinuxStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.SELinux = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRunAsUser sets the RunAsUser field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the RunAsUser field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithRunAsUser(value *RunAsUserStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.RunAsUser = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRunAsGroup sets the RunAsGroup field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the RunAsGroup field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithRunAsGroup(value *RunAsGroupStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.RunAsGroup = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSupplementalGroups sets the SupplementalGroups field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the SupplementalGroups field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithSupplementalGroups(value *SupplementalGroupsStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.SupplementalGroups = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFSGroup sets the FSGroup field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the FSGroup field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithFSGroup(value *FSGroupStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.FSGroup = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithReadOnlyRootFilesystem sets the ReadOnlyRootFilesystem field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ReadOnlyRootFilesystem field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithReadOnlyRootFilesystem(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.ReadOnlyRootFilesystem = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaultAllowPrivilegeEscalation sets the DefaultAllowPrivilegeEscalation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DefaultAllowPrivilegeEscalation field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithDefaultAllowPrivilegeEscalation(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.DefaultAllowPrivilegeEscalation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowPrivilegeEscalation sets the AllowPrivilegeEscalation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AllowPrivilegeEscalation field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowPrivilegeEscalation(value bool) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.AllowPrivilegeEscalation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedHostPaths adds the given value to the AllowedHostPaths 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 AllowedHostPaths field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedHostPaths(values ...*AllowedHostPathApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithAllowedHostPaths")
|
|
||||||
}
|
|
||||||
b.AllowedHostPaths = append(b.AllowedHostPaths, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedFlexVolumes adds the given value to the AllowedFlexVolumes 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 AllowedFlexVolumes field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedFlexVolumes(values ...*AllowedFlexVolumeApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithAllowedFlexVolumes")
|
|
||||||
}
|
|
||||||
b.AllowedFlexVolumes = append(b.AllowedFlexVolumes, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedCSIDrivers adds the given value to the AllowedCSIDrivers 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 AllowedCSIDrivers field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedCSIDrivers(values ...*AllowedCSIDriverApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithAllowedCSIDrivers")
|
|
||||||
}
|
|
||||||
b.AllowedCSIDrivers = append(b.AllowedCSIDrivers, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedUnsafeSysctls adds the given value to the AllowedUnsafeSysctls 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 AllowedUnsafeSysctls field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedUnsafeSysctls(values ...string) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.AllowedUnsafeSysctls = append(b.AllowedUnsafeSysctls, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithForbiddenSysctls adds the given value to the ForbiddenSysctls 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 ForbiddenSysctls field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithForbiddenSysctls(values ...string) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.ForbiddenSysctls = append(b.ForbiddenSysctls, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedProcMountTypes adds the given value to the AllowedProcMountTypes 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 AllowedProcMountTypes field.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithAllowedProcMountTypes(values ...v1.ProcMountType) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.AllowedProcMountTypes = append(b.AllowedProcMountTypes, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRuntimeClass sets the RuntimeClass field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the RuntimeClass field is set to the value of the last call.
|
|
||||||
func (b *PodSecurityPolicySpecApplyConfiguration) WithRuntimeClass(value *RuntimeClassStrategyOptionsApplyConfiguration) *PodSecurityPolicySpecApplyConfiguration {
|
|
||||||
b.RuntimeClass = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RunAsGroupStrategyOptionsApplyConfiguration represents an declarative configuration of the RunAsGroupStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type RunAsGroupStrategyOptionsApplyConfiguration struct {
|
|
||||||
Rule *v1beta1.RunAsGroupStrategy `json:"rule,omitempty"`
|
|
||||||
Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// RunAsGroupStrategyOptionsApplyConfiguration constructs an declarative configuration of the RunAsGroupStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func RunAsGroupStrategyOptions() *RunAsGroupStrategyOptionsApplyConfiguration {
|
|
||||||
return &RunAsGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRule sets the Rule field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Rule field is set to the value of the last call.
|
|
||||||
func (b *RunAsGroupStrategyOptionsApplyConfiguration) WithRule(value v1beta1.RunAsGroupStrategy) *RunAsGroupStrategyOptionsApplyConfiguration {
|
|
||||||
b.Rule = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRanges adds the given value to the Ranges 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 Ranges field.
|
|
||||||
func (b *RunAsGroupStrategyOptionsApplyConfiguration) WithRanges(values ...*IDRangeApplyConfiguration) *RunAsGroupStrategyOptionsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRanges")
|
|
||||||
}
|
|
||||||
b.Ranges = append(b.Ranges, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// RunAsUserStrategyOptionsApplyConfiguration represents an declarative configuration of the RunAsUserStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type RunAsUserStrategyOptionsApplyConfiguration struct {
|
|
||||||
Rule *v1beta1.RunAsUserStrategy `json:"rule,omitempty"`
|
|
||||||
Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// RunAsUserStrategyOptionsApplyConfiguration constructs an declarative configuration of the RunAsUserStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func RunAsUserStrategyOptions() *RunAsUserStrategyOptionsApplyConfiguration {
|
|
||||||
return &RunAsUserStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRule sets the Rule field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Rule field is set to the value of the last call.
|
|
||||||
func (b *RunAsUserStrategyOptionsApplyConfiguration) WithRule(value v1beta1.RunAsUserStrategy) *RunAsUserStrategyOptionsApplyConfiguration {
|
|
||||||
b.Rule = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRanges adds the given value to the Ranges 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 Ranges field.
|
|
||||||
func (b *RunAsUserStrategyOptionsApplyConfiguration) WithRanges(values ...*IDRangeApplyConfiguration) *RunAsUserStrategyOptionsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRanges")
|
|
||||||
}
|
|
||||||
b.Ranges = append(b.Ranges, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
// RuntimeClassStrategyOptionsApplyConfiguration represents an declarative configuration of the RuntimeClassStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type RuntimeClassStrategyOptionsApplyConfiguration struct {
|
|
||||||
AllowedRuntimeClassNames []string `json:"allowedRuntimeClassNames,omitempty"`
|
|
||||||
DefaultRuntimeClassName *string `json:"defaultRuntimeClassName,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// RuntimeClassStrategyOptionsApplyConfiguration constructs an declarative configuration of the RuntimeClassStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func RuntimeClassStrategyOptions() *RuntimeClassStrategyOptionsApplyConfiguration {
|
|
||||||
return &RuntimeClassStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllowedRuntimeClassNames adds the given value to the AllowedRuntimeClassNames 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 AllowedRuntimeClassNames field.
|
|
||||||
func (b *RuntimeClassStrategyOptionsApplyConfiguration) WithAllowedRuntimeClassNames(values ...string) *RuntimeClassStrategyOptionsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.AllowedRuntimeClassNames = append(b.AllowedRuntimeClassNames, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDefaultRuntimeClassName sets the DefaultRuntimeClassName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DefaultRuntimeClassName field is set to the value of the last call.
|
|
||||||
func (b *RuntimeClassStrategyOptionsApplyConfiguration) WithDefaultRuntimeClassName(value string) *RuntimeClassStrategyOptionsApplyConfiguration {
|
|
||||||
b.DefaultRuntimeClassName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/core/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SELinuxStrategyOptionsApplyConfiguration represents an declarative configuration of the SELinuxStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type SELinuxStrategyOptionsApplyConfiguration struct {
|
|
||||||
Rule *v1beta1.SELinuxStrategy `json:"rule,omitempty"`
|
|
||||||
SELinuxOptions *v1.SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SELinuxStrategyOptionsApplyConfiguration constructs an declarative configuration of the SELinuxStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func SELinuxStrategyOptions() *SELinuxStrategyOptionsApplyConfiguration {
|
|
||||||
return &SELinuxStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRule sets the Rule field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Rule field is set to the value of the last call.
|
|
||||||
func (b *SELinuxStrategyOptionsApplyConfiguration) WithRule(value v1beta1.SELinuxStrategy) *SELinuxStrategyOptionsApplyConfiguration {
|
|
||||||
b.Rule = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSELinuxOptions sets the SELinuxOptions field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the SELinuxOptions field is set to the value of the last call.
|
|
||||||
func (b *SELinuxStrategyOptionsApplyConfiguration) WithSELinuxOptions(value *v1.SELinuxOptionsApplyConfiguration) *SELinuxStrategyOptionsApplyConfiguration {
|
|
||||||
b.SELinuxOptions = value
|
|
||||||
return b
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// SupplementalGroupsStrategyOptionsApplyConfiguration represents an declarative configuration of the SupplementalGroupsStrategyOptions type for use
|
|
||||||
// with apply.
|
|
||||||
type SupplementalGroupsStrategyOptionsApplyConfiguration struct {
|
|
||||||
Rule *v1beta1.SupplementalGroupsStrategyType `json:"rule,omitempty"`
|
|
||||||
Ranges []IDRangeApplyConfiguration `json:"ranges,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// SupplementalGroupsStrategyOptionsApplyConfiguration constructs an declarative configuration of the SupplementalGroupsStrategyOptions type for use with
|
|
||||||
// apply.
|
|
||||||
func SupplementalGroupsStrategyOptions() *SupplementalGroupsStrategyOptionsApplyConfiguration {
|
|
||||||
return &SupplementalGroupsStrategyOptionsApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRule sets the Rule field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Rule field is set to the value of the last call.
|
|
||||||
func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithRule(value v1beta1.SupplementalGroupsStrategyType) *SupplementalGroupsStrategyOptionsApplyConfiguration {
|
|
||||||
b.Rule = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRanges adds the given value to the Ranges 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 Ranges field.
|
|
||||||
func (b *SupplementalGroupsStrategyOptionsApplyConfiguration) WithRanges(values ...*IDRangeApplyConfiguration) *SupplementalGroupsStrategyOptionsApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRanges")
|
|
||||||
}
|
|
||||||
b.Ranges = append(b.Ranges, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@ -7734,29 +7734,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
type:
|
type:
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime
|
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime
|
||||||
default: {}
|
default: {}
|
||||||
- name: io.k8s.api.extensions.v1beta1.AllowedCSIDriver
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.AllowedFlexVolume
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.AllowedHostPath
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: pathPrefix
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: readOnly
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.DaemonSet
|
- name: io.k8s.api.extensions.v1beta1.DaemonSet
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -7992,18 +7969,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: type
|
- name: type
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
- name: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath
|
- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -8026,28 +7991,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
elementType:
|
elementType:
|
||||||
namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath
|
namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath
|
||||||
elementRelationship: atomic
|
elementRelationship: atomic
|
||||||
- name: io.k8s.api.extensions.v1beta1.HostPortRange
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: max
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: min
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.IDRange
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: max
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: min
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.IPBlock
|
- name: io.k8s.api.extensions.v1beta1.IPBlock
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -8293,135 +8236,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
elementRelationship: associative
|
elementRelationship: associative
|
||||||
keys:
|
keys:
|
||||||
- type
|
- type
|
||||||
- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy
|
|
||||||
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.extensions.v1beta1.PodSecurityPolicySpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allowPrivilegeEscalation
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: allowedCSIDrivers
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.AllowedCSIDriver
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedCapabilities
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedFlexVolumes
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.AllowedFlexVolume
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedHostPaths
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.AllowedHostPath
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedProcMountTypes
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedUnsafeSysctls
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: defaultAddCapabilities
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: defaultAllowPrivilegeEscalation
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: forbiddenSysctls
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: fsGroup
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: hostIPC
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: hostNetwork
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: hostPID
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: hostPorts
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.HostPortRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: privileged
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: readOnlyRootFilesystem
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: requiredDropCapabilities
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: runAsGroup
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions
|
|
||||||
- name: runAsUser
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: runtimeClass
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions
|
|
||||||
- name: seLinux
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: supplementalGroups
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: volumes
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.ReplicaSet
|
- name: io.k8s.api.extensions.v1beta1.ReplicaSet
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -8531,66 +8345,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: maxUnavailable
|
- name: maxUnavailable
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
|
namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString
|
||||||
- name: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allowedRuntimeClassNames
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: defaultRuntimeClassName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: seLinuxOptions
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.core.v1.SELinuxOptions
|
|
||||||
- name: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.extensions.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod
|
- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
@ -937,12 +937,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationseventsv1beta1.EventSeriesApplyConfiguration{}
|
return &applyconfigurationseventsv1beta1.EventSeriesApplyConfiguration{}
|
||||||
|
|
||||||
// Group=extensions, Version=v1beta1
|
// Group=extensions, Version=v1beta1
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("AllowedCSIDriver"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.AllowedCSIDriverApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("AllowedFlexVolume"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.AllowedFlexVolumeApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("AllowedHostPath"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.AllowedHostPathApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("DaemonSet"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("DaemonSet"):
|
||||||
return &applyconfigurationsextensionsv1beta1.DaemonSetApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.DaemonSetApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("DaemonSetCondition"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("DaemonSetCondition"):
|
||||||
@ -963,16 +957,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsextensionsv1beta1.DeploymentStatusApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.DeploymentStatusApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("DeploymentStrategy"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("DeploymentStrategy"):
|
||||||
return &applyconfigurationsextensionsv1beta1.DeploymentStrategyApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.DeploymentStrategyApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("FSGroupStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.FSGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("HostPortRange"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.HostPortRangeApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("HTTPIngressPath"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("HTTPIngressPath"):
|
||||||
return &applyconfigurationsextensionsv1beta1.HTTPIngressPathApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.HTTPIngressPathApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("HTTPIngressRuleValue"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("HTTPIngressRuleValue"):
|
||||||
return &applyconfigurationsextensionsv1beta1.HTTPIngressRuleValueApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.HTTPIngressRuleValueApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("IDRange"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.IDRangeApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("Ingress"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("Ingress"):
|
||||||
return &applyconfigurationsextensionsv1beta1.IngressApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.IngressApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressBackend"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("IngressBackend"):
|
||||||
@ -1009,10 +997,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsextensionsv1beta1.NetworkPolicySpecApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.NetworkPolicySpecApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("NetworkPolicyStatus"):
|
||||||
return &applyconfigurationsextensionsv1beta1.NetworkPolicyStatusApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.NetworkPolicyStatusApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicy"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.PodSecurityPolicyApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicySpec"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.PodSecurityPolicySpecApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet"):
|
||||||
return &applyconfigurationsextensionsv1beta1.ReplicaSetApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.ReplicaSetApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSetCondition"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSetCondition"):
|
||||||
@ -1027,18 +1011,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsextensionsv1beta1.RollingUpdateDaemonSetApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.RollingUpdateDaemonSetApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("RollingUpdateDeployment"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("RollingUpdateDeployment"):
|
||||||
return &applyconfigurationsextensionsv1beta1.RollingUpdateDeploymentApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.RollingUpdateDeploymentApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("RunAsGroupStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.RunAsGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("RunAsUserStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.RunAsUserStrategyOptionsApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("RuntimeClassStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.RuntimeClassStrategyOptionsApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("Scale"):
|
case extensionsv1beta1.SchemeGroupVersion.WithKind("Scale"):
|
||||||
return &applyconfigurationsextensionsv1beta1.ScaleApplyConfiguration{}
|
return &applyconfigurationsextensionsv1beta1.ScaleApplyConfiguration{}
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("SELinuxStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.SELinuxStrategyOptionsApplyConfiguration{}
|
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithKind("SupplementalGroupsStrategyOptions"):
|
|
||||||
return &applyconfigurationsextensionsv1beta1.SupplementalGroupsStrategyOptionsApplyConfiguration{}
|
|
||||||
|
|
||||||
// Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1
|
// Group=flowcontrol.apiserver.k8s.io, Version=v1alpha1
|
||||||
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"):
|
case flowcontrolv1alpha1.SchemeGroupVersion.WithKind("FlowDistinguisherMethod"):
|
||||||
|
@ -32,8 +32,6 @@ type Interface interface {
|
|||||||
Ingresses() IngressInformer
|
Ingresses() IngressInformer
|
||||||
// NetworkPolicies returns a NetworkPolicyInformer.
|
// NetworkPolicies returns a NetworkPolicyInformer.
|
||||||
NetworkPolicies() NetworkPolicyInformer
|
NetworkPolicies() NetworkPolicyInformer
|
||||||
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
|
||||||
PodSecurityPolicies() PodSecurityPolicyInformer
|
|
||||||
// ReplicaSets returns a ReplicaSetInformer.
|
// ReplicaSets returns a ReplicaSetInformer.
|
||||||
ReplicaSets() ReplicaSetInformer
|
ReplicaSets() ReplicaSetInformer
|
||||||
}
|
}
|
||||||
@ -69,11 +67,6 @@ func (v *version) NetworkPolicies() NetworkPolicyInformer {
|
|||||||
return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
|
||||||
func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
|
|
||||||
return &podSecurityPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReplicaSets returns a ReplicaSetInformer.
|
// ReplicaSets returns a ReplicaSetInformer.
|
||||||
func (v *version) ReplicaSets() ReplicaSetInformer {
|
func (v *version) ReplicaSets() ReplicaSetInformer {
|
||||||
return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
time "time"
|
|
||||||
|
|
||||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
|
||||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSecurityPolicyInformer provides access to a shared informer and lister for
|
|
||||||
// PodSecurityPolicies.
|
|
||||||
type PodSecurityPolicyInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() v1beta1.PodSecurityPolicyLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type podSecurityPolicyInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy 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 NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy 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 NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ExtensionsV1beta1().PodSecurityPolicies().List(context.TODO(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(context.TODO(), options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&extensionsv1beta1.PodSecurityPolicy{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&extensionsv1beta1.PodSecurityPolicy{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
|
|
||||||
return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -247,8 +247,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("networkpolicies"):
|
case extensionsv1beta1.SchemeGroupVersion.WithResource("networkpolicies"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().NetworkPolicies().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().NetworkPolicies().Informer()}, nil
|
||||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ type ExtensionsV1beta1Interface interface {
|
|||||||
DeploymentsGetter
|
DeploymentsGetter
|
||||||
IngressesGetter
|
IngressesGetter
|
||||||
NetworkPoliciesGetter
|
NetworkPoliciesGetter
|
||||||
PodSecurityPoliciesGetter
|
|
||||||
ReplicaSetsGetter
|
ReplicaSetsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +56,6 @@ func (c *ExtensionsV1beta1Client) NetworkPolicies(namespace string) NetworkPolic
|
|||||||
return newNetworkPolicies(c, namespace)
|
return newNetworkPolicies(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
|
|
||||||
return newPodSecurityPolicies(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
|
func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
|
||||||
return newReplicaSets(c, namespace)
|
return newReplicaSets(c, namespace)
|
||||||
}
|
}
|
||||||
|
@ -44,10 +44,6 @@ func (c *FakeExtensionsV1beta1) NetworkPolicies(namespace string) v1beta1.Networ
|
|||||||
return &FakeNetworkPolicies{c, namespace}
|
return &FakeNetworkPolicies{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeExtensionsV1beta1) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface {
|
|
||||||
return &FakePodSecurityPolicies{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSetInterface {
|
func (c *FakeExtensionsV1beta1) ReplicaSets(namespace string) v1beta1.ReplicaSetInterface {
|
||||||
return &FakeReplicaSets{c, namespace}
|
return &FakeReplicaSets{c, namespace}
|
||||||
}
|
}
|
||||||
|
@ -1,145 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakePodSecurityPolicies implements PodSecurityPolicyInterface
|
|
||||||
type FakePodSecurityPolicies struct {
|
|
||||||
Fake *FakeExtensionsV1beta1
|
|
||||||
}
|
|
||||||
|
|
||||||
var podsecuritypoliciesResource = v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies")
|
|
||||||
|
|
||||||
var podsecuritypoliciesKind = v1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicy")
|
|
||||||
|
|
||||||
// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
|
|
||||||
func (c *FakePodSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
|
|
||||||
func (c *FakePodSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1beta1.PodSecurityPolicyList{ListMeta: obj.(*v1beta1.PodSecurityPolicyList).ListMeta}
|
|
||||||
for _, item := range obj.(*v1beta1.PodSecurityPolicyList).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 podSecurityPolicies.
|
|
||||||
func (c *FakePodSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
|
||||||
func (c *FakePodSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
|
||||||
func (c *FakePodSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakePodSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootDeleteActionWithOptions(podsecuritypoliciesResource, name, opts), &v1beta1.PodSecurityPolicy{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakePodSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOpts)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched podSecurityPolicy.
|
|
||||||
func (c *FakePodSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, pt, data, subresources...), &v1beta1.PodSecurityPolicy{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podSecurityPolicy.
|
|
||||||
func (c *FakePodSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
if podSecurityPolicy == nil {
|
|
||||||
return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
data, err := json.Marshal(podSecurityPolicy)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := podSecurityPolicy.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, *name, types.ApplyPatchType, data), &v1beta1.PodSecurityPolicy{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), err
|
|
||||||
}
|
|
@ -24,6 +24,4 @@ type IngressExpansion interface{}
|
|||||||
|
|
||||||
type NetworkPolicyExpansion interface{}
|
type NetworkPolicyExpansion interface{}
|
||||||
|
|
||||||
type PodSecurityPolicyExpansion interface{}
|
|
||||||
|
|
||||||
type ReplicaSetExpansion interface{}
|
type ReplicaSetExpansion interface{}
|
||||||
|
@ -1,197 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
json "encoding/json"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
|
||||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type PodSecurityPoliciesGetter interface {
|
|
||||||
PodSecurityPolicies() PodSecurityPolicyInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
|
|
||||||
type PodSecurityPolicyInterface interface {
|
|
||||||
Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error)
|
|
||||||
Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error)
|
|
||||||
Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error)
|
|
||||||
PodSecurityPolicyExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// podSecurityPolicies implements PodSecurityPolicyInterface
|
|
||||||
type podSecurityPolicies struct {
|
|
||||||
client rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
// newPodSecurityPolicies returns a PodSecurityPolicies
|
|
||||||
func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies {
|
|
||||||
return &podSecurityPolicies{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
|
|
||||||
func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
result = &v1beta1.PodSecurityPolicy{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
|
|
||||||
func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
result = &v1beta1.PodSecurityPolicyList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
|
|
||||||
func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Watch(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
|
||||||
func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
result = &v1beta1.PodSecurityPolicy{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(podSecurityPolicy).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
|
||||||
func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
result = &v1beta1.PodSecurityPolicy{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
Name(podSecurityPolicy.Name).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(podSecurityPolicy).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
Name(name).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
var timeout time.Duration
|
|
||||||
if listOpts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched podSecurityPolicy.
|
|
||||||
func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
result = &v1beta1.PodSecurityPolicy{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
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 podSecurityPolicy.
|
|
||||||
func (c *podSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
if podSecurityPolicy == nil {
|
|
||||||
return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil")
|
|
||||||
}
|
|
||||||
patchOpts := opts.ToPatchOptions()
|
|
||||||
data, err := json.Marshal(podSecurityPolicy)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
name := podSecurityPolicy.Name
|
|
||||||
if name == nil {
|
|
||||||
return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply")
|
|
||||||
}
|
|
||||||
result = &v1beta1.PodSecurityPolicy{}
|
|
||||||
err = c.client.Patch(types.ApplyPatchType).
|
|
||||||
Resource("podsecuritypolicies").
|
|
||||||
Name(*name).
|
|
||||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -41,7 +41,3 @@ type NetworkPolicyListerExpansion interface{}
|
|||||||
// NetworkPolicyNamespaceListerExpansion allows custom methods to be added to
|
// NetworkPolicyNamespaceListerExpansion allows custom methods to be added to
|
||||||
// NetworkPolicyNamespaceLister.
|
// NetworkPolicyNamespaceLister.
|
||||||
type NetworkPolicyNamespaceListerExpansion interface{}
|
type NetworkPolicyNamespaceListerExpansion interface{}
|
||||||
|
|
||||||
// PodSecurityPolicyListerExpansion allows custom methods to be added to
|
|
||||||
// PodSecurityPolicyLister.
|
|
||||||
type PodSecurityPolicyListerExpansion interface{}
|
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1beta1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PodSecurityPolicyLister helps list PodSecurityPolicies.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type PodSecurityPolicyLister interface {
|
|
||||||
// List lists all PodSecurityPolicies in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error)
|
|
||||||
// Get retrieves the PodSecurityPolicy from the index for a given name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*v1beta1.PodSecurityPolicy, error)
|
|
||||||
PodSecurityPolicyListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// podSecurityPolicyLister implements the PodSecurityPolicyLister interface.
|
|
||||||
type podSecurityPolicyLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPodSecurityPolicyLister returns a new PodSecurityPolicyLister.
|
|
||||||
func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister {
|
|
||||||
return &podSecurityPolicyLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all PodSecurityPolicies in the indexer.
|
|
||||||
func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1beta1.PodSecurityPolicy))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the PodSecurityPolicy from the index for a given name.
|
|
||||||
func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v1beta1.Resource("podsecuritypolicy"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v1beta1.PodSecurityPolicy), nil
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user