feat: deploy metrics-server (#56)

* chore: update readme to not deploy metrics-server

* feat: add metrics-server kustomization

* feat: enable metrics server

* Update kustomization.yaml

* Update kustomization.yaml

* Update and rename lint.yaml to lint-markdown.yaml

* Create lint-shell.yaml

* Create lint.yaml
This commit is contained in:
ᗪєνιη ᗷυнʟ authored and GitHub committed 2021-08-09 15:53:07 -04:00
1 parent 72bc5af94d
commit 8956bd46db
7 files changed
+108 -22

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
---
name: Lint Markdown files on Pull Requests
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- "**.md"
jobs:
markdownlint:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get changes
uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
markdown:
- added|modified: "**.md"
- name: Lint files
if: ${{ steps.filter.outputs.markdown == 'true' }}
uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
markdownlint_flags: "-c '.github/lint/.markdownlint.yaml' ${{ steps.filter.outputs.markdown_files }}"
+27
View File
@@ -0,0 +1,27 @@
---
name: Lint Shell scripts on Pull Requests
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- "**.sh"
jobs:
shellcheck:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get changes
uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
shell:
- added|modified: "**.sh"
- name: Lint files
if: ${{ steps.filter.outputs.shell == 'true' }}
uses: reviewdog/action-shellcheck@v1
with:
shellcheck_flags: "${{ steps.filter.outputs.shell_files }}"
+18 -21
View File
@@ -1,32 +1,29 @@
---
name: Lint
name: Lint YAML files on Pull Requests
on: # yamllint disable-line rule:truthy
pull_request:
paths:
- "**.yaml"
- "**.yml"
jobs:
yamllint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: yamllint
- name: Checkout
uses: actions/checkout@v2
- name: Get changes
uses: dorny/paths-filter@v2
id: filter
with:
list-files: shell
filters: |
yaml:
- added|modified: "**.yaml"
- added|modified: "**.yml"
- name: Lint files
if: ${{ steps.filter.outputs.yaml == 'true' }}
uses: reviewdog/action-yamllint@v1
with:
yamllint_flags: "-c .github/lint/.yamllint.yaml ./cluster"
shellcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
path: "./hack"
level: "error"
markdownlint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: markdownlint
uses: reviewdog/action-markdownlint@v0.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
yamllint_flags: "-c .github/lint/.yamllint.yaml ${{ steps.filter.outputs.yaml_files }}"
+1 -1
View File
@@ -164,7 +164,7 @@ k3sup install \
--host=169.254.1.1 \
--user=k8s-at-home \
--k3s-version=v1.20.5+k3s1 \
--k3s-extra-args="--disable servicelb --disable traefik"
--k3s-extra-args="--disable servicelb --disable traefik --disable metrics-server"
```
3. Join worker nodes (optional)
@@ -0,0 +1,5 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- metrics-server
@@ -0,0 +1,28 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/kubernetes-sigs/metrics-server/manifests/base?ref=v0.5.0
images:
- name: gcr.io/k8s-staging-metrics-server/metrics-server
newName: k8s.gcr.io/metrics-server/metrics-server
newTag: v0.5.0
patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: metrics-server
namespace: kube-system
spec:
template:
spec:
containers:
- name: metrics-server
args:
- --cert-dir=/tmp
- --secure-port=443
- --kubelet-use-node-status-port
- --metric-resolution=15s
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
+1
View File
@@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- default
- kube-system
- networking
- system-upgrade