pulumi/tests/testdata/codegen/kubernetes20/go/kubernetes/config/config.go

28 lines
1.0 KiB
Go

// Code generated by test DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package config
import (
"github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = utilities.GetEnvOrDefault
// The contents of a kubeconfig file or the path to a kubeconfig file. If this is set, this config will be used instead of $KUBECONFIG.
func GetKubeconfig(ctx *pulumi.Context) string {
return config.Get(ctx, "kubernetes:kubeconfig")
}
// If present, the default namespace to use. This flag is ignored for cluster-scoped resources.
//
// A namespace can be specified in multiple places, and the precedence is as follows:
// 1. `.metadata.namespace` set on the resource.
// 2. This `namespace` parameter.
// 3. `namespace` set for the active context in the kubeconfig.
func GetNamespace(ctx *pulumi.Context) string {
return config.Get(ctx, "kubernetes:namespace")
}