-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Action CI (Kustomize) | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test-action-kustomize-job-win32: | ||
runs-on: windows-latest | ||
name: kube-score kustomize (Win32) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: azure/setup-kubectl@v3 | ||
id: install | ||
- name: Make temporal output directory | ||
run: mkdir -p out/kustomize | ||
- name: kustomize build to standard template | ||
run: kubectl kustomize sample-manifests\kustomize\overlays\production > ./out/kustomize/sample-kustomize.yaml | ||
- name: kube-score action step | ||
uses: ./ # Uses an action in the root directory | ||
id: ksga | ||
with: | ||
manifests-folders: './out/kustomize/*.yaml' | ||
ignore-exit-code: 'true' | ||
kube-score-version: '1.14.0' | ||
|
||
test-action-kustomize-job-linux: | ||
runs-on: ubuntu-latest | ||
name: kube-score kustomize (Linux) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: azure/setup-kubectl@v3 | ||
id: install | ||
- name: Make temporal output directory | ||
run: mkdir -p out/kustomize | ||
- name: kustomize build to standard template | ||
run: kubectl kustomize sample-manifests/kustomize/overlays/production > ./out/kustomize/sample-kustomize.yaml | ||
- name: kube-score action step | ||
uses: ./ # Uses an action in the root directory | ||
id: ksga | ||
with: | ||
manifests-folders: './out/kustomize/*.yaml' | ||
ignore-exit-code: 'true' | ||
kube-score-version: '1.14.0' | ||
|
||
test-action-kustomize-job-macos: | ||
runs-on: macos-latest | ||
name: kube-score kustomize (MacOS) | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: azure/setup-kubectl@v3 | ||
id: install | ||
- name: Make temporal output directory | ||
run: mkdir -p out/kustomize | ||
- name: kustomize build to standard template | ||
run: kubectl kustomize sample-manifests/kustomize/overlays/production > ./out/kustomize/sample-kustomize.yaml | ||
- name: kube-score action step | ||
uses: ./ # Uses an action in the root directory | ||
id: ksga | ||
with: | ||
manifests-folders: './out/kustomize/*.yaml' | ||
ignore-exit-code: 'true' | ||
kube-score-version: '1.14.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.7.9 | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commonLabels: | ||
app: hello | ||
resources: | ||
- deployment.yaml |
6 changes: 6 additions & 0 deletions
6
sample-manifests/kustomize/overlays/production/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
commonLabels: | ||
env: production | ||
bases: | ||
- ../../base | ||
patches: | ||
- replica_count.yaml |
6 changes: 6 additions & 0 deletions
6
sample-manifests/kustomize/overlays/production/replica_count.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
spec: | ||
replicas: 100 |