Documentation
¶
Index ¶
- Variables
- type PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) APIVersion(v string) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DeepCopy() *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DeepCopyObject() runtime.Object
- func (d *PodDisruptionBudgetDie) DieFeed(r policyv1.PodDisruptionBudget) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieFeedJSON(j []byte) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieFeedPtr(r *policyv1.PodDisruptionBudget) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieFeedYAML(y []byte) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieImmutable(immutable bool) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieRelease() policyv1.PodDisruptionBudget
- func (d *PodDisruptionBudgetDie) DieReleaseJSON() []byte
- func (d *PodDisruptionBudgetDie) DieReleasePtr() *policyv1.PodDisruptionBudget
- func (d *PodDisruptionBudgetDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *PodDisruptionBudgetDie) DieReleaseUnstructured() *unstructured.Unstructured
- func (d *PodDisruptionBudgetDie) DieReleaseYAML() []byte
- func (d *PodDisruptionBudgetDie) DieStamp(fn func(r *policyv1.PodDisruptionBudget)) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) DieWith(fns ...func(d *PodDisruptionBudgetDie)) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) GetObjectKind() schema.ObjectKind
- func (d *PodDisruptionBudgetDie) Kind(v string) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) MarshalJSON() ([]byte, error)
- func (d *PodDisruptionBudgetDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) Spec(v policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) SpecDie(fn func(d *PodDisruptionBudgetSpecDie)) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) Status(v policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) StatusDie(fn func(d *PodDisruptionBudgetStatusDie)) *PodDisruptionBudgetDie
- func (d *PodDisruptionBudgetDie) UnmarshalJSON(b []byte) error
- type PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DeepCopy() *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeed(r policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeedJSON(j []byte) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeedPtr(r *policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeedYAML(y []byte) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieImmutable(immutable bool) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieRelease() policyv1.PodDisruptionBudgetSpec
- func (d *PodDisruptionBudgetSpecDie) DieReleaseJSON() []byte
- func (d *PodDisruptionBudgetSpecDie) DieReleasePtr() *policyv1.PodDisruptionBudgetSpec
- func (d *PodDisruptionBudgetSpecDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *PodDisruptionBudgetSpecDie) DieReleaseYAML() []byte
- func (d *PodDisruptionBudgetSpecDie) DieStamp(fn func(r *policyv1.PodDisruptionBudgetSpec)) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) DieWith(fns ...func(d *PodDisruptionBudgetSpecDie)) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MaxUnavailable(v *intstr.IntOrString) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MaxUnavailableInt(i int) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MaxUnavailableString(s string) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MinAvailable(v *intstr.IntOrString) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MinAvailableInt(i int) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) MinAvailableString(s string) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) Selector(v *apismetav1.LabelSelector) *PodDisruptionBudgetSpecDie
- func (d *PodDisruptionBudgetSpecDie) UnhealthyPodEvictionPolicy(v *policyv1.UnhealthyPodEvictionPolicyType) *PodDisruptionBudgetSpecDie
- type PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) Conditions(v ...apismetav1.Condition) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) ConditionsDie(conditions ...*diemetav1.ConditionDie) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) CurrentHealthy(v int32) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DeepCopy() *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DesiredHealthy(v int32) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeed(r policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeedJSON(j []byte) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeedPtr(r *policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeedYAML(y []byte) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieImmutable(immutable bool) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieRelease() policyv1.PodDisruptionBudgetStatus
- func (d *PodDisruptionBudgetStatusDie) DieReleaseJSON() []byte
- func (d *PodDisruptionBudgetStatusDie) DieReleasePtr() *policyv1.PodDisruptionBudgetStatus
- func (d *PodDisruptionBudgetStatusDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *PodDisruptionBudgetStatusDie) DieReleaseYAML() []byte
- func (d *PodDisruptionBudgetStatusDie) DieStamp(fn func(r *policyv1.PodDisruptionBudgetStatus)) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DieWith(fns ...func(d *PodDisruptionBudgetStatusDie)) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DisruptedPodDie(key string, value metav1.Time) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DisruptedPods(v map[string]metav1.Time) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) DisruptionsAllowed(v int32) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) ExpectedPods(v int32) *PodDisruptionBudgetStatusDie
- func (d *PodDisruptionBudgetStatusDie) ObservedGeneration(v int64) *PodDisruptionBudgetStatusDie
Constants ¶
This section is empty.
Variables ¶
var PodDisruptionBudgetBlank = (&PodDisruptionBudgetDie{}).DieFeed(policyv1.PodDisruptionBudget{})
var PodDisruptionBudgetSpecBlank = (&PodDisruptionBudgetSpecDie{}).DieFeed(policyv1.PodDisruptionBudgetSpec{})
var PodDisruptionBudgetStatusBlank = (&PodDisruptionBudgetStatusDie{}).DieFeed(policyv1.PodDisruptionBudgetStatus{})
Functions ¶
This section is empty.
Types ¶
type PodDisruptionBudgetDie ¶
type PodDisruptionBudgetDie struct { metav1.FrozenObjectMeta // contains filtered or unexported fields }
func (*PodDisruptionBudgetDie) APIVersion ¶ added in v0.5.0
func (d *PodDisruptionBudgetDie) APIVersion(v string) *PodDisruptionBudgetDie
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
func (*PodDisruptionBudgetDie) DeepCopy ¶
func (d *PodDisruptionBudgetDie) DeepCopy() *PodDisruptionBudgetDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*PodDisruptionBudgetDie) DeepCopyObject ¶
func (d *PodDisruptionBudgetDie) DeepCopyObject() runtime.Object
func (*PodDisruptionBudgetDie) DieFeed ¶
func (d *PodDisruptionBudgetDie) DieFeed(r policyv1.PodDisruptionBudget) *PodDisruptionBudgetDie
DieFeed returns a new die with the provided resource.
func (*PodDisruptionBudgetDie) DieFeedJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieFeedJSON(j []byte) *PodDisruptionBudgetDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*PodDisruptionBudgetDie) DieFeedPtr ¶
func (d *PodDisruptionBudgetDie) DieFeedPtr(r *policyv1.PodDisruptionBudget) *PodDisruptionBudgetDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*PodDisruptionBudgetDie) DieFeedRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetDie) DieFeedYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieFeedYAML(y []byte) *PodDisruptionBudgetDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*PodDisruptionBudgetDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*PodDisruptionBudgetDie) DieImmutable ¶
func (d *PodDisruptionBudgetDie) DieImmutable(immutable bool) *PodDisruptionBudgetDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*PodDisruptionBudgetDie) DieRelease ¶
func (d *PodDisruptionBudgetDie) DieRelease() policyv1.PodDisruptionBudget
DieRelease returns the resource managed by the die.
func (*PodDisruptionBudgetDie) DieReleaseJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*PodDisruptionBudgetDie) DieReleasePtr ¶
func (d *PodDisruptionBudgetDie) DieReleasePtr() *policyv1.PodDisruptionBudget
DieReleasePtr returns a pointer to the resource managed by the die.
func (*PodDisruptionBudgetDie) DieReleaseRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetDie) DieReleaseUnstructured ¶
func (d *PodDisruptionBudgetDie) DieReleaseUnstructured() *unstructured.Unstructured
DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.
func (*PodDisruptionBudgetDie) DieReleaseYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*PodDisruptionBudgetDie) DieStamp ¶
func (d *PodDisruptionBudgetDie) DieStamp(fn func(r *policyv1.PodDisruptionBudget)) *PodDisruptionBudgetDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*PodDisruptionBudgetDie) DieStampAt ¶ added in v0.8.0
func (d *PodDisruptionBudgetDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*PodDisruptionBudgetDie) DieWith ¶ added in v0.9.0
func (d *PodDisruptionBudgetDie) DieWith(fns ...func(d *PodDisruptionBudgetDie)) *PodDisruptionBudgetDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*PodDisruptionBudgetDie) GetObjectKind ¶
func (d *PodDisruptionBudgetDie) GetObjectKind() schema.ObjectKind
func (*PodDisruptionBudgetDie) Kind ¶ added in v0.5.0
func (d *PodDisruptionBudgetDie) Kind(v string) *PodDisruptionBudgetDie
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
func (*PodDisruptionBudgetDie) MarshalJSON ¶
func (d *PodDisruptionBudgetDie) MarshalJSON() ([]byte, error)
func (*PodDisruptionBudgetDie) MetadataDie ¶
func (d *PodDisruptionBudgetDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *PodDisruptionBudgetDie
MetadataDie stamps the resource's ObjectMeta field with a mutable die.
func (*PodDisruptionBudgetDie) Spec ¶
func (d *PodDisruptionBudgetDie) Spec(v policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetDie
Specification of the desired behavior of the PodDisruptionBudget.
func (*PodDisruptionBudgetDie) SpecDie ¶
func (d *PodDisruptionBudgetDie) SpecDie(fn func(d *PodDisruptionBudgetSpecDie)) *PodDisruptionBudgetDie
SpecDie stamps the resource's spec field with a mutable die.
func (*PodDisruptionBudgetDie) Status ¶
func (d *PodDisruptionBudgetDie) Status(v policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetDie
Most recently observed status of the PodDisruptionBudget.
func (*PodDisruptionBudgetDie) StatusDie ¶
func (d *PodDisruptionBudgetDie) StatusDie(fn func(d *PodDisruptionBudgetStatusDie)) *PodDisruptionBudgetDie
StatusDie stamps the resource's status field with a mutable die.
func (*PodDisruptionBudgetDie) UnmarshalJSON ¶
func (d *PodDisruptionBudgetDie) UnmarshalJSON(b []byte) error
type PodDisruptionBudgetSpecDie ¶
type PodDisruptionBudgetSpecDie struct {
// contains filtered or unexported fields
}
func (*PodDisruptionBudgetSpecDie) DeepCopy ¶
func (d *PodDisruptionBudgetSpecDie) DeepCopy() *PodDisruptionBudgetSpecDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*PodDisruptionBudgetSpecDie) DieFeed ¶
func (d *PodDisruptionBudgetSpecDie) DieFeed(r policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetSpecDie
DieFeed returns a new die with the provided resource.
func (*PodDisruptionBudgetSpecDie) DieFeedJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieFeedJSON(j []byte) *PodDisruptionBudgetSpecDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieFeedPtr ¶
func (d *PodDisruptionBudgetSpecDie) DieFeedPtr(r *policyv1.PodDisruptionBudgetSpec) *PodDisruptionBudgetSpecDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*PodDisruptionBudgetSpecDie) DieFeedRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetSpecDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetSpecDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieFeedYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieFeedYAML(y []byte) *PodDisruptionBudgetSpecDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetSpecDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieImmutable ¶
func (d *PodDisruptionBudgetSpecDie) DieImmutable(immutable bool) *PodDisruptionBudgetSpecDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*PodDisruptionBudgetSpecDie) DieRelease ¶
func (d *PodDisruptionBudgetSpecDie) DieRelease() policyv1.PodDisruptionBudgetSpec
DieRelease returns the resource managed by the die.
func (*PodDisruptionBudgetSpecDie) DieReleaseJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieReleasePtr ¶
func (d *PodDisruptionBudgetSpecDie) DieReleasePtr() *policyv1.PodDisruptionBudgetSpec
DieReleasePtr returns a pointer to the resource managed by the die.
func (*PodDisruptionBudgetSpecDie) DieReleaseRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetSpecDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieReleaseYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*PodDisruptionBudgetSpecDie) DieStamp ¶
func (d *PodDisruptionBudgetSpecDie) DieStamp(fn func(r *policyv1.PodDisruptionBudgetSpec)) *PodDisruptionBudgetSpecDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*PodDisruptionBudgetSpecDie) DieStampAt ¶ added in v0.8.0
func (d *PodDisruptionBudgetSpecDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetSpecDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*PodDisruptionBudgetSpecDie) DieWith ¶ added in v0.9.0
func (d *PodDisruptionBudgetSpecDie) DieWith(fns ...func(d *PodDisruptionBudgetSpecDie)) *PodDisruptionBudgetSpecDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*PodDisruptionBudgetSpecDie) MaxUnavailable ¶
func (d *PodDisruptionBudgetSpecDie) MaxUnavailable(v *intstr.IntOrString) *PodDisruptionBudgetSpecDie
An eviction is allowed if at most "maxUnavailable" pods selected by
"selector" are unavailable after the eviction, i.e. even in absence of
the evicted pod. For example, one can prevent all voluntary evictions
by specifying 0. This is a mutually exclusive setting with "minAvailable".
func (*PodDisruptionBudgetSpecDie) MaxUnavailableInt ¶
func (d *PodDisruptionBudgetSpecDie) MaxUnavailableInt(i int) *PodDisruptionBudgetSpecDie
func (*PodDisruptionBudgetSpecDie) MaxUnavailableString ¶
func (d *PodDisruptionBudgetSpecDie) MaxUnavailableString(s string) *PodDisruptionBudgetSpecDie
func (*PodDisruptionBudgetSpecDie) MinAvailable ¶
func (d *PodDisruptionBudgetSpecDie) MinAvailable(v *intstr.IntOrString) *PodDisruptionBudgetSpecDie
An eviction is allowed if at least "minAvailable" pods selected by
"selector" will still be available after the eviction, i.e. even in the
absence of the evicted pod. So for example you can prevent all voluntary
evictions by specifying "100%".
func (*PodDisruptionBudgetSpecDie) MinAvailableInt ¶
func (d *PodDisruptionBudgetSpecDie) MinAvailableInt(i int) *PodDisruptionBudgetSpecDie
func (*PodDisruptionBudgetSpecDie) MinAvailableString ¶
func (d *PodDisruptionBudgetSpecDie) MinAvailableString(s string) *PodDisruptionBudgetSpecDie
func (*PodDisruptionBudgetSpecDie) Selector ¶
func (d *PodDisruptionBudgetSpecDie) Selector(v *apismetav1.LabelSelector) *PodDisruptionBudgetSpecDie
Label query over pods whose evictions are managed by the disruption
budget.
A null selector will match no pods, while an empty ({}) selector will select
all pods within the namespace.
func (*PodDisruptionBudgetSpecDie) UnhealthyPodEvictionPolicy ¶ added in v0.7.0
func (d *PodDisruptionBudgetSpecDie) UnhealthyPodEvictionPolicy(v *policyv1.UnhealthyPodEvictionPolicyType) *PodDisruptionBudgetSpecDie
UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods
should be considered for eviction. Current implementation considers healthy pods,
as pods that have status.conditions item with type="Ready",status="True".
Valid policies are IfHealthyBudget and AlwaysAllow.
If no policy is specified, the default behavior will be used,
which corresponds to the IfHealthyBudget policy.
IfHealthyBudget policy means that running pods (status.phase="Running"),
but not yet healthy can be evicted only if the guarded application is not
disrupted (status.currentHealthy is at least equal to status.desiredHealthy).
Healthy pods will be subject to the PDB for eviction.
AlwaysAllow policy means that all running pods (status.phase="Running"),
but not yet healthy are considered disrupted and can be evicted regardless
of whether the criteria in a PDB is met. This means perspective running
pods of a disrupted application might not get a chance to become healthy.
Healthy pods will be subject to the PDB for eviction.
Additional policies may be added in the future.
Clients making eviction decisions should disallow eviction of unhealthy pods ¶
if they encounter an unrecognized policy in this field.
This field is beta-level. The eviction API uses this field when
the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).
type PodDisruptionBudgetStatusDie ¶
type PodDisruptionBudgetStatusDie struct {
// contains filtered or unexported fields
}
func (*PodDisruptionBudgetStatusDie) Conditions ¶
func (d *PodDisruptionBudgetStatusDie) Conditions(v ...apismetav1.Condition) *PodDisruptionBudgetStatusDie
Conditions contain conditions for PDB. The disruption controller sets the
DisruptionAllowed condition. The following are known values for the reason field
(additional reasons could be added in the future):
- SyncFailed: The controller encountered an error and wasn't able to compute
the number of allowed disruptions. Therefore no disruptions are
allowed and the status of the condition will be False.
- InsufficientPods: The number of pods are either at or below the number
required by the PodDisruptionBudget. No disruptions are
allowed and the status of the condition will be False.
- SufficientPods: There are more pods than required by the PodDisruptionBudget.
The condition will be True, and the number of allowed ¶
disruptions are provided by the disruptionsAllowed property.
func (*PodDisruptionBudgetStatusDie) ConditionsDie ¶
func (d *PodDisruptionBudgetStatusDie) ConditionsDie(conditions ...*diemetav1.ConditionDie) *PodDisruptionBudgetStatusDie
func (*PodDisruptionBudgetStatusDie) CurrentHealthy ¶
func (d *PodDisruptionBudgetStatusDie) CurrentHealthy(v int32) *PodDisruptionBudgetStatusDie
current number of healthy pods
func (*PodDisruptionBudgetStatusDie) DeepCopy ¶
func (d *PodDisruptionBudgetStatusDie) DeepCopy() *PodDisruptionBudgetStatusDie
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*PodDisruptionBudgetStatusDie) DesiredHealthy ¶
func (d *PodDisruptionBudgetStatusDie) DesiredHealthy(v int32) *PodDisruptionBudgetStatusDie
minimum desired number of healthy pods
func (*PodDisruptionBudgetStatusDie) DieFeed ¶
func (d *PodDisruptionBudgetStatusDie) DieFeed(r policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetStatusDie
DieFeed returns a new die with the provided resource.
func (*PodDisruptionBudgetStatusDie) DieFeedJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieFeedJSON(j []byte) *PodDisruptionBudgetStatusDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieFeedPtr ¶
func (d *PodDisruptionBudgetStatusDie) DieFeedPtr(r *policyv1.PodDisruptionBudgetStatus) *PodDisruptionBudgetStatusDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*PodDisruptionBudgetStatusDie) DieFeedRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetStatusDie) DieFeedRawExtension(raw runtime.RawExtension) *PodDisruptionBudgetStatusDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieFeedYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieFeedYAML(y []byte) *PodDisruptionBudgetStatusDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieFeedYAMLFile ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieFeedYAMLFile(name string) *PodDisruptionBudgetStatusDie
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieImmutable ¶
func (d *PodDisruptionBudgetStatusDie) DieImmutable(immutable bool) *PodDisruptionBudgetStatusDie
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*PodDisruptionBudgetStatusDie) DieRelease ¶
func (d *PodDisruptionBudgetStatusDie) DieRelease() policyv1.PodDisruptionBudgetStatus
DieRelease returns the resource managed by the die.
func (*PodDisruptionBudgetStatusDie) DieReleaseJSON ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieReleaseJSON() []byte
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieReleasePtr ¶
func (d *PodDisruptionBudgetStatusDie) DieReleasePtr() *policyv1.PodDisruptionBudgetStatus
DieReleasePtr returns a pointer to the resource managed by the die.
func (*PodDisruptionBudgetStatusDie) DieReleaseRawExtension ¶ added in v0.5.0
func (d *PodDisruptionBudgetStatusDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieReleaseYAML ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*PodDisruptionBudgetStatusDie) DieStamp ¶
func (d *PodDisruptionBudgetStatusDie) DieStamp(fn func(r *policyv1.PodDisruptionBudgetStatus)) *PodDisruptionBudgetStatusDie
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*PodDisruptionBudgetStatusDie) DieStampAt ¶ added in v0.8.0
func (d *PodDisruptionBudgetStatusDie) DieStampAt(jp string, fn interface{}) *PodDisruptionBudgetStatusDie
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.
func (*PodDisruptionBudgetStatusDie) DieWith ¶ added in v0.9.0
func (d *PodDisruptionBudgetStatusDie) DieWith(fns ...func(d *PodDisruptionBudgetStatusDie)) *PodDisruptionBudgetStatusDie
DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.
func (*PodDisruptionBudgetStatusDie) DisruptedPodDie ¶
func (d *PodDisruptionBudgetStatusDie) DisruptedPodDie(key string, value metav1.Time) *PodDisruptionBudgetStatusDie
func (*PodDisruptionBudgetStatusDie) DisruptedPods ¶
func (d *PodDisruptionBudgetStatusDie) DisruptedPods(v map[string]metav1.Time) *PodDisruptionBudgetStatusDie
DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.
func (*PodDisruptionBudgetStatusDie) DisruptionsAllowed ¶
func (d *PodDisruptionBudgetStatusDie) DisruptionsAllowed(v int32) *PodDisruptionBudgetStatusDie
Number of pod disruptions that are currently allowed.
func (*PodDisruptionBudgetStatusDie) ExpectedPods ¶
func (d *PodDisruptionBudgetStatusDie) ExpectedPods(v int32) *PodDisruptionBudgetStatusDie
total number of pods counted by this disruption budget
func (*PodDisruptionBudgetStatusDie) ObservedGeneration ¶
func (d *PodDisruptionBudgetStatusDie) ObservedGeneration(v int64) *PodDisruptionBudgetStatusDie
Most recent generation observed when updating this PDB status. DisruptionsAllowed and other
status information is valid only if observedGeneration equals to PDB's object generation.