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: custom cluster configs ✨ #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liquidiert
Copy link
Contributor

@liquidiert liquidiert commented Sep 30, 2024

  • add cluster config option in ClusterOptions
  • add cluster config parsing
  • add cluster config pytest arg
  • add unit tests

closes #17

  - add cluster config option in ClusterOptions
  - add cluster config parsing
  - add cluster config pytest arg
  - add unit tests
@liquidiert liquidiert requested a review from Schille September 30, 2024 09:54
group = parser.getgroup("k8s")
group.addoption(
k8s_group = parser.getgroup("k8s")
k8s_group.addoption(
"--k8s-cluster-name",
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a mutual exlusion of --k8s-cluster-name and --k8s-cluster-config or precedence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet. I think it should be mutually exclusive and the name should be required when provider config is given

+ opts
)
self._exec(
[
"kubeconfig",
"get",
self.cluster_name,
self.cluster_name if not config_yaml else config_yaml["name"],
Copy link
Member

Choose a reason for hiding this comment

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

Is it better to fill up self.cluster_name with config_yaml["name"] somewhere else during init?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will look for a better place :)

Copy link
Member

@Schille Schille left a comment

Choose a reason for hiding this comment

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

Overall it's probably better to somehow integrate the precedence of cluster_name and the name coming from an optional config file?

@liquidiert
Copy link
Contributor Author

Overall it's probably better to somehow integrate the precedence of cluster_name and the name coming from an optional config file?

I think we should make it mutually exclusive and require the name in the config file

@gaelgatelement
Copy link

Any news about this feature?

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.

Custom cluster configs
3 participants