Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/manual/kinds/k8s-kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ topology:
extras:
k8s_kind:
deploy:
# Corresponds to --kubeconfig option.
kubeconfig: ./kubeconfig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @robertvolkmann
is the path local to the clab file or the pwd? If so, worth adding a comment about it and strive to have the paths local to clab file (like all other paths)

# Corresponds to --wait option. Wait given duration until the cluster becomes ready.
wait: 0s
```
Expand Down
6 changes: 6 additions & 0 deletions nodes/k8s_kind/k8s_kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func (n *k8s_kind) Deploy(_ context.Context, _ *clabnodes.DeployParams) error {
n.Cfg.Extras.K8sKind.Deploy != nil {
opts := n.Cfg.Extras.K8sKind.Deploy

// Sets the explicit --kubeconfig path
if opts.KubeconfigPath != nil {
clusterCreateOptions = append(clusterCreateOptions,
cluster.CreateWithKubeconfigPath(*opts.KubeconfigPath))
}

// Override the default wait duration
if opts.Wait != nil {
duration, err := time.ParseDuration(*opts.Wait)
Expand Down
3 changes: 2 additions & 1 deletion types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ type K8sKindExtras struct {
// It is aligned with the `kind create cluster` command options, but exposes
// only the ones that are relevant for containerlab.
type K8sKindDeployExtras struct {
Wait *string `yaml:"wait,omitempty"`
KubeconfigPath *string `yaml:"kubeconfig,omitempty"`
Wait *string `yaml:"wait,omitempty"`
}

// ContainerDetails contains information that is commonly outputted to tables or graphs.
Expand Down