-
Notifications
You must be signed in to change notification settings - Fork 71
feat: add an option to change the startup command/args for the app #246
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
base: main
Are you sure you want to change the base?
feat: add an option to change the startup command/args for the app #246
Conversation
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughHelm chart templates were updated to replace static container args with value-driven command and args for the main container and migration tasks. Corresponding values and schema entries were added to values.yaml and values.schema.json to define command and args for both the main application and datastore migrations. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Operator
participant Helm as Helm (Chart Render)
participant K8s as Kubernetes API
participant Pod as Pod/Job
participant Ctr as Container
Operator->>Helm: helm install/upgrade with values
Helm->>K8s: Rendered Deployment/Job (command, args from values)
K8s->>Pod: Schedule Pod/Job
Pod->>Ctr: Start container with command/args
Note right of Ctr: Main: .Values.command/.Values.args<br/>Migrate: .Values.migrations.command/.Values.migrations.args
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 5
🧹 Nitpick comments (3)
charts/openfga/values.yaml (1)
121-122: Top-level command/args defaults look good; consider quoting for clarityThe defaults match the current image’s expected entrypoint/cmd. Optional: quote the strings to avoid surprises with YAML parsing if users extend them with flags containing special chars.
Apply this diff if you want clearer quoting:
-command: ["/openfga"] -args: ["run"] +command: ["/openfga"] +args: ["run"]charts/openfga/templates/deployment.yaml (1)
94-96: JSON-encode command/args arrays for robust renderingUsing
toJsonensures valid YAML for lists and correct quoting if values contain spaces or special characters.Apply this diff:
- command: {{ .Values.command }} - args: {{ .Values.args }} + command: {{ .Values.command | toJson }} + args: {{ .Values.args | toJson }}charts/openfga/templates/job.yaml (1)
1-83: Optional: guard command/args only when non-empty to allow image defaultsIf you want to allow users to rely on the image’s default ENTRYPOINT/CMD, render these fields conditionally when non-empty. Not required for this PR since you provide defaults, but improves flexibility.
Example:
- command: {{ .Values.datastore.migrations.command | toJson }} - args: {{ .Values.datastore.migrations.args | toJson }} + {{- if .Values.datastore.migrations.command }} + command: {{ .Values.datastore.migrations.command | toJson }} + {{- end }} + {{- if .Values.datastore.migrations.args }} + args: {{ .Values.datastore.migrations.args | toJson }} + {{- end }}And similarly for the main container in deployment.yaml.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
charts/openfga/templates/deployment.yaml(2 hunks)charts/openfga/templates/job.yaml(1 hunks)charts/openfga/values.schema.json(1 hunks)charts/openfga/values.yaml(2 hunks)
|
The next problem is that the image is distroless and can't make my magic trick work :) |
Description
Adding the flexibility to overwrite current startup commands for flexibility.
What problem is being solved?
#101
How is it being solved?
Simply by making
commandandargsparametersWhat changes are made to solve it?
add an option to change the startup command/args for the app
Wanted Behaviour:
References
Review Checklist
mainSummary by CodeRabbit
New Features
Chores