Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements automatic-kubernetes-api-monitoring-cluster-name feature flag #797

Merged
merged 6 commits into from
May 25, 2022

Conversation

mjgrzybek
Copy link
Contributor

Description

AutomaticKubernetesApiMonitoring feature uses clusterLabel to show it on UI.
By default clusterLabel is set to dynakube CR name.
If feature.dynatrace.com/automatic-kubernetes-api-monitoring-cluster-label annotation is set, it's value is used to override default value of clusterLabel.

Unicode characters are supported as a value.

How can this be tested?

kubectl create namespace dynatrace
kubectl apply -f https://github.com/Dynatrace/dynatrace-operator/releases/download/v0.6.0/kubernetes.yaml
kubectl -n dynatrace wait pod --for=condition=ready --selector=app.kubernetes.io/name=dynatrace-operator,app.kubernetes.io/component=webhook --timeout=300s
kubectl apply -f - <<EOF
apiVersion: v1
data:
  apiToken: XXXX
  dataIngestToken: XXXX
kind: Secret
metadata:
  name: dk-4
  namespace: dynatrace
type: Opaque
---
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
  name: dk-4
  namespace: dynatrace
  annotations:
    feature.dynatrace.com/automatic-kubernetes-api-monitoring: "true"
    feature.dynatrace.com/automatic-kubernetes-api-monitoring-name: "...dots;;;źdźbło~!🙃."
spec:
  apiUrl: https://xxxxx/api
  activeGate:
    capabilities:
      - routing
      - kubernetes-monitoring
EOF

check if UI shows:
image

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly

@mjgrzybek mjgrzybek added the core Changes to core functionality of the Operator label May 24, 2022
@mjgrzybek mjgrzybek requested a review from fabwer May 24, 2022 12:02
@mjgrzybek mjgrzybek requested a review from a team as a code owner May 24, 2022 12:02
src/api/v1beta1/feature_flags.go Outdated Show resolved Hide resolved
@mjgrzybek mjgrzybek enabled auto-merge (squash) May 25, 2022 07:18
meik99
meik99 previously requested changes May 25, 2022
src/controllers/dynakube/dynakube_controller.go Outdated Show resolved Hide resolved
@mjgrzybek mjgrzybek force-pushed the feature/custom-k8s-cluster-name branch from 6c6e352 to b56d666 Compare May 25, 2022 12:33
@mjgrzybek mjgrzybek changed the title Implements automatic-kubernetes-api-monitoring-cluster-label feature flag Implements automatic-kubernetes-api-monitoring-cluster-name feature flag May 25, 2022
@meik99 meik99 dismissed their stale review May 25, 2022 13:42

Dismissing my review 'cause issues were fixed

@mjgrzybek mjgrzybek merged commit 860b99f into master May 25, 2022
@mjgrzybek mjgrzybek deleted the feature/custom-k8s-cluster-name branch May 25, 2022 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core functionality of the Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants