-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add timeout checker #16
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
Conversation
WalkthroughThis pull request updates the version of the Helm chart for the Changes
Sequence Diagram(s)sequenceDiagram
participant Scheduler as K8s Scheduler
participant CronJob as Timeout Checker CronJob
participant Container as Timeout Checker Container
participant App as Node.js Application
CronJob->>Scheduler: Register schedule from Helm values
Scheduler->>CronJob: Trigger job based on schedule
CronJob->>Container: Launch container with command execution
Container->>App: Execute `node index.js -r -j timeout-checker`
Suggested reviewers
Poem
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:
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)
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: 1
🧹 Nitpick comments (2)
charts/ctrlplane/charts/jobs/templates/timeout-checker.yaml (2)
5-8
: Review Template Indentation for Labels
YAMLlint warns of indentation issues (extra spaces and unexpected indent levels) on lines 7–8. Although Helm templating can sometimes trigger these false positives, please verify that the final rendered YAML maintains proper indentation. You might consider adjusting thenindent
value or reformatting the block if needed.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 7-7: wrong indentation: expected 2 but found 4
(indentation)
[warning] 7-7: too many spaces after hyphen
(hyphens)
[warning] 8-8: wrong indentation: expected 2 but found 4
(indentation)
9-12
: Review Template Indentation for Annotations
Similar to the labels block, warnings on lines 11–12 indicate potential indentation issues. Ensure that the rendered annotations section is correctly indented. Adjust the templating or indentation settings (e.g., usingnindent
) if necessary.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 11-11: wrong indentation: expected 2 but found 4
(indentation)
[warning] 11-11: too many spaces after hyphen
(hyphens)
[warning] 12-12: wrong indentation: expected 2 but found 4
(indentation)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
charts/ctrlplane/Chart.yaml
(1 hunks)charts/ctrlplane/charts/jobs/templates/timeout-checker.yaml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
charts/ctrlplane/charts/jobs/templates/timeout-checker.yaml
[warning] 7-7: wrong indentation: expected 2 but found 4
(indentation)
[warning] 7-7: too many spaces after hyphen
(hyphens)
[warning] 8-8: wrong indentation: expected 2 but found 4
(indentation)
[warning] 11-11: wrong indentation: expected 2 but found 4
(indentation)
[warning] 11-11: too many spaces after hyphen
(hyphens)
[warning] 12-12: wrong indentation: expected 2 but found 4
(indentation)
[error] 4-4: syntax error: expected , but found ''
(syntax)
🔇 Additional comments (9)
charts/ctrlplane/Chart.yaml (1)
5-5
: Version Bump Update
The chart’s version has been correctly updated from0.3.8
to0.3.9
, which aligns with the introduction of the new CronJob feature.charts/ctrlplane/charts/jobs/templates/timeout-checker.yaml (8)
1-3
: API Version & Kind Setup
The API versionbatch/v1
and kindCronJob
are correctly defined for this Kubernetes resource.
13-15
: CronJob Specification Settings
TheconcurrencyPolicy
andschedule
fields are correctly templated. Verify that the schedule value (obtained from.Values.cron.schedule
) conforms to Kubernetes CronJob syntax.
16-20
: Job Template and Pod Specification
The structure for the job template and pod spec is well defined with a restart policy ofOnFailure
, which is appropriate for jobs that should retry on failure.
21-27
: Container Configuration
The container for the timeout-checker is configured with a dynamic image (using.Values.image.repository
and.Values.image.tag
), a pull policy, and a command/args setup that calls Node.js correctly. Ensure that these values resolve properly in your values file.
28-42
: Environment Variable Configuration
Environment variables are securely sourced from Kubernetes secrets (forREDIS_URL
,POSTGRES_URL
, andVARIABLES_AES_256_KEY
), which is a good security practice.
43-44
: Extra Environment Variables Inclusion
The file includes additional environment variables via templated includes (ctrlplane.extraEnv
andctrlplane.extraEnvFrom
). This enhances flexibility. Please ensure that the referenced templates exist and render as expected.
45-46
: Resource Configuration
Resources are inserted into the manifest using a templatedtoYaml
call. Verify that.Values.resources
is well defined in your values file to avoid runtime issues.
47-47
: Trailing Newline Check
There is a blank line at the end of the file. While this is generally harmless, ensure that no unintended whitespace affects downstream processing.
metadata: | ||
name: {{ include "jobs.fullname" . }}-timeout-checker |
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.
Quote the Dynamic Name Field
The metadata name
uses a Helm template expression:
name: {{ include "jobs.fullname" . }}-timeout-checker
YAMLlint reports a syntax error on this line because the templated scalar is not quoted. Enclose the value in quotes to ensure valid YAML syntax. For example:
name: "{{ include \"jobs.fullname\" . }}-timeout-checker"
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 4-4: syntax error: expected , but found ''
(syntax)
Summary by CodeRabbit