From b11661877bd1c13816f25163ff3316ebb6f6f6e1 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Thu, 25 May 2023 11:26:19 +0000 Subject: [PATCH 1/3] backport of commit 6e537507efda59ac982febb9cf0b921140317922 --- website/content/docs/k8s/k8s-cli.mdx | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/website/content/docs/k8s/k8s-cli.mdx b/website/content/docs/k8s/k8s-cli.mdx index d0ad98c49a86..282bf0be0a76 100644 --- a/website/content/docs/k8s/k8s-cli.mdx +++ b/website/content/docs/k8s/k8s-cli.mdx @@ -28,6 +28,8 @@ $ consul-k8s You can use the following commands with `consul-k8s`. + - [`config`](#config): Interact with helm configuration. + - [`config read`](#config-read): Read helm configuration of a Consul installation. - [`install`](#install): Install Consul on Kubernetes. - [`proxy`](#proxy): Inspect Envoy proxies managed by Consul. - [`proxy list`](#proxy-list): List all Pods running proxies managed by Consul. @@ -39,6 +41,34 @@ You can use the following commands with `consul-k8s`. - [`upgrade`](#upgrade): Upgrade Consul on Kubernetes from an existing installation. - [`version`](#version): Print the version of the Consul on Kubernetes CLI. +### `config` + +The `config` command exposes the `read` subcommand that allows to read the helm configuration of a Consul installation. + +- [`config read`](#config-read): Read helm configuration of a Consul installation. + +### `config read` + +```shell-session +$ consul-k8s config read +``` + +| Flag | Description | Default | +| ------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `-all-namespaces`, `-A` | `Boolean` List pods in all Kubernetes namespaces. | `false` | +| `-namespace`, `-n` | `String` The Kubernetes namespace to list proxies in. | Current [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) namespace. | + +Refer to the [Global Options](#global-options) for additional options that you can use +when installing Consul on Kubernetes. + +#### Example Commands + +The following example command reads the Helm configuration in the `myNS` namespace. + +```shell-session +$ consul-k8s config read -namespace=myNS +``` + ### `install` The `install` command installs Consul on your Kubernetes cluster. From 1ed631968edab0910a4fb86442e590b06eac3a14 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Thu, 25 May 2023 11:36:05 +0000 Subject: [PATCH 2/3] backport of commit fbdab01e8548635ff86ebc0ae1241ea35ce0d20f --- website/content/docs/k8s/k8s-cli.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/content/docs/k8s/k8s-cli.mdx b/website/content/docs/k8s/k8s-cli.mdx index 282bf0be0a76..df986a5885ec 100644 --- a/website/content/docs/k8s/k8s-cli.mdx +++ b/website/content/docs/k8s/k8s-cli.mdx @@ -69,6 +69,23 @@ The following example command reads the Helm configuration in the `myNS` namespa $ consul-k8s config read -namespace=myNS ``` +``` +global: + cloud: + clientId: + secretKey: client-id + secretName: consul-hcp-client-id + clientSecret: + secretKey: client-secret + secretName: consul-hcp-client-secret + enabled: true + resourceId: + secretKey: resource-id + secretName: consul-hcp-resource-id + image: hashicorp/consul:1.14.7 + name: consul +``` + ### `install` The `install` command installs Consul on your Kubernetes cluster. From 056e092ef3bea2fe9ff65ba669a8580c1ecc8c21 Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Thu, 25 May 2023 23:11:26 +0200 Subject: [PATCH 3/3] trigger ci