Skip to content

[etcd] Update etcd application (fix resources and headless services) - #1128

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
etcd
Jul 2, 2025
Merged

Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
etcd

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Jun 27, 2025 •

Copy link
Copy Markdown
Member

ref to #1127, clastix/kamaji#856 and cozystack/etcd-operator#291

Summary by CodeRabbit

  • New Features
    • Updated etcd chart to version 2.9.0.
  • Improvements
    • Simplified etcd endpoint configuration to use a single static endpoint.
    • Expanded TLS certificate DNS names to include additional service addresses.
    • Streamlined resource configuration for etcd deployment.
  • Chores
    • Updated version mapping for etcd package.

@coderabbitai

coderabbitai Bot commented Jun 27, 2025 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

Andrei Kvapil (@kvaps) has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1b59390 and a5ff9bf.

📒 Files selected for processing (5)
  • packages/extra/etcd/Chart.yaml (1 hunks)
  • packages/extra/etcd/templates/datastore.yaml (2 hunks)
  • packages/extra/etcd/templates/etcd-cluster.yaml (3 hunks)
  • packages/extra/etcd/values.yaml (1 hunks)
  • packages/extra/versions_map (1 hunks)

Walkthrough

This update modifies the etcd Helm chart by incrementing its version, updating resource configuration and certificate DNS names, simplifying endpoint specification, and adjusting the version mapping. The resource configuration is streamlined, and certificate specifications now include additional DNS names for improved service discovery.

Changes

File(s) Change Summary
packages/extra/etcd/Chart.yaml Bumped etcd chart version from 2.8.0 to 2.9.0.
packages/extra/etcd/templates/datastore.yaml Changed etcd endpoints from a dynamic list per replica to a single static endpoint.
packages/extra/etcd/templates/etcd-cluster.yaml Updated resource rendering to use a sanitizer function; added DNS names to certificate specs.
packages/extra/etcd/values.yaml Simplified resource configuration: replaced nested limits/requests with flat CPU and memory values.
packages/extra/versions_map Updated etcd version mapping: pinned 2.8.0 to a commit, added 2.9.0 with HEAD reference.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HelmChart
    participant Kubernetes
    participant EtcdService

    User->>HelmChart: Deploy etcd chart (v2.9.0)
    HelmChart->>Kubernetes: Render manifests with sanitized resources and updated endpoints
    Kubernetes->>EtcdService: Create etcd pods with new resource config and certificates
    EtcdService->>Kubernetes: Register with single endpoint and expanded DNS names
Loading

Possibly related PRs

Suggested labels

enhancement, size:M

Suggested reviewers

  • lllamnyp

Poem

A hop and a skip, the chart’s now nine,
Endpoints streamlined, resource lines fine.
DNS names growing, certificates strong,
Etcd’s cluster will hum right along.
With every commit and version mapped true,
This bunny’s delighted—cheers to the crew! 🐇✨


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.

@kvaps Andrei Kvapil (kvaps) changed the title etcd [etcd] Update etcd application (fix resources and headless services) Jun 27, 2025
@kvaps Andrei Kvapil (kvaps) changed the title [etcd] Update etcd application (fix resources and headless services) [etcd] Update etcd application (fix resources and headless services) Jun 27, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/extra/etcd/templates/datastore.yaml (1)

48-49: Nit: unchanged annotation flagged as diff
Line 48 is identical to the previous revision; remove the stray change to keep git history clean.

packages/extra/etcd/templates/etcd-cluster.yaml (2)

155-157: Add full-qualified service DNS to certificate
etcd.<ns>.svc.cluster.local (or custom cluster-domain) is still missing.
Many clients use the FQDN returned by the Kubernetes API; without it TLS verification may fail.
Recommend appending the cluster-domain variant, e.g.:

   dnsNames:
   - etcd
   - etcd.{{ $.Release.Namespace }}.svc
+  - etcd.{{ $.Release.Namespace }}.svc.cluster.local

191-193: Same FQDN omission for peer certificate
Mirror the addition here to keep server & peer certs symmetric.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc21c6 and 1b59390.

📒 Files selected for processing (5)
  • packages/extra/etcd/Chart.yaml (1 hunks)
  • packages/extra/etcd/templates/datastore.yaml (2 hunks)
  • packages/extra/etcd/templates/etcd-cluster.yaml (3 hunks)
  • packages/extra/etcd/values.yaml (1 hunks)
  • packages/extra/versions_map (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build
🔇 Additional comments (5)
packages/extra/versions_map (1)

15-16: Pin-sha looks good – please verify SHA and remember to lock 2.9.0 later
2.8.0 now points to 4369b031, removing the transient HEAD, 👍.
Before merging, double-check that the hash exists in the repo history and represents the exact chart state you tagged.
For 2.9.0 we still keep HEAD; don’t forget to replace it with a real commit once the version is cut, otherwise reproducible builds will break.

packages/extra/etcd/Chart.yaml (1)

6-6: Version bump LGTM
Nothing else changed in chart metadata, semantic-version ordering preserved.

packages/extra/etcd/templates/datastore.yaml (1)

8-9: Single-service endpoint may break multi-replica fail-over
kamaji DataStore previously received the full replica list; switching to one ClusterIP (etcd.<ns>.svc:2379) relies on kube-proxy load-balancing.
Points to verify:

  1. Does the Etcd operator always create the non-headless Service named etcd (in addition to the headless one)?
  2. If the ClusterIP is down (e.g. because no endpoints yet), will control-plane consumers retry until ready, or should we keep at least one pod FQDN?
  3. Some etcd client libraries still perform member-list calls that return pod names; make sure certificates include those (they do), but also ensure DNS can resolve them.

Consider leaving the explicit pod endpoints or providing both for safer roll-outs.

packages/extra/etcd/values.yaml (1)

11-14: Flat resources structure – confirm library compatibility
cozy-lib.resources.sanitize now receives

cpu: 4
memory: 1Gi

Verify that the helper understands the flat layout and converts it into both requests and limits (or whatever policy you expect).
If it still expects the classic requests/limits map, this will silently drop all resource settings.

packages/extra/etcd/templates/etcd-cluster.yaml (1)

50-50: Good move to centralised sanitation
Delegating to the shared helper reduces chart-specific logic.

@kvaps
Andrei Kvapil (kvaps) merged commit d12d07f into main Jul 2, 2025
@kvaps
Andrei Kvapil (kvaps) deleted the etcd branch July 2, 2025 08:45
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.

3 participants