Dagger
Search

kops

using Kops and kubectl binaries. It includes methods to configure the Kops
environment, export kubeconfig files, and set various parameters such as cluster
name, state storage, and credentials.

Installation

dagger install github.com/dictybase-docker/dagger-of-dcr/kops@320e2dab141bc6c728f623e9ac4797aaf28b769e

Entrypoint

Return Type
Kops
Example
func (m *myModule) example() *Kops  {
	return dag.
			Kops()
}
@function
def example() -> dag.Kops:
	return (
		dag.kops()
	)
@func()
example(): Kops {
	return dag
		.kops()
}

Types

Kops 🔗

kubectl() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kops().
			Kubectl(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kops()
		.kubectl()
	)
@func()
async example(): Promise<string> {
	return dag
		.kops()
		.kubectl()
}

kopsV() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kops().
			KopsV(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kops()
		.kops_v()
	)
@func()
async example(): Promise<string> {
	return dag
		.kops()
		.kopsV()
}

cluster() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kops().
			Cluster(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kops()
		.cluster()
	)
@func()
async example(): Promise<string> {
	return dag
		.kops()
		.cluster()
}

storage() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kops().
			Storage(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kops()
		.storage()
	)
@func()
async example(): Promise<string> {
	return dag
		.kops()
		.storage()
}

name() 🔗

Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Kops().
			Name(ctx)
}
@function
async def example() -> str:
	return await (
		dag.kops()
		.name()
	)
@func()
async example(): Promise<string> {
	return dag
		.kops()
		.name()
}

credentials() 🔗

Return Type
File !
Example
func (m *myModule) example() *File  {
	return dag.
			Kops().
			Credentials()
}
@function
def example() -> dagger.File:
	return (
		dag.kops()
		.credentials()
	)
@func()
example(): File {
	return dag
		.kops()
		.credentials()
}

kopsContainer() 🔗

KopsContainer sets up a container with specified versions of kubectl and kops binaries from given URLs

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			Kops().
			KopsContainer()
}
@function
def example() -> dagger.Container:
	return (
		dag.kops()
		.kops_container()
	)
@func()
example(): Container {
	return dag
		.kops()
		.kopsContainer()
}

exportKubectl() 🔗

ExportKubectl exports the kubeconfig file for the specified Kops cluster to a specified output path

Return Type
File !
Example
func (m *myModule) example() *File  {
	return dag.
			Kops().
			ExportKubectl()
}
@function
def example() -> dagger.File:
	return (
		dag.kops()
		.export_kubectl()
	)
@func()
example(): File {
	return dag
		.kops()
		.exportKubectl()
}

withCredentials() 🔗

WithCredentials sets the credentials file

Return Type
Kops !
Arguments
NameTypeDefault ValueDescription
credentialsFile !-credentials file(google cloud for the time being), required
Example
func (m *myModule) example(credentials *File) *Kops  {
	return dag.
			Kops().
			WithCredentials(credentials)
}
@function
def example(credentials: dagger.File) -> dag.Kops:
	return (
		dag.kops()
		.with_credentials(credentials)
	)
@func()
example(credentials: File): Kops {
	return dag
		.kops()
		.withCredentials(credentials)
}

withStateStorage() 🔗

WithStateStorage sets the location of the state storage

Return Type
Kops !
Arguments
NameTypeDefault ValueDescription
storageString !-location of state storeage, required
Example
func (m *myModule) example(storage string) *Kops  {
	return dag.
			Kops().
			WithStateStorage(storage)
}
@function
def example(storage: str) -> dag.Kops:
	return (
		dag.kops()
		.with_state_storage(storage)
	)
@func()
example(storage: string): Kops {
	return dag
		.kops()
		.withStateStorage(storage)
}

withCluster() 🔗

WithCluster sets the cluster name

Return Type
Kops !
Arguments
NameTypeDefault ValueDescription
nameString !-cluster name, required
Example
func (m *myModule) example(name string) *Kops  {
	return dag.
			Kops().
			WithCluster(name)
}
@function
def example(name: str) -> dag.Kops:
	return (
		dag.kops()
		.with_cluster(name)
	)
@func()
example(name: string): Kops {
	return dag
		.kops()
		.withCluster(name)
}

withKops() 🔗

WithKops sets the Kops version

Return Type
Kops !
Arguments
NameTypeDefault ValueDescription
versionString !"1.27.0"kops version
Example
func (m *myModule) example(version string) *Kops  {
	return dag.
			Kops().
			WithKops(version)
}
@function
def example(version: str) -> dag.Kops:
	return (
		dag.kops()
		.with_kops(version)
	)
@func()
example(version: string): Kops {
	return dag
		.kops()
		.withKops(version)
}

withKubectl() 🔗

WithKubectl sets the kubectl version

Return Type
Kops !
Arguments
NameTypeDefault ValueDescription
versionString !"1.24.11"kubectl version
Example
func (m *myModule) example(version string) *Kops  {
	return dag.
			Kops().
			WithKubectl(version)
}
@function
def example(version: str) -> dag.Kops:
	return (
		dag.kops()
		.with_kubectl(version)
	)
@func()
example(version: string): Kops {
	return dag
		.kops()
		.withKubectl(version)
}