From d3d22a5654b0007a808a676e5fbda6f1b959a5e9 Mon Sep 17 00:00:00 2001 From: Mritunjay Date: Tue, 23 May 2023 12:43:11 +0530 Subject: [PATCH] improvements in docs Signed-off-by: Mritunjay --- docs/modules/k3s.md | 12 +++++++++--- modules/k3s/k3s.go | 4 +++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/modules/k3s.md b/docs/modules/k3s.md index 1804ad2b55..589b80bb84 100644 --- a/docs/modules/k3s.md +++ b/docs/modules/k3s.md @@ -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: + +[Container Ports](../../modules/k3s/k3s.go) inside_block:containerPorts + + ### Container Options When starting the K3s container, you can pass options in a variadic way to configure it. @@ -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`. [Get KubeConifg](../../modules/k3s/k3s_test.go) inside_block:GetKubeConfig diff --git a/modules/k3s/k3s.go b/modules/k3s/k3s.go index 989e53c911..0b21b55b6b 100644 --- a/modules/k3s/k3s.go +++ b/modules/k3s/k3s.go @@ -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