mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-20 14:47:17 +02:00
fix: pulumi stack for k3s-prod-1
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package networking
|
||||
|
||||
import (
|
||||
v1 "github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes/core/v1"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
)
|
||||
|
||||
func NewNetworking(ctx *pulumi.Context, env string) error {
|
||||
// Create a Kubernetes Namespace
|
||||
namespaceName := "networking"
|
||||
namespace, err := v1.NewNamespace(ctx, namespaceName, &v1.NamespaceArgs{
|
||||
Metadata: &v1.ObjectMetaArgs{
|
||||
Name: pulumi.String(namespaceName),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Export the name of the namespace
|
||||
ctx.Export("networkingNamespaceName", namespace.Metadata.Name())
|
||||
|
||||
if err := NewCertManager(ctx, env); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user