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

refactor: remove code duplication for namespace and sa creation #208

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paulfouquet
Copy link
Collaborator

Motivation

Namespace and SA creation logic is duplicated with different k8s component initialization.

Modification

Remove the duplication by calling a builder function

Checklist

If not applicable, provide explanation of why.

  • Tests updated
  • Docs updated
  • Issue linked in Title

fluentBitSa.node.addDependency(fluentBitNs); // Ensure the namespace created first
new CfnOutput(this, 'FluentBitServiceAccountRoleArn', { value: fluentBitSa.role.roleArn });
const fluentbitSA = initService(this.cluster, 'fluentbit');
new CfnOutput(this, 'FluentBitServiceAccountRoleArn', { value: fluentbitSA.role.roleArn });

// Basic constructs for argo to be deployed into
const argoNs = this.cluster.addManifest('ArgoNameSpace', {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does this service account have to be suffixed runner?

Copy link
Member

Choose a reason for hiding this comment

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

I think argo has multiple service accounts, I think this was copied from the docs somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants