-
Notifications
You must be signed in to change notification settings - Fork 0
Add helm chart #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add helm chart #22
Conversation
3216a7c to
242f828
Compare
52faba1 to
e31aed6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a complete Helm chart implementation for the Ofen Kubernetes controller, allowing users to deploy the application via Helm instead of just raw Kubernetes manifests. The changes include generating Helm templates from existing Kustomize configurations and updating resource naming conventions.
- Renamed service account and related RBAC resources from
imageprefetch-controllertocontroller-managerfor consistency - Added comprehensive Helm chart under
charts/ofen/with configurable values, templates, and documentation - Updated build tooling to generate Helm templates from Kustomize configurations using yq
Reviewed Changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| config/rbac/*.yaml | Renamed service account and RBAC resources to use consistent controller-manager naming |
| config/manager/*.yaml | Updated service account references and enabled leader election by default |
| config/kustomize-to-helm/ | Added Kustomize overlays and components for Helm template generation |
| charts/ofen/ | Complete Helm chart implementation with templates, values, documentation, and helper functions |
| cmd/imageprefetch-controller/main.go | Enabled leader election by default for high availability |
| Makefile | Added yq tool and targets for generating Helm templates from Kustomize configurations |
e31aed6 to
7e26254
Compare
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
7e26254 to
cc4d243
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review.
I think the PDB for the controller is necessary for actual operation. Please include PDB in helm as well.
| - includeSelectors: true | ||
| pairs: | ||
| app.kubernetes.io/name: '{{ include "ofen.name" . }}' | ||
| - pairs: | ||
| app.kubernetes.io/version: '{{ .Chart.AppVersion }}' | ||
| app.kubernetes.io/managed-by: '{{ .Release.Service }}' | ||
| helm.sh/chart: '{{ include "ofen.chart" . }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar labels are defined in multiple places. Is it possible to reduce the definitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masa213f
The labels are defined in both .../kustomization.yaml and _helpers.tpl. Am I correct in understanding that you want to use only the definitions from _helpers.tpl, like in the example below?
metadata:
labels:
{{- include "ofen.labels" . | nindent 4 }}I looked into whether this was possible, but it seems difficult to add only the keys to the labels field using tools like yq or Kustomize. Therefore, consolidating them into a single source appears to be challenging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems difficult to add only the keys to the labels field using tools like yq or Kustomize.
Oh, that's right. Thank you for confirming.
The redundancy in charts/ofen/templates/configmap.yaml has been reduced, so that's sufficient.
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
…nstraints, and priorityClassName in controller values Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
…sName in daemon values Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
…oyment templates Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds the Helm chart for ofen.
The mechanism for releasing the Helm chart will be added in a separate PR.