Skip to content

Commit

Permalink
moving apiurl to external secret
Browse files Browse the repository at this point in the history
  • Loading branch information
akirasoft1 committed Nov 14, 2024
1 parent fba7298 commit 6f933fb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ spec:
postBuild:
substituteFrom:
- kind: ConfigMap
name: dynatrace-variables # Provides apiurl, dynatracesecretname, dynakubename, oneagentvolumestorage
name: dynatrace-variables # Provides dynatracesecretname, dynakubename, oneagentvolumestorage
- kind: Secret
name: dynatrace-apiurl # provides apiurl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,21 @@ spec:
- extract:
# we expect an external secret in the following format
# {"apiToken":"sometoken","dataIngestToken":"anothertoken"}
key: dt-tokens-secret
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
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6f933fb

Please sign in to comment.