Skip to content

Commit

Permalink
Merge pull request #2 from ironpeakservices/feat/kubelinter
Browse files Browse the repository at this point in the history
Feature: add kubelinter
  • Loading branch information
hazcod authored Jan 15, 2021
2 parents 7c3395d + fd8352d commit 6c15dc4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/kubelinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

30 changes: 19 additions & 11 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ on: [pull_request]

jobs:

# k8slint:
# name: Kubernetes
# runs-on: ubuntu-latest
# steps:
# -
# uses: actions/checkout@v2
# -
# uses: makocchi-git/[email protected]
# with:
# files: kubernetes/helm/templates/
# token: ${{ secrets.GITHUB_TOKEN }}
k8slint:
name: Kubernetes
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v2
-
name: Set up Helm
uses: azure/setup-helm@v1
-
name: Compile helm chart
run: |
mkdir compiled/
helm template kubernetes/helm > compiled/all.yaml
-
uses: stackrox/kube-linter-action@v1
with:
directory: compiled/
config: .github/kubelinter.yml

stylelint:
name: Styles
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ spec:
{{ end }}

resources:
requests:
cpu: 0.1
memory: 50Mi
limits:
cpu: 0.5
memory: 300Mi
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/helm/templates/tests/service.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ spec:
args: ['-O/dev/null', '-q', '{{ .Values.name }}:{{ .Values.servicePort }}']

resources:
requests:
cpu: 0.1
memory: 50Mi
limits:
cpu: 100m
memory: 64Mi
Expand Down

0 comments on commit 6c15dc4

Please sign in to comment.