Documentation
¶
Index ¶
- Constants
- type AppInjectionSpec
- type ApplicationMonitoringSpec
- type CloudNativeFullStackSpec
- type CodeModulesStatus
- type CommunicationHostStatus
- type ConnectionInfoStatus
- type HostInjectSpec
- type Instance
- type Mode
- type OneAgent
- func (oa *OneAgent) GetArguments() []string
- func (oa *OneAgent) GetArgumentsMap() map[string][]string
- func (oa *OneAgent) GetCodeModulesImage() string
- func (oa *OneAgent) GetCodeModulesVersion() string
- func (oa *OneAgent) GetConnectionInfoConfigMapName() string
- func (oa *OneAgent) GetCustomCodeModulesImage() string
- func (oa *OneAgent) GetCustomCodeModulesVersion() string
- func (oa *OneAgent) GetCustomImage() string
- func (oa *OneAgent) GetCustomVersion() string
- func (oa *OneAgent) GetDaemonsetName() string
- func (oa *OneAgent) GetDefaultImage(version string) string
- func (oa *OneAgent) GetEndpoints() string
- func (oa *OneAgent) GetEnvironment() []corev1.EnvVar
- func (oa *OneAgent) GetHostGroup() string
- func (oa *OneAgent) GetHostGroupAsParam() string
- func (oa *OneAgent) GetHostPath() string
- func (oa *OneAgent) GetImage() string
- func (oa *OneAgent) GetInitResources() *corev1.ResourceRequirements
- func (oa *OneAgent) GetNamespaceSelector() *metav1.LabelSelector
- func (oa *OneAgent) GetNodeSelector(fallbackNodeSelector map[string]string) map[string]string
- func (oa *OneAgent) GetSecCompProfile() string
- func (oa *OneAgent) GetTenantSecret() string
- func (oa *OneAgent) GetVersion() string
- func (oa *OneAgent) IsAppInjectionNeeded() bool
- func (oa *OneAgent) IsApplicationMonitoringMode() bool
- func (oa *OneAgent) IsAutoUpdateEnabled() bool
- func (oa *OneAgent) IsCSIAvailable() bool
- func (oa *OneAgent) IsClassicFullStackMode() bool
- func (oa *OneAgent) IsCloudNativeFullstackMode() bool
- func (oa *OneAgent) IsCommunicationRouteClear() bool
- func (oa *OneAgent) IsDaemonsetRequired() bool
- func (oa *OneAgent) IsHostMonitoringMode() bool
- func (oa *OneAgent) IsLivenessProbeNeeded() bool
- func (oa *OneAgent) IsPrivilegedNeeded() bool
- func (oa *OneAgent) IsReadOnlyFSSupported() bool
- func (oa *OneAgent) IsReadinessProbeNeeded() bool
- type Spec
- type Status
Constants ¶
const ( OneAgentTenantSecretSuffix = "-oneagent-tenant-secret" OneAgentConnectionInfoConfigMapSuffix = "-oneagent-connection-info" PodNameOsAgent = "oneagent" DefaultOneAgentImageRegistrySubPath = "/linux/oneagent" StorageVolumeDefaultHostPath = "/var/opt/dynatrace" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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).
// +kubebuilder:validation: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"`
// Use a custom OneAgent CodeModule image to download binaries.
// +kubebuilder:validation: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"`
// 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"`
}
+kubebuilder:object:generate=true
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 {
// Use a specific OneAgent CodeModule version. Defaults to the latest version from the Dynatrace cluster.
// +kubebuilder:validation: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"`
AppInjectionSpec `json:",inline"`
}
+kubebuilder:object:generate=true
func (*ApplicationMonitoringSpec) DeepCopy ¶
func (in *ApplicationMonitoringSpec) DeepCopy() *ApplicationMonitoringSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationMonitoringSpec.
func (*ApplicationMonitoringSpec) DeepCopyInto ¶
func (in *ApplicationMonitoringSpec) DeepCopyInto(out *ApplicationMonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CloudNativeFullStackSpec ¶
type CloudNativeFullStackSpec struct {
HostInjectSpec `json:",inline"`
AppInjectionSpec `json:",inline"`
}
+kubebuilder:object:generate=true
func (*CloudNativeFullStackSpec) DeepCopy ¶
func (in *CloudNativeFullStackSpec) DeepCopy() *CloudNativeFullStackSpec
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"`
}
+kubebuilder:object:generate=true
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"`
}
+kubebuilder:object:generate=true
func (*CommunicationHostStatus) DeepCopy ¶
func (in *CommunicationHostStatus) DeepCopy() *CommunicationHostStatus
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 {
// Information for communicating with the tenant
communication.ConnectionInfo `json:",inline"`
// List of communication hosts
CommunicationHosts []CommunicationHostStatus `json:"communicationHosts,omitempty"`
}
+kubebuilder:object:generate=true
func (*ConnectionInfoStatus) DeepCopy ¶
func (in *ConnectionInfoStatus) DeepCopy() *ConnectionInfoStatus
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 HostInjectSpec ¶
type HostInjectSpec struct {
// Add custom OneAgent annotations.
// +kubebuilder:validation: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.
// +kubebuilder:validation: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"`
// Specify the node selector that controls on which nodes OneAgent will be deployed.
// +kubebuilder:validation: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"`
// Deprecated: This field will be removed in a future release.
// 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.
// +kubebuilder:validation: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"`
// Use a specific OneAgent version. Defaults to the latest version from the Dynatrace cluster.
// +kubebuilder:validation: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 image. Defaults to the latest image from the Dynatrace cluster.
// +kubebuilder:validation: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"`
// 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).
// +kubebuilder:validation: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"`
// 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/).
// +kubebuilder:validation: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"`
// The SecComp Profile that will be configured in order to run in secure computing mode.
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OneAgent SecComp Profile",order=17,xDescriptors="urn:alm:descriptor:com.tectonic.ui:selector:core:v1:Namespace"
SecCompProfile string `json:"secCompProfile,omitempty"`
// StorageHostPath is the writable directory on the host filesystem where OneAgent configurations will be stored.
// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="StorageHostPath",order=28,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:advanced","urn:alm:descriptor:com.tectonic.ui:hidden"}
StorageHostPath string `json:"storageHostPath,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.
// +kubebuilder:validation: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"`
// Tolerations to include with the OneAgent DaemonSet. For details, see Taints and Tolerations (https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).
// +kubebuilder:validation: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"`
// Set additional environment variables for the OneAgent pods.
// +kubebuilder:validation: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).
// +kubebuilder:validation: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"`
}
+kubebuilder:object:generate=true
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 Instance ¶
type Instance struct {
// Name of the OneAgent pod
PodName string `json:"podName,omitempty"`
// IP address of the pod
IPAddress string `json:"ipAddress,omitempty"`
}
+kubebuilder:object:generate=true
func (*Instance) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (*Instance) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OneAgent ¶
type OneAgent struct {
*Spec
*Status
*CodeModulesStatus
// contains filtered or unexported fields
}
func NewOneAgent ¶
func (*OneAgent) GetArguments ¶
func (*OneAgent) GetArgumentsMap ¶
func (*OneAgent) GetCodeModulesImage ¶
GetCodeModulesImage provides the image reference set in Status for the CodeModules. Format: repo@sha256:digest.
func (*OneAgent) GetCodeModulesVersion ¶
GetCodeModulesVersion provides version set in Status for the CodeModules.
func (*OneAgent) GetConnectionInfoConfigMapName ¶
func (*OneAgent) GetCustomCodeModulesImage ¶
GetCustomCodeModulesImage provides the image reference for the CodeModules provided in the Spec.
func (*OneAgent) GetCustomCodeModulesVersion ¶
GetCustomCodeModulesVersion provides the version for the CodeModules provided in the Spec.
func (*OneAgent) GetCustomImage ¶
GetCustomImage provides the image reference for the OneAgent provided in the Spec.
func (*OneAgent) GetCustomVersion ¶
GetCustomVersion provides the version for the OneAgent provided in the Spec.
func (*OneAgent) GetDaemonsetName ¶
func (*OneAgent) GetDefaultImage ¶
GetDefaultImage provides the image reference for the OneAgent from tenant registry.
func (*OneAgent) GetEndpoints ¶
func (*OneAgent) GetEnvironment ¶
func (*OneAgent) GetHostGroup ¶
func (*OneAgent) GetHostGroupAsParam ¶
func (*OneAgent) GetHostPath ¶
GetHostPath provides the host path for the storage volume if CSI driver is absent.
func (*OneAgent) GetImage ¶
GetImage provides the image reference set in Status for the OneAgent. Format: repo@sha256:digest.
func (*OneAgent) GetInitResources ¶
func (oa *OneAgent) GetInitResources() *corev1.ResourceRequirements
func (*OneAgent) GetNamespaceSelector ¶
func (oa *OneAgent) GetNamespaceSelector() *metav1.LabelSelector
func (*OneAgent) GetNodeSelector ¶
func (*OneAgent) GetSecCompProfile ¶
func (*OneAgent) GetTenantSecret ¶
GetTenantSecret returns the name of the secret containing the token for the OneAgent.
func (*OneAgent) GetVersion ¶
GetVersion provides version set in Status for the OneAgent.
func (*OneAgent) IsAppInjectionNeeded ¶
func (*OneAgent) IsApplicationMonitoringMode ¶
IsApplicationMonitoringMode returns true when application only section is used.
func (*OneAgent) IsAutoUpdateEnabled ¶
IsAutoUpdateEnabled returns true if the Operator should update OneAgent instances automatically.
func (*OneAgent) IsCSIAvailable ¶
func (*OneAgent) IsClassicFullStackMode ¶
IsClassicFullStackMode returns true when classic fullstack section is used.
func (*OneAgent) IsCloudNativeFullstackMode ¶
IsCloudNativeFullstackMode returns true when cloud native fullstack section is used.
func (*OneAgent) IsCommunicationRouteClear ¶
func (*OneAgent) IsDaemonsetRequired ¶
IsDaemonsetRequired returns true when a feature requires OneAgent instances.
func (*OneAgent) IsHostMonitoringMode ¶
IsHostMonitoringMode returns true when host monitoring section is used.
func (*OneAgent) IsLivenessProbeNeeded ¶
func (*OneAgent) IsPrivilegedNeeded ¶
func (*OneAgent) IsReadOnlyFSSupported ¶
func (*OneAgent) IsReadinessProbeNeeded ¶
type Spec ¶
type Spec 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.
// +kubebuilder:validation: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"`
}
+kubebuilder:object:generate=true
func (*Spec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Spec.
func (*Spec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Status ¶
type Status struct {
status.VersionStatus `json:",inline"`
// List of deployed OneAgent instances
Instances map[string]Instance `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 ConnectionInfoStatus `json:"connectionInfoStatus,omitempty"`
}
+kubebuilder:object:generate=true
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.