feat(vm-instance): accept cloud-init network-data as a value alongside the netplan-specific netplanDhcp flag

Đang mở
#5,455 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cloud, go, kubernetes, yaml
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Read packages/apps/vm-instance/values.yaml and templates/secret-network-config.yaml to trace how netplanDhcp becomes networkDataSecretRef, then inspect the component's README for configuration examples. Add support for the proposed string value, reject using it together with netplanDhcp, and document the netplan example; done means either setting works as described and the conflict is refused.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/virtualization kind/feature triage/needs-triage

Problem / motivation

netplanDhcp (packages/apps/vm-instance/values.yaml:131-132) is a boolean that turns on one fixed network-data document: DHCP with use-domains on every en* and eth* interface (templates/secret-network-config.yaml). It exists for a real problem: cloud-init's fallback configuration covers one interface, so a VM joined to a VPC subnet never asks for its address there, and systemd-networkd ignores the search domains DHCP offers. But the field's own description names the guests it breaks, any guest not rendered by netplan and any netplan guest with a static interface, and those users have no way to supply their own network-data. The API carries a flag for one guest renderer.

Proposed solution

Add a string field next to cloudInit, for example cloudInitNetworkData, passed to networkDataSecretRef as is. Keep netplanDhcp as a shortcut that renders the current document, and refuse setting both. Put the netplan snippet in the README as an example.

Scope check

  • This affects a single component / package (if it spans many, consider a design proposal)
  • I can describe the expected behavior concretely (if not, consider a Discussion first)

Alternatives considered

Replace netplanDhcp outright with the free-form field. Cleaner API, but v1.7.1 ships netplanDhcp, so removing it is a breaking change, and a toggle is easier for the common case than pasting YAML.

Additional context

Added in #4306. Related: #2085 (systemd-resolved guests not resolving the cluster domain), which the netplan document addresses for netplan guests only.

Ngôn ngữ chính
Go
Star
2.2k
Fork
209
Merge trung bình
4 ngày 14 giờ
Pull request đã merge (30 ngày)
140

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cozystack/cozystack

Tất cả issue của cozystack/cozystack

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.