Skip to content
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

Helm: helm-lint task/goal #2613

Closed
manusa opened this issue Feb 2, 2024 · 0 comments · Fixed by #2635
Closed

Helm: helm-lint task/goal #2613

manusa opened this issue Feb 2, 2024 · 0 comments · Fixed by #2635
Assignees
Labels
component/helm ⎈ enhancement New feature or request
Milestone

Comments

@manusa
Copy link
Member

manusa commented Feb 2, 2024

Helm: helm-lint task/goal

#2613

Description

As an Eclipse JKube user, I want to be able to examine a chart for possible issues, so that I can fix them before packaging and deploying it.

Proposal

JKube Kit

JKube Kit exposes a new method lint that lints the chart provided in the HelmConfig argument.
This allows to lint the charts Eclipse JKube generates.

  • The linting is performed by executing helm-java lint command.
  • The user is able to provide the following linting options through the HelmConfig in the lint field and properties.
    • strict: jkube.helm.lint.strict
    • quiet: jkube.helm.lint.quiet
  • The linting messages are logged in white ([[W]]).
  • If linting fails:
    • The messages are logged using the error logger.
    • A RuntimeException is thrown with the message Linting failed.
  • If linting succeeds:
    • The messages are logged using the info logger.
    • A message is logged using the info logger with the message Linting successful.

Maven plugins

The Kubernetes Maven Plugin and OpenShift Maven Plugin expose a new helm-lint goal in a HelmLintMojo and OpenshiftHelmLintMojo that extends the basic HelmMojo (following a similar approach to that of HelmPushMojo).

The mojos are bound by default to the LifecyclePhase.INTEGRATION_TEST phase.

Gradle plugins

The Kubernetes Gradle Plugin and OpenShift Gradle Plugin expose a new helmLint task in a KubernetesHelmLintTask and OpenShiftHelmLintTask that extends the basic AbstractJKubeTask task.

An integration test proves that the task can be executed both, with a successful and a failed linting.

Documentation

The documentation exposes for each of the Maven, Gradle, Kubernetes, and OpenShift plugins reflects the new lint goal/task.

It includes a section with the linting options that can be provided in the HelmConfig argument and properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/helm ⎈ enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant