Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: michal.gubricky <[email protected]>
  • Loading branch information
michal-gubricky committed Nov 21, 2024
1 parent 8b893b8 commit 70f580c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Tests/kaas/plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ In addition to the core requirements, ensure the following are set up:
* An **OpenStack** environment configured and accessible.
* A `clouds.yaml` file defining OpenStack credentials and endpoints.
* An installing the envsubst via this command:

```bash
GOBIN=/tmp go install github.com/drone/envsubst/v2/cmd/envsubst@latest
```
Expand All @@ -57,7 +58,7 @@ In addition to the core requirements, ensure the following are set up:

Before running the `cluster-stacks` plugin, you need to set up the following environment variable:

- **GIT_ACCESS_TOKEN**: This token is required for Git operations, especially if your repository is private.
* **GIT_ACCESS_TOKEN**: This token is required for Git operations, especially if your repository is private.

To set the `GIT_ACCESS_TOKEN`, run the following command in your terminal:

Expand Down
7 changes: 3 additions & 4 deletions Tests/kaas/plugin/plugin_cluster_stacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def setup_environment_variables(self):


class PluginClusterStacks(KubernetesClusterPlugin):
def __init__(self, config_file=None):
def __init__(self, config_file):
self.config = load_config(config_file) if config_file else {}
logger.debug(self.config)
self.working_directory = os.getcwd()
Expand All @@ -132,7 +132,7 @@ def __init__(self, config_file=None):
self.cs_namespace = self.config.get('cs_namespace')
logger.debug(f"Working from {self.working_directory}")

def create_cluster(self, cluster_name=None, version=None, kubeconfig_filepath=None):
def create_cluster(self, cluster_name, version, kubeconfig_filepath):
self.cluster_name = cluster_name
self.cluster_version = version
self.kubeconfig_cs_cluster = kubeconfig_filepath
Expand Down Expand Up @@ -176,10 +176,9 @@ def create_cluster(self, cluster_name=None, version=None, kubeconfig_filepath=No
self._retrieve_kubeconfig(namespace=self.cs_namespace, kubeconfig=self.kubeconfig_mgmnt)

# Wait for workload system pods to be ready
# wait_for_workload_pods_ready(kubeconfig_path=self.kubeconfig_cs_cluster)
wait_for_pods(self, ["kube-system"], timeout=600, interval=15, kubeconfig=self.kubeconfig_cs_cluster)

def delete_cluster(self, cluster_name=None, kubeconfig_filepath=None):
def delete_cluster(self, cluster_name, kubeconfig_filepath):
self.cluster_name = cluster_name
kubeconfig_cs_cluster_filename = kubeconfig_filepath

Expand Down
2 changes: 0 additions & 2 deletions Tests/kaas/plugin/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ google-auth==2.34.0
# via kubernetes
idna==3.8
# via requests
junitparser==3.2.0
# via -r requirements.in
kubernetes==30.1.0
# via -r requirements.in
oauthlib==3.2.2
Expand Down
2 changes: 2 additions & 0 deletions Tests/kaas/plugin/run_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def create(plugin_kind, plugin_config, clusterspec_path, cluster_id):
@click.argument('clusterspec_path', type=click.Path(exists=True, dir_okay=False))
@click.argument('cluster_id', type=str, default="default")
def delete(plugin_kind, plugin_config, clusterspec_path, cluster_id):
clusterspec = load_spec(clusterspec_path)['clusters']
clusterinfo = clusterspec[cluster_id]
plugin = init_plugin(plugin_kind, plugin_config)
plugin.delete_cluster(cluster_id, os.path.abspath(clusterinfo['kubeconfig']))

Expand Down

0 comments on commit 70f580c

Please sign in to comment.