Compare commits

...

5 Commits

Author SHA1 Message Date
Eugene Taranov
cac6fbc698 cleanup 2020-06-23 20:56:45 +03:00
Eugene Taranov
1d00ff19fa test 2020-06-23 20:50:29 +03:00
Eugene Taranov
51b4717fdd test 2020-06-23 20:43:04 +03:00
Eugene Taranov
6640fbeb61 TOOLS-23: fix validation 2020-06-23 20:15:35 +03:00
eugenetaranov-opsfleet
bb97859861 TOOLS-23: k8s manifests validators (#1)
* TOOLS-23: k8s manifests validators

* test

* test

* test glusterfs

* fix

* test

* test

* test tip-wlan

* fix

* disabled PR

* moved validation into separate job

Co-authored-by: Eugene Taranov <eugene@taranov.me>
2020-06-23 13:08:09 -04:00
3 changed files with 133 additions and 3 deletions

View File

@@ -7,7 +7,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
@@ -28,5 +27,4 @@ jobs:
- name: Verify that chart was uploaded successfully
run: |
helm repo update
helm search repo tip
helm search repo tip

56
.github/workflows/helm-validation.yml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: Helm validation
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.GH_AUTOMATION_KEY }}
submodules: true
- name: Validators setup
env:
KUBESCORE_VERSON: 1.7.1
run: |
mkdir /tmp/k8s-validators
cd /tmp/k8s-validators
curl -LO https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz
tar xf kubeval-linux-amd64.tar.gz
rm -f kubeval-linux-amd64.tar.gz LICENSE README.md
curl -LO https://github.com/zegl/kube-score/releases/download/v${{ env.KUBESCORE_VERSON }}/kube-score_${{ env.KUBESCORE_VERSON }}_linux_amd64.tar.gz
tar xf kube-score_${{ env.KUBESCORE_VERSON }}_linux_amd64.tar.gz
rm -f kube-score_${{ env.KUBESCORE_VERSON }}_linux_amd64.tar.gz LICENSE README.md
curl -LO https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz
tar xf helm-v3.2.4-linux-amd64.tar.gz
mv linux-amd64/helm .
rm -fr helm-v3.2.4-linux-amd64.tar.gz linux-amd64
- name: Cache validators
uses: actions/cache@v1
with:
path: /tmp/k8s-validators
key: ${{ runner.os }}-k8s-validators
- name: Test tip-wlan
working-directory: tip-wlan
run: |
echo "Kubeval test"
helm template -f values-test.yaml . | /tmp/k8s-validators/kubeval --ignore-missing-schemas
echo "Kube-score test"
helm template -f values-test.yaml . | /tmp/k8s-validators/kube-score score -
- name: Test glusterfs
working-directory: glusterfs/kube-templates
run: |
echo "Kubeval test"
/tmp/k8s-validators/kubeval *.yaml
echo "Kube-score test"
/tmp/k8s-validators/kube-score score *.yaml

76
tip-wlan/values-test.yaml Normal file
View File

@@ -0,0 +1,76 @@
# Default values for Tip-Wlan
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
#################################################################
# Global configuration overrides.
#
# These overrides will affect all helm charts (ie. applications)
# that are listed below and are 'enabled'.
#################################################################
global:
# Change to an unused port prefix range to prevent port conflicts
# with other instances running within the same k8s cluster
nodePortPrefix: 302
# namespace to deploy the release
nsPrefix: tip
repository: tip-tip-wlan-cloud-docker-repo.jfrog.io
# image pull policy
pullPolicy: Always
# default mount path root directory referenced
# by persistent volumes and log files
persistence:
# override default resource limit flavor for all charts
flavor: unlimited
# flag to enable debugging - application support required
debugEnabled: false
# Integrated Deployment which deploys Prov Service, Portal Service and
# SSC Service in a single docker image
integratedDeployment: false
# Namespace related
createReleaseNamespace: true
# DockerRegistry Secret
createDockerRegistrySecret: true
# Docker Registry secret to pull docker images from WLAN repo
dockerRegistrySecret: dummySecret
# Annotations to add to the namespace
annotations: {}
# Enabling components under Tip-wlan
opensync-gw-static:
enabled: true
opensync-gw-cloud:
enabled: true
opensync-mqtt-broker:
enabled: true
wlan-cloud-graphql-gw:
enabled: true
wlan-cloud-static-portal:
enabled: true
wlan-portal-service:
enabled: true
wlan-prov-service:
enabled: true
wlan-ssc-service:
enabled: true
wlan-integrated-cloud-component-service:
enabled: true
nginx-ingress-controller:
enabled: true
zookeeper:
enabled: true
kafka:
enabled: true
cassandra:
enabled: true
postgresql:
enabled: true