mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 18:58:28 +02:00
23 lines
607 B
Python
23 lines
607 B
Python
from pulumi import ResourceOptions
|
|
from pulumi_kubernetes.yaml import ConfigGroup
|
|
|
|
from pathlib import Path
|
|
|
|
from ..kubevirt import NewKubeVirt
|
|
|
|
|
|
class NewVirtualMachines:
|
|
CURRENT_DIR = Path(__file__).parent
|
|
CURRENT_DIR_STR = CURRENT_DIR.as_posix()
|
|
|
|
def __init__(self, provider, kubevirt: NewKubeVirt):
|
|
self.provider = provider
|
|
|
|
self.kubevirt = ConfigGroup(
|
|
"virtual-machines",
|
|
files=[self.CURRENT_DIR_STR + "/yaml/*.yaml"],
|
|
opts=ResourceOptions(
|
|
provider=self.provider, depends_on=kubevirt.resouces()
|
|
),
|
|
)
|