From a87294bd7c67c39a5e3e22794fd7107026372bb1 Mon Sep 17 00:00:00 2001 From: NicoletaPopoviciu Date: Tue, 19 Jul 2022 19:40:21 -0400 Subject: [PATCH 1/5] Updates k8s annotation docs Updates k8s annotation docs for the options added in https://github.com/hashicorp/consul-k8s/pull/1315. --- website/content/docs/k8s/annotations-and-labels.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/content/docs/k8s/annotations-and-labels.mdx b/website/content/docs/k8s/annotations-and-labels.mdx index 2eba477f09a..d0b94fa37d3 100644 --- a/website/content/docs/k8s/annotations-and-labels.mdx +++ b/website/content/docs/k8s/annotations-and-labels.mdx @@ -233,6 +233,8 @@ The following Kubernetes resource annotations could be used on a pod to control - `consul.hashicorp.com/service-metrics-port` - Set the port where the Connect service exposes metrics. - `consul.hashicorp.com/service-metrics-path` - Set the path where the Connect service exposes metrics. - `consul.hashicorp.com/connect-inject-mount-volume` - Comma separated list of container names to mount the connect-inject volume into. The volume will be mounted at `/consul/connect-inject`. The connect-inject volume contains Consul internals data needed by the other sidecar containers, for example the `consul` binary, and the Pod's Consul ACL token. This data can be valuable for advanced use-cases, such as making requests to the Consul API from within application containers. +- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects that define Volumes to be added to the Envoy sidecar. +- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects that define VolumeMounts to be added to the Envoy sidecar. ## Labels From c6cf5c03dba06e6532df5686abf7010dd5835237 Mon Sep 17 00:00:00 2001 From: NicoletaPopoviciu <87660255+NicoletaPopoviciu@users.noreply.github.com> Date: Thu, 21 Jul 2022 14:20:40 -0400 Subject: [PATCH 2/5] Update website/content/docs/k8s/annotations-and-labels.mdx Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> --- website/content/docs/k8s/annotations-and-labels.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/k8s/annotations-and-labels.mdx b/website/content/docs/k8s/annotations-and-labels.mdx index d0b94fa37d3..1194c4c63fe 100644 --- a/website/content/docs/k8s/annotations-and-labels.mdx +++ b/website/content/docs/k8s/annotations-and-labels.mdx @@ -233,8 +233,8 @@ The following Kubernetes resource annotations could be used on a pod to control - `consul.hashicorp.com/service-metrics-port` - Set the port where the Connect service exposes metrics. - `consul.hashicorp.com/service-metrics-path` - Set the path where the Connect service exposes metrics. - `consul.hashicorp.com/connect-inject-mount-volume` - Comma separated list of container names to mount the connect-inject volume into. The volume will be mounted at `/consul/connect-inject`. The connect-inject volume contains Consul internals data needed by the other sidecar containers, for example the `consul` binary, and the Pod's Consul ACL token. This data can be valuable for advanced use-cases, such as making requests to the Consul API from within application containers. -- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects that define Volumes to be added to the Envoy sidecar. -- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects that define VolumeMounts to be added to the Envoy sidecar. +- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects that define volumes to add to the Envoy sidecar. +- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects that define volumeMounts to add to the Envoy sidecar. ## Labels From 7e16739a90e890a98440e221ba2b88c15c493072 Mon Sep 17 00:00:00 2001 From: David Yu Date: Fri, 22 Jul 2022 10:07:11 -0700 Subject: [PATCH 3/5] adding more clarity around sidecar volume annotations --- website/content/docs/k8s/annotations-and-labels.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/docs/k8s/annotations-and-labels.mdx b/website/content/docs/k8s/annotations-and-labels.mdx index 1194c4c63fe..4a4d1d505db 100644 --- a/website/content/docs/k8s/annotations-and-labels.mdx +++ b/website/content/docs/k8s/annotations-and-labels.mdx @@ -233,8 +233,8 @@ The following Kubernetes resource annotations could be used on a pod to control - `consul.hashicorp.com/service-metrics-port` - Set the port where the Connect service exposes metrics. - `consul.hashicorp.com/service-metrics-path` - Set the path where the Connect service exposes metrics. - `consul.hashicorp.com/connect-inject-mount-volume` - Comma separated list of container names to mount the connect-inject volume into. The volume will be mounted at `/consul/connect-inject`. The connect-inject volume contains Consul internals data needed by the other sidecar containers, for example the `consul` binary, and the Pod's Consul ACL token. This data can be valuable for advanced use-cases, such as making requests to the Consul API from within application containers. -- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects that define volumes to add to the Envoy sidecar. -- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects that define volumeMounts to add to the Envoy sidecar. +- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects as specified by the [Volume pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core), that define volumes to add to the Envoy sidecar. For example, the JSON object for a volume with the name `secrets-data` and the hostPath `/mnt/secrets-path` is as follows: `"[{\"name\": \"secrets-data\", \"hostPath\": "[{\"path\": \"/mnt/secrets-path\"}] "}]"` +- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects as specified by the [Volume mount pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core), that define volumeMounts to add to the Envoy sidecar. For example, the JSON object for a volume mount with the name `secrets-store-mount` and the mountPath `/mnt/secrets-store` is as follows: `"[{\"name\": \"secrets-store-mount\", \"mountPath\": \"/mnt/secrets-store\"}]"` ## Labels From 7450414500eabd50aa07c26ccf6e8dc892bf0808 Mon Sep 17 00:00:00 2001 From: David Yu Date: Fri, 22 Jul 2022 10:17:21 -0700 Subject: [PATCH 4/5] Update annotations-and-labels.mdx --- website/content/docs/k8s/annotations-and-labels.mdx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/website/content/docs/k8s/annotations-and-labels.mdx b/website/content/docs/k8s/annotations-and-labels.mdx index 4a4d1d505db..d18a10dae98 100644 --- a/website/content/docs/k8s/annotations-and-labels.mdx +++ b/website/content/docs/k8s/annotations-and-labels.mdx @@ -233,8 +233,16 @@ The following Kubernetes resource annotations could be used on a pod to control - `consul.hashicorp.com/service-metrics-port` - Set the port where the Connect service exposes metrics. - `consul.hashicorp.com/service-metrics-path` - Set the path where the Connect service exposes metrics. - `consul.hashicorp.com/connect-inject-mount-volume` - Comma separated list of container names to mount the connect-inject volume into. The volume will be mounted at `/consul/connect-inject`. The connect-inject volume contains Consul internals data needed by the other sidecar containers, for example the `consul` binary, and the Pod's Consul ACL token. This data can be valuable for advanced use-cases, such as making requests to the Consul API from within application containers. -- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects as specified by the [Volume pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core), that define volumes to add to the Envoy sidecar. For example, the JSON object for a volume with the name `secrets-data` and the hostPath `/mnt/secrets-path` is as follows: `"[{\"name\": \"secrets-data\", \"hostPath\": "[{\"path\": \"/mnt/secrets-path\"}] "}]"` -- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects as specified by the [Volume mount pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core), that define volumeMounts to add to the Envoy sidecar. For example, the JSON object for a volume mount with the name `secrets-store-mount` and the mountPath `/mnt/secrets-store` is as follows: `"[{\"name\": \"secrets-store-mount\", \"mountPath\": \"/mnt/secrets-store\"}]"` +- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects as specified by the [Volume pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core), that define volumes to add to the Envoy sidecar. For example, the JSON object for a volume with the name `secrets-data` and the hostPath `/mnt/secrets-path` is as follows: + ```yaml + annotations: + "consul.hashicorp.com/consul-sidecar-user-volume": "[{\"name\": \"secrets-data\", \"hostPath\": "[{\"path\": \"/mnt/secrets-path\"}] "}]" + ``` +- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects as specified by the [Volume mount pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core), that define volumeMounts to add to the Envoy sidecar. For example, the JSON object for a volume mount with the name `secrets-store-mount` and the mountPath `/mnt/secrets-store` is as follows: + ```yaml + annotations: + "consul.hashicorp.com/consul-sidecar-user-volume-mount": "[{\"name\": \"secrets-store-mount\", \"mountPath\": \"/mnt/secrets-store\"}]" + ``` ## Labels From bd1e340805edd5273a34a78d1eaa91e5e2070e8e Mon Sep 17 00:00:00 2001 From: David Yu Date: Fri, 22 Jul 2022 12:49:45 -0700 Subject: [PATCH 5/5] Update annotations-and-labels.mdx --- website/content/docs/k8s/annotations-and-labels.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/k8s/annotations-and-labels.mdx b/website/content/docs/k8s/annotations-and-labels.mdx index d18a10dae98..d67aa7297d5 100644 --- a/website/content/docs/k8s/annotations-and-labels.mdx +++ b/website/content/docs/k8s/annotations-and-labels.mdx @@ -233,12 +233,12 @@ The following Kubernetes resource annotations could be used on a pod to control - `consul.hashicorp.com/service-metrics-port` - Set the port where the Connect service exposes metrics. - `consul.hashicorp.com/service-metrics-path` - Set the path where the Connect service exposes metrics. - `consul.hashicorp.com/connect-inject-mount-volume` - Comma separated list of container names to mount the connect-inject volume into. The volume will be mounted at `/consul/connect-inject`. The connect-inject volume contains Consul internals data needed by the other sidecar containers, for example the `consul` binary, and the Pod's Consul ACL token. This data can be valuable for advanced use-cases, such as making requests to the Consul API from within application containers. -- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects as specified by the [Volume pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core), that define volumes to add to the Envoy sidecar. For example, the JSON object for a volume with the name `secrets-data` and the hostPath `/mnt/secrets-path` is as follows: +- `consul.hashicorp.com/consul-sidecar-user-volume` - JSON objects as specified by the [Volume pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core), that define volumes to add to the Envoy sidecar. ```yaml annotations: - "consul.hashicorp.com/consul-sidecar-user-volume": "[{\"name\": \"secrets-data\", \"hostPath\": "[{\"path\": \"/mnt/secrets-path\"}] "}]" + "consul.hashicorp.com/consul-sidecar-user-volume": "[{\"name\": \"secrets-data\", \"hostPath\": "[{\"path\": \"/mnt/secrets-path\"}]"}]" ``` -- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects as specified by the [Volume mount pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core), that define volumeMounts to add to the Envoy sidecar. For example, the JSON object for a volume mount with the name `secrets-store-mount` and the mountPath `/mnt/secrets-store` is as follows: +- `consul.hashicorp.com/consul-sidecar-user-volume-mount` - JSON objects as specified by the [Volume mount pod spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volumemount-v1-core), that define volumeMounts to add to the Envoy sidecar. ```yaml annotations: "consul.hashicorp.com/consul-sidecar-user-volume-mount": "[{\"name\": \"secrets-store-mount\", \"mountPath\": \"/mnt/secrets-store\"}]"