dynakube

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Overview

+kubebuilder:object:generate=true +groupName=dynatrace.com +versionName=v1beta1

Index

Constants

View Source
const (
	TrustedCAKey = "certs"
	TlsCertKey   = "server.crt"
)
View Source
const (
	// TokenConditionType identifies the token validity condition.
	TokenConditionType string = "Tokens"

	// APITokenConditionType identifies the API Token validity condition.
	APITokenConditionType string = "APIToken"

	// PaaSTokenConditionType identifies the PaaS Token validity condition.
	PaaSTokenConditionType string = "PaaSToken"

	// DataIngestTokenConditionType identifies the DataIngest Token validity condition.
	DataIngestTokenConditionType string = "DataIngestToken"
)

TODO: Move these conditions related consts to a place where they are used, so we don't bloat this package further.

View Source
const (
	// ReasonTokenReady is set when a token has passed verifications.
	ReasonTokenReady string = "TokenReady"

	// ReasonTokenError is set when an unknown error has been found when verifying the token.
	ReasonTokenError string = "TokenError"
)

Possible reasons for ApiToken and PaaSToken conditions.

View Source
const (
	AnnotationFeaturePrefix = "feature.dynatrace.com/"

	// General.
	AnnotationFeaturePublicRegistry = AnnotationFeaturePrefix + "public-registry"

	// Deprecated: AnnotationFeatureDisableActiveGateUpdates use AnnotationFeatureActiveGateUpdates instead.
	AnnotationFeatureDisableActiveGateUpdates = AnnotationFeaturePrefix + "disable-activegate-updates"

	AnnotationFeatureActiveGateUpdates = AnnotationFeaturePrefix + "activegate-updates"

	AnnotationFeatureActiveGateAppArmor                   = AnnotationFeaturePrefix + "activegate-apparmor"
	AnnotationFeatureAutomaticK8sApiMonitoring            = AnnotationFeaturePrefix + "automatic-kubernetes-api-monitoring"
	AnnotationFeatureAutomaticK8sApiMonitoringClusterName = AnnotationFeaturePrefix + "automatic-kubernetes-api-monitoring-cluster-name"
	AnnotationFeatureK8sAppEnabled                        = AnnotationFeaturePrefix + "k8s-app-enabled"
	AnnotationFeatureActiveGateIgnoreProxy                = AnnotationFeaturePrefix + "activegate-ignore-proxy"

	AnnotationFeatureNoProxy             = AnnotationFeaturePrefix + "no-proxy"
	AnnotationFeatureApiRequestThreshold = AnnotationFeaturePrefix + "dynatrace-api-request-threshold"

	AnnotationFeatureMultipleOsAgentsOnNode         = AnnotationFeaturePrefix + "multiple-osagents-on-node"
	AnnotationFeatureOneAgentMaxUnavailable         = AnnotationFeaturePrefix + "oneagent-max-unavailable"
	AnnotationFeatureOneAgentIgnoreProxy            = AnnotationFeaturePrefix + "oneagent-ignore-proxy"
	AnnotationFeatureOneAgentInitialConnectRetry    = AnnotationFeaturePrefix + "oneagent-initial-connect-retry-ms"
	AnnotationFeatureRunOneAgentContainerPrivileged = AnnotationFeaturePrefix + "oneagent-privileged"
	AnnotationFeatureOneAgentSecCompProfile         = AnnotationFeaturePrefix + "oneagent-seccomp-profile"

	// Deprecated: AnnotationFeatureDisableMetadataEnrichment use AnnotationFeatureMetadataEnrichment instead.
	AnnotationFeatureDisableMetadataEnrichment = AnnotationFeaturePrefix + "disable-metadata-enrichment"

	AnnotationFeatureMetadataEnrichment = AnnotationFeaturePrefix + "metadata-enrichment"

	AnnotationFeatureIgnoreUnknownState    = AnnotationFeaturePrefix + "ignore-unknown-state"
	AnnotationFeatureIgnoredNamespaces     = AnnotationFeaturePrefix + "ignored-namespaces"
	AnnotationFeatureAutomaticInjection    = AnnotationFeaturePrefix + "automatic-injection"
	AnnotationFeatureLabelVersionDetection = AnnotationFeaturePrefix + "label-version-detection"
	AnnotationInjectionFailurePolicy       = AnnotationFeaturePrefix + "injection-failure-policy"
	AnnotationFeatureInitContainerSeccomp  = AnnotationFeaturePrefix + "init-container-seccomp-profile"
	AnnotationFeatureEnforcementMode       = AnnotationFeaturePrefix + "enforcement-mode"

	// CSI.
	AnnotationFeatureMaxFailedCsiMountAttempts = AnnotationFeaturePrefix + "max-csi-mount-attempts"
	AnnotationFeatureReadOnlyCsiVolume         = AnnotationFeaturePrefix + "injection-readonly-volume"
)
View Source
const (
	DefaultMaxFailedCsiMountAttempts        = 10
	DefaultMinRequestThresholdMinutes       = 15
	IstioDefaultOneAgentInitialConnectRetry = 6000
)
View Source
const (
	// MaxNameLength is the maximum length of a DynaKube's name, we tend to add suffixes to the name to avoid name collisions for resources related to the DynaKube. (example: dkName-activegate-<some-hash>)
	// The limit is necessary because kubernetes uses the name of some resources (ActiveGate StatefulSet) for the label value, which has a limit of 63 characters. (see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set)
	MaxNameLength = 40

	// PullSecretSuffix is the suffix appended to the DynaKube name to n.
	PullSecretSuffix                        = "-pull-secret"
	ActiveGateTenantSecretSuffix            = "-activegate-tenant-secret"
	OneAgentTenantSecretSuffix              = "-oneagent-tenant-secret"
	OneAgentConnectionInfoConfigMapSuffix   = "-oneagent-connection-info"
	ActiveGateConnectionInfoConfigMapSuffix = "-activegate-connection-info"
	AuthTokenSecretSuffix                   = "-activegate-authtoken-secret"
	PodNameOsAgent                          = "oneagent"

	DefaultActiveGateImageRegistrySubPath = "/linux/activegate"
	DefaultOneAgentImageRegistrySubPath   = "/linux/oneagent"
)
View Source
const (
	ProxyKey   = "proxy"
	NoProxyKey = "noProxy"
)
View Source
const InternalFlagPrefix = "internal.operator.dynatrace.com/"

Variables

View Source
var (
	RoutingCapability = ActiveGateCapability{
		DisplayName:  "routing",
		ShortName:    "routing",
		ArgumentName: "MSGrouter",
	}

	KubeMonCapability = ActiveGateCapability{
		DisplayName:  "kubernetes-monitoring",
		ShortName:    "kubemon",
		ArgumentName: "kubernetes_monitoring",
	}

	MetricsIngestCapability = ActiveGateCapability{
		DisplayName:  "metrics-ingest",
		ShortName:    "metrics-ingest",
		ArgumentName: "metrics_ingest",
	}

	DynatraceApiCapability = ActiveGateCapability{
		DisplayName:  "dynatrace-api",
		ShortName:    "dynatrace-api",
		ArgumentName: "restInterface",
	}
)
View Source
var ActiveGateDisplayNames = map[CapabilityDisplayName]struct{}{
	RoutingCapability.DisplayName:       {},
	KubeMonCapability.DisplayName:       {},
	MetricsIngestCapability.DisplayName: {},
	DynatraceApiCapability.DisplayName:  {},
}

Functions

func FlagsWithPrefix

func FlagsWithPrefix(obj metav1.Object, prefix string) map[string]string

func GetCacheValidMessage

func GetCacheValidMessage(functionName string, lastRequestTimestamp metav1.Time, timeout time.Duration) string

func InternalFlags

func InternalFlags(obj metav1.Object) map[string]string

func IsInternalFlagsEqual

func IsInternalFlagsEqual(obj1, obj2 metav1.Object) bool

Types

type ActiveGateCapability

type ActiveGateCapability struct {

	// The name of the capability known by the user, mainly used in the CR
	DisplayName CapabilityDisplayName

	// The name used for marking the pod for given capability
	ShortName string

	// The string passed to the active gate image to enable a given capability
	ArgumentName string
}

func (*ActiveGateCapability) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveGateCapability.

func (*ActiveGateCapability) DeepCopyInto

func (in *ActiveGateCapability) DeepCopyInto(out *ActiveGateCapability)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActiveGateConnectionInfoStatus

type ActiveGateConnectionInfoStatus struct {
	// Information about Active Gate's connections
	ConnectionInfoStatus `json:",inline"`
}

func (*ActiveGateConnectionInfoStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveGateConnectionInfoStatus.

func (*ActiveGateConnectionInfoStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActiveGateSpec

type ActiveGateSpec struct {

	// Adds additional annotations to the ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Annotations",order=27,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Annotations map[string]string `json:"annotations,omitempty"`

	// The name of a secret containing ActiveGate TLS cert+key and password. If not set, self-signed certificate is used.
	// server.p12: certificate+key pair in pkcs12 format
	// password: passphrase to read server.p12
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="TlsSecretName",order=10,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	TlsSecretName string `json:"tlsSecretName,omitempty"`

	// Sets DNS Policy for the ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="DNS Policy",order=24,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// If specified, indicates the pod's priority. Name must be defined by creating a PriorityClass object with that
	// name. If not specified the setting will be removed from the StatefulSet.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Priority Class name",order=23,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:PriorityClass"}
	PriorityClassName string `json:"priorityClassName,omitempty"`

	CapabilityProperties `json:",inline"`

	// Activegate capabilities enabled (routing, kubernetes-monitoring, metrics-ingest, dynatrace-api)
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Capabilities",order=10,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Capabilities []CapabilityDisplayName `json:"capabilities,omitempty"`
}

func (*ActiveGateSpec) DeepCopy

func (in *ActiveGateSpec) DeepCopy() *ActiveGateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveGateSpec.

func (*ActiveGateSpec) DeepCopyInto

func (in *ActiveGateSpec) DeepCopyInto(out *ActiveGateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ActiveGateStatus

type ActiveGateStatus struct {
	status.VersionStatus `json:",inline"`

	// Information about Active Gate's connections
	ConnectionInfoStatus ActiveGateConnectionInfoStatus `json:"connectionInfoStatus,omitempty"`

	// The ClusterIPs set by Kubernetes on the ActiveGate Service created by the Operator
	ServiceIPs []string `json:"serviceIPs,omitempty"`
}

func (*ActiveGateStatus) DeepCopy

func (in *ActiveGateStatus) DeepCopy() *ActiveGateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveGateStatus.

func (*ActiveGateStatus) DeepCopyInto

func (in *ActiveGateStatus) DeepCopyInto(out *ActiveGateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AppInjectionSpec

type AppInjectionSpec struct {

	// Define resources requests and limits for the initContainer. For details, see Managing resources for containers
	// (https://kubernetes.io/docs/concepts/configuration/manage-resources-containers).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",order=15,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	InitResources *corev1.ResourceRequirements `json:"initResources,omitempty"`

	// The OneAgent image that is used to inject into Pods.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="CodeModulesImage",order=12,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	CodeModulesImage string `json:"codeModulesImage,omitempty"`
}

func (*AppInjectionSpec) DeepCopy

func (in *AppInjectionSpec) DeepCopy() *AppInjectionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppInjectionSpec.

func (*AppInjectionSpec) DeepCopyInto

func (in *AppInjectionSpec) DeepCopyInto(out *AppInjectionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ApplicationMonitoringSpec

type ApplicationMonitoringSpec struct {
	AppInjectionSpec `json:",inline"`

	// Set if you want to use the CSIDriver. Don't enable it if you do not have access to Kubernetes nodes or if you lack privileges.
	// +optional
	UseCSIDriver *bool `json:"useCSIDriver,omitempty"`

	// The OneAgent version to be used.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent version",order=11,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Version string `json:"version,omitempty"`
}

func (*ApplicationMonitoringSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationMonitoringSpec.

func (*ApplicationMonitoringSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CapabilityDisplayName

type CapabilityDisplayName string

type CapabilityProperties

type CapabilityProperties struct {
	// Amount of replicas for your ActiveGates
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Replicas",order=30,xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	Replicas *int32 `json:"replicas,omitempty"`

	// The ActiveGate container image. Defaults to the latest ActiveGate image provided by the registry on the tenant
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Image",order=10,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Image string `json:"image,omitempty"`

	// Set activation group for ActiveGate
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Activation group",order=31,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Group string `json:"group,omitempty"`

	// Add a custom properties file by providing it as a value or reference it from a secret
	// +optional
	// If referenced from a secret, make sure the key is called 'customProperties'
	CustomProperties *DynaKubeValueSource `json:"customProperties,omitempty"`

	// Define resources requests and limits for single ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",order=34,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Node selector to control the selection of nodes
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Node Selector",order=35,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:Node"
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Set tolerations for the ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Tolerations",order=36,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Adds additional labels for the ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Labels",order=37,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Labels map[string]string `json:"labels,omitempty"`

	// List of environment variables to set for the ActiveGate
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Environment variables",order=39,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Environment variables"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:advanced,urn:alm:descriptor:com.tectonic.ui:text"
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Adds TopologySpreadConstraints for the ActiveGate pods
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="topologySpreadConstraints",order=40,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

CapabilityProperties is a struct which can be embedded by ActiveGate capabilities Such as KubernetesMonitoring or Routing It encapsulates common properties.

func (*CapabilityProperties) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityProperties.

func (*CapabilityProperties) DeepCopyInto

func (in *CapabilityProperties) DeepCopyInto(out *CapabilityProperties)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudNativeFullStackSpec

type CloudNativeFullStackSpec struct {
	AppInjectionSpec `json:",inline"`
	HostInjectSpec   `json:",inline"`
}

func (*CloudNativeFullStackSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudNativeFullStackSpec.

func (*CloudNativeFullStackSpec) DeepCopyInto

func (in *CloudNativeFullStackSpec) DeepCopyInto(out *CloudNativeFullStackSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CodeModulesStatus

type CodeModulesStatus struct {
	status.VersionStatus `json:",inline"`
}

func (*CodeModulesStatus) DeepCopy

func (in *CodeModulesStatus) DeepCopy() *CodeModulesStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CodeModulesStatus.

func (*CodeModulesStatus) DeepCopyInto

func (in *CodeModulesStatus) DeepCopyInto(out *CodeModulesStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CommunicationHostStatus

type CommunicationHostStatus struct {
	// Connection protocol
	Protocol string `json:"protocol,omitempty"`

	// Host domain
	Host string `json:"host,omitempty"`

	// Connection port
	Port uint32 `json:"port,omitempty"`
}

func (*CommunicationHostStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommunicationHostStatus.

func (*CommunicationHostStatus) DeepCopyInto

func (in *CommunicationHostStatus) DeepCopyInto(out *CommunicationHostStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConnectionInfoStatus

type ConnectionInfoStatus struct {

	// Time of the last connection request
	LastRequest metav1.Time `json:"lastRequest,omitempty"`
	// UUID of the tenant, received from the tenant
	TenantUUID string `json:"tenantUUID,omitempty"`

	// Available connection endpoints
	Endpoints string `json:"endpoints,omitempty"`
}

func (*ConnectionInfoStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionInfoStatus.

func (*ConnectionInfoStatus) DeepCopyInto

func (in *ConnectionInfoStatus) DeepCopyInto(out *ConnectionInfoStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynaKube

type DynaKube struct {
	metav1.TypeMeta `json:",inline"`

	Status            DynaKubeStatus `json:"status,omitempty"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec DynaKubeSpec `json:"spec,omitempty"`
}

DynaKube is the Schema for the DynaKube API +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=dynakubes,scope=Namespaced,categories=dynatrace,shortName={dk,dks} +kubebuilder:printcolumn:name="ApiUrl",type=string,JSONPath=`.spec.apiUrl` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +operator-sdk:csv:customresourcedefinitions:displayName="Dynatrace DynaKube" +operator-sdk:csv:customresourcedefinitions:resources={{StatefulSet,v1,},{DaemonSet,v1,},{Pod,v1,}}

func (*DynaKube) ActiveGateAuthTokenSecret

func (dk *DynaKube) ActiveGateAuthTokenSecret() string

ActiveGateAuthTokenSecret returns the name of the secret containing the ActiveGateAuthToken, which is mounted to the AGs.

func (*DynaKube) ActiveGateConnectionInfoConfigMapName

func (dk *DynaKube) ActiveGateConnectionInfoConfigMapName() string

func (*DynaKube) ActiveGateImage

func (dk *DynaKube) ActiveGateImage() string

ActiveGateImage provides the image reference set in Status for the ActiveGate. Format: repo@sha256:digest.

func (*DynaKube) ActiveGateMode

func (dk *DynaKube) ActiveGateMode() bool

func (*DynaKube) ActiveGateServiceAccountName

func (dk *DynaKube) ActiveGateServiceAccountName() string

func (*DynaKube) ActiveGateServiceAccountOwner

func (dk *DynaKube) ActiveGateServiceAccountOwner() string

func (*DynaKube) ActiveGateTlsCert

func (dk *DynaKube) ActiveGateTlsCert(ctx context.Context, kubeReader client.Reader) ([]byte, error)

func (*DynaKube) ActiveGateVersion added in v1.1.0

func (dk *DynaKube) ActiveGateVersion() string

ActiveGateVersion provides version set in Status for the ActiveGate.

func (*DynaKube) ActivegateTenantSecret

func (dk *DynaKube) ActivegateTenantSecret() string

ActivegateTenantSecret returns the name of the secret containing tenant UUID, token and communication endpoints for ActiveGate.

func (*DynaKube) ApiUrl

func (dk *DynaKube) ApiUrl() string

ApiUrl is a getter for dk.Spec.APIURL.

func (*DynaKube) ApiUrlHost

func (dk *DynaKube) ApiUrlHost() string

ApiUrlHost returns the host of dk.Spec.APIURL E.g. if the APIURL is set to "https://my-tenant.dynatrace.com/api", it returns "my-tenant.dynatrace.com" If the URL cannot be parsed, it returns an empty string.

func (*DynaKube) ApplicationMonitoringMode

func (dk *DynaKube) ApplicationMonitoringMode() bool

ApplicationMonitoringMode returns true when application only section is used.

func (*DynaKube) ClassicFullStackMode

func (dk *DynaKube) ClassicFullStackMode() bool

ClassicFullStackMode returns true when classic fullstack section is used.

func (*DynaKube) CloudNativeFullstackMode

func (dk *DynaKube) CloudNativeFullstackMode() bool

CloudNativeFullstackMode returns true when cloud native fullstack section is used.

func (*DynaKube) CodeModulesImage

func (dk *DynaKube) CodeModulesImage() string

CodeModulesImage provides the image reference set in Status for the CodeModules. Format: repo@sha256:digest.

func (*DynaKube) CodeModulesVersion

func (dk *DynaKube) CodeModulesVersion() string

CodeModulesVersion provides version set in Status for the CodeModules.

func (*DynaKube) Conditions added in v1.1.0

func (dk *DynaKube) Conditions() *[]metav1.Condition

func (*DynaKube) ConvertFrom

func (dst *DynaKube) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts v1beta2 to v1beta1.

func (*DynaKube) ConvertTo

func (src *DynaKube) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts v1beta1 to v1beta2.

func (*DynaKube) CustomActiveGateImage

func (dk *DynaKube) CustomActiveGateImage() string

CustomActiveGateImage provides the image reference for the ActiveGate provided in the Spec.

func (*DynaKube) CustomCodeModulesImage

func (dk *DynaKube) CustomCodeModulesImage() string

CustomCodeModulesImage provides the image reference for the CodeModules provided in the Spec.

func (*DynaKube) CustomCodeModulesVersion

func (dk *DynaKube) CustomCodeModulesVersion() string

CustomCodeModulesVersion provides the version for the CodeModules provided in the Spec.

func (*DynaKube) CustomOneAgentImage

func (dk *DynaKube) CustomOneAgentImage() string

CustomOneAgentImage provides the image reference for the OneAgent provided in the Spec.

func (*DynaKube) CustomOneAgentVersion

func (dk *DynaKube) CustomOneAgentVersion() string

CustomOneAgentVersion provides the version for the OneAgent provided in the Spec.

func (*DynaKube) DeepCopy

func (in *DynaKube) DeepCopy() *DynaKube

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKube.

func (*DynaKube) DeepCopyInto

func (in *DynaKube) DeepCopyInto(out *DynaKube)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DynaKube) DeepCopyObject

func (in *DynaKube) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DynaKube) DefaultActiveGateImage

func (dk *DynaKube) DefaultActiveGateImage(version string) string

DefaultActiveGateImage provides the image reference for the ActiveGate from tenant registry. Format: repo:tag.

func (*DynaKube) DefaultOneAgentImage

func (dk *DynaKube) DefaultOneAgentImage(version string) string

DefaultOneAgentImage provides the image reference for the OneAgent from tenant registry.

func (*DynaKube) DeprecatedActiveGateMode

func (dk *DynaKube) DeprecatedActiveGateMode() bool

func (*DynaKube) FeatureActiveGateAppArmor

func (dk *DynaKube) FeatureActiveGateAppArmor() bool

FeatureActiveGateAppArmor is a feature flag to enable AppArmor in ActiveGate container.

func (*DynaKube) FeatureActiveGateIgnoreProxy

func (dk *DynaKube) FeatureActiveGateIgnoreProxy() bool

FeatureActiveGateIgnoreProxy is a feature flag to ignore the proxy for ActiveGate when set in CR.

func (*DynaKube) FeatureAgentInitialConnectRetry

func (dk *DynaKube) FeatureAgentInitialConnectRetry() int

FeatureAgentInitialConnectRetry is a feature flag to configure startup delay of standalone agents.

func (*DynaKube) FeatureApiRequestThreshold

func (dk *DynaKube) FeatureApiRequestThreshold() time.Duration

func (*DynaKube) FeatureAutomaticInjection

func (dk *DynaKube) FeatureAutomaticInjection() bool

FeatureAutomaticInjection controls OneAgent is injected to pods in selected namespaces automatically ("automatic-injection=true" or flag not set) or if pods need to be opted-in one by one ("automatic-injection=false").

func (*DynaKube) FeatureAutomaticKubernetesApiMonitoring

func (dk *DynaKube) FeatureAutomaticKubernetesApiMonitoring() bool

FeatureAutomaticKubernetesApiMonitoring is a feature flag to enable automatic kubernetes api monitoring, which ensures that settings for this kubernetes cluster exist in Dynatrace.

func (*DynaKube) FeatureAutomaticKubernetesApiMonitoringClusterName

func (dk *DynaKube) FeatureAutomaticKubernetesApiMonitoringClusterName() string

FeatureAutomaticKubernetesApiMonitoringClusterName is a feature flag to set custom cluster name for automatic-kubernetes-api-monitoring.

func (*DynaKube) FeatureDisableActiveGateUpdates

func (dk *DynaKube) FeatureDisableActiveGateUpdates() bool

FeatureDisableActiveGateUpdates is a feature flag to disable ActiveGate updates.

func (*DynaKube) FeatureDisableMetadataEnrichment

func (dk *DynaKube) FeatureDisableMetadataEnrichment() bool

FeatureDisableMetadataEnrichment is a feature flag to disable metadata enrichment,.

func (*DynaKube) FeatureEnableK8sAppEnabled

func (dk *DynaKube) FeatureEnableK8sAppEnabled() bool

FeatureEnableK8sAppEnabled is a feature flag to enable automatically enable current Kubernetes cluster for the Kubernetes app.

func (*DynaKube) FeatureEnableMultipleOsAgentsOnNode

func (dk *DynaKube) FeatureEnableMultipleOsAgentsOnNode() bool

FeatureEnableMultipleOsAgentsOnNode is a feature flag to enable multiple osagents running on the same host.

func (*DynaKube) FeatureEnforcementMode

func (dk *DynaKube) FeatureEnforcementMode() bool

FeatureEnforcementMode is a feature flag to control how the initContainer sets the tenantUUID to the container.conf file (always vs if oneAgent is present).

func (*DynaKube) FeatureIgnoreUnknownState

func (dk *DynaKube) FeatureIgnoreUnknownState() bool

FeatureIgnoreUnknownState is a feature flag that makes the operator inject into applications even when the dynakube is in an UNKNOWN state, this may cause extra host to appear in the tenant for each process.

func (*DynaKube) FeatureIgnoredNamespaces

func (dk *DynaKube) FeatureIgnoredNamespaces() []string

FeatureIgnoredNamespaces is a feature flag for ignoring certain namespaces. defaults to "[ \"^dynatrace$\", \"^kube-.*\", \"openshift(-.*)?\" ]".

func (*DynaKube) FeatureInitContainerSeccomp

func (dk *DynaKube) FeatureInitContainerSeccomp() bool

func (*DynaKube) FeatureInjectionFailurePolicy

func (dk *DynaKube) FeatureInjectionFailurePolicy() string

func (*DynaKube) FeatureLabelVersionDetection

func (dk *DynaKube) FeatureLabelVersionDetection() bool

FeatureLabelVersionDetection is a feature flag to enable injecting additional environment variables based on user labels.

func (*DynaKube) FeatureMaxFailedCsiMountAttempts

func (dk *DynaKube) FeatureMaxFailedCsiMountAttempts() int

func (*DynaKube) FeatureNoProxy

func (dk *DynaKube) FeatureNoProxy() string

FeatureNoProxy is a feature flag to set the NO_PROXY value to be used by the dtClient.

func (*DynaKube) FeatureOneAgentIgnoreProxy

func (dk *DynaKube) FeatureOneAgentIgnoreProxy() bool

FeatureOneAgentIgnoreProxy is a feature flag to ignore the proxy for oneAgents when set in CR.

func (*DynaKube) FeatureOneAgentMaxUnavailable

func (dk *DynaKube) FeatureOneAgentMaxUnavailable() int

FeatureOneAgentMaxUnavailable is a feature flag to configure maxUnavailable on the OneAgent DaemonSets rolling upgrades.

func (*DynaKube) FeatureOneAgentPrivileged

func (dk *DynaKube) FeatureOneAgentPrivileged() bool

func (*DynaKube) FeatureOneAgentSecCompProfile

func (dk *DynaKube) FeatureOneAgentSecCompProfile() string

func (*DynaKube) FeaturePublicRegistry

func (dk *DynaKube) FeaturePublicRegistry() bool

func (*DynaKube) FeatureReadOnlyCsiVolume

func (dk *DynaKube) FeatureReadOnlyCsiVolume() bool

func (*DynaKube) GetOneAgentEnvironment

func (dk *DynaKube) GetOneAgentEnvironment() []corev1.EnvVar

func (*DynaKube) HasActiveGateCaCert

func (dk *DynaKube) HasActiveGateCaCert() bool

func (*DynaKube) HasProxy

func (dk *DynaKube) HasProxy() bool

func (*DynaKube) HostGroup

func (dk *DynaKube) HostGroup() string

func (*DynaKube) HostGroupAsParam added in v1.0.0

func (dk *DynaKube) HostGroupAsParam() string

func (*DynaKube) HostMonitoringMode

func (dk *DynaKube) HostMonitoringMode() bool

HostMonitoringMode returns true when host monitoring section is used.

func (*DynaKube) InitResources

func (dk *DynaKube) InitResources() *corev1.ResourceRequirements

func (*DynaKube) IsActiveGateMode

func (dk *DynaKube) IsActiveGateMode(mode CapabilityDisplayName) bool

func (*DynaKube) IsApiActiveGateEnabled

func (dk *DynaKube) IsApiActiveGateEnabled() bool

func (*DynaKube) IsKubernetesMonitoringActiveGateEnabled

func (dk *DynaKube) IsKubernetesMonitoringActiveGateEnabled() bool

func (*DynaKube) IsMetricsIngestActiveGateEnabled

func (dk *DynaKube) IsMetricsIngestActiveGateEnabled() bool

func (*DynaKube) IsOneAgentCommunicationRouteClear

func (dk *DynaKube) IsOneAgentCommunicationRouteClear() bool

func (*DynaKube) IsRoutingActiveGateEnabled

func (dk *DynaKube) IsRoutingActiveGateEnabled() bool

func (*DynaKube) IsTokenScopeVerificationAllowed

func (dk *DynaKube) IsTokenScopeVerificationAllowed(timeProvider *timeprovider.Provider) bool

func (*DynaKube) NamespaceSelector

func (dk *DynaKube) NamespaceSelector() *metav1.LabelSelector

func (*DynaKube) NeedAppInjection

func (dk *DynaKube) NeedAppInjection() bool

func (*DynaKube) NeedsActiveGate

func (dk *DynaKube) NeedsActiveGate() bool

NeedsActiveGate returns true when a feature requires ActiveGate instances.

func (*DynaKube) NeedsActiveGateProxy

func (dk *DynaKube) NeedsActiveGateProxy() bool

func (*DynaKube) NeedsActiveGateService

func (dk *DynaKube) NeedsActiveGateService() bool

func (*DynaKube) NeedsActiveGateServicePorts

func (dk *DynaKube) NeedsActiveGateServicePorts() bool

func (*DynaKube) NeedsCSIDriver

func (dk *DynaKube) NeedsCSIDriver() bool

func (*DynaKube) NeedsOneAgent

func (dk *DynaKube) NeedsOneAgent() bool

NeedsOneAgent returns true when a feature requires OneAgent instances.

func (*DynaKube) NeedsOneAgentPrivileged

func (dk *DynaKube) NeedsOneAgentPrivileged() bool

func (*DynaKube) NeedsOneAgentProbe

func (dk *DynaKube) NeedsOneAgentProbe() bool

func (*DynaKube) NeedsOneAgentProxy

func (dk *DynaKube) NeedsOneAgentProxy() bool

func (*DynaKube) NeedsReadOnlyOneAgents

func (dk *DynaKube) NeedsReadOnlyOneAgents() bool

func (*DynaKube) NodeSelector

func (dk *DynaKube) NodeSelector() map[string]string

func (*DynaKube) OneAgentConnectionInfoConfigMapName

func (dk *DynaKube) OneAgentConnectionInfoConfigMapName() string

func (*DynaKube) OneAgentDaemonsetName

func (dk *DynaKube) OneAgentDaemonsetName() string

func (*DynaKube) OneAgentImage

func (dk *DynaKube) OneAgentImage() string

OneAgentImage provides the image reference set in Status for the OneAgent. Format: repo@sha256:digest.

func (*DynaKube) OneAgentVersion

func (dk *DynaKube) OneAgentVersion() string

OneAgentVersion provides version set in Status for the OneAgent.

func (*DynaKube) OneagentTenantSecret

func (dk *DynaKube) OneagentTenantSecret() string

OneagentTenantSecret returns the name of the secret containing the token for the OneAgent.

func (*DynaKube) Proxy

func (dk *DynaKube) Proxy(ctx context.Context, kubeReader client.Reader) (string, error)

func (*DynaKube) PullSecretName

func (dk *DynaKube) PullSecretName() string

PullSecretName returns the name of the pull secret to be used for immutable images.

func (*DynaKube) PullSecretWithoutData

func (dk *DynaKube) PullSecretWithoutData() corev1.Secret

PullSecretWithoutData returns a secret which can be used to query the actual secrets data from the cluster.

func (*DynaKube) SetupWebhookWithManager

func (r *DynaKube) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*DynaKube) ShouldAutoUpdateOneAgent

func (dk *DynaKube) ShouldAutoUpdateOneAgent() bool

ShouldAutoUpdateOneAgent returns true if the Operator should update OneAgent instances automatically.

func (*DynaKube) TenantUUIDFromApiUrl

func (dk *DynaKube) TenantUUIDFromApiUrl() (string, error)

TenantUUIDFromApiUrl gets the tenantUUID from the ApiUrl present in the struct, if the tenant is aliased then the alias will be returned.

func (*DynaKube) Tokens

func (dk *DynaKube) Tokens() string

Tokens returns the name of the Secret to be used for tokens.

func (*DynaKube) TrustedCAs

func (dk *DynaKube) TrustedCAs(ctx context.Context, kubeReader client.Reader) ([]byte, error)

func (*DynaKube) UpdateStatus added in v1.1.0

func (dk *DynaKube) UpdateStatus(ctx context.Context, client client.Client) error

type DynaKubeList

type DynaKubeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DynaKube `json:"items"`
}

DynaKubeList contains a list of DynaKube +kubebuilder:object:root=true

func (*DynaKubeList) DeepCopy

func (in *DynaKubeList) DeepCopy() *DynaKubeList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKubeList.

func (*DynaKubeList) DeepCopyInto

func (in *DynaKubeList) DeepCopyInto(out *DynaKubeList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DynaKubeList) DeepCopyObject

func (in *DynaKubeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DynaKubeProxy

type DynaKubeProxy struct {
	// Proxy URL. It has preference over ValueFrom.
	// +nullable
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Proxy value",order=32,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Value string `json:"value,omitempty"`

	// Secret containing proxy URL.
	// +nullable
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Proxy secret",order=33,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:Secret"}
	ValueFrom string `json:"valueFrom,omitempty"`
}

func (*DynaKubeProxy) DeepCopy

func (in *DynaKubeProxy) DeepCopy() *DynaKubeProxy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKubeProxy.

func (*DynaKubeProxy) DeepCopyInto

func (in *DynaKubeProxy) DeepCopyInto(out *DynaKubeProxy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynaKubeSpec

type DynaKubeSpec struct {

	// Set custom proxy settings either directly or from a secret with the field proxy.
	// Note: Applies to Dynatrace Operator, ActiveGate, and OneAgents.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Proxy",order=3,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	Proxy *DynaKubeProxy `json:"proxy,omitempty"`

	// General configuration about OneAgent instances.
	// You can't enable more than one module (classicFullStack, cloudNativeFullStack, hostMonitoring, or applicationMonitoring).
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
	OneAgent OneAgentSpec `json:"oneAgent,omitempty"`

	// Dynatrace apiUrl, including the /api path at the end. For SaaS, set YOUR_ENVIRONMENT_ID to your environment ID. For Managed, change the apiUrl address.
	// For instructions on how to determine the environment ID and how to configure the apiUrl address, see Environment ID (https://www.dynatrace.com/support/help/get-started/monitoring-environment/environment-id).
	// +kubebuilder:validation:Required
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="API URL",order=1,xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
	APIURL string `json:"apiUrl"`

	// Name of the secret holding the tokens used for connecting to Dynatrace.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Tenant specific secrets",order=2,xDescriptors="urn:alm:descriptor:io.kubernetes:Secret"
	Tokens string `json:"tokens,omitempty"`

	// Adds custom RootCAs from a configmap. Put the certificate under certs within your configmap.
	// Note: Applies to Dynatrace Operator, OneAgent and ActiveGate.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Trusted CAs",order=6,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:ConfigMap"}
	TrustedCAs string `json:"trustedCAs,omitempty"`

	// Sets a network zone for the OneAgent and ActiveGate pods.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Network Zone",order=7,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	NetworkZone string `json:"networkZone,omitempty"`

	// Defines a custom pull secret in case you use a private registry when pulling images from the Dynatrace environment.
	// To define a custom pull secret and learn about the expected behavior, see Configure customPullSecret
	// (https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring/dto-config-options-k8s#custompullsecret).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Custom PullSecret",order=8,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:Secret"}
	CustomPullSecret string `json:"customPullSecret,omitempty"`

	// General configuration about ActiveGate instances.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="ActiveGate",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
	ActiveGate ActiveGateSpec `json:"activeGate,omitempty"`

	// Applicable only for applicationMonitoring or cloudNativeFullStack configuration types. The namespaces where you want Dynatrace Operator to inject.
	// For more information, see Configure monitoring for namespaces and pods (https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring/dto-config-options-k8s#annotate).
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Namespace Selector",order=17,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:core:v1:Namespace"
	NamespaceSelector metav1.LabelSelector `json:"namespaceSelector,omitempty"`

	// Configuration for Routing
	// +kubebuilder:deprecatedversion:warning="Deprecated property"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Routing"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:text"
	Routing RoutingSpec `json:"routing,omitempty"`

	// Configuration for Kubernetes Monitoring
	// +kubebuilder:deprecatedversion:warning="Deprecated property"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Kubernetes Monitoring"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:text"
	KubernetesMonitoring KubernetesMonitoringSpec `json:"kubernetesMonitoring,omitempty"`

	// Disable certificate check for the connection between Dynatrace Operator and the Dynatrace Cluster.
	// Set to true if you want to skip certification validation checks.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Skip Certificate Check",order=3,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	SkipCertCheck bool `json:"skipCertCheck,omitempty"`

	// When enabled, and if Istio is installed on the Kubernetes environment, Dynatrace Operator will create the corresponding
	// VirtualService and ServiceEntry objects to allow access to the Dynatrace Cluster from the OneAgent or ActiveGate.
	// Disabled by default.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Enable Istio automatic management",order=9,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	EnableIstio bool `json:"enableIstio,omitempty"`
}

DynaKubeSpec defines the desired state of DynaKube +k8s:openapi-gen=true

func (*DynaKubeSpec) DeepCopy

func (in *DynaKubeSpec) DeepCopy() *DynaKubeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKubeSpec.

func (*DynaKubeSpec) DeepCopyInto

func (in *DynaKubeSpec) DeepCopyInto(out *DynaKubeSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynaKubeStatus

type DynaKubeStatus struct {

	// Observed state of OneAgent
	OneAgent OneAgentStatus `json:"oneAgent,omitempty"`

	// Observed state of ActiveGate
	ActiveGate ActiveGateStatus `json:"activeGate,omitempty"`

	// Observed state of Code Modules
	CodeModules CodeModulesStatus `json:"codeModules,omitempty"`

	// UpdatedTimestamp indicates when the instance was last updated
	// +operator-sdk:gen-csv:customresourcedefinitions.statusDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Last Updated"
	// +operator-sdk:gen-csv:customresourcedefinitions.statusDescriptors.x-descriptors="urn:alm:descriptor:text"
	UpdatedTimestamp metav1.Time `json:"updatedTimestamp,omitempty"`

	// Observed state of Dynatrace API
	DynatraceApi DynatraceApiStatus `json:"dynatraceApi,omitempty"`

	// LastTokenProbeTimestamp tracks when the last request for the API token validity was sent
	// +kubebuilder:deprecatedversion:warning="Use DynatraceApiStatus.LastTokenScopeRequest instead"
	LastTokenProbeTimestamp *metav1.Time `json:"lastTokenProbeTimestamp,omitempty"`

	// Defines the current state (Running, Updating, Error, ...)
	Phase status.DeploymentPhase `json:"phase,omitempty"`

	// KubeSystemUUID contains the UUID of the current Kubernetes cluster
	KubeSystemUUID string `json:"kubeSystemUUID,omitempty"`

	// Conditions includes status about the current state of the instance
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

DynaKubeStatus defines the observed state of DynaKube +k8s:openapi-gen=true

func (*DynaKubeStatus) DeepCopy

func (in *DynaKubeStatus) DeepCopy() *DynaKubeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKubeStatus.

func (*DynaKubeStatus) DeepCopyInto

func (in *DynaKubeStatus) DeepCopyInto(out *DynaKubeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DynaKubeStatus) SetPhase

func (dk *DynaKubeStatus) SetPhase(phase status.DeploymentPhase) bool

SetPhase sets the status phase on the DynaKube object.

type DynaKubeValueSource

type DynaKubeValueSource struct {
	// Custom properties value.
	// +nullable
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Custom properties value",order=32,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Value string `json:"value,omitempty"`

	// Custom properties secret.
	// +nullable
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Custom properties secret",order=33,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:Secret"}
	ValueFrom string `json:"valueFrom,omitempty"`
}

func (*DynaKubeValueSource) DeepCopy

func (in *DynaKubeValueSource) DeepCopy() *DynaKubeValueSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynaKubeValueSource.

func (*DynaKubeValueSource) DeepCopyInto

func (in *DynaKubeValueSource) DeepCopyInto(out *DynaKubeValueSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DynatraceApiStatus

type DynatraceApiStatus struct {
	// Time of the last token request
	LastTokenScopeRequest metav1.Time `json:"lastTokenScopeRequest,omitempty"`
}

func (*DynatraceApiStatus) DeepCopy

func (in *DynatraceApiStatus) DeepCopy() *DynatraceApiStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynatraceApiStatus.

func (*DynatraceApiStatus) DeepCopyInto

func (in *DynatraceApiStatus) DeepCopyInto(out *DynatraceApiStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HostInjectSpec

type HostInjectSpec struct {

	// The OneAgent version to be used.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent version",order=11,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Version string `json:"version,omitempty"`

	// Use a custom OneAgent Docker image. Defaults to the image from the Dynatrace cluster.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Image",order=12,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Image string `json:"image,omitempty"`

	// Tolerations to include with the OneAgent DaemonSet. For details, see Taints and Tolerations (https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Tolerations",order=18,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Disables automatic restarts of OneAgent pods in case a new version is available (https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/kubernetes/get-started-with-kubernetes-monitoring#disable-auto).
	// Enabled by default.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Automatically update Agent",order=13,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:booleanSwitch"}
	AutoUpdate *bool `json:"autoUpdate,omitempty"`

	// Set the DNS Policy for OneAgent pods. For details, see Pods DNS Policy (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="DNS Policy",order=24,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// Add custom OneAgent annotations.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Annotations",order=27,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Annotations map[string]string `json:"annotations,omitempty"`

	// Your defined labels for OneAgent pods in order to structure workloads as desired.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Labels",order=26,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	Labels map[string]string `json:"labels,omitempty"`

	// Set additional environment variables for the OneAgent pods.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent environment variable installer arguments",order=22,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Set additional arguments to the OneAgent installer.
	// For available options, see Linux custom installation (https://www.dynatrace.com/support/help/setup-and-configuration/dynatrace-oneagent/installation-and-operation/linux/installation/customize-oneagent-installation-on-linux).
	// For the list of limitations, see Limitations (https://www.dynatrace.com/support/help/setup-and-configuration/setup-on-container-platforms/docker/set-up-dynatrace-oneagent-as-docker-container#limitations).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent installer arguments",order=21,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
	// +listType=set
	Args []string `json:"args,omitempty"`

	// Specify the node selector that controls on which nodes OneAgent will be deployed.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Node Selector",order=17,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:Node"
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Assign a priority class to the OneAgent pods. By default, no class is set.
	// For details, see Pod Priority and Preemption (https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/).
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Priority Class name",order=23,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:io.kubernetes:PriorityClass"}
	PriorityClassName string `json:"priorityClassName,omitempty"`

	// Resource settings for OneAgent container. Consumption of the OneAgent heavily depends on the workload to monitor. You can use the default settings in the CR.
	// Note: resource.requests shows the values needed to run; resource.limits shows the maximum limits for the pod.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resource Requirements",order=20,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:resourceRequirements"}
	OneAgentResources corev1.ResourceRequirements `json:"oneAgentResources,omitempty"`
}

func (*HostInjectSpec) DeepCopy

func (in *HostInjectSpec) DeepCopy() *HostInjectSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostInjectSpec.

func (*HostInjectSpec) DeepCopyInto

func (in *HostInjectSpec) DeepCopyInto(out *HostInjectSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesMonitoringSpec deprecated

type KubernetesMonitoringSpec struct {
	CapabilityProperties `json:",inline"`
	// Enables Capability
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Capability",order=29,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:booleanSwitch"
	Enabled bool `json:"enabled,omitempty"`
}

Deprecated: Use ActiveGateSpec instead.

func (*KubernetesMonitoringSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesMonitoringSpec.

func (*KubernetesMonitoringSpec) DeepCopyInto

func (in *KubernetesMonitoringSpec) DeepCopyInto(out *KubernetesMonitoringSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OneAgentConnectionInfoStatus

type OneAgentConnectionInfoStatus struct {
	// Information for communicating with the tenant
	ConnectionInfoStatus `json:",inline"`

	// List of communication hosts
	CommunicationHosts []CommunicationHostStatus `json:"communicationHosts,omitempty"`
}

func (*OneAgentConnectionInfoStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneAgentConnectionInfoStatus.

func (*OneAgentConnectionInfoStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OneAgentInstance

type OneAgentInstance struct {
	// Name of the OneAgent pod
	PodName string `json:"podName,omitempty"`

	// IP address of the pod
	IPAddress string `json:"ipAddress,omitempty"`
}

func (*OneAgentInstance) DeepCopy

func (in *OneAgentInstance) DeepCopy() *OneAgentInstance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneAgentInstance.

func (*OneAgentInstance) DeepCopyInto

func (in *OneAgentInstance) DeepCopyInto(out *OneAgentInstance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OneAgentMode

type OneAgentMode string

type OneAgentSpec

type OneAgentSpec struct {
	// Has a single OneAgent per node via DaemonSet.
	// Injection is performed via the same OneAgent DaemonSet.
	// +nullable
	ClassicFullStack *HostInjectSpec `json:"classicFullStack,omitempty"`

	// Has a single OneAgent per node via DaemonSet.
	// dynatrace-webhook injects into application pods based on labeled namespaces.
	// Has a CSI driver per node via DaemonSet to provide binaries to pods.
	// +nullable
	CloudNativeFullStack *CloudNativeFullStackSpec `json:"cloudNativeFullStack,omitempty"`

	// dynatrace-webhook injects into application pods based on labeled namespaces.
	// Has an optional CSI driver per node via DaemonSet to provide binaries to pods.
	// +nullable
	ApplicationMonitoring *ApplicationMonitoringSpec `json:"applicationMonitoring,omitempty"`

	// Has a single OneAgent per node via DaemonSet.
	// Doesn't inject into application pods.
	// +nullable
	HostMonitoring *HostInjectSpec `json:"hostMonitoring,omitempty"`

	// Sets a host group for OneAgent.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Host Group",order=5,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:text"}
	HostGroup string `json:"hostGroup,omitempty"`
}

func (*OneAgentSpec) DeepCopy

func (in *OneAgentSpec) DeepCopy() *OneAgentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneAgentSpec.

func (*OneAgentSpec) DeepCopyInto

func (in *OneAgentSpec) DeepCopyInto(out *OneAgentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OneAgentStatus

type OneAgentStatus struct {
	status.VersionStatus `json:",inline"`

	// List of deployed OneAgent instances
	Instances map[string]OneAgentInstance `json:"instances,omitempty"`

	// Time of the last instance status update
	LastInstanceStatusUpdate *metav1.Time `json:"lastInstanceStatusUpdate,omitempty"`

	// Commands used for OneAgent's readiness probe
	// +kubebuilder:validation:Type=object
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Healthcheck *containerv1.HealthConfig `json:"healthcheck,omitempty"`

	// Information about OneAgent's connections
	ConnectionInfoStatus OneAgentConnectionInfoStatus `json:"connectionInfoStatus,omitempty"`
}

func (*OneAgentStatus) DeepCopy

func (in *OneAgentStatus) DeepCopy() *OneAgentStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneAgentStatus.

func (*OneAgentStatus) DeepCopyInto

func (in *OneAgentStatus) DeepCopyInto(out *OneAgentStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RequestAllowedChecker

type RequestAllowedChecker func(timeProvider *timeprovider.Provider) bool

+kubebuilder:object:generate=false

type RoutingSpec deprecated

type RoutingSpec struct {
	CapabilityProperties `json:",inline"`
	// Enables Capability
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Capability",order=29,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:booleanSwitch"
	Enabled bool `json:"enabled,omitempty"`
}

Deprecated: Use ActiveGateSpec instead.

func (*RoutingSpec) DeepCopy

func (in *RoutingSpec) DeepCopy() *RoutingSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingSpec.

func (*RoutingSpec) DeepCopyInto

func (in *RoutingSpec) DeepCopyInto(out *RoutingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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