helm: Re-factor the way we handle CRDs in fluent-operator's helm chart(s)

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

Maintainer thường phản hồi trong vòng 2 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
45/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
kubernetes
Lĩnh vực
devops

Hướng nghiên cứu

Bắt đầu bằng cách so sánh các dependency CRD hiện tại trong charts/fluent-operator/charts với thư mục crds/ của chart chính. Xem xét chart fluent-operator-crds được đề xuất, thư mục templates/ của nó và cấu hình CI hoặc release dùng để phát hành các chart. Công việc được xem là hoàn tất khi chart chính cài đặt các CRD, chart riêng cập nhật chúng, tránh các CRD trùng lặp và tài liệu cài đặt và nâng cấp được cập nhật.

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

Mô tả

helm chart
Is your feature request related to a problem? Please describe.

How we currently handle CRDs:

  • We currently distribute fluent-operator's CRDs in two separate "sub-charts" which are dependencies of the "main" chart.
  • This makes it difficult to upgrade Helm releases when there are CRD changes, because CRDs (in crds/ directories) are not upgraded by default in Helm. Users have to manually fetch CRDs, run kubectl replace etc
  • The usage of file:// references in dependencies also causes duplicate CRDs in the release as reported here.
Describe the solution you'd like

I'd like to propose that we implement something similar to how Karpenter handles their Helm releases:

  • Include the fluentd and fluent-bit CRDs in the fluent-operator's "main" chart's crds/ folder.
    This will ensure all CRDs get installed during an initial helm install
  • Create a new "top-level" chart named fluent-operator-crds
  • Put CRDs in the templates/ directory of the fluent-operator-crds chart
  • Placing them in the templates/ directory will allow a user to helm upgrade the fluent-operator-crds chart to upgrade our CRDs instead instead of having to fetch them manually and kubectl replace etc
  • In this setup, we'll need to publish updated CRDs to two locations -- charts/fluent-operator/crds and charts/fluent-operator-crds/templates -- but this should be fairly simple with CI. (edited)
Additional context

I don't think this would introduce any breaking changes:

  • Currently, if a user wants to install fluent-operator without any CRDs, they can set fluentd.crdsEnable or fluentbit.crdsEnable to false
  • Moving forward, we would deprecate these two values, and a user could simply use helm install --skip-crds` if they want to prevent CRD installation

As part of this, we can also clarify and update our documentation for "installing" and "upgrading."

Ngôn ngữ chính
Go
Star
689
Fork
333
Merge trung bình
2 ngày 14 giờ
Pull request đã merge (30 ngày)
41

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 fluent/fluent-operator

Tất cả issue của fluent/fluent-operator

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.