diff --git a/eks-anywhere-common/Addons/Partner/dynatrace/dynakube-operator.yaml b/eks-anywhere-common/Addons/Partner/dynatrace/dynakube-operator.yaml index 54da1f4c..fe0125e3 100644 --- a/eks-anywhere-common/Addons/Partner/dynatrace/dynakube-operator.yaml +++ b/eks-anywhere-common/Addons/Partner/dynatrace/dynakube-operator.yaml @@ -31,4 +31,6 @@ spec: postBuild: substituteFrom: - kind: ConfigMap - name: dynatrace-variables # Provides apiurl, dynatracesecretname, dynakubename, oneagentvolumestorage \ No newline at end of file + name: dynatrace-variables # Provides dynatracesecretname, dynakubename, oneagentvolumestorage + - kind: Secret + name: dynatrace-apiurl # provides apiurl \ No newline at end of file diff --git a/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-operator/external-secret.yaml b/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-operator/external-secret.yaml index 6ebcb369..8f2a7996 100644 --- a/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-operator/external-secret.yaml +++ b/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-operator/external-secret.yaml @@ -15,4 +15,21 @@ spec: - extract: # we expect an external secret in the following format # {"apiToken":"sometoken","dataIngestToken":"anothertoken"} - key: dt-tokens-secret \ No newline at end of file + key: dt-tokens-secret +--- +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: dynatrace-apiurl-external-secret + namespace: dynatrace +spec: + refreshInterval: 1m + secretStoreRef: + name: eksa-secret-store #The secret store name we have just created. + kind: ClusterSecretStore + target: + name: dynatrace-apiurl # Secret name in k8s + data: + - secretKey: apiurl + remoteRef: + key: dynatrace-apiurl diff --git a/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-variables.yaml b/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-variables.yaml index 73521f2b..e106ddbc 100644 --- a/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-variables.yaml +++ b/eks-anywhere-common/Addons/Partner/dynatrace/dynatrace-variables.yaml @@ -5,9 +5,7 @@ metadata: name: dynatrace-variables namespace: flux-system data: - # api url for dynatrace environment - apiUrl: https://fjy55252.sprint.dynatracelabs.com/api - # name of secret containing tokens + # name of secret containing tokens created by external-secret dynatracesecretname: "dt-secret" # name of cluster to be listed in Dynatrace dynakubename: "eks-flux-test-cluster"