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: checks if operator exists for server-related cmds #1081

Merged
merged 9 commits into from
Sep 16, 2022

Conversation

bartoszmajsak
Copy link
Contributor

@bartoszmajsak bartoszmajsak commented Sep 13, 2022

Short description of what this resolves:

The check is performed by simply ensuring that CRD exists and failing with hint installation otherwise. For now it's only applied to ike develop as that's the only command interacting with the cluster on the client side. Others, such as create or delete can be e.g. run as part of Tekton task.

Changes proposed in this pull request:

  • root command incorporates check for installation prereq for all commands which require server/cluster side interaction
  • commands should be marked with special annotation in order for this check to be performed
Annotations: map[string]string{
			cmd.AnnotationOperatorRequired: "true",
		},
  • reworks pre-runs to fulfil this req
  • adds dynamic client which is used for the check

Fixes #1023

By simply checking if CRD exists and failing with hint otherwise
@bartoszmajsak bartoszmajsak added kind/enhancement Kind: New feature or improvement component/cli Component: CLI tooling labels Sep 13, 2022
@bartoszmajsak bartoszmajsak merged commit bdf159e into master Sep 16, 2022
@bartoszmajsak bartoszmajsak deleted the check_operator branch September 16, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cli Component: CLI tooling kind/enhancement Kind: New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI prerequisite checks
2 participants