github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/config/config.go (about)

     1  // Code generated by pulumigen DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package config
     5  
     6  import (
     7  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     8  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
     9  )
    10  
    11  // If present, the name of the kubeconfig cluster to use.
    12  func GetCluster(ctx *pulumi.Context) string {
    13  	return config.Get(ctx, "kubernetes:cluster")
    14  }
    15  
    16  // If present, the name of the kubeconfig context to use.
    17  func GetContext(ctx *pulumi.Context) string {
    18  	return config.Get(ctx, "kubernetes:context")
    19  }
    20  
    21  // If present and set to true, the provider will delete resources associated with an unreachable Kubernetes cluster from Pulumi state
    22  func GetDeleteUnreachable(ctx *pulumi.Context) bool {
    23  	return config.GetBool(ctx, "kubernetes:deleteUnreachable")
    24  }
    25  
    26  // BETA FEATURE - If present and set to true, allow ConfigMaps to be mutated.
    27  // This feature is in developer preview, and is disabled by default.
    28  //
    29  // This config can be specified in the following ways using this precedence:
    30  // 1. This `enableConfigMapMutable` parameter.
    31  // 2. The `PULUMI_K8S_ENABLE_CONFIGMAP_MUTABLE` environment variable.
    32  func GetEnableConfigMapMutable(ctx *pulumi.Context) bool {
    33  	return config.GetBool(ctx, "kubernetes:enableConfigMapMutable")
    34  }
    35  
    36  // Deprecated. If present and set to true, enable server-side diff calculations.
    37  //
    38  // Deprecated: This option has been replaced by `enableServerSideApply`.
    39  func GetEnableDryRun(ctx *pulumi.Context) bool {
    40  	return config.GetBool(ctx, "kubernetes:enableDryRun")
    41  }
    42  
    43  // Obsolete. This option has no effect.
    44  //
    45  // Deprecated: This option is deprecated, and will be removed in a future release.
    46  func GetEnableReplaceCRD(ctx *pulumi.Context) bool {
    47  	return config.GetBool(ctx, "kubernetes:enableReplaceCRD")
    48  }
    49  
    50  // BETA FEATURE - If present and set to true, enable Server-Side Apply mode.
    51  // See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
    52  // This feature is in developer preview, and is disabled by default.
    53  func GetEnableServerSideApply(ctx *pulumi.Context) bool {
    54  	return config.GetBool(ctx, "kubernetes:enableServerSideApply")
    55  }
    56  
    57  // 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.
    58  func GetKubeconfig(ctx *pulumi.Context) string {
    59  	return config.Get(ctx, "kubernetes:kubeconfig")
    60  }
    61  
    62  // If present, the default namespace to use. This flag is ignored for cluster-scoped resources.
    63  //
    64  // A namespace can be specified in multiple places, and the precedence is as follows:
    65  // 1. `.metadata.namespace` set on the resource.
    66  // 2. This `namespace` parameter.
    67  // 3. `namespace` set for the active context in the kubeconfig.
    68  func GetNamespace(ctx *pulumi.Context) string {
    69  	return config.Get(ctx, "kubernetes:namespace")
    70  }
    71  
    72  // BETA FEATURE - If present, render resource manifests to this directory. In this mode, resources will not
    73  // be created on a Kubernetes cluster, but the rendered manifests will be kept in sync with changes
    74  // to the Pulumi program. This feature is in developer preview, and is disabled by default.
    75  //
    76  // Note that some computed Outputs such as status fields will not be populated
    77  // since the resources are not created on a Kubernetes cluster. These Output values will remain undefined,
    78  // and may result in an error if they are referenced by other resources. Also note that any secret values
    79  // used in these resources will be rendered in plaintext to the resulting YAML.
    80  func GetRenderYamlToDirectory(ctx *pulumi.Context) string {
    81  	return config.Get(ctx, "kubernetes:renderYamlToDirectory")
    82  }
    83  
    84  // If present and set to true, the provider will use strict configuration mode. Recommended for production stacks. In this mode, the default Kubernetes provider is disabled, and the `kubeconfig` and `context` settings are required for Provider configuration. These settings unambiguously ensure that every Kubernetes resource is associated with a particular cluster.
    85  func GetStrictMode(ctx *pulumi.Context) bool {
    86  	return config.GetBool(ctx, "kubernetes:strictMode")
    87  }
    88  
    89  // If present and set to true, suppress apiVersion deprecation warnings from the CLI.
    90  //
    91  // This config can be specified in the following ways, using this precedence:
    92  // 1. This `suppressDeprecationWarnings` parameter.
    93  // 2. The `PULUMI_K8S_SUPPRESS_DEPRECATION_WARNINGS` environment variable.
    94  func GetSuppressDeprecationWarnings(ctx *pulumi.Context) bool {
    95  	return config.GetBool(ctx, "kubernetes:suppressDeprecationWarnings")
    96  }
    97  
    98  // If present and set to true, suppress unsupported Helm hook warnings from the CLI.
    99  //
   100  // This config can be specified in the following ways, using this precedence:
   101  // 1. This `suppressHelmHookWarnings` parameter.
   102  // 2. The `PULUMI_K8S_SUPPRESS_HELM_HOOK_WARNINGS` environment variable.
   103  func GetSuppressHelmHookWarnings(ctx *pulumi.Context) bool {
   104  	return config.GetBool(ctx, "kubernetes:suppressHelmHookWarnings")
   105  }