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

Allow creating cluster wide tasks #26

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Conversation

adejanovski
Copy link
Contributor

Fixes #25

@adejanovski adejanovski requested a review from burmanm February 15, 2024 16:46
@@ -222,3 +222,11 @@ func CreateTask(ctx context.Context, kubeClient client.Client, command controlap

return task, nil
}

func DcNames(dcName string) []string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this exported? Also, instead of modifying each task, would it have made more sense to modify the "CreateClusterTask()" function instead to modify this part:

	if len(datacenters) > 0 {
		task.Spec.Datacenters = datacenters
	}

To something like

	if len(datacenters) > 0 && datacenters[0] != "" {
		task.Spec.Datacenters = datacenters
	}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is this exported?

For testing purposes.

Also, instead of modifying each task, would it have made more sense to modify the "CreateClusterTask()" function instead to modify this part:

Done

@adejanovski adejanovski requested a review from burmanm February 15, 2024 17:16
@adejanovski adejanovski merged commit 41b0d34 into main Feb 15, 2024
2 checks passed
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 creating cluster wide tasks
2 participants