-
Notifications
You must be signed in to change notification settings - Fork 451
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 Cronjob name #2717
Fix Cronjob name #2717
Conversation
Marking this as a draft, I plan to get back on this and a few other issues soon after some internal migration. |
Could you please create a changelog entry for this? |
@@ -502,6 +503,26 @@ func (i *sdkInjector) addParentResourceLabels(ctx context.Context, uid bool, ns | |||
if uid { | |||
resources[semconv.K8SJobUIDKey] = string(owner.UID) | |||
} | |||
|
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.
I think it would be really nice to add an E2E test for this situation
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.
e2e done, pls give it another review :-)
025a871
to
d53ff48
Compare
Ready, @pavolloffay @iblancasa can you pls give it a review? :-) |
c5bea75
to
a5e601e
Compare
@@ -502,6 +503,26 @@ func (i *sdkInjector) addParentResourceLabels(ctx context.Context, uid bool, ns | |||
if uid { | |||
resources[semconv.K8SJobUIDKey] = string(owner.UID) | |||
} | |||
|
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.
Can we also add a unit test, while we're at it? LGTM otherwise.
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.
sure, I'll take a look and get back to you soon.
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.
done, pls give it another review :-)
a5e601e
to
e011d61
Compare
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
e011d61
to
4b3f56e
Compare
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
Signed-off-by: Janario Oliveira <[email protected]>
* Fix Cronjob name Signed-off-by: Janario Oliveira <[email protected]> * Mapped Job permissions Signed-off-by: Janario Oliveira <[email protected]> * Add changelog Signed-off-by: Janario Oliveira <[email protected]> * Add Job rbac permissions Signed-off-by: Janario Oliveira <[email protected]> * Add e2e test case Signed-off-by: Janario Oliveira <[email protected]> * Parent resources unit test Signed-off-by: Janario Oliveira <[email protected]> * ChooseServiceName unit test Signed-off-by: Janario Oliveira <[email protected]> * Generated manifest Signed-off-by: Janario Oliveira <[email protected]> * Rename e2e Signed-off-by: Janario Oliveira <[email protected]> * Fix e2e tests Signed-off-by: Janario Oliveira <[email protected]> * Fix lint Signed-off-by: Janario Oliveira <[email protected]> --------- Signed-off-by: Janario Oliveira <[email protected]>
Description:
Here we will change the service name resolver to give precedence for CronJob instead of Job since it would be the owner.
Also we start to collect the owner of Job if it has one, in some cases CronJob.
Link to tracking Issue(s):
Testing:
Documentation: