-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Support helm lint #429
Comments
Do you have a helm linter to propose ? |
I'm not (yet) familiar with helm, please could you provide:
Thanks ! |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
Hello, I would like to incorporate the "helm lint" feature into megalinter. @nvuillam Here are some example calls for
A valid Helm chart file might look something like this: apiVersion: v2
name: mychart
version: 1.0.0
# A chart can contain one or more charts
charts:
# This is the name of the chart
- name: myapp
# The chart version
version: 1.0.0
# A chart can contain one or more templates
templates:
# The name of the template
- name: deployment.yaml
# The template content
content: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-deployment
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:latest
ports:
- containerPort: 80
An invalid Helm chart file might have a syntax error or be missing required fields, for example: apiVersion: v2
name: mychart
# A chart is missing the 'version' field
# A chart can contain one or more charts
charts:
# This is the name of the chart
- name: myapp
# The chart version
version: 1.0.0
# A chart can contain one or more templates
templates:
# The name of the template
- name: deployment.yaml
# The template content
content: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-deployment
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:latest
ports:
- containerPort: 80
I hope this helps! Let me know if you have any other questions. If you would like, I am willing to try making a pull request to include this new linter. |
@ThomasSanson that would be great :) You can start your PR and we'll provide support if necessary :) Instructions to add a linter: https://megalinter.io/latest/contributing/#add-a-new-linter Example of recent PR with a new linter, by @bdovaz : #2150 (don't be scared by the number of files, most of them are automatically generated, updates are mainly in descriptor file. I suggest you add helm lint in KUBERNETES descriptor -> https://github.com/oxsecurity/megalinter/blob/main/megalinter/descriptors/kubernetes.megalinter-descriptor.yml ) |
This issue has been automatically marked as stale because it has not had recent activity. If you think this issue should stay open, please remove the |
@ThomasSanson are you still interested in providing a PR ? :) |
@nvuillam Yes, I'm planning to do it this Sunday due to lack of time |
Great :) |
In progress, I've been sick... However, I find it challenging to fully comprehend what actions I need to take to make a meaningful contribution. Despite this, I am committed to doing my best. |
None of the yaml linters or kubeval support helm
The text was updated successfully, but these errors were encountered: