k8s

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// these were not found in upstream/vendor packages
	ClusterRoleKind             = "ClusterRole"
	ClusterRoleBindingKind      = "ClusterRoleBinding"
	ConfigMapKind               = "ConfigMap"
	DeploymentKind              = "Deployment"
	NamespaceKind               = "Namespace"
	PodKind                     = "Pod"
	PodDisruptionBudgetKind     = "PodDisruptionBudget"
	ReplicaSetKind              = "ReplicaSet"
	RoleKind                    = "Role"
	RoleBindingKind             = "RoleBinding"
	CronJobKind                 = "CronJob"
	SecretKind                  = "Secret"
	ServiceKind                 = "Service"
	IngressKind                 = "Ingress"
	HorizontalPodAutoscalerKind = "HorizontalPodAutoscaler"
	ServiceInstanceKind         = "ServiceInstance"
	ServiceAccountKind          = "ServiceAccount"
	EventKind                   = "Event"
	ServiceInstanceResource     = "serviceinstances"
	ServiceBindingResource      = "servicebindings"
	IngressResource             = "ingresses"

	CreateVerb           = "create"
	GetVerb              = "get"
	ListVerb             = "list"
	UpdateVerb           = "update"
	PatchVerb            = "patch"
	DeleteVerb           = "delete"
	DeleteCollectionVerb = "deletecollection"
	WatchVerb            = "watch"

	ServiceDescriptorClaimVerb = "claim"

	// Beta labels, from:
	// https://github.com/kubernetes/kubernetes/blob/v1.12.2/pkg/kubelet/apis/well_known_labels.go
	LabelHostname           = "kubernetes.io/hostname"
	LabelZoneFailureDomain  = "failure-domain.beta.kubernetes.io/zone"
	LabelMultiZoneDelimiter = "__"
	LabelZoneRegion         = "failure-domain.beta.kubernetes.io/region"

	LabelInstanceType = "beta.kubernetes.io/instance-type"

	LabelOS   = "beta.kubernetes.io/os"
	LabelArch = "beta.kubernetes.io/arch"
)

Variables

View Source
var (
	DeploymentGVK              = apps_v1.SchemeGroupVersion.WithKind(DeploymentKind)
	PodGVK                     = core_v1.SchemeGroupVersion.WithKind(PodKind)
	ReplicaSetGVK              = apps_v1.SchemeGroupVersion.WithKind(ReplicaSetKind)
	HorizontalPodAutoscalerGVK = autoscaling_v2b1.SchemeGroupVersion.WithKind(HorizontalPodAutoscalerKind)
	ConfigMapGVK               = core_v1.SchemeGroupVersion.WithKind(ConfigMapKind)
	NamespaceGVK               = core_v1.SchemeGroupVersion.WithKind(NamespaceKind)
	RoleBindingGVK             = rbac_v1.SchemeGroupVersion.WithKind(RoleBindingKind)

	ServiceInstanceGVR = meta_v1.GroupVersionResource{
		Group:    sc_v1b1.SchemeGroupVersion.Group,
		Version:  sc_v1b1.SchemeGroupVersion.Version,
		Resource: ServiceInstanceResource,
	}
	ServiceBindingGVR = meta_v1.GroupVersionResource{
		Group:    sc_v1b1.SchemeGroupVersion.Group,
		Version:  sc_v1b1.SchemeGroupVersion.Version,
		Resource: ServiceBindingResource,
	}
	IngressGVR = meta_v1.GroupVersionResource{
		Group:    ext_v1b1.SchemeGroupVersion.Group,
		Version:  ext_v1b1.SchemeGroupVersion.Version,
		Resource: IngressResource,
	}
)

Functions

func CalculateConditionAll

func CalculateConditionAll(conditions []cond_v1.Condition) cond_v1.ConditionStatus

func CalculateConditionAny

func CalculateConditionAny(conditions []cond_v1.Condition) cond_v1.ConditionStatus

func FillCondition

func FillCondition(clk clock.Clock, oldCondition, cond *cond_v1.Condition) bool

FillCondition returns true if the cond is different from oldCondition. If the timestamps are null, then this ignores those for comparison and also fills them with defaults. If oldCondition is null, it considers it a new condition. "cond" will be mutated with the timestamps.

func FillNewConditions

func FillNewConditions(c clock.Clock, existingConditions, newConditions []cond_v1.Condition) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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