-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And apply static plugin Signed-off-by: Toni Finger <[email protected]>
- Loading branch information
1 parent
bfd1a0f
commit 9747f3c
Showing
4 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
from interface import KubernetesClusterPlugin | ||
from pytest_kind import KindCluster | ||
from pathlib import Path | ||
|
||
|
||
class PluginKind(KubernetesClusterPlugin): | ||
""" | ||
Plugin to handle the provisioning of kubernetes cluster for | ||
Plugin to handle the provisioning of kubernetes cluster for | ||
conformance testing purpose with the use of Kind | ||
""" | ||
|
||
def _create_cluster(self): | ||
self.cluster_name= "scs-cluster" | ||
self.cluster_name = "scs-cluster" | ||
self.cluster = KindCluster(self.cluster_name) | ||
self.cluster.create() | ||
self.kubeconfig_path=str(self.cluster.kubeconfig_path.resolve()) | ||
self.kubeconfig_path = str(self.cluster.kubeconfig_path.resolve()) | ||
|
||
def _delete_cluster(self): | ||
self.cluster.delete() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from interface import KubernetesClusterPlugin | ||
import os | ||
|
||
|
||
class PluginStatic(KubernetesClusterPlugin): | ||
""" | ||
Plugin to handle the provisioning of kubernetes | ||
using a kubeconfig file | ||
""" | ||
def _create_cluster(self): | ||
self.kubeconfig_path = os.environ["KUBECONFIG"] | ||
|
||
def _delete_cluster(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from plugin_kind import PluginKind | ||
from plugin_static import PluginStatic | ||
import os | ||
|
||
if __name__ == "__main__": | ||
|