kubernetes

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppKubernetesComponentLabelKey is the key for the component within the architecture
	AppKubernetesComponentLabelKey = "app.kubernetes.io/component"
	// AppKubernetesInstanceLabelKey is the key for a unique name identifying the instance of an application
	AppKubernetesInstanceLabelKey = "app.kubernetes.io/instance"
	// AppKubernetesManageByLabelKey is the key for the tool being used to manage the operation of an application
	AppKubernetesManageByLabelKey = "app.kubernetes.io/managed-by"
	// AppKubernetesNameLabelKey is the key for the name of the application
	AppKubernetesNameLabelKey = "app.kubernetes.io/name"
	// AppKubernetesPartOfLabelKey is the key for the name of a higher level application this one is part of
	AppKubernetesPartOfLabelKey = "app.kubernetes.io/part-of"
	// AppKubernetesVersionLabelKey is the key for the current version of the application
	AppKubernetesVersionLabelKey = "app.kubernetes.io/version"
)
View Source
const (
	// APIServiceKind is the APIService resource kind
	APIServiceKind = "apiservices"
	// CiliumNetworkPoliciesKind is the CiliumNetworkPolicies resource kind
	CiliumNetworkPoliciesKind = "ciliumnetworkpolicies"
	// ClusterRolesKind is the ClusterRoles resource kind
	ClusterRolesKind = "clusterroles"
	// ClusterRoleBindingKind is the ClusterRoleBindings resource kind
	ClusterRoleBindingKind = "clusterrolebindings"
	// ConfigMapKind is the ConfigMaps resource kind
	ConfigMapKind ObjectKind = "configmaps"
	// MutatingWebhookConfigurationsKind is the MutatingWebhookConfigurations resource kind
	MutatingWebhookConfigurationsKind = "mutatingwebhookconfigurations"
	// NetworkPoliciesKind is the NetworkPolicies resource kind
	NetworkPoliciesKind = "networkpolicies"
	// NodeKind is the Nodes resource kind
	NodeKind = "nodes"
	// PodDisruptionBudgetsKind is the PodDisruptionBudgets resource kind
	PodDisruptionBudgetsKind = "poddisruptionbudgets"
	// PodSecurityPoliciesKind is the PodSecurityPolicies resource kind
	PodSecurityPoliciesKind = "podsecuritypolicies"
	// RoleBindingKind is the RoleBinding resource kind
	RoleBindingKind = "rolebindings"
	// RolesKind is the Roles resource kind
	RolesKind = "roles"
	// SecretsKind is the Secrets resource kind
	SecretsKind = "secrets"
	// ServiceAccountsKind is the ServiceAccounts resource kind
	ServiceAccountsKind = "serviceaccounts"
	// ServicesKind is the Services resource kind
	ServicesKind = "services"
	// ValidatingWebhookConfigurationsKind is the ValidatingWebhookConfigurations resource kind
	ValidatingWebhookConfigurationsKind = "validatingwebhookconfigurations"
)
View Source
const (
	// ExtendedDaemonSetKind is the ExtendedDaemonset resource kind
	ExtendedDaemonSetKind = "extendeddaemonset"
	// DaemonSetKind is the Daemonset resource kind
	DaemonSetKind = "daemonset"
	// DeploymentKind is the Deployment resource kind
	DeploymentKind = "deployment"
)

These constants are used in Datadog event submission

View Source
const (
	// LegacyProvider Legacy Provider (empty name)
	LegacyProvider = ""
	// DefaultProvider Default provider name
	DefaultProvider = "default"

	// GKE provider types: https://cloud.google.com/kubernetes-engine/docs/concepts/node-images#available_node_images
	// GKECosType is the Container-Optimized OS node image offered by GKE
	GKECosType = "cos"

	// GKECloudProvider GKE CloudProvider name
	GKECloudProvider = "gke"

	// GKEProviderLabel is the GKE node label used to determine the node's provider
	GKEProviderLabel = "cloud.google.com/gke-os-distribution"
)

Variables

This section is empty.

Functions

func ComponentOverrideFromProvider added in v1.4.0

func ComponentOverrideFromProvider(overrideName, provider string, providerList map[string]struct{}) v2alpha1.DatadogAgentComponentOverride

ComponentOverrideFromProvider generates a componentOverride with overrides for the DatadogAgent name, provider, and label

func GetAgentNameWithProvider added in v1.4.0

func GetAgentNameWithProvider(overrideDSName, provider string) string

GetAgentNameWithProvider returns the agent name based on the ds name and provider

func GetProviderLabelKeyValue added in v1.4.0

func GetProviderLabelKeyValue(provider string) (string, string)

GetProviderLabelKeyValue gets the corresponding cloud provider label key and value from a provider name

func GetProviderListFromNodeList added in v1.5.0

func GetProviderListFromNodeList(nodeList []corev1.Node, logger logr.Logger) map[string]struct{}

GetProviderListFromNodeList generates a list of providers given a list of nodes

func ObjectFromKind added in v1.0.0

func ObjectFromKind(kind ObjectKind, platformInfo PlatformInfo) client.Object

ObjectFromKind returns the corresponding object list from a kind

func ObjectListFromKind added in v1.0.0

func ObjectListFromKind(kind ObjectKind, platformInfo PlatformInfo) client.ObjectList

ObjectListFromKind returns the corresponding object list from a kind

func UpdateFromObject added in v0.8.0

func UpdateFromObject(ctx context.Context, c client.Client, newObject client.Object, oldMeta metav1.ObjectMeta) error

UpdateFromObject performs an update and forces previous ResourceVersion to be set

Types

type ObjectKind added in v1.0.0

type ObjectKind string

They are also used in the store for DatadogAgent dependencies.

type PlatformInfo added in v1.0.0

type PlatformInfo struct {
	// contains filtered or unexported fields
}

func NewPlatformInfo added in v1.0.0

func NewPlatformInfo(versionInfo *version.Info, groups []*v1.APIGroup, resources []*v1.APIResourceList) PlatformInfo

func NewPlatformInfoFromVersionMaps added in v1.0.0

func NewPlatformInfoFromVersionMaps(versionInfo *version.Info, apiPreferredVersions, apiOtherVersions map[string]string) PlatformInfo

func (*PlatformInfo) CreatePDBObject added in v1.0.0

func (platformInfo *PlatformInfo) CreatePDBObject() client.Object

func (*PlatformInfo) CreatePDBObjectList added in v1.0.0

func (platformInfo *PlatformInfo) CreatePDBObjectList() client.ObjectList

func (*PlatformInfo) GetAgentResourcesKind added in v1.0.0

func (platformInfo *PlatformInfo) GetAgentResourcesKind(withCiliumResources bool) []ObjectKind

func (*PlatformInfo) GetApiVersions added in v1.0.0

func (platformInfo *PlatformInfo) GetApiVersions(name string) (preferred string, other string)

func (*PlatformInfo) GetVersionInfo added in v1.10.0

func (platformInfo *PlatformInfo) GetVersionInfo() *version.Info

func (*PlatformInfo) IsResourceSupported added in v1.0.0

func (platformInfo *PlatformInfo) IsResourceSupported(resource string) bool

IsResourceSupported returns true if a Kubernetes resource is supported by the server

func (*PlatformInfo) UseV1Beta1PDB added in v1.0.0

func (platformInfo *PlatformInfo) UseV1Beta1PDB() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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