Documentation ¶
Index ¶
Constants ¶
const ( // GKECreateLabel is the name of the label which be added to any cluster created with KTF and // indicates which Google Cloud IAM Service Account created the cluster. GKECreateLabel = "ktf_created_by" // GKEClusterType indicates that the Kubernetes cluster was provisioned by Google Kubernetes Engine (GKE) GKEClusterType clusters.Type = "gke" // GKECredsVar indicates the environment variable used to provide auth credentials for GKE GKECredsVar = "GOOGLE_APPLICATION_CREDENTIALS" // GKEProjectVar indicates the environment variable used to provide a default gcloud project GKEProjectVar = "GOOGLE_PROJECT" // GKELocationVar indicates the environment variable used to provide a default gcloud region GKELocationVar = "GOOGLE_LOCATION" )
Variables ¶
var ( // EnvKeepCluster indicates whether the caller wants the cluster to remain after tests for manual inspection. EnvKeepCluster = os.Getenv("GKE_KEEP_CLUSTER") )
Functions ¶
func NewFromExisting ¶ added in v0.3.2
func NewFromExisting(ctx context.Context, name, project, location string, jsonCreds []byte) (clusters.Cluster, error)
NewFromExisting provides a new clusters.Cluster backed by an existing GKE cluster.
func NewFromExistingWithEnv ¶ added in v0.3.2
NewFromExistingWithEnv provides a new clusters.Cluster backed by an existing GKE cluster, but allows some of the configuration to be filled in from the ENV instead of arguments.
Types ¶
type Builder ¶
type Builder struct { Name string // contains filtered or unexported fields }
Builder generates clusters.Cluster objects backed by GKE given provided configuration options.
func NewBuilder ¶
NewBuilder provides a new *Builder object.
func (*Builder) Build ¶
Build creates and configures clients for a GKE-based Kubernetes clusters.Cluster.
func (*Builder) WithClusterMinorVersion ¶
WithClusterMinorVersion configures the Kubernetes cluster version according to a provided Major and Minor version, but will automatically select the latest patch version of that minor release (for convenience over the caller having to know the entire version tag).
func (*Builder) WithClusterVersion ¶
WithClusterVersion configures the Kubernetes cluster version for the Builder to use when building the GKE cluster.