-
Notifications
You must be signed in to change notification settings - Fork 130
feat(shield): improve regions handling logic to allow override region specific settings without setting region to custom #2216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f1faef4
to
954d350
Compare
@@ -180,16 +180,16 @@ | |||
|
|||
{{- define "common.collector_endpoint" }} | |||
{{- $regions := fromYaml (include "common.regions" .) }} | |||
{{- if ne "custom" .Values.sysdig_endpoint.region }} | |||
{{- get (get $regions .Values.sysdig_endpoint.region) "collector_endpoint" }} | |||
{{- if and (ne "custom" .Values.sysdig_endpoint.region) (not .Values.sysdig_endpoint.collector.host) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maratsal - If I understand the intent of this PR I think what the intent of this change is, is to use sysdig_endpoint.collector.host
any time it is specified, correct? If that's true, we could simplify the boolean logic here.
If my understanding is correct, you could apply the simplification to the other areas you've modified as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, if you can share what you are thinking of - my brain always comes back to couple of checks anyways :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if I'm not mistaken, this change is intended to use sysdig_endpoint.collector.host
whether the region field is custom
or some valid region, correct? If that's the case, you can simplify the checks here to simply see if sysdig_endpoint.collector.host
is non-null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated logic.
00b40a3
to
cedaf2d
Compare
…ings without setting region to custom
cedaf2d
to
1f36699
Compare
… specific settings without setting region to custom (#2216)
What this PR does / why we need it:
improve regions handling logic to allow override region specific settings without setting region to custom. Currently if we want to use alternative collector settings we have to use custom region and specify each of the following values:
Many customers want to keep using default region settings and update only collector endpoints and use config like below:
This PR is addressing that functionality.
Checklist
feat(agent,node-analyzer,sysdig-deploy):
)