kops
using Kops and kubectl binaries. It includes methods to configure the Kopsenvironment, 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@138d7c653ef062b0114657757e222bdbe4211a48Entrypoint
Return Type
Kops Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
func (m *MyModule) Example() *dagger.Kops {
return dag.
Kops()
}@function
def example() -> dagger.Kops:
return (
dag.kops()
)@func()
example(): Kops {
return dag
.kops()
}Types
Kops 🔗
kubectl() 🔗
Return Type
String ! Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
kubectlfunc (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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
kops-vfunc (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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
clusterfunc (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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
storagefunc (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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
namefunc (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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
credentialsfunc (m *MyModule) Example() *dagger.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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
kops-containerfunc (m *MyModule) Example() *dagger.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
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
export-kubectlfunc (m *MyModule) Example() *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| credentials | File ! | - | credentials file(google cloud for the time being), required |
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
with-credentials --credentials file:pathfunc (m *MyModule) Example(credentials *dagger.File) *dagger.Kops {
return dag.
Kops().
WithCredentials(credentials)
}@function
def example(credentials: dagger.File) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| storage | String ! | - | location of state storeage, required |
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
with-state-storage --storage stringfunc (m *MyModule) Example(storage string) *dagger.Kops {
return dag.
Kops().
WithStateStorage(storage)
}@function
def example(storage: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String ! | - | cluster name, required |
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
with-cluster --name stringfunc (m *MyModule) Example(name string) *dagger.Kops {
return dag.
Kops().
WithCluster(name)
}@function
def example(name: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | "1.27.0" | kops version |
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
with-kops --version stringfunc (m *MyModule) Example(version string) *dagger.Kops {
return dag.
Kops().
WithKops(version)
}@function
def example(version: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | String ! | "1.24.11" | kubectl version |
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/kops@138d7c653ef062b0114657757e222bdbe4211a48 call \
with-kubectl --version stringfunc (m *MyModule) Example(version string) *dagger.Kops {
return dag.
Kops().
WithKubectl(version)
}@function
def example(version: str) -> dagger.Kops:
return (
dag.kops()
.with_kubectl(version)
)@func()
example(version: string): Kops {
return dag
.kops()
.withKubectl(version)
}