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

Add creation of ServiceAccount to the Target Allocator #836

Merged

Conversation

jaronoff97
Copy link
Contributor

This PR creates a service account for use by the target allocator. This will let a user of the targetallocator bind roles to it which will allow the allocator to run it's loop.

Closes #834

@jaronoff97 jaronoff97 requested a review from a team April 25, 2022 18:09
pkg/collector/reconcile/serviceaccount.go Outdated Show resolved Hide resolved
Comment on lines +26 to +32
func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string {
if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 {
return naming.ServiceAccount(instance)
}

return instance.Spec.TargetAllocator.ServiceAccount
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This matches what is done for the collector

pkg/collector/reconcile/serviceaccount_test.go Outdated Show resolved Hide resolved
pkg/collector/reconcile/serviceaccount.go Outdated Show resolved Hide resolved
pkg/collector/reconcile/serviceaccount.go Outdated Show resolved Hide resolved
Copy link
Member

@secustor secustor left a comment

Choose a reason for hiding this comment

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

LGTM

@Aneurysm9 can you start the pipeline?

@secustor
Copy link
Member

secustor commented May 4, 2022

@carlosalberto
Copy link

Maybe @pavolloffay can review/merge this one, as JP is out on parental leave?

@yuriolisa
Copy link
Contributor

@carlosalberto, @secustor, I just restarted the jobs.

@pavolloffay pavolloffay merged commit bad6ae7 into open-telemetry:main Jun 3, 2022
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…y#836)

* Added the creation or linking of an existing service account to the target allocator

* Fix test

* Updated from feedback

* Fixed test package
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.

Allow the target allocator to use a custom serviceaccount
6 participants