Skip to content

Dynatrace/opentelemetry-demo-gitops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Opentelemetry demo gitops

This repository contains Helm chart for Astroshop, an adaptation of the Opentelemetry Demo app, alongside with:

  • sample deployment script
  • Argocd configuration used to showcase Dynatrace's ability to monitor gitops

Deployment

Requirements

Prerequisites

To properly function the Astroshop deployment requires a few other tools to be present on the cluster, however since they are not a part of the Astroshop itself, they are not included in the helm chart and have to be installed separately. We provide sample deployments but you can install them however you see fit or use already existing ones.

Dynatrace operator

To monitor the cluster with Dynatrace you can follow the official guide or use the sample deployment

DAPR

Astroshop uses DAPR under the hood so it needs the operator installed on the cluster. Installation info here

Ingress controller [optional]

If you want to deploy the ingress resources (by setting components.ingress.enabled: true in values) you will need the ingress controller running on the cluster. If you already have one running make sure that it's properly instrumented. Sample installation info here

Helm deployment

To deploy the helm chart you will first need to set the required values here

then run

./deploy

Flagd configuration change: problem patterns

About

ArgoCD monitors the directory under the application called opentelemetry-demo-flagd-config. After each modification, ArgoCD synchronizes the data and applies the changes. The goal of this configuration is to switch the feature flags state of OpenTelemetry demo configuration, which in effect enables or disables problem patterns

Purpose of configuration files

Flagd stores feature flag states in a ConfigMap. To toggle a problem pattern, the value of the flag needs to be updated. Flagd itself doesn't detect manual changes in the ConfigMap, to apply changes Flagd need to be restarted. To facilitate this, a job has been added that restarts Flagd after a feature flag change.

Configuration

flagd-config.yaml contains ConfigMap with feature flag states

To toggle flag, change value of defaultVariant to either on or off.

"productCatalogFailure": {
    "description": "Fail product catalog service on a specific product",
    "state": "ENABLED",
    "variants": {
        "on": true,
        "off": false
    },
    "defaultVariant": "off"
}

flagd-restart.yaml contains job restarting flagd

Job is tagged as ArgoCD hook, which is triggered automatically after succesful sync and deleted afterward.

annotations:
  #  triggers hook after sync
  argocd.argoproj.io/hook: PostSync
  #  deletes hook resourcers after successful deployment
  argocd.argoproj.io/hook-delete-policy: HookSucceeded

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8

Languages