Documentation
¶
Overview ¶
Package policy is for any kind of policy object. Suitable examples, even if they aren't all here, are PodDisruptionBudget, NetworkPolicy, etc.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Eviction
- func (in *Eviction) APILifecycleDeprecated() (major, minor int)
- func (in *Eviction) APILifecycleIntroduced() (major, minor int)
- func (in *Eviction) APILifecycleRemoved() (major, minor int)
- func (in *Eviction) DeepCopy() *Eviction
- func (in *Eviction) DeepCopyInto(out *Eviction)
- func (in *Eviction) DeepCopyObject() runtime.Object
- func (m *Eviction) Marshal() (dAtA []byte, err error)
- func (m *Eviction) MarshalTo(dAtA []byte) (int, error)
- func (m *Eviction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (in Eviction) OpenAPIModelName() string
- func (m *Eviction) Reset()
- func (m *Eviction) Size() (n int)
- func (this *Eviction) String() string
- func (Eviction) SwaggerDoc() map[string]string
- func (m *Eviction) Unmarshal(dAtA []byte) error
- type PodDisruptionBudget
- func (in *PodDisruptionBudget) APILifecycleDeprecated() (major, minor int)
- func (in *PodDisruptionBudget) APILifecycleIntroduced() (major, minor int)
- func (in *PodDisruptionBudget) APILifecycleRemoved() (major, minor int)
- func (in *PodDisruptionBudget) APILifecycleReplacement() schema.GroupVersionKind
- func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget
- func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget)
- func (in *PodDisruptionBudget) DeepCopyObject() runtime.Object
- func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error)
- func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error)
- func (m *PodDisruptionBudget) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (in PodDisruptionBudget) OpenAPIModelName() string
- func (m *PodDisruptionBudget) Reset()
- func (m *PodDisruptionBudget) Size() (n int)
- func (this *PodDisruptionBudget) String() string
- func (PodDisruptionBudget) SwaggerDoc() map[string]string
- func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error
- type PodDisruptionBudgetList
- func (in *PodDisruptionBudgetList) APILifecycleDeprecated() (major, minor int)
- func (in *PodDisruptionBudgetList) APILifecycleIntroduced() (major, minor int)
- func (in *PodDisruptionBudgetList) APILifecycleRemoved() (major, minor int)
- func (in *PodDisruptionBudgetList) APILifecycleReplacement() schema.GroupVersionKind
- func (in *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList
- func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList)
- func (in *PodDisruptionBudgetList) DeepCopyObject() runtime.Object
- func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error)
- func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error)
- func (m *PodDisruptionBudgetList) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (in PodDisruptionBudgetList) OpenAPIModelName() string
- func (m *PodDisruptionBudgetList) Reset()
- func (m *PodDisruptionBudgetList) Size() (n int)
- func (this *PodDisruptionBudgetList) String() string
- func (PodDisruptionBudgetList) SwaggerDoc() map[string]string
- func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error
- type PodDisruptionBudgetSpec
- func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec
- func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec)
- func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error)
- func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *PodDisruptionBudgetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (in PodDisruptionBudgetSpec) OpenAPIModelName() string
- func (m *PodDisruptionBudgetSpec) Reset()
- func (m *PodDisruptionBudgetSpec) Size() (n int)
- func (this *PodDisruptionBudgetSpec) String() string
- func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string
- func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error
- type PodDisruptionBudgetStatus
- func (in *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus
- func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus)
- func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error)
- func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error)
- func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (in PodDisruptionBudgetStatus) OpenAPIModelName() string
- func (m *PodDisruptionBudgetStatus) Reset()
- func (m *PodDisruptionBudgetStatus) Size() (n int)
- func (this *PodDisruptionBudgetStatus) String() string
- func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string
- func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error
- type UnhealthyPodEvictionPolicyType
Constants ¶
const ( // DisruptionAllowedCondition is a condition set by the disruption controller // that signal whether any of the pods covered by the PDB can be disrupted. DisruptionAllowedCondition = "DisruptionAllowed" // SyncFailedReason is set on the DisruptionAllowed condition if reconcile // of the PDB failed and therefore disruption of pods are not allowed. SyncFailedReason = "SyncFailed" // SufficientPodsReason is set on the DisruptionAllowed condition if there are // more pods covered by the PDB than required and at least one can be disrupted. SufficientPodsReason = "SufficientPods" // InsufficientPodsReason is set on the DisruptionAllowed condition if the number // of pods are equal to or fewer than required by the PDB. InsufficientPodsReason = "InsufficientPods" )
const GroupName = "policy"
GroupName is the group name use in this package
Variables ¶
var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") )
var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Eviction ¶
type Eviction struct {
metav1.TypeMeta `json:""`
// metadata describes the pod that is being evicted.
// +optional
// +k8s:opaqueType
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// deleteOptions may be provided
// +optional
DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"`
}
Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.
func (*Eviction) APILifecycleDeprecated ¶ added in v0.19.0
APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
func (*Eviction) APILifecycleIntroduced ¶ added in v0.19.0
APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
func (*Eviction) APILifecycleRemoved ¶ added in v0.19.0
APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
func (*Eviction) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.
func (*Eviction) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Eviction) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Eviction) MarshalToSizedBuffer ¶ added in v0.16.4
func (Eviction) OpenAPIModelName ¶ added in v0.35.0
OpenAPIModelName returns the OpenAPI model name for this type.
func (Eviction) SwaggerDoc ¶
type PodDisruptionBudget ¶
type PodDisruptionBudget struct {
metav1.TypeMeta `json:""`
// metadata is the standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec is the specification of the desired behavior of the PodDisruptionBudget.
// +optional
Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// status is the most recently observed status of the PodDisruptionBudget.
// +optional
Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods +k8s:supportsSubresource="/status"
func (*PodDisruptionBudget) APILifecycleDeprecated ¶ added in v0.19.0
func (in *PodDisruptionBudget) APILifecycleDeprecated() (major, minor int)
APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.