extract

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotations

func Annotations(object k8sutil.Object) map[string]string

Annotations extracts annotations from the given object.

func GVK

GVK extracts the GroupVersionKind of an object.

func HPAMinReplicas

func HPAMinReplicas(obj k8sutil.Object) (int32, bool)

HPAMinReplicas extracts minReplicas from the given object, if available.

func HPAScaleTargetRefName added in v0.6.6

func HPAScaleTargetRefName(obj k8sutil.Object) (string, bool)

HPAScaleTargetRefName extracts Spec.ScaleTargetRef.Name

func Labels

func Labels(object k8sutil.Object) map[string]string

Labels extracts labels from the given object.

func PodSpec

func PodSpec(obj k8sutil.Object) (customtypes.PodSpec, bool)

PodSpec extracts a pod spec from the given object, if available.

func PodTemplateSpec

func PodTemplateSpec(obj k8sutil.Object) (coreV1.PodTemplateSpec, bool)

PodTemplateSpec extracts a pod template spec from the given object, if available.

func Replicas

func Replicas(obj k8sutil.Object) (int32, bool)

Replicas extracts replicas from the given object, if available.

func SCCallowPrivilegedContainer added in v0.6.5

func SCCallowPrivilegedContainer(obj k8sutil.Object) (bool, bool)

SCCallowPrivilegedContainer extracts allowPrivilegedContainer from the given object, if available.

func Selector

func Selector(obj k8sutil.Object) (*metaV1.LabelSelector, bool)

Selector extracts a selector from the given object, if available.

Types

type UpdateStrategyValues

type UpdateStrategyValues struct {
	Type                 string
	TypeExists           bool
	RollingConfigExists  bool
	RollingConfigValid   bool
	MaxUnavailableExists bool
	MaxUnavailable       *intstr.IntOrString
	MaxSurgeExists       bool
	MaxSurge             *intstr.IntOrString
}

UpdateStrategyValues contains testable data from an UpdateStrategy struct

func UpdateStrategy

func UpdateStrategy(obj k8sutil.Object) (*UpdateStrategyValues, bool)

UpdateStrategy will extract the data from an UpdateStrategy into a common struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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