-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fix service account is created even when one is specified in collector spec #2378
Conversation
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.
Could you add a test verifying that the ServiceAccount doeesn't get created if the value is set? LGTM otherwise.
@@ -45,12 +45,14 @@ func Build(params manifests.Params) ([]client.Object, error) { | |||
manifestFactories = append(manifestFactories, []manifests.K8sManifestFactory{ | |||
manifests.FactoryWithoutError(ConfigMap), | |||
manifests.FactoryWithoutError(HorizontalPodAutoscaler), | |||
manifests.FactoryWithoutError(ServiceAccount), |
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.
Could we instead just check this in the service account manifest? In the builder we would then return nil if service account is set
I wasn't sure if the test should be placed in service account manifest, so I simply added test to builder since we would like to check if the builder build service account manifest when specified, feel free to let me know your thoughts : > |
…r spec (open-telemetry#2378) * add additional check before creating sa for collector * update builder test for collector * change check collector sa specified in sa manifest * add specified account test case to collector building
Description:
Fix service account is created even when one is specified in collector spec
Link to tracking Issue:
#2372