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

feat: CommandArgsOverrider supports Job #3414

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

chaunceyjiang
Copy link
Member

@chaunceyjiang chaunceyjiang commented Apr 17, 2023

What type of PR is this?
/kind feature

What this PR does / why we need it:

CommandArgsOverrider supports Job

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

case util.JobKind:
jobObj := &batchv1.Job{}
if err := helper.ConvertToTypedObject(rawObj, jobObj); err != nil {
return nil, fmt.Errorf("failed to convert Job from unstructured object: %v", err)
}
return extractPatchesBy(jobObj.Spec.Template.Spec, podTemplatePrefix, imageOverrider)

Consistent with imageOverride.

Does this PR introduce a user-facing change?:

`karmada-controller-manager`:  The overriders `commandsOverrider` and `argOverride` in `OverridePolicy` now support `Job` resources.

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 17, 2023
@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 17, 2023
@chaunceyjiang chaunceyjiang changed the title CommandArgsOverrider supports Job feat: CommandArgsOverrider supports Job Apr 17, 2023
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/assign

@RainbowMango
Copy link
Member

I just noticed that the CommandArgsOverrider now only supports K8s native resources, right?

@chaunceyjiang
Copy link
Member Author

I just noticed that the CommandArgsOverrider now only supports K8s native resources, right?

Yes.

@chaunceyjiang
Copy link
Member Author

I just noticed that the CommandArgsOverrider now only supports K8s native resources, right?

By the way, i think we should support initContainers, not just containers.

@RainbowMango
Copy link
Member

By the way, i think we should support initContainers, not just containers.

Yes, however, the API needs to be updated accordingly.

@RainbowMango
Copy link
Member

It's ok to let this PR focus on the Job, have you tested it?

@chaunceyjiang
Copy link
Member Author

karmada:
image

op:

image

memer cluster:
image

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
Thanks.

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 18, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 18, 2023
@karmada-bot karmada-bot merged commit ef6d595 into karmada-io:master Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants