"""A Kubernetes Python Pulumi program""" import pulumi import pulumi_kubernetes as k8s from pulumi_kubernetes.apps.v1 import Deployment, DeploymentSpecArgs from pulumi_kubernetes.meta.v1 import LabelSelectorArgs, ObjectMetaArgs from pulumi_kubernetes.core.v1 import ContainerArgs, PodSpecArgs, PodTemplateSpecArgs import yaml def deploy_gloo_edge_enterprise(k8s_provider): from pulumi_kubernetes.helm.v3 import Chart, ChartOpts, FetchOpts loaded_values = yaml.load(open('./values_yaml'), Loader=yaml.FullLoader) k8s.core.v1.Namespace( 'gloo-system', opts=pulumi.ResourceOptions(provider=k8s_provider), metadata=k8s.meta.v1.ObjectMetaArgs(name="gloo-system")) Chart( "glooe-helm-chart", config=ChartOpts( chart="gloo-ee", version="v1.6.2", namespace="gloo-system", fetch_opts=FetchOpts( repo="http://storage.googleapis.com/gloo-ee-helm", ), values=loaded_values, ), opts=pulumi.ResourceOptions(provider=k8s_provider), ) # The K8s base stack is simply an eks cluster that is deployed using default eks.cluster settings. config = pulumi.Config() stack_name = config.require("stack_name") stack_ref = pulumi.StackReference(stack_name) kubeconfig = stack_ref.get_output("kubeconfig") k8s_provider = k8s.Provider('k8s-provider', kubeconfig=kubeconfig) deploy_gloo_edge_enterprise(k8s_provider)