Skip to content
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

OpenTelemetryCollector config files are different from reference #810

Conversation

freschri
Copy link
Collaborator

@freschri freschri commented Aug 7, 2023

Please review

@freschri freschri requested a review from aws-ia-ci as a code owner August 7, 2023 06:28
@freschri freschri linked an issue Aug 7, 2023 that may be closed by this pull request
@freschri freschri mentioned this pull request Aug 7, 2023
@freschri freschri changed the title FluxCD fails to deploy multiple Kustomizations following PR #794 OpenTelemetryCollector config files are different from reference Aug 7, 2023
@shapirov103
Copy link
Collaborator

@elamaran11 please take a look, that was the manifest maintenance that we are on the hook for. If you have ideas on how we can better track this type of changes please let me know.

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

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

LGTM

@shapirov103
Copy link
Collaborator

/do-e2e-tests

Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

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

end to end tests failed. A maintainer can provide more details.

@shapirov103
Copy link
Collaborator

@freschri please merge main to address unit test failures:



Version was not specified by cluster builder or in cluster provider props, must be specified in one of these
--
250 |  
251 | 244 \|         const outputClusterName = true;
252 | 245 \|         if(!kubernetesVersion && !this.props.version) {
253 | > 246 \|             throw new Error("Version was not specified by cluster builder or in cluster provider props, must be specified in one of these");
254 | \|                   ^
255 | 247 \|         }
256 | 248 \|         const version: eks.KubernetesVersion = kubernetesVersion \|\| this.props.version \|\| eks.KubernetesVersion.V1_27;
257 | 249 \|


Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

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

Unit test failures

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

LGTM

@elamaran11
Copy link
Collaborator

@shapirov103 One thing we can definately do is load an externa YAML like how its done here and move these ytpl files to https://github.com/aws-observability/aws-observability-accelerator. We should partner with terraform accelerator to see if we can align both together. Im expecting this to take time and i also dont anticipate change to this file sooner. So lets have it like this for now. We can find a way to remove these yamls and load externally later.

@freschri
Copy link
Collaborator Author

freschri commented Aug 8, 2023

@freschri please merge main to address unit test failures:



Version was not specified by cluster builder or in cluster provider props, must be specified in one of these
--
250 |  
251 | 244 \|         const outputClusterName = true;
252 | 245 \|         if(!kubernetesVersion && !this.props.version) {
253 | > 246 \|             throw new Error("Version was not specified by cluster builder or in cluster provider props, must be specified in one of these");
254 | \|                   ^
255 | 247 \|         }
256 | 248 \|         const version: eks.KubernetesVersion = kubernetesVersion \|\| this.props.version \|\| eks.KubernetesVersion.V1_27;
257 | 249 \|

done

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@freschri Since you already have a PR for Collector config, Could you please add the config listed here for the API Troubleshooting board to work as you add the rules in CDK accelerator.

https://github.com/aws-observability/terraform-aws-observability-accelerator/blob/cc3fd5a8dda6edb69b1e444034c3b5687d654f87/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml#L72-L98

Also please add a flag to enable or disable API Server monitoring in Addon. We dont want this to be defaulted. Also please check this for adding documentation for API server mon.

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

Another comment. We need to add a feature to addon to allow external yaml like this This YAML should override the YAML part of the repo. Also this helps you to add the YAML to AWS Accelerator repo in a new folder like template and use that in the pattern.

@freschri
Copy link
Collaborator Author

Another comment. We need to add a feature to addon to allow external yaml like this This YAML should override the YAML part of the repo. Also this helps you to add the YAML to AWS Accelerator repo in a new folder like template and use that in the pattern.

I guess I did it in another PR see here: https://github.com/aws-quickstart/cdk-eks-blueprints/blob/64075bc726594e396d88f4d5b58a27a2dceee4a8/lib/addons/amp/index.ts#L33C6-L33C18
if that's what you mean

@elamaran11
Copy link
Collaborator

Another comment. We need to add a feature to addon to allow external yaml like this This YAML should override the YAML part of the repo. Also this helps you to add the YAML to AWS Accelerator repo in a new folder like template and use that in the pattern.

I guess I did it in another PR see here: https://github.com/aws-quickstart/cdk-eks-blueprints/blob/64075bc726594e396d88f4d5b58a27a2dceee4a8/lib/addons/amp/index.ts#L33C6-L33C18 if that's what you mean

@freschri I know but i think you should be using loadExternalYaml function to read an external path. The manifestPath should be an internal code base path now inorder for this to work in the current code. If you use loadExternalYaml function, it will allow you to load from external path too and you can refactor later to use the external path in common gitops repo.

@freschri
Copy link
Collaborator Author

Another comment. We need to add a feature to addon to allow external yaml like this This YAML should override the YAML part of the repo. Also this helps you to add the YAML to AWS Accelerator repo in a new folder like template and use that in the pattern.

I guess I did it in another PR see here: https://github.com/aws-quickstart/cdk-eks-blueprints/blob/64075bc726594e396d88f4d5b58a27a2dceee4a8/lib/addons/amp/index.ts#L33C6-L33C18 if that's what you mean

@freschri I know but i think you should be using loadExternalYaml function to read an external path. The manifestPath should be an internal code base path now inorder for this to work in the current code. If you use loadExternalYaml function, it will allow you to load from external path too and you can refactor later to use the external path in common gitops repo.

ok can you please create an enhancement issue for that? not really related to the current changes and anyone can pick it up

@elamaran11
Copy link
Collaborator

@freschri We already have an Issue for this. Since you are working on AmpAddon with this PR and you might need this feature for your proposal to CDK accelerator, i felt it is very relevant to add this low hanging fruit to this PR. I will leave it up to you to add to this work or a PR later. Thanks!

@freschri
Copy link
Collaborator Author

@freschri Since you already have a PR for Collector config, Could you please add the config listed here for the API Troubleshooting board to work as you add the rules in CDK accelerator.

https://github.com/aws-observability/terraform-aws-observability-accelerator/blob/cc3fd5a8dda6edb69b1e444034c3b5687d654f87/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml#L72-L98

Also please add a flag to enable or disable API Server monitoring in Addon. We dont want this to be defaulted. Also please check this for adding documentation for API server mon.

done

@freschri
Copy link
Collaborator Author

@freschri We already have an Issue for this. Since you are working on AmpAddon with this PR and you might need this feature for your proposal to CDK accelerator, i felt it is very relevant to add this low hanging fruit to this PR. I will leave it up to you to add to this work or a PR later. Thanks!

ok thanks then I will leave the work to be done in the context of Issue

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

LGTM. Minor feedback. Have a question on doc needs for string utils.

@@ -90,7 +95,8 @@ export const enum DeploymentMode {
const defaultProps = {
deploymentMode: DeploymentMode.DEPLOYMENT,
name: 'adot-collector-amp',
namespace: 'default'
namespace: 'default',
enableAPIserverJob: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

camelCase. enableAPIServerJob

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

* @param string
* @returns
*/
export function changeTextBetweenTokens(str: string, openToken: string, closeToken: string, keep: boolean) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i like this implementation. @shapirov103 Do we have to create a doc page for string utils?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have not done it before, the utils part is not the main value of the blueprints. I would just put more emphasis on the JSDoc and rely on the API doc tool for those for now.

@elamaran11
Copy link
Collaborator

@freschri Can you fix the issues, We are planning to release this week.

@freschri
Copy link
Collaborator Author

@freschri Can you fix the issues, We are planning to release this week.

what issues? all looks addressed above...

@elamaran11
Copy link
Collaborator

@shapirov103 Could you review this PR?

@elamaran11
Copy link
Collaborator

@freschri Can you fix the issues, We are planning to release this week.

what issues? all looks addressed above...

I see the issues are unresolved, Lets ask Mikhail to review and close this.

@shapirov103
Copy link
Collaborator

/do-e2e-tests

Copy link

@aws-ia-ci aws-ia-ci left a comment

Choose a reason for hiding this comment

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

end to end tests passed

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

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

LGTM

@shapirov103
Copy link
Collaborator

@elamaran11 your review status is "changes requested" - this prevents the merge atm.

Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

LGTM

@elamaran11 elamaran11 merged commit 7133d40 into main Aug 16, 2023
@elamaran11
Copy link
Collaborator

@elamaran11 your review status is "changes requested" - this prevents the merge atm.

Merged.

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.

OpenTelemetryCollector config files are different from reference
4 participants