v1

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodDisruptionBudgetBlank = (&PodDisruptionBudgetDie{}).DieFeed(policyv1.PodDisruptionBudget{})
View Source
var PodDisruptionBudgetSpecBlank = (&PodDisruptionBudgetSpecDie{}).DieFeed(policyv1.PodDisruptionBudgetSpec{})
View Source
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

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

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

DieFeed returns a new die with the provided resource.

func (*PodDisruptionBudgetDie) DieFeedJSON

func (d *PodDisruptionBudgetDie) DieFeedJSON(j []byte) *PodDisruptionBudgetDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*PodDisruptionBudgetDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*PodDisruptionBudgetDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*PodDisruptionBudgetDie) DieFeedYAML

func (d *PodDisruptionBudgetDie) DieFeedYAML(y []byte) *PodDisruptionBudgetDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*PodDisruptionBudgetDie) DieFeedYAMLFile

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

DieRelease returns the resource managed by the die.

func (*PodDisruptionBudgetDie) DieReleaseJSON

func (d *PodDisruptionBudgetDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*PodDisruptionBudgetDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*PodDisruptionBudgetDie) DieReleaseRawExtension

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

func (d *PodDisruptionBudgetDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*PodDisruptionBudgetDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*PodDisruptionBudgetDie) DieStampAt

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

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

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

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*PodDisruptionBudgetDie) Spec

Specification of the desired behavior of the PodDisruptionBudget.

func (*PodDisruptionBudgetDie) SpecDie

SpecDie stamps the resource's spec field with a mutable die.

func (*PodDisruptionBudgetDie) Status

Most recently observed status of the PodDisruptionBudget.

func (*PodDisruptionBudgetDie) StatusDie

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

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*PodDisruptionBudgetSpecDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*PodDisruptionBudgetSpecDie) DieFeedJSON

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*PodDisruptionBudgetSpecDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieFeedYAML

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieFeedYAMLFile

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

DieRelease returns the resource managed by the die.

func (*PodDisruptionBudgetSpecDie) DieReleaseJSON

func (d *PodDisruptionBudgetSpecDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*PodDisruptionBudgetSpecDie) DieReleaseRawExtension

func (d *PodDisruptionBudgetSpecDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieReleaseYAML

func (d *PodDisruptionBudgetSpecDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*PodDisruptionBudgetSpecDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*PodDisruptionBudgetSpecDie) DieStampAt

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

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*PodDisruptionBudgetSpecDie) MaxUnavailable

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 (*PodDisruptionBudgetSpecDie) MaxUnavailableString

func (d *PodDisruptionBudgetSpecDie) MaxUnavailableString(s string) *PodDisruptionBudgetSpecDie

func (*PodDisruptionBudgetSpecDie) MinAvailable

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 (*PodDisruptionBudgetSpecDie) MinAvailableString

func (*PodDisruptionBudgetSpecDie) Selector

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

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

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 (*PodDisruptionBudgetStatusDie) CurrentHealthy

current number of healthy pods

func (*PodDisruptionBudgetStatusDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*PodDisruptionBudgetStatusDie) DesiredHealthy

minimum desired number of healthy pods

func (*PodDisruptionBudgetStatusDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*PodDisruptionBudgetStatusDie) DieFeedJSON

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*PodDisruptionBudgetStatusDie) DieFeedRawExtension

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieFeedYAML

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieFeedYAMLFile

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieImmutable

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*PodDisruptionBudgetStatusDie) DieRelease

DieRelease returns the resource managed by the die.

func (*PodDisruptionBudgetStatusDie) DieReleaseJSON

func (d *PodDisruptionBudgetStatusDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieReleasePtr

DieReleasePtr returns a pointer to the resource managed by the die.

func (*PodDisruptionBudgetStatusDie) DieReleaseRawExtension

func (d *PodDisruptionBudgetStatusDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieReleaseYAML

func (d *PodDisruptionBudgetStatusDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*PodDisruptionBudgetStatusDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*PodDisruptionBudgetStatusDie) DieStampAt

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

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*PodDisruptionBudgetStatusDie) DisruptedPodDie

func (*PodDisruptionBudgetStatusDie) DisruptedPods

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

Number of pod disruptions that are currently allowed.

func (*PodDisruptionBudgetStatusDie) ExpectedPods

total number of pods counted by this disruption budget

func (*PodDisruptionBudgetStatusDie) ObservedGeneration

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL