Skip to content

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Dec 21, 2023

The Nomad Autoscaler agent can only target a single namespace, but when using the wildcard (*) value it is possible to monitor policies for all namespaces.

With this configuration, the Nomad APM plugin must specify the job namespace when querying for information as the agent is configured with the wildcard.

Ref: #65 (comment)

The Nomad Autoscaler agent can only target a single namespace, but when
using the wildcard (`*`) value it is possible to monitor policies for
all namespaces.

With this configuration, the Nomad APM plugin must specify the job
namespace when querying for information as the agent is configured with
the wildcard.
Comment on lines -111 to +118
c.Query = fmt.Sprintf("%s_%s/%s/%s",
nomadAPM.QueryTypeTaskGroup, c.Query, t.Config[sdk.TargetConfigKeyTaskGroup], t.Config[sdk.TargetConfigKeyJob])
c.Query = fmt.Sprintf(
"%s_%s/%s/%s@%s",
nomadAPM.QueryTypeTaskGroup,
c.Query,
t.Config[sdk.TargetConfigKeyTaskGroup],
t.Config[sdk.TargetConfigKeyJob],
t.Config[sdk.TargetConfigKeyNamespace],
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal query format, so I wouldn't consider it a breaking change.

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: James Rasell <[email protected]>
@lgfa29 lgfa29 merged commit 1c1cf08 into main Jan 2, 2024
@lgfa29 lgfa29 deleted the b-fix-nomad-apm-ns branch January 2, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants