DOCS-2549: Update CC L7 logs to use deployment-patch method#2582
DOCS-2549: Update CC L7 logs to use deployment-patch method#2582ctauchen wants to merge 1 commit intotigera:mainfrom
Conversation
Replace outdated service-annotation method (kubectl annotate svc) with the deployment-patch approach from CE 3.22-2, add comprehensive limitations, and improve heading structure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
❌ Deploy Preview for calico-docs-preview-next failed. Why did it fail? →
|
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Updates the Calico Cloud “Configure L7 logs” documentation to align with the newer deployment-patch workflow (instead of service annotations), while expanding prerequisites/limitations and adding a quickstart example.
Changes:
- Replaces the service-annotation enable/disable instructions with
kubectl patch deploymentexamples. - Adds/expands limitations and operational notes (mesh incompatibility, K8s version requirement, pod restarts, storage impact).
- Improves section structure by converting bold “headings” into proper Markdown headings and adding a quickstart walkthrough.
| 1. To disable L7 log collection, reverse the above patch with the following command. | ||
|
|
||
| ```bash | ||
| kubectl patch deployment frontend --type='json' -p '[{"op":"remove","path":"/spec/template/metadata/labels/applicationlayer.projectcalico.org~1sidecar"},{"op":"remove","path":"/spec/template/metadata/annotations/applicationlayer.projectcalico.org~1logging"}]' | ||
| ``` |
There was a problem hiding this comment.
The disable command kubectl patch deployment frontend --type='json' ... also omits -n <namespace>, even though the preceding note says to use it for non-default installs. Please include the namespace flag here as well (or explicitly state these commands assume the default namespace).
|
|
||
| :::note | ||
|
|
||
| L7 logs require a minimum of 1 additional GB of log storage per node, per one-day retention period. Adjust your [Log Storage](../../../operations/logstorage/adjust-log-storage-size.mdx) before you start tasks in the next section. |
There was a problem hiding this comment.
The "Log Storage" link target appears to be invalid in Calico Cloud docs: calico-cloud/operations/logstorage/adjust-log-storage-size.mdx doesn't exist (there is no operations/logstorage/ section under calico-cloud/operations/). Please update this to an existing Calico Cloud page (or a stable cross-link that exists in this doc set), otherwise the rendered page will contain a broken link.
| L7 logs require a minimum of 1 additional GB of log storage per node, per one-day retention period. Adjust your [Log Storage](../../../operations/logstorage/adjust-log-storage-size.mdx) before you start tasks in the next section. | |
| L7 logs require a minimum of 1 additional GB of log storage per node, per one-day retention period. Adjust your [Log Storage](../../../operations/) before you start tasks in the next section. |
| @@ -40,32 +40,36 @@ L7 logs are visible in the web console, service graph, in the HTTP tab. | |||
| **Not supported** | |||
There was a problem hiding this comment.
This heading is still using bold text (**Not supported**) rather than a Markdown heading, which is inconsistent with the rest of the page after the heading-hierarchy updates. Consider converting it to a proper heading (for example ### Not supported) so it appears in the TOC and has consistent styling.
| **Not supported** | |
| ### Not supported |
| ``` | ||
|
|
||
| 2. To disable the L7 log collection, remove the annotation. | ||
| without the `-n <namespace>` flag, it is going to be installed in the `default` namespace. if you wish to install in a different namespace, specify the `-n <namespace>` flag on all other commands in this tutorial from this point on. |
There was a problem hiding this comment.
The explanatory sentence starts with lowercase "without"/"if" and reads like a run-on sentence. Please capitalize and split into clearer sentences (and consider calling out explicitly that subsequent commands need -n <namespace> if not using default).
| without the `-n <namespace>` flag, it is going to be installed in the `default` namespace. if you wish to install in a different namespace, specify the `-n <namespace>` flag on all other commands in this tutorial from this point on. | |
| Without the `-n <namespace>` flag, this command installs the demo in the `default` namespace. If you want to use a different namespace, add the `-n <namespace>` flag to this command and to all subsequent `kubectl` commands in this tutorial. |
| 1. Patch the `frontend` application deployment to start collecting L7 logs for this application | ||
|
|
||
| ```bash | ||
| kubectl annotate svc <service-name> -n <service-namespace> projectcalico.org/l7-logging- | ||
| kubectl patch deployment frontend -p '{"spec":{"template":{"metadata":{"labels":{"applicationlayer.projectcalico.org/sidecar":"true"},"annotations":{"applicationlayer.projectcalico.org/logging":"Enabled"}}}}}' | ||
| ``` |
There was a problem hiding this comment.
This quickstart notes using -n <namespace> when not installing into default, but the kubectl patch deployment frontend ... example doesn’t include a namespace. Please add -n <namespace> (or explicitly state the command assumes default) to prevent users patching the wrong deployment or hitting "not found" errors.
| The above command applies the following patch: | ||
| 1. ensures pods in your `frontend` deployment pod template spec has the label `applicationlayer.projectcalico.org/sidecar: true` | ||
| 1. ensures pods in your `frontend` deployment pod template spec has the following annotations: | ||
| - `applicationlayer.projectcalico.org/logging: Enabled` |
There was a problem hiding this comment.
The ordered list explaining the patch is hard to read and has grammar issues (e.g., "ensures pods ... has" and lowercase sentence starts). Consider rewriting to refer to the Deployment's pod template (singular) and capitalizing the list items so the explanation is unambiguous.
| The above command applies the following patch: | |
| 1. ensures pods in your `frontend` deployment pod template spec has the label `applicationlayer.projectcalico.org/sidecar: true` | |
| 1. ensures pods in your `frontend` deployment pod template spec has the following annotations: | |
| - `applicationlayer.projectcalico.org/logging: Enabled` | |
| The above command patches the `frontend` Deployment's pod template to: | |
| 1. Add the label `applicationlayer.projectcalico.org/sidecar: true`. | |
| 1. Add the annotation `applicationlayer.projectcalico.org/logging: Enabled`. |
| Deployment pods will then be expected to restart. Monitor its progress with: | ||
|
|
||
| ```bash | ||
| kubectl rollout status deployment frontend | ||
| ``` |
There was a problem hiding this comment.
If the demo is installed into a non-default namespace, kubectl rollout status deployment frontend also needs -n <namespace> to match the earlier guidance. Please update the example (or state it assumes default).

Summary
kubectl annotate svc) with the deployment-patch approach (kubectl patch deployment) matching CE 3.22-2Test plan
yarn buildpasses with no errors/calico-cloud/observability/elastic/l7/configure🤖 Generated with Claude Code