-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fluentbit config parsing logic for isolated region compatibility #94
Conversation
Updating values.yaml with new .NET auto instrumentation version v1.3.2
@@ -242,6 +242,318 @@ containerLogs: | |||
log_stream_prefix ${HOST_NAME}. | |||
auto_create_group true | |||
extra_user_agent container-insights | |||
adcIsoExtraFiles: |
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.
If the only difference is the endpoint, could we figure out a way to template it out instead of duplicating each of the configs?
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.
The problem is that you would need to refactor your fluent-bit-configmap in your linux helm chart to parse only for the OUTPUTS section and for ADC regions which then gets convoluted. Its about the same refactoring as I have done already in the values currently. The endpoint only needs to be specified in the OUTPUTS section, other wise it can actually cause helm chart formatting errors -> causes the pod to be instable.
Open to suggestions but this was the safest way i could think that doesn't impact your helm charts too much.
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.
Ideally, we would fix this in fluent bit so the right endpoint would be used without having to override it https://github.com/fluent/fluent-bit/blob/master/src/aws/flb_aws_util.c#L75, but until that's done, I'm fine with doing it this way.
@@ -14,8 +14,20 @@ data: | |||
{{- end }} | |||
parsers.conf: | | |||
{{- .Values.containerLogs.fluentBit.config.customParsers | nindent 4 }} | |||
{{- if contains "us-iso-" .Values.region }} |
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.
nit: Could use hasPrefix
instead https://helm.sh/docs/chart_template_guide/function_list/#hasprefix-and-hassuffix
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.
Ack. updating.
Issue #, if available:
Description of changes:
Isolated regions need the Cloudwatch logs endpoint specified in the linux fluent bit configmap in order to properly create log groups. The endpoints are different for isolated (ADC) regions and do not follow conventional formatting compared to commercial. I have refactored some logic to properly parse which region the addon is being applied to and appropriately apply the correct linux configmap. These changes already work in isolated regions and are in AWS code base.
###Testing
Images/addon components are already onboarded to an internal ImageReplicationService. This automatically syncs CW images lowside and transfers them up to all supported EKS regions. We have worked with the EKS team to ensure you guys are already onboarded.
I was able to confirm metrics, log groups, and that my metrics for Application Signals and GPU Container insights show up in Container Insights. I am not able to attach/illustrate specific screenshots or logs due to security implications.
Changes only affect ADC regions to incorporate the endpoint line to the configmap. Commercial is unaffected and i did test there too.
In commercial the configmap remains the same
while Isolated region now have the new added endpoint param