Documentation ¶
Index ¶
- Constants
- func ComponentOverrideFromProvider(daemonSetName string, provider string) v2alpha1.DatadogAgentComponentOverride
- func DetermineProvider(labels map[string]string) string
- func GetAgentNameWithProvider(dsName, provider string, overrideName *string) string
- func GetProviderLabelKeyValue(provider string) (string, string)
- func ObjectFromKind(kind ObjectKind, platformInfo PlatformInfo) client.Object
- func ObjectListFromKind(kind ObjectKind, platformInfo PlatformInfo) client.ObjectList
- func UpdateFromObject(ctx context.Context, c client.Client, newObject client.Object, ...) error
- type ObjectKind
- type PlatformInfo
- func (platformInfo *PlatformInfo) CreatePDBObject() client.Object
- func (platformInfo *PlatformInfo) CreatePDBObjectList() client.ObjectList
- func (platformInfo *PlatformInfo) GetAgentResourcesKind(withCiliumResources bool) []ObjectKind
- func (platformInfo *PlatformInfo) GetApiVersions(name string) (preferred string, other string)
- func (platformInfo *PlatformInfo) IsResourceSupported(resource string) bool
- func (platformInfo *PlatformInfo) UseV1Beta1PDB() bool
- type ProviderStore
- func (p *ProviderStore) GenerateProviderNodeAffinity(provider string) []corev1.NodeSelectorRequirement
- func (p *ProviderStore) GetProviders() *map[string]struct{}
- func (p *ProviderStore) IsPresent(provider string) bool
- func (p *ProviderStore) Reset(providersList map[string]struct{}) map[string]struct{}
Constants ¶
const ( // AppKubernetesNameLabelKey The name of the application AppKubernetesNameLabelKey = "app.kubernetes.io/name" // AppKubernetesInstanceLabelKey A unique name identifying the instance of an application AppKubernetesInstanceLabelKey = "app.kubernetes.io/instance" // AppKubernetesVersionLabelKey The current version of the application AppKubernetesVersionLabelKey = "app.kubernetes.io/version" // AppKubernetesComponentLabelKey The component within the architecture AppKubernetesComponentLabelKey = "app.kubernetes.io/component" // AppKubernetesPartOfLabelKey The name of a higher level application this one is part of AppKubernetesPartOfLabelKey = "app.kubernetes.io/part-of" // AppKubernetesManageByLabelKey The tool being used to manage the operation of an application AppKubernetesManageByLabelKey = "app.kubernetes.io/managed-by" )
const ( // ConfigMapKind ConfigMaps resource kind ConfigMapKind ObjectKind = "configmaps" // ClusterRolesKind ClusterRoles resource kind ClusterRolesKind = "clusterroles" // ClusterRoleBindingKind ClusterRoleBindings resource kind ClusterRoleBindingKind = "clusterrolebindings" // RolesKind Roles resource kind RolesKind = "roles" // RoleBindingKind RoleBinding resource kind RoleBindingKind = "rolebindings" // MutatingWebhookConfigurationsKind MutatingWebhookConfigurations resource kind MutatingWebhookConfigurationsKind = "mutatingwebhookconfigurations" // APIServiceKind APIService resource kind APIServiceKind = "apiservices" // SecretsKind Secrets resource kind SecretsKind = "secrets" // ServicesKind Services resource kind ServicesKind = "services" // ServiceAccountsKind ServiceAccounts resource kind ServiceAccountsKind = "serviceaccounts" // PodDisruptionBudgetsKind PodDisruptionBudgets resource kind PodDisruptionBudgetsKind = "poddisruptionbudgets" // NetworkPoliciesKind NetworkPolicies resource kind NetworkPoliciesKind = "networkpolicies" // PodSecurityPoliciesKind PodSecurityPolicies resource kind PodSecurityPoliciesKind = "podsecuritypolicies" // CiliumNetworkPoliciesKind CiliumNetworkPolicies resource kind CiliumNetworkPoliciesKind = "ciliumnetworkpolicies" )
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(daemonSetName string, provider string) v2alpha1.DatadogAgentComponentOverride
ComponentOverrideFromProvider generates a componentOverride with an override for a provider-specific agent name
func DetermineProvider ¶ added in v1.4.0
DetermineProvider creates a Provider based on a map of labels
func GetAgentNameWithProvider ¶ added in v1.4.0
GetAgentNameWithProvider returns the agent name based on the ds name, provider, and component override settings
func GetProviderLabelKeyValue ¶ added in v1.4.0
GetProviderLabelKeyValue gets the corresponding cloud provider label key and value from a provider name
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
Types ¶
type ObjectKind ¶ added in v1.0.0
type ObjectKind string
ObjectKind type for kubernetes resource kind.
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) 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
type ProviderStore ¶ added in v1.4.0
type ProviderStore struct {
// contains filtered or unexported fields
}
func NewProviderStore ¶ added in v1.4.0
func NewProviderStore(log logr.Logger) ProviderStore
NewProviderStore generates an empty ProviderStore instance
func (*ProviderStore) GenerateProviderNodeAffinity ¶ added in v1.4.0
func (p *ProviderStore) GenerateProviderNodeAffinity(provider string) []corev1.NodeSelectorRequirement
GenerateProviderNodeAffinity creates NodeSelectorTerms based on the provider
func (*ProviderStore) GetProviders ¶ added in v1.4.0
func (p *ProviderStore) GetProviders() *map[string]struct{}
GetProviders gets a list of providers
func (*ProviderStore) IsPresent ¶ added in v1.4.0
func (p *ProviderStore) IsPresent(provider string) bool
IsPresent returns whether the given provider exists in the provider store
func (*ProviderStore) Reset ¶ added in v1.4.0
func (p *ProviderStore) Reset(providersList map[string]struct{}) map[string]struct{}
Reset overwrites all providers in the provider store given a list of providers