Coder Social home page Coder Social logo

harrisin2037 / dynatrace-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dynatrace/dynatrace-operator

0.0 1.0 0.0 2.83 MB

Kubernetes / OpenShift operator to manage Dynatrace ActiveGate lifecycle

License: Apache License 2.0

Dockerfile 0.68% Shell 4.18% Go 93.42% Makefile 1.31% Smarty 0.42%

dynatrace-operator's Introduction

Note: Requires Dynatrace Cluster version 1.209

Dynatrace Operator

The Dynatrace Operator supports rollout and lifecycle of various Dynatrace components in Kubernetes and OpenShift.

As of launch, the Dynatrace Operator can be used to deploy a containerized ActiveGate for Kubernetes API monitoring. New capabilities will be added to the Dynatrace Operator over time including metric routing, and API monitoring for AWS, Azure, GCP, and vSphere.

With v0.2.0 we added the classicFullStack functionality which allows rolling out the OneAgent to your Kubernetes cluster. Furthermore, the Dynatrace Operator is now capable of rolling out a containerized ActiveGate for routing the OneAgent traffic.

With v0.3.0 the CRD structure has been changed to provide an easier and more understandable way to deploy Dynatrace in your environment.

  • routing and kubernetesMonitoring within the Dynakube spec are deprecated now and moved to the activeGate section.
  • (combination with 'useCSIDriver' is still in PREVIEW) added applicationMonitoring mode, a webhook based injection mechanism for automatic-app-only injection
  • added hostMonitoring for only monitoring the host in the cluster without app-only injection
  • (PREVIEW) added cloudNativeFullStack mode, which combines hostMonitoring, with the webhook based applicationMonitoring

For more information please have a look at our DynaKube Custom Resource examples, or our official help page.

Supported platforms

Depending on the version of the Dynatrace Operator, it supports the following platforms:

Dynatrace Operator version Kubernetes OpenShift Container Platform
master 1.20+ 4.7+
v0.3.0 1.20+ 4.7+
v0.2.2 1.18+ 3.11.188+, 4.5+
v0.1.0 1.18+ 3.11.188+, 4.4+

Quick Start

The Dynatrace Operator acts on its separate namespace dynatrace. It holds the operator deployment and all dependent objects like permissions, custom resources and corresponding StatefulSets.

Kubernetes

Installation

To create the namespace and apply the operator run the following commands

$ kubectl create namespace dynatrace
$ kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/kubernetes.yaml

A secret holding tokens for authenticating to the Dynatrace cluster needs to be created upfront. Create access tokens of type Dynatrace API and Platform as a Service and use its values in the following commands respectively. For assistance please refer to Create user-generated access tokens.

Make sure the Dynatrace API token has the following permission:

  • Access problem and event feed, metrics and topology
$ kubectl -n dynatrace create secret generic dynakube --from-literal="apiToken=DYNATRACE_API_TOKEN" --from-literal="paasToken=PLATFORM_AS_A_SERVICE_TOKEN"

Create DynaKube custom resource for ActiveGate and OneAgent rollout

The rollout of the Dynatrace components is governed by a custom resource of type DynaKube. This custom resource will contain parameters for various Dynatrace capabilities (API monitoring, routing, etc.)

Note: .spec.tokens denotes the name of the secret holding access tokens. If not specified Dynatrace Operator searches for a secret called like the DynaKube custom resource .metadata.name.

apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
  name: dynakube
  namespace: dynatrace
spec:
  # 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 https://www.dynatrace.com/support/help/reference/dynatrace-concepts/environment-id/.
  apiUrl: https://ENVIRONMENTID.live.dynatrace.com/api

  # name of secret holding `apiToken` and `paasToken`
  # if unset, name of custom resource is used
  #
  # tokens: ""

  # Optional: Sets Network Zone for OneAgent and ActiveGate pods
  # Make sure networkZones are enabled on your cluster before (see https://www.dynatrace.com/support/help/setup-and-configuration/network-zones/network-zones-basic-info/)
  #
  # networkZone: name-of-my-network-zone

  oneAgent:
    # enable classic fullstack monitoring and change its settings
    # Cannot be used in conjunction with cloud-native fullstack monitoring, application-only monitoring or host monitoring
    classicFullStack:

      # Optional: tolerations to include with the OneAgent DaemonSet.
      # See more here: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists

  # Configuration for ActiveGate instances.
  activeGate:
    # Enables listed ActiveGate capabilities
    capabilities:
      - routing
      - kubernetes-monitoring

This is the most basic configuration for the DynaKube object. We recommend you to use classic Fullstack injection to roll out Dynatrace to your cluster, as shown in the example above. In case you want to have adjustments please have a look at our DynaKube Custom Resource examples. Save one of the sample configurations, change the API url to your environment and apply it to your cluster.

$ kubectl apply -f cr.yaml

For detailed instructions see our official help page.

Uninstall

Uninstall dynatrace-operator

Remove DynaKube custom resources and clean-up all remaining Dynatrace Operator specific objects:

$ kubectl delete -n dynatrace dynakube --all
$ kubectl delete -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/kubernetes.yaml

OpenShift

Installation

To create the namespace and apply the operator run the following commands (for OpenShift 4.x)

$ oc adm new-project --node-selector="" dynatrace
$ oc apply -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/openshift.yaml

A secret holding tokens for authenticating to the Dynatrace cluster needs to be created upfront. Create access tokens of type Dynatrace API and Platform as a Service and use its values in the following commands respectively. For assistance please refere to Create user-generated access tokens.

Make sure the Dynatrace API token has the following permission:

  • Access problem and event feed, metrics and topology
$ oc -n dynatrace create secret generic dynakube --from-literal="apiToken=DYNATRACE_API_TOKEN" --from-literal="paasToken=PLATFORM_AS_A_SERVICE_TOKEN"

Create DynaKube custom resource for ActiveGate and OneAgent rollout

The rollout of the Dynatrace components is governed by a custom resource of type DynaKube. This custom resource will contain parameters for various Dynatrace capabilities (API monitoring, routing, etc.)

Note: .spec.tokens denotes the name of the secret holding access tokens. If not specified Dynatrace Operator searches for a secret called like the DynaKube custom resource .metadata.name.

apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
  name: dynakube
  namespace: dynatrace
spec:
  # 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 https://www.dynatrace.com/support/help/reference/dynatrace-concepts/environment-id/.
  apiUrl: https://ENVIRONMENTID.live.dynatrace.com/api

  # name of secret holding `apiToken` and `paasToken`
  # if unset, name of custom resource is used
  #
  # tokens: ""

  # Optional: Sets Network Zone for OneAgent and ActiveGate pods
  # Make sure networkZones are enabled on your cluster before (see https://www.dynatrace.com/support/help/setup-and-configuration/network-zones/network-zones-basic-info/)
  #
  # networkZone: name-of-my-network-zone

  oneAgent:
    # enable classic fullstack monitoring and change its settings
    # Cannot be used in conjunction with cloud-native fullstack monitoring, application-only monitoring or host monitoring
    classicFullStack:

      # Optional: tolerations to include with the OneAgent DaemonSet.
      # See more here: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
          operator: Exists

  # Configuration for ActiveGate instances.
  activeGate:
    # Enables listed ActiveGate capabilities
    capabilities:
      - routing
      - kubernetes-monitoring

This is the most basic configuration for the DynaKube object. We recommend you to use classic Fullstack injection to roll out Dynatrace to your cluster, as shown in the example above. In case you want to have adjustments please have a look at our DynaKube Custom Resource examples. Save one of the sample configurations, change the API url to your environment and apply it to your cluster.

$ oc apply -f cr.yaml

For detailed instructions see our official help page.

Uninstall

Uninstall dynatrace-operator

Remove DynaKube custom resources and clean-up all remaining Dynatrace Operator specific objects:

$ oc delete -n dynatrace dynakube --all
$ oc delete -f https://github.com/Dynatrace/dynatrace-operator/releases/latest/download/openshift.yaml

Hacking

See HACKING for details on how to get started enhancing Dynatrace Operator.

Contributing

See CONTRIBUTING for details on submitting changes.

License

Dynatrace Operator is under Apache 2.0 license. See LICENSE for details.

dynatrace-operator's People

Contributors

dtmad avatar meik99 avatar 0sewa0 avatar chrismuellner avatar lrgar avatar gkrenn avatar aorcholski avatar luhi-dt avatar mjgrzybek avatar waodim avatar baichinger avatar mmayr-at avatar toszr avatar chrkl avatar dseywald avatar fabwer avatar mreider avatar popecruzdt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.