mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-24 14:12:18 +00:00
Merge pull request #119806 from enj/enj/i/delete_psp_api
Delete PSP API types and generated clients Kubernetes-commit: 012e61a860d978bed4e72222da756d0c7b7832ba
This commit is contained in:
commit
d124e52fa8
@ -11061,29 +11061,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: observedGeneration
|
- name: observedGeneration
|
||||||
type:
|
type:
|
||||||
scalar: numeric
|
scalar: numeric
|
||||||
- name: io.k8s.api.policy.v1beta1.AllowedCSIDriver
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.policy.v1beta1.AllowedFlexVolume
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.policy.v1beta1.AllowedHostPath
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: pathPrefix
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: readOnly
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: io.k8s.api.policy.v1beta1.Eviction
|
- name: io.k8s.api.policy.v1beta1.Eviction
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -11100,40 +11077,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
type:
|
type:
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||||
default: {}
|
default: {}
|
||||||
- name: io.k8s.api.policy.v1beta1.FSGroupStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.policy.v1beta1.HostPortRange
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: max
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: min
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.policy.v1beta1.IDRange
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: max
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: min
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.policy.v1beta1.PodDisruptionBudget
|
- name: io.k8s.api.policy.v1beta1.PodDisruptionBudget
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -11205,195 +11148,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: observedGeneration
|
- name: observedGeneration
|
||||||
type:
|
type:
|
||||||
scalar: numeric
|
scalar: numeric
|
||||||
- name: io.k8s.api.policy.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.policy.v1beta1.PodSecurityPolicySpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.policy.v1beta1.PodSecurityPolicySpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allowPrivilegeEscalation
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: allowedCSIDrivers
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.AllowedCSIDriver
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedCapabilities
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedFlexVolumes
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.AllowedFlexVolume
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: allowedHostPaths
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.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.policy.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.policy.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.policy.v1beta1.RunAsGroupStrategyOptions
|
|
||||||
- name: runAsUser
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: runtimeClass
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions
|
|
||||||
- name: seLinux
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.SELinuxStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: supplementalGroups
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions
|
|
||||||
default: {}
|
|
||||||
- name: volumes
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.policy.v1beta1.RunAsGroupStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allowedRuntimeClassNames
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: defaultRuntimeClassName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.policy.v1beta1.SELinuxStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: seLinuxOptions
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.core.v1.SELinuxOptions
|
|
||||||
- name: io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: ranges
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.policy.v1beta1.IDRange
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: rule
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.rbac.v1.AggregationRule
|
- name: io.k8s.api.rbac.v1.AggregationRule
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
@ -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/policy/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 (
|
|
||||||
policyv1beta1 "k8s.io/api/policy/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("policy/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 *policyv1beta1.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 *policyv1beta1.PodSecurityPolicy, fieldManager string) (*PodSecurityPolicyApplyConfiguration, error) {
|
|
||||||
return extractPodSecurityPolicy(podSecurityPolicy, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractPodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy, fieldManager string, subresource string) (*PodSecurityPolicyApplyConfiguration, error) {
|
|
||||||
b := &PodSecurityPolicyApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(podSecurityPolicy, internal.Parser().Type("io.k8s.api.policy.v1beta1.PodSecurityPolicy"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(podSecurityPolicy.Name)
|
|
||||||
|
|
||||||
b.WithKind("PodSecurityPolicy")
|
|
||||||
b.WithAPIVersion("policy/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/policy/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/policy/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/policy/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/policy/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/policy/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
|
|
||||||
}
|
|
@ -1417,40 +1417,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationspolicyv1.PodDisruptionBudgetStatusApplyConfiguration{}
|
return &applyconfigurationspolicyv1.PodDisruptionBudgetStatusApplyConfiguration{}
|
||||||
|
|
||||||
// Group=policy, Version=v1beta1
|
// Group=policy, Version=v1beta1
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("AllowedCSIDriver"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.AllowedCSIDriverApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("AllowedFlexVolume"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.AllowedFlexVolumeApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("AllowedHostPath"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.AllowedHostPathApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("Eviction"):
|
case policyv1beta1.SchemeGroupVersion.WithKind("Eviction"):
|
||||||
return &applyconfigurationspolicyv1beta1.EvictionApplyConfiguration{}
|
return &applyconfigurationspolicyv1beta1.EvictionApplyConfiguration{}
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("FSGroupStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.FSGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("HostPortRange"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.HostPortRangeApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("IDRange"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.IDRangeApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudget"):
|
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudget"):
|
||||||
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration{}
|
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetApplyConfiguration{}
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudgetSpec"):
|
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudgetSpec"):
|
||||||
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetSpecApplyConfiguration{}
|
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetSpecApplyConfiguration{}
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudgetStatus"):
|
case policyv1beta1.SchemeGroupVersion.WithKind("PodDisruptionBudgetStatus"):
|
||||||
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetStatusApplyConfiguration{}
|
return &applyconfigurationspolicyv1beta1.PodDisruptionBudgetStatusApplyConfiguration{}
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicy"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.PodSecurityPolicyApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("PodSecurityPolicySpec"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.PodSecurityPolicySpecApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("RunAsGroupStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.RunAsGroupStrategyOptionsApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("RunAsUserStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.RunAsUserStrategyOptionsApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("RuntimeClassStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.RuntimeClassStrategyOptionsApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("SELinuxStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.SELinuxStrategyOptionsApplyConfiguration{}
|
|
||||||
case policyv1beta1.SchemeGroupVersion.WithKind("SupplementalGroupsStrategyOptions"):
|
|
||||||
return &applyconfigurationspolicyv1beta1.SupplementalGroupsStrategyOptionsApplyConfiguration{}
|
|
||||||
|
|
||||||
// Group=rbac.authorization.k8s.io, Version=v1
|
// Group=rbac.authorization.k8s.io, Version=v1
|
||||||
case rbacv1.SchemeGroupVersion.WithKind("AggregationRule"):
|
case rbacv1.SchemeGroupVersion.WithKind("AggregationRule"):
|
||||||
|
4
go.mod
4
go.mod
@ -23,7 +23,7 @@ require (
|
|||||||
golang.org/x/term v0.10.0
|
golang.org/x/term v0.10.0
|
||||||
golang.org/x/time v0.3.0
|
golang.org/x/time v0.3.0
|
||||||
google.golang.org/protobuf v1.30.0
|
google.golang.org/protobuf v1.30.0
|
||||||
k8s.io/api v0.0.0-20230810042731-2f6eec10c476
|
k8s.io/api v0.0.0-20230817195626-f130bde80d7f
|
||||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
||||||
k8s.io/klog/v2 v2.100.1
|
k8s.io/klog/v2 v2.100.1
|
||||||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
|
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
|
||||||
@ -60,6 +60,6 @@ require (
|
|||||||
)
|
)
|
||||||
|
|
||||||
replace (
|
replace (
|
||||||
k8s.io/api => k8s.io/api v0.0.0-20230810042731-2f6eec10c476
|
k8s.io/api => k8s.io/api v0.0.0-20230817195626-f130bde80d7f
|
||||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -146,8 +146,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/api v0.0.0-20230810042731-2f6eec10c476 h1:1LpPoqkYurARQ/TQ0U3DRAclyCkM7hMCMCUVymCR3jM=
|
k8s.io/api v0.0.0-20230817195626-f130bde80d7f h1:RK3CMHCVGicJ+7BXl5XtfPXnO3S2OSWYoiHQUSivBOM=
|
||||||
k8s.io/api v0.0.0-20230810042731-2f6eec10c476/go.mod h1:RFi7MZgMNqcWc0azfutkpPR/OdHWZjnTAwdFHTKjAUQ=
|
k8s.io/api v0.0.0-20230817195626-f130bde80d7f/go.mod h1:GT9MF3sI/KGC+k3nmiQ+++vvUhyZtGX3GHeDSaF2kT0=
|
||||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe h1:UjWeb1lUhxUf0Ryph1r1hz+pENt060neKZ+P3gKWrDc=
|
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe h1:UjWeb1lUhxUf0Ryph1r1hz+pENt060neKZ+P3gKWrDc=
|
||||||
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw=
|
k8s.io/apimachinery v0.0.0-20230816163301-3e2600dc79fe/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw=
|
||||||
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||||
|
@ -326,8 +326,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
// Group=policy, Version=v1beta1
|
// Group=policy, Version=v1beta1
|
||||||
case policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
|
case policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
|
||||||
case policyv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodSecurityPolicies().Informer()}, nil
|
|
||||||
|
|
||||||
// Group=rbac.authorization.k8s.io, Version=v1
|
// Group=rbac.authorization.k8s.io, Version=v1
|
||||||
case rbacv1.SchemeGroupVersion.WithResource("clusterroles"):
|
case rbacv1.SchemeGroupVersion.WithResource("clusterroles"):
|
||||||
|
@ -26,8 +26,6 @@ import (
|
|||||||
type Interface interface {
|
type Interface interface {
|
||||||
// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
|
// PodDisruptionBudgets returns a PodDisruptionBudgetInformer.
|
||||||
PodDisruptionBudgets() PodDisruptionBudgetInformer
|
PodDisruptionBudgets() PodDisruptionBudgetInformer
|
||||||
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
|
||||||
PodSecurityPolicies() PodSecurityPolicyInformer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer {
|
func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer {
|
||||||
return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
return &podDisruptionBudgetInformer{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}
|
|
||||||
}
|
|
||||||
|
@ -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"
|
|
||||||
|
|
||||||
policyv1beta1 "k8s.io/api/policy/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/policy/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.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.PolicyV1beta1().PodSecurityPolicies().Watch(context.TODO(), options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&policyv1beta1.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(&policyv1beta1.PodSecurityPolicy{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
|
|
||||||
return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -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/policy/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"
|
|
||||||
policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakePodSecurityPolicies implements PodSecurityPolicyInterface
|
|
||||||
type FakePodSecurityPolicies struct {
|
|
||||||
Fake *FakePolicyV1beta1
|
|
||||||
}
|
|
||||||
|
|
||||||
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 *policyv1beta1.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
|
|
||||||
}
|
|
@ -36,10 +36,6 @@ func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDi
|
|||||||
return &FakePodDisruptionBudgets{c, namespace}
|
return &FakePodDisruptionBudgets{c, namespace}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakePolicyV1beta1) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface {
|
|
||||||
return &FakePodSecurityPolicies{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakePolicyV1beta1) RESTClient() rest.Interface {
|
func (c *FakePolicyV1beta1) RESTClient() rest.Interface {
|
||||||
|
@ -19,5 +19,3 @@ limitations under the License.
|
|||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
type PodDisruptionBudgetExpansion interface{}
|
type PodDisruptionBudgetExpansion interface{}
|
||||||
|
|
||||||
type PodSecurityPolicyExpansion 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/policy/v1beta1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/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 *policyv1beta1.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 *PolicyV1beta1Client) *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 *policyv1beta1.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
|
|
||||||
}
|
|
@ -30,7 +30,6 @@ type PolicyV1beta1Interface interface {
|
|||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
EvictionsGetter
|
EvictionsGetter
|
||||||
PodDisruptionBudgetsGetter
|
PodDisruptionBudgetsGetter
|
||||||
PodSecurityPoliciesGetter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PolicyV1beta1Client is used to interact with features provided by the policy group.
|
// PolicyV1beta1Client is used to interact with features provided by the policy group.
|
||||||
@ -46,10 +45,6 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisrupti
|
|||||||
return newPodDisruptionBudgets(c, namespace)
|
return newPodDisruptionBudgets(c, namespace)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *PolicyV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
|
|
||||||
return newPodSecurityPolicies(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new PolicyV1beta1Client for the given config.
|
// NewForConfig creates a new PolicyV1beta1Client for the given config.
|
||||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
|
@ -25,7 +25,3 @@ type EvictionListerExpansion interface{}
|
|||||||
// EvictionNamespaceListerExpansion allows custom methods to be added to
|
// EvictionNamespaceListerExpansion allows custom methods to be added to
|
||||||
// EvictionNamespaceLister.
|
// EvictionNamespaceLister.
|
||||||
type EvictionNamespaceListerExpansion interface{}
|
type EvictionNamespaceListerExpansion 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/policy/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