Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (37 loc) · 1.66 KB

HACKING.md

File metadata and controls

51 lines (37 loc) · 1.66 KB

Dynatrace OneAgent Operator

Hack on Dynatrace OneAgent Operator

Operator SDK is the underlying framework for Dynatrace OneAgent Operator. The operator-sdk tool needs to be installed upfront as outlined in the Operator SDK User Guide.

Installation

There are automatic builds from the master branch. The latest development build can be installed on Kubernetes with,

Kubernetes

$ kubectl create namespace dynatrace
$ kubectl apply -k github.com/Dynatrace/dynatrace-oneagent-operator/config/kubernetes

OpenShift

$ oc adm new-project --node-selector="" dynatrace
$ oc apply -k github.com/Dynatrace/dynatrace-oneagent-operator/config/openshift

Tests

The unit tests can be executed with

$ go test ./...

And integration tests,

$ go test -tags integration ./...

These integration tests also require Kubebuilder, unpack the binaries from the release package in /usr/local/kubebuilder/bin where they will be looked at by default.

Build and push your image

Replace REGISTRY with your Registry`s URN:

$ cd $GOPATH/src/github.com/Dynatrace/dynatrace-oneagent-operator
$ operator-sdk build REGISTRY/dynatrace-oneagent-operator
$ docker push REGISTRY/dynatrace-oneagent-operator

Deploy operator

Change the image field in ./deploy/operator.yaml to the URN of your image. Apart from that follow the instructions in the usage section above.