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

Automation #15

Closed
difabion opened this issue Feb 26, 2022 · 7 comments
Closed

Automation #15

difabion opened this issue Feb 26, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@difabion
Copy link
Collaborator

difabion commented Feb 26, 2022

Add some nice-to-haves for the updating workflow:

Github Actions

on pull request:
✅ lint chart
✅ test chart against some basic configurations

on pull request commit:
✅ check version in chart.yaml
✅ if new version, tag main at latest commit

on tag:
✅ sync readme from main to gh-pages
✅ helm package new tag
✅ helm index
✅ Either push commit to repo or create PR for review and manual merging

@difabion
Copy link
Collaborator Author

Automation to tag and publish new helm releases is covered by #20.

@difabion
Copy link
Collaborator Author

Actions currently has only read permissions, automation will fail until it has write permissions.

@difabion difabion added the enhancement New feature or request label May 19, 2022
@difabion difabion self-assigned this May 19, 2022
@difabion
Copy link
Collaborator Author

Automation to tag and publish new helm releases is covered by #20.

This has been refactored and is working much better now.

@difabion
Copy link
Collaborator Author

difabion commented May 22, 2022

Trying out stackrox/kube-linter for linting on PRs and commits. Stock out of the box, this is the output of linting chart 0.5.0:

% kube-linter lint .
KubeLinter 0.3.0

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" does not have a read-only root file system (check: no-read-only-root-fs, remediation: Set readOnlyRootFilesystem to true in the container securityContext.)

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" is not set to runAsNonRoot (check: run-as-non-root, remediation: Set runAsUser to a non-zero number and runAsNonRoot to true in your pod or container securityContext. Refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ for details.)

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" has cpu request 0 (check: unset-cpu-requirements, remediation: Set CPU requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.)

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" has cpu limit 0 (check: unset-cpu-requirements, remediation: Set CPU requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.)

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" has memory request 0 (check: unset-memory-requirements, remediation: Set memory requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.)

templates/deployment.yaml: (object: <no namespace>/test-release-benthos apps/v1, Kind=Deployment) container "benthos" has memory limit 0 (check: unset-memory-requirements, remediation: Set memory requests and limits for your container based on its requirements. Refer to https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits for details.)

Error: found 6 lint errors

There are some potential enhancements from this list, but needs some more consideration.

EDIT: The linter will exclude these checks for now.

@difabion
Copy link
Collaborator Author

This may be a good local alternative to shitposting commits just to test GitHub Actions:

https://github.com/nektos/act

@difabion
Copy link
Collaborator Author

Act is awesome, confirmed.

Re: linting, it is in place and SARIF uploads are available in the code scanning tool in the repo.

@difabion
Copy link
Collaborator Author

Basic testing added to actions.

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

No branches or pull requests

1 participant