Skip to content

Conversation

@jhlodin
Copy link
Contributor

@jhlodin jhlodin commented Dec 8, 2025

https://cockroachlabs.atlassian.net/browse/DOC-15288

Update docs as needed to account for cockroachdb/helm-charts#578

TODO: Backport to other CRDB versions once these changes are reviewed.

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for cockroachdb-interactivetutorials-docs canceled.

Name Link
🔨 Latest commit 84ae52c
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-interactivetutorials-docs/deploys/69374889b688850008071390

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for cockroachdb-api-docs canceled.

Name Link
🔨 Latest commit 84ae52c
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-api-docs/deploys/6937488953798b000868801d

@netlify
Copy link

netlify bot commented Dec 8, 2025

Netlify Preview

Name Link
🔨 Latest commit 84ae52c
🔍 Latest deploy log https://app.netlify.com/projects/cockroachdb-docs/deploys/69374889bcca8d0008dcd6f4
😎 Deploy Preview https://deploy-preview-21543--cockroachdb-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +368 to +378
Specify labels in `cockroachdb.crdbCluster.podTemplate.spec.podLabels` and annotations in `cockroachdb.crdbCluster.podTemplate.spec.podAnnotations` in the values file used to [deploy the cluster]({% link {{ page.version.version }}/deploy-cockroachdb-with-cockroachdb-operator.md %}#initialize-the-cluster):

~~~ yaml
cockroachdb:
crdbCluster:
podLabels:
app.kubernetes.io/version: v25.1.4
podAnnotations
operator: https://raw.githubusercontent.com/cockroachdb/helm-charts/refs/heads/master/cockroachdb-parent/charts/cockroachdb/values.yaml
podTemplate:
spec:
podLabels:
app.kubernetes.io/version: v25.1.4
podAnnotations
operator: https://raw.githubusercontent.com/cockroachdb/helm-charts/refs/heads/master/cockroachdb-parent/charts/cockroachdb/values.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pritesh-lahoti @NishanthNalluri I noticed that the values.yaml file doesn't have these fields included, even commented out. Is that something we ought to add for completeness? Or otherwise is there a reason we excluded pod labels/annotations?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good callout, @jhlodin . The labels and annotations are now part of podTemplate.metadata.labels and podTemplate.metadata.annotations respectively.

We would need to update this example accordingly. Also, the sample values are slightly off, so we could update as below:

cockroachdb:
  crdbCluster:
    podTemplate:
      metadata:
        labels:
          app.kubernetes.io/name: "cockroachdb"
        annotations:
          kubernetes.io/description: "This is a CockroachDB pod."

- The `values.yaml` configuration maps to a subset of `cockroach start` flags when CockroachDB is initialized.

This page describes configuration options that allow advanced users to manually override the pod template and `cockroach start` flags as needed for deployment.
This page describes configuration options that allow advanced users to manually override pod template metadata and `cockroach start` flags as needed for deployment.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NishanthNalluri @pritesh-lahoti Originally this page was written when the only purpose of podTemplate fields was to modify the spec from default, but now much of the default pod config is defined here. Is there a reason to keep this content? Is there a situation where a customer may need to modify other fields under podTemplate than the ones we've moved there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhlodin I believe both the sections (pod template and start flags) should stay.

We could update the examples to not repeat the ones that we already have documented elsewhere, e.g. we could remove the affinity related example, but retain the one for init-containers and containers, as this is definitely a use-case for advanced customers.

On that note, we have resolved the changes to not require the containers field within pod template (https://cockroachlabs.atlassian.net/browse/CC-33346), so we could take this opportunity to refactor the same too.

@jhlodin jhlodin force-pushed the jl/doc-15288 branch 2 times, most recently from 6f65125 to 84ae52c Compare December 8, 2025 21:52
Comment on lines +368 to +378
Specify labels in `cockroachdb.crdbCluster.podTemplate.spec.podLabels` and annotations in `cockroachdb.crdbCluster.podTemplate.spec.podAnnotations` in the values file used to [deploy the cluster]({% link {{ page.version.version }}/deploy-cockroachdb-with-cockroachdb-operator.md %}#initialize-the-cluster):

~~~ yaml
cockroachdb:
crdbCluster:
podLabels:
app.kubernetes.io/version: v25.1.4
podAnnotations
operator: https://raw.githubusercontent.com/cockroachdb/helm-charts/refs/heads/master/cockroachdb-parent/charts/cockroachdb/values.yaml
podTemplate:
spec:
podLabels:
app.kubernetes.io/version: v25.1.4
podAnnotations
operator: https://raw.githubusercontent.com/cockroachdb/helm-charts/refs/heads/master/cockroachdb-parent/charts/cockroachdb/values.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good callout, @jhlodin . The labels and annotations are now part of podTemplate.metadata.labels and podTemplate.metadata.annotations respectively.

We would need to update this example accordingly. Also, the sample values are slightly off, so we could update as below:

cockroachdb:
  crdbCluster:
    podTemplate:
      metadata:
        labels:
          app.kubernetes.io/name: "cockroachdb"
        annotations:
          kubernetes.io/description: "This is a CockroachDB pod."

- The `values.yaml` configuration maps to a subset of `cockroach start` flags when CockroachDB is initialized.

This page describes configuration options that allow advanced users to manually override the pod template and `cockroach start` flags as needed for deployment.
This page describes configuration options that allow advanced users to manually override pod template metadata and `cockroach start` flags as needed for deployment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhlodin I believe both the sections (pod template and start flags) should stay.

We could update the examples to not repeat the ones that we already have documented elsewhere, e.g. we could remove the affinity related example, but retain the one for init-containers and containers, as this is definitely a use-case for advanced customers.

On that note, we have resolved the changes to not require the containers field within pod template (https://cockroachlabs.atlassian.net/browse/CC-33346), so we could take this opportunity to refactor the same too.

podTemplate:
spec:
affinity:
podAntiAffinity:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This needs to be further indented to be within affinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants