kind
A Dagger Module for integrating with the KinD
Installation
dagger install github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31aEntrypoint
Return Type
Kind !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| socket | Socket ! | - | Unix socket to connect to the external Docker Engine. Please carefully use this option it can expose your host to the container. |
| containerImage | String | - | No description provided |
| kindImage | String | - | No description provided |
Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
func (m *MyModule) Example(socket *dagger.Socket) *dagger.Kind {
return dag.
Kind(socket)
}@function
def example(socket: dagger.Socket, ) -> dagger.Kind:
return (
dag.kind(socket)
)@func()
example(socket: Socket, ): Kind {
return dag
.kind(socket)
}Types
Kind 🔗
container() 🔗
Container that contains the kind and k9s binaries
Return Type
Container ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
containerfunc (m *MyModule) Example(socket *dagger.Socket) *dagger.Container {
return dag.
Kind(socket).
Container()
}@function
def example(socket: dagger.Socket, ) -> dagger.Container:
return (
dag.kind(socket)
.container()
)@func()
example(socket: Socket, ): Container {
return dag
.kind(socket)
.container()
}cluster() 🔗
Returns a cluster object that can be used to interact with the kind cluster
Return Type
Cluster !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | String | "kind" | Name of the cluster |
| disableDefaultCni | Boolean | false | If true, the default CNI is not used. This is useful for running kind clusters with a different CNI. |
Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
clusterfunc (m *MyModule) Example(socket *dagger.Socket) *dagger.KindCluster {
return dag.
Kind(socket).
Cluster()
}@function
def example(socket: dagger.Socket, ) -> dagger.KindCluster:
return (
dag.kind(socket)
.cluster()
)@func()
example(socket: Socket, ): KindCluster {
return dag
.kind(socket)
.cluster()
}Cluster 🔗
Represents a kind cluster
name() 🔗
Name of the cluster
Return Type
String ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
namefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Kind().
Cluster().
Name(ctx)
}@function
async def example() -> str:
return await (
dag.kind()
.cluster()
.name()
)@func()
async example(): Promise<string> {
return dag
.kind()
.cluster()
.name()
}network() 🔗
Network name of the cluster. This should be the same as the network name of the dagger-engine containers
Return Type
String ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
networkfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Kind().
Cluster().
Network(ctx)
}@function
async def example() -> str:
return await (
dag.kind()
.cluster()
.network()
)@func()
async example(): Promise<string> {
return dag
.kind()
.cluster()
.network()
}kindImage() 🔗
KindImage to use for the cluster If not provided, the default image is used
Return Type
String ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
kind-imagefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Kind().
Cluster().
KindImage(ctx)
}@function
async def example() -> str:
return await (
dag.kind()
.cluster()
.kind_image()
)@func()
async example(): Promise<string> {
return dag
.kind()
.cluster()
.kindImage()
}disableDefaultCni() 🔗
If true, the default CNI is not used. This is useful for running kind clusters with a different CNI.
Return Type
Boolean ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
disable-default-cnifunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Kind().
Cluster().
DisableDefaultCni(ctx)
}@function
async def example() -> bool:
return await (
dag.kind()
.cluster()
.disable_default_cni()
)@func()
async example(): Promise<boolean> {
return dag
.kind()
.cluster()
.disableDefaultCni()
}exist() 🔗
Check if the cluster exists or not
Return Type
Boolean ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
existfunc (m *MyModule) Example(ctx context.Context) bool {
return dag.
Kind().
Cluster().
Exist(ctx)
}@function
async def example() -> bool:
return await (
dag.kind()
.cluster()
.exist()
)@func()
async example(): Promise<boolean> {
return dag
.kind()
.cluster()
.exist()
}create() 🔗
Create creates the cluster if it doesn’t already exist.
Return Type
String ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
createfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Kind().
Cluster().
Create(ctx)
}@function
async def example() -> str:
return await (
dag.kind()
.cluster()
.create()
)@func()
async example(): Promise<string> {
return dag
.kind()
.cluster()
.create()
}delete() 🔗
Delete deletes the cluster if it exists.
Return Type
String ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
deletefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Kind().
Cluster().
Delete(ctx)
}@function
async def example() -> str:
return await (
dag.kind()
.cluster()
.delete()
)@func()
async example(): Promise<string> {
return dag
.kind()
.cluster()
.delete()
}logs() 🔗
Exports cluster logs to a directory
Return Type
Directory ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
logsfunc (m *MyModule) Example() *dagger.Directory {
return dag.
Kind().
Cluster().
Logs()
}@function
def example() -> dagger.Directory:
return (
dag.kind()
.cluster()
.logs()
)@func()
example(): Directory {
return dag
.kind()
.cluster()
.logs()
}kubeconfig() 🔗
Exports cluster kubeconfig
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| internal | Boolean | false | If true, the internal address is used in the kubeconfig. This is useful for running kubectl commands from within other containers. |
Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
kubeconfigfunc (m *MyModule) Example() *dagger.File {
return dag.
Kind().
Cluster().
Kubeconfig()
}@function
def example() -> dagger.File:
return (
dag.kind()
.cluster()
.kubeconfig()
)@func()
example(): File {
return dag
.kind()
.cluster()
.kubeconfig()
}container() 🔗
Container that contains the kind and k9s binaries with the cluster name and network set as environment variables
Return Type
Container ! Example
dagger -m github.com/neticdk/daggerverse/modules/kind@048d11ab71f796ea66edc2bbf613bd2b08c3e31a call \
cluster \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Kind().
Cluster().
Container()
}@function
def example() -> dagger.Container:
return (
dag.kind()
.cluster()
.container()
)@func()
example(): Container {
return dag
.kind()
.cluster()
.container()
}