-
Notifications
You must be signed in to change notification settings - Fork 23
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/add cluster stacks plugin #800
base: 710-feature-request-enable-compliance-tests-to-use-plugins-for-cluster-provisioning
Are you sure you want to change the base?
Feat/add cluster stacks plugin #800
Conversation
2d37443
to
eefc02f
Compare
Tests/kaas/plugin/README.md
Outdated
|
||
### Configuring clusterspec.yaml file | ||
|
||
The `clusterspec.yaml` file is used to set parameters for creating a Kubernetes cluster with the `cluster-stacks` plugin. This file allows you to specify details related to the cluster-stack, Git integration, and cluster configurations. |
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.
The clusterspec.yaml
only contains information that is not specific to the plugin. Information that is specific to the test subject (i.e., the cloud under test) should be defined somewhere else.
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.
Ah, okay. Then we need to think about some new config file where will be defined parameters/variables specific to the plugins (kind, cluster-stacks, etc.) or we can say that the user/tester needs to define some env variables before executing the plugin. What do you think?
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.
The plugin's constructor will take the path of a config file, and that config file should contain everything that is specific to the plugin and the test subject (it could in turn refer to other files, if necessary). The path of the config file can be specified per subject in config.toml.
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 thought clusterspec.yaml
was the config file, as it was the only argument (called CLUSTERSPEC_PATH
) you could pass to the plugin. However, it seems that it was changed in yesterday's commits. I will take a closer look into that.
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.
It now take an additional configuration file specific to the plugin. I have also added an example file, see plugin-cluster-stacks-config.yaml
.
And I have one question regarding this. How should the plugin configuration file look when you want to provision multiple clusters? Do you need a separate configuration file for each cluster, or is a single file sufficient, with the clusterspec_cluster
variable determining the cluster?
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.
In my mind, the plugin will merge the plugin configuration with the clusterspec information.
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.
So it should be merged based on the clusterspec_cluster
. In my mind, the config file for the plugin would then look something like this:
current-k8s-release:
clouds_yaml_path: "~/.config/openstack/clouds.yaml" # Path to the OpenStack clouds.yaml file
cs_name: "scs" # Cluster Stack Name
cs_version: "v1" # Cluster Stack Version
# Additional configurations
...
...
...
current-k8s-release-1:
...
...
...
Tests/kaas/plugin/README.md
Outdated
|
||
```yaml | ||
cs_name: <cs_name> # Default: "scs" | ||
cs_k8s_version: <cs_k8s_version> # Default: "1.29" |
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.
this should be taken from the branch (and the branch will be supplied to the plugin; the plugin need not read the clusterspec.yaml)
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.
Yes, I agree that the cs_k8s_version
should be taken from the branch parameter in the clusterspec.yaml
file.
Tests/kaas/plugin/plugin_kind.py
Outdated
@@ -21,7 +21,7 @@ def _create_cluster(self): | |||
if self.config is None: | |||
self.cluster.create() | |||
else: | |||
self.cluster.create(self.config) | |||
self.cluster.create() |
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.
Why this change? It has nothing to do with cluster stacks.
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.
This change is currently outdated, as the code in #753 has also been modified.
Tests/kaas/plugin/run_plugin.py
Outdated
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.
this needs to be rebased on the latest version of the target branch
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.
Rebased onto the latest version
f4bdba7
to
e5952c0
Compare
If this has been rebased to the latest version, why then does it have merge conflicts? |
As you can see, I added that comment on 11.11.2024 at 10:37 a.m., and then, after rebasing, a new commit was added to the target branch later that afternoon. |
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
… update README Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
Signed-off-by: michal.gubricky <[email protected]>
…oad cluster Signed-off-by: michal.gubricky <[email protected]>
e5952c0
to
b5bb995
Compare
Understood. Thanks for doing all the great work. Please work with Toni to get this merged asap. |
Signed-off-by: michal.gubricky <[email protected]>
This PR implement plugin for cluster-stacks
Fixes #774