Configure auto-update for Dynatrace Operator managed components

Dynatrace Operator manages the rollout and updates of the following components in Kubernetes:

  • OneAgent: Configured in the DynaKube
  • ActiveGate: Configured in the DynaKube
  • EdgeConnect: Configured by the EdgeConnect Custom Resource (CR)

The default settings for OneAgent and ActiveGate automatically roll out updates as soon as they become available. DynaKube also defaults to update all pods when updates are detected automatically. Note that updates may take up to 15 minutes due to Dynatrace Operator checking for updates at 15-minute intervals. If you set a custom image, it will disable automatic updates.

Configure OneAgent auto-update

Set up the update policy to configure the OneAgent settings. The update will result in a changed image visible to Dynatrace Operator.

  • Always up to date: The default setting latest ensures that the most up-to-date OneAgent image is installed automatically.
  • Bugfix releases: You can choose a revision by selecting a specific target version. The default revision is latest, resulting in always getting the most recent bugfix release.
  • No Updates: By setting the revision to a specific version, you lock the image to that particular version, preventing any automatic updates.

Configuration in DynaKube

Depending on the monitoring mode, the autoUpdate field in the .spec.oneAgent.cloudNativeFullStack/classicFullStack/hostMonitoring controls whether Dynatrace Operator restarts the OneAgent pods when a new version is found or leaves the pods running. If this flag is set to true, Dynatrace Operator checks for updates and restarts the pods.

apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
spec:
apiUrl: https://ENVIRONMENTID.live.dynatrace.com/api
oneAgent:
classicFullStack:
autoUpdate: true

The maintenance window configured in the UI does not apply to Kubernetes.

Configure code module auto-update of monitored applications

While new images are downloaded, applications are only updated when restarted. Keep in mind that autoscaling also injects the most recent CodeModule.

Configure ActiveGate auto-update

Similar to OneAgent, the ActiveGate update can be configured in the UI, resulting in a changed ActiveGate image, visible to Dynatrace Operator.

The feature flag feature.dynatrace.com/activegate-updates controls whether the Dynatrace Operator checks for an updated ActiveGate image and restarts the ActiveGate pods. By default, this feature flag is set to true.

apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube
namespace: dynatrace
annotations:
feature.dynatrace.com/activegate-updates: "true"

Configure EdgeConnect auto-update

Dynatrace Operator can be configured to disable auto-updates by setting the autoUpdate field in the EdgeConnect spec section to false.

apiVersion: dynatrace.com/v1beta1
kind: EdgeConnect
metadata:
name: edgeconnect
namespace: dynatrace
spec:
autoUpdate: false