Skip to content

Commit

Permalink
Add check to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gkrenn committed Nov 22, 2024
1 parent 6cf16ca commit 659c133
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/injection/namespace/ingestendpoint/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ func (g *SecretGenerator) PrepareFields(ctx context.Context, dk *dynakube.DynaKu
if dk.MetadataEnrichmentEnabled() { // TODO: why check here and not at the very beginning?
if token, ok := tokens.Data[dtclient.DataIngestToken]; ok {
fields[MetricsTokenSecretField] = string(token)
} else {
log.Info("data ingest token not found in secret", "dk", dk.Name)
}

if ingestUrl, err := ingestUrlFor(dk); err != nil {
Expand Down

0 comments on commit 659c133

Please sign in to comment.