Skip to content

Commit

Permalink
Update annotations-and-labels.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
David Yu committed Jul 6, 2023
1 parent e1bf428 commit ddf214e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions website/content/docs/k8s/annotations-and-labels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This allows the user to configure natively configure Consul on select Kubernetes
The noun _connect_ is used throughout this documentation to refer to the connect
subsystem that provides Consul's service mesh capabilities.

## Annotations
## Consul Service Mesh Annotations

The following Kubernetes resource annotations could be used on a pod to control connect-inject behavior:

Expand Down Expand Up @@ -191,13 +191,6 @@ The following Kubernetes resource annotations could be used on a pod to control
consul.hashicorp.com/kubernetes-service: 'service-name-to-use'
```

- `consul.hashicorp.com/service-weight:` - Configure ability to support weighted loadbalancing by service annotation for Catalog Sync. The integer provided will be applied as a weight for the `passing` state for the health of the service. See [weights](/consul/docs/services/configuration/services-configuration-reference#weights) in service configuration for more information on how this is leveraged for services in the Catalog.

```yaml
annotations:
consul.hashicorp.com/service-weight: 10
```

- `consul.hashicorp.com/service-tags` - A comma separated list of tags that will
be applied to the Consul service and its sidecar.

Expand Down Expand Up @@ -272,6 +265,18 @@ The following Kubernetes resource annotations could be used on a pod to control
"consul.hashicorp.com/consul-sidecar-user-volume-mount": "[{\"name\": \"secrets-store-mount\", \"mountPath\": \"/mnt/secrets-store\"}]"
```

## Consul Catalog Sync anntoations

The following Kubernetes resource annotations could be used on a pod to [Catalog Sync](https://developer.hashicorp.com/consul/docs/k8s/service-sync) behavior:

- 'consul.hashicorp.com/service-sync': If this is set to `true`, then the Kubernetes service is explicitly configured to be synced to Consul.
- `consul.hashicorp.com/service-weight:` - Configure ability to support weighted loadbalancing by service annotation for Catalog Sync. The integer provided will be applied as a weight for the `passing` state for the health of the service. See [weights](/consul/docs/services/configuration/services-configuration-reference#weights) in service configuration for more information on how this is leveraged for services in the Consul catalog.

```yaml
annotations:
consul.hashicorp.com/service-weight: 10
```

## Labels

Resource labels could be used on a Kubernetes service to control connect-inject behavior.
Expand Down

0 comments on commit ddf214e

Please sign in to comment.