Skip to content

Commit

Permalink
improvements in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Mritunjay <mritunjaysharma394@gmail.com>
  • Loading branch information
mritunjaysharma394 committed May 23, 2023
1 parent 9ecd81c commit d3d22a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions docs/modules/k3s.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomize
- `context.Context`, the Go context.
- `testcontainers.ContainerCustomizer`, a variadic argument for passing options.


### Container Ports
These are the ports used by the K3s container:
<!--codeinclude-->
[Container Ports](../../modules/k3s/k3s.go) inside_block:containerPorts
<!--/codeinclude-->

### Container Options

When starting the K3s container, you can pass options in a variadic way to configure it.
Expand Down Expand Up @@ -66,9 +73,8 @@ The K3s container exposes the following methods:

#### GetKubeConfig

GetKubeConfig returns modified kubeconfig with server url that should be used for connecting
to the Kubernetes Rest Client API with your Kubernetes client. It'll be returned in the format:
`[]bytes`
The `GetKubeConfig` method returns the K3s cluster's `kubeconfig`, including the server URL, to be used for connecting
to the Kubernetes Rest Client API using a Kubernetes client. It'll be returned in the format of `[]bytes`.

<!--codeinclude-->
[Get KubeConifg](../../modules/k3s/k3s_test.go) inside_block:GetKubeConfig
Expand Down
4 changes: 3 additions & 1 deletion modules/k3s/k3s.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import (
)

var (
// containerPorts {
defaultKubeSecurePort = "6443/tcp"
defaultRancherWebhookPort = "8443/tcp"
defaultKubeConfigK3sPath = "/etc/rancher/k3s/k3s.yaml"
// }
defaultKubeConfigK3sPath = "/etc/rancher/k3s/k3s.yaml"
)

// K3sContainer represents the K3s container type used in the module
Expand Down

0 comments on commit d3d22a5

Please sign in to comment.