Skip to content

Wrap cert-manager CRDs in conditional - #1076

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/conditional-install-crds
Jun 24, 2025
Merged

Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
fix/conditional-install-crds

Conversation

@lllamnyp

@lllamnyp Timofei Larkin (lllamnyp) commented Jun 17, 2025 •

Copy link
Copy Markdown
Member

There's no point in installing the CRDs if cert-manager itself is disabled.

Summary by CodeRabbit

  • New Features

    • cert-manager CRDs are now only installed when the cert-manager addon is enabled, providing more control over addon management.
  • Chores

    • Updated the Kubernetes chart version to 0.24.1.
    • Adjusted version mapping to reflect the new chart version and associated commit.

There's no point in installing the CRDs if cert-manager itself is
disabled.

Signed-off-by: Timofei Larkin <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 17, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This update increments the Kubernetes application's Helm chart version from 0.24.0 to 0.24.1, updates its version mapping with a commit hash, and wraps the cert-manager CRDs HelmRelease manifest in a conditional block so it is only included if the certManager addon is enabled.

Changes

Files/Paths Change Summary
packages/apps/kubernetes/Chart.yaml Incremented chart version from 0.24.0 to 0.24.1.
packages/apps/versions_map Updated "kubernetes" version mapping: added commit hash for 0.24.0, introduced 0.24.1 as HEAD.
packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml Wrapped manifest in conditional block to include only if certManager addon is enabled.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Helm Chart
    participant Values
    participant cert-manager CRDs Manifest

    User->>Helm Chart: Deploy chart with values
    Helm Chart->>Values: Read .Values.addons.certManager.enabled
    alt certManager enabled
        Helm Chart->>cert-manager CRDs Manifest: Include manifest
    else certManager not enabled
        Helm Chart--xcert-manager CRDs Manifest: Skip manifest
    end
Loading

Possibly related PRs

  • Update version-map for updated application #568: Both PRs update the Kubernetes application's Helm chart version in packages/apps/kubernetes/Chart.yaml and adjust the version mapping in packages/apps/versions_map accordingly, indicating related changes focused on version increments.

Suggested labels

size:XS

Poem

A hop, a skip, a chart update’s done,
Cert-manager waits for a flag to be spun.
Versions mapped with hashes neat,
Kubernetes changes can’t be beat!
🐇✨
With every patch, we leap ahead—
The garden of clusters freshly fed!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce6dbe and e848dde.

📒 Files selected for processing (3)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml (2 hunks)
  • packages/apps/versions_map (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build
🔇 Additional comments (3)
packages/apps/kubernetes/Chart.yaml (1)

19-19: Bump chart version to 0.24.1
The patch version increment aligns with the new conditional deployment logic for cert-manager CRDs.

packages/apps/versions_map (1)

48-49: Align versions_map with new chart release
Pinning 0.24.0 to commit 62cb694d and marking 0.24.1 as HEAD correctly reflects the Chart.yaml update.

packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml (1)

1-58: Wrap cert-manager CRDs in conditional block
The {{- if .Values.addons.certManager.enabled }}/{{- end }} wrapper properly gates both the HelmRelease and Secret manifests, ensuring CRDs are only installed when certManager.enabled is true. Static analysis warnings on Go-template directives can be safely ignored.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@NickVolynkin Nick Volynkin (NickVolynkin) added the kind/backport Categorizes issue or PR as requiring a backport to the current release line label Jun 17, 2025
@kvaps
Andrei Kvapil (kvaps) merged commit 778577e into main Jun 24, 2025
@kvaps
Andrei Kvapil (kvaps) deleted the fix/conditional-install-crds branch June 24, 2025 08:40
@github-actions

Copy link
Copy Markdown

Successfully created backport PR for release-0.32:

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

Labels

kind/backport Categorizes issue or PR as requiring a backport to the current release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants