Use oneAgent.hostGroup in ApplicationMonitoring mode (release-1.0) #2776
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR main branch
Description
oneAgent.hostGroup
parameter is passed to code modules in case of application monitoring mode. In such a case standalone logic addshostGroup
field to the ProcessModuleConfig configuration and additionally standalone dynatrace client applieshostGroup
to requests which can use it (getProcessModuleConfig).oneAgent.hostGroup
parameter has higher priority then--set-host-group
argument for all related deployment modes (havingargs
field). Validation webhook print a warning every time the argument is used.How can this be tested?
hostGroup
is used:kubectl -n <namespace> get -o json secret/dynatrace-dynakube-config|jq -r '.data.config'|base64 -d|jq -r '.hostGroup'
ruxitagentproc.conf
on the app podkubectl -n <namespace> exec -t deployment.apps/<appname>l -- /bin/sh -c "cat /opt/dynatrace/oneagent-paas/agent/conf/ruxitagentproc.conf | grep hostGroup"
No changes in other modes:
--set-host-group
value used inoneagent
podskubectl -n dynatrace get -o json daemonset.apps/dynakube-oneagent | jq -r '.spec.template.spec.containers[0].args | grep set-host-group'
kubectl -n <namespace> get -o json secret/dynatrace-dynakube-config|jq -r '.data.config'|base64 -d|jq -r '.hostGroup'
ruxitagentproc.conf
on the app podkubectl -n <namespace> exec -t deployment.apps/<appname>l -- /bin/sh -c "cat /opt/dynatrace/oneagent-paas/agent/conf/ruxitagentproc.conf | grep hostGroup"
--set-host-group
value used inoneagent
podskubectl -n dynatrace get -o json daemonset.apps/dynakube-oneagent | jq -r '.spec.template.spec.containers[0].args | grep set-host-group'
kubectl -n <namespace> get -o json secret/dynatrace-dynakube-config|jq -r '.data.config'|base64 -d|jq -r '.hostGroup'
ruxitagentproc.conf
on the app podkubectl -n <namespace> exec -t deployment.apps/<appname>l -- /bin/sh -c "cat /opt/dynatrace/oneagent-paas/agent/conf/ruxitagentproc.conf | grep hostGroup"
Checklist