diff --git a/.github/workflows/periodic-broken-links-check.yml b/.github/workflows/periodic-broken-links-check.yml new file mode 100644 index 0000000..ebf02a0 --- /dev/null +++ b/.github/workflows/periodic-broken-links-check.yml @@ -0,0 +1,15 @@ +name: periodic-broken-links-check + +on: + schedule: + - cron: '8 8 * * 1' + +jobs: + broken-link-checker: + runs-on: ubuntu-18.04 + steps: + - name: Broken link checker + run: | + export INPUT_URL="https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY##*/}" + export INPUT_CMD_PARAMS="--buffer-size=8192 --concurrency=10 --exclude=mylabs.dev" + wget -qO- https://raw.githubusercontent.com/ruzickap/action-broken-link-checker/v1/entrypoint.sh | bash diff --git a/.github/workflows/vuepress-build-check-deploy.yml b/.github/workflows/vuepress-build-check-deploy.yml new file mode 100644 index 0000000..24229ac --- /dev/null +++ b/.github/workflows/vuepress-build-check-deploy.yml @@ -0,0 +1,87 @@ +name: vuepress-build-check-deploy + +on: + pull_request: + types: [opened, synchronize] + paths: + - .github/workflows/vuepress-build-check-deploy.yml + - docs/** + - .markdownlint.yml + - .spelling + - package.json + - package-lock.json + push: + paths: + - .github/workflows/vuepress-build-check-deploy.yml + - docs/** + - .markdownlint.yml + - .spelling + - package.json + - package-lock.json + +jobs: + markdownlint-check: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: markdownlint-cli + uses: nosborn/github-action-markdown-cli@v1.1.1 + with: + files: . + config_file: .markdownlint.yml + + markdown-spell-check: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: Install Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Install markdown-spellcheck + run: npm install -g markdown-spellcheck + + - name: Run mdspell + run: find . -type f -name "*.md" -exec mdspell --ignore-numbers --ignore-acronyms --report --en-gb {} \; + + vuepress-build-check-deploy: + runs-on: ubuntu-18.04 + needs: + - markdownlint-check + - markdown-spell-check + steps: + - uses: actions/checkout@v2 + + - name: Install Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Install VuePress and build the document + run: | + npm install + npm run build + cp LICENSE docs/.vuepress/dist + sed -e "s@(part-@(https://github.com/${GITHUB_REPOSITORY}/tree/master/docs/part-@" -e 's@.\/.vuepress\/public\/@./@' docs/README.md > docs/.vuepress/dist/README.md + + - name: Check broken links + env: + INPUT_URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }} + INPUT_PAGES_PATH: . + INPUT_CMD_PARAMS: --buffer-size=8192 --concurrency=10 --skip-tls-verification --exclude=mylabs.dev + run: | + ln -s docs/.vuepress/dist ${{ github.event.repository.name }} + wget -qO- https://raw.githubusercontent.com/ruzickap/action-broken-link-checker/v1/entrypoint.sh | bash + + - name: Deploy + uses: peaceiris/actions-gh-pages@v2.8.0 + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + env: + ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: ./docs/.vuepress/dist + with: + forceOrphan: true diff --git a/.github/workflows/vuepress-build.yml b/.github/workflows/vuepress-build.yml deleted file mode 100644 index e3033d6..0000000 --- a/.github/workflows/vuepress-build.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: "vuepress-build" - -on: - push: - branches: [master] - paths: - - '.github/**' - - 'docs/**' - - .spelling - - package.json - - package-lock.json - -env: - EXCLUDE_WEB_PAGES: "(mylabs.dev)" - -jobs: - markdown-lint-check: - name: "Markdown lint check" - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v2 - - - name: "Install Node.js 12" - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: "Install markdownlint-cli" - run: npm install -g markdownlint-cli - - - name: "Create markdownlint configuration file" - run: | - echo "{ MD013: { code_blocks: false } }" > /tmp/markdownlint_config.json - - - name: "Run markdownlint" - run: find . -path ./node_modules -prune -o -name "*.md" -print0 | xargs -t -0 markdownlint -c /tmp/markdownlint_config.json - - markdown-spell-check: - name: "Markdown spell check" - runs-on: ubuntu-18.04 - - steps: - - uses: actions/checkout@v2 - - - name: "Install Node.js 12" - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: "Install markdown-spellcheck" - run: npm install -g markdown-spellcheck - - - name: "Run mdspell" - run: mdspell '**/*.md' '!**/node_modules/**/*.md' --ignore-numbers --ignore-acronyms --report --en-gb - - vuepress-build: - name: "VuePress build" - runs-on: ubuntu-18.04 - needs: - - markdown-lint-check - - markdown-spell-check - - steps: - - uses: actions/checkout@v2 - - - name: "Install Node.js 12" - uses: actions/setup-node@v1 - with: - node-version: 12.x - - - name: "Install VuePress and build the document" - run: | - npm install - npm run build - cp LICENSE docs/.vuepress/dist - ln -s docs/.vuepress/dist ${GITHUB_REPOSITORY##*/} - sed -e "s@(part-@(https://github.com/${GITHUB_REPOSITORY}/tree/master/docs/part-@" -e 's@.\/.vuepress\/public\/@./@' docs/README.md > docs/.vuepress/dist/README.md - - - name: "Check links" - run: | - echo "127.0.0.1 ${GITHUB_REPOSITORY%/*}.github.io" | sudo tee -a /etc/hosts - curl -s https://getcaddy.com | bash -s personal - cat > Caddyfile << EOF - https://${GITHUB_REPOSITORY%/*}.github.io - tls self_signed - EOF - sudo caddy -quiet & - go get -u github.com/raviqqe/muffet - ~/go/bin/muffet --concurrency=10 --skip-tls-verification --exclude "${EXCLUDE_WEB_PAGES}" https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY##*/} - - - name: Deploy - uses: peaceiris/actions-gh-pages@v2.8.0 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./docs/.vuepress/dist - with: - emptyCommits: false - forceOrphan: true diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..8f3de8b --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,23 @@ +name: yamllint + +on: + pull_request: + types: [opened, synchronize] + paths: + - '**.yml' + - '**.yaml' + push: + paths: + - '**.yml' + - '**.yaml' + +jobs: + yamllint-check: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + + - name: yamllint + uses: ibiqlik/action-yamllint@master + with: + file_or_dir: . diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..90c6300 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,3 @@ +MD013: + code_blocks: false + tables: false diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..addf0aa --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,7 @@ +extends: default + +rules: + # 80 chars should be enough, but don't fail if a line is longer + line-length: + max: 80 + level: warning diff --git a/files/cert-manager-letsencrypt-aws-route53-clusterissuer-certificate.yaml b/files/cert-manager-letsencrypt-aws-route53-clusterissuer-certificate.yaml index 666ee96..67a7e7f 100644 --- a/files/cert-manager-letsencrypt-aws-route53-clusterissuer-certificate.yaml +++ b/files/cert-manager-letsencrypt-aws-route53-clusterissuer-certificate.yaml @@ -23,13 +23,13 @@ spec: dns01: # Here we define a list of DNS-01 providers that can solve DNS challenges providers: - - name: aws-route53 - route53: - accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID} - region: eu-central-1 - secretAccessKeySecretRef: - name: aws-route53-secret-access-key-secret - key: secret-access-key + - name: aws-route53 + route53: + accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID} + region: eu-central-1 + secretAccessKeySecretRef: + name: aws-route53-secret-access-key-secret + key: secret-access-key --- apiVersion: certmanager.k8s.io/v1alpha1 kind: ClusterIssuer @@ -49,13 +49,13 @@ spec: # Here we define a list of DNS-01 providers that can solve DNS challenges # https://docs.cert-manager.io/en/latest/tasks/acme/configuring-dns01/index.html providers: - - name: aws-route53 - route53: - accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID} - region: eu-central-1 - secretAccessKeySecretRef: - name: aws-route53-secret-access-key-secret - key: secret-access-key + - name: aws-route53 + route53: + accessKeyID: ${EKS_CERT_MANAGER_ROUTE53_AWS_ACCESS_KEY_ID} + region: eu-central-1 + secretAccessKeySecretRef: + name: aws-route53-secret-access-key-secret + key: secret-access-key --- apiVersion: certmanager.k8s.io/v1alpha1 kind: Certificate @@ -69,12 +69,12 @@ spec: name: letsencrypt-${LETSENCRYPT_ENVIRONMENT}-dns commonName: "*.${MY_DOMAIN}" dnsNames: - - "*.${MY_DOMAIN}" - - ${MY_DOMAIN} + - "*.${MY_DOMAIN}" + - ${MY_DOMAIN} acme: config: - - dns01: - provider: aws-route53 - domains: - - "*.${MY_DOMAIN}" - - ${MY_DOMAIN} + - dns01: + provider: aws-route53 + domains: + - "*.${MY_DOMAIN}" + - ${MY_DOMAIN} diff --git a/files/export_services_gateway.yaml b/files/export_services_gateway.yaml index 0a5658e..f2ec11e 100644 --- a/files/export_services_gateway.yaml +++ b/files/export_services_gateway.yaml @@ -22,15 +22,15 @@ metadata: namespace: istio-system spec: hosts: - - "grafana.${MY_DOMAIN}" + - grafana.${MY_DOMAIN} gateways: - - istio-autogenerated-k8s-ingress + - istio-autogenerated-k8s-ingress http: - - route: - - destination: - host: grafana.istio-system.svc.cluster.local - port: - number: 3000 + - route: + - destination: + host: grafana.istio-system.svc.cluster.local + port: + number: 3000 --- apiVersion: networking.istio.io/v1alpha3 kind: Gateway @@ -41,12 +41,12 @@ spec: selector: istio: ingressgateway servers: - - port: - number: 15031 - name: http2-grafana - protocol: HTTP2 - hosts: - - "*" + - port: + number: 15031 + name: http2-grafana + protocol: HTTP2 + hosts: + - "*" --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService @@ -55,17 +55,17 @@ metadata: namespace: istio-system spec: hosts: - - "*" + - "*" gateways: - - grafana-gateway + - grafana-gateway http: - - match: - - port: 15031 - route: - - destination: - host: grafana.istio-system.svc.cluster.local - port: - number: 3000 + - match: + - port: 15031 + route: + - destination: + host: grafana.istio-system.svc.cluster.local + port: + number: 3000 --- ################## @@ -91,15 +91,15 @@ metadata: namespace: istio-system spec: hosts: - - "jaeger.${MY_DOMAIN}" + - jaeger.${MY_DOMAIN} gateways: - - istio-autogenerated-k8s-ingress + - istio-autogenerated-k8s-ingress http: - - route: - - destination: - host: tracing.istio-system.svc.cluster.local - port: - number: 80 + - route: + - destination: + host: tracing.istio-system.svc.cluster.local + port: + number: 80 --- apiVersion: networking.istio.io/v1alpha3 kind: Gateway @@ -110,12 +110,12 @@ spec: selector: istio: ingressgateway servers: - - port: - number: 15032 - name: http2-tracing - protocol: HTTP2 - hosts: - - "*" + - port: + number: 15032 + name: http2-tracing + protocol: HTTP2 + hosts: + - "*" --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService @@ -124,17 +124,17 @@ metadata: namespace: istio-system spec: hosts: - - "*" + - "*" gateways: - - tracing-gateway + - tracing-gateway http: - - match: - - port: 15032 - route: - - destination: - host: tracing.istio-system.svc.cluster.local - port: - number: 80 + - match: + - port: 15032 + route: + - destination: + host: tracing.istio-system.svc.cluster.local + port: + number: 80 --- ################## @@ -160,15 +160,15 @@ metadata: namespace: istio-system spec: hosts: - - "kiali.${MY_DOMAIN}" + - kiali.${MY_DOMAIN} gateways: - - istio-autogenerated-k8s-ingress + - istio-autogenerated-k8s-ingress http: - - route: - - destination: - host: kiali.istio-system.svc.cluster.local - port: - number: 20001 + - route: + - destination: + host: kiali.istio-system.svc.cluster.local + port: + number: 20001 --- apiVersion: networking.istio.io/v1alpha3 kind: Gateway @@ -179,12 +179,12 @@ spec: selector: istio: ingressgateway servers: - - port: - number: 15029 - name: http2-kiali - protocol: HTTP2 - hosts: - - "*" + - port: + number: 15029 + name: http2-kiali + protocol: HTTP2 + hosts: + - "*" --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService @@ -193,17 +193,17 @@ metadata: namespace: istio-system spec: hosts: - - "*" + - "*" gateways: - - kiali-gateway + - kiali-gateway http: - - match: - - port: 15029 - route: - - destination: - host: kiali.istio-system.svc.cluster.local - port: - number: 20001 + - match: + - port: 15029 + route: + - destination: + host: kiali.istio-system.svc.cluster.local + port: + number: 20001 --- ################## @@ -229,15 +229,15 @@ metadata: namespace: istio-system spec: hosts: - - "prometheus.${MY_DOMAIN}" + - prometheus.${MY_DOMAIN} gateways: - - istio-autogenerated-k8s-ingress + - istio-autogenerated-k8s-ingress http: - - route: - - destination: - host: prometheus.istio-system.svc.cluster.local - port: - number: 9090 + - route: + - destination: + host: prometheus.istio-system.svc.cluster.local + port: + number: 9090 --- apiVersion: networking.istio.io/v1alpha3 kind: Gateway @@ -248,12 +248,12 @@ spec: selector: istio: ingressgateway servers: - - port: - number: 15030 - name: http2-prometheus - protocol: HTTP2 - hosts: - - "*" + - port: + number: 15030 + name: http2-prometheus + protocol: HTTP2 + hosts: + - "*" --- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService @@ -262,17 +262,17 @@ metadata: namespace: istio-system spec: hosts: - - "*" + - "*" gateways: - - prometheus-gateway + - prometheus-gateway http: - - match: - - port: 15030 - route: - - destination: - host: prometheus.istio-system.svc.cluster.local - port: - number: 9090 + - match: + - port: 15030 + route: + - destination: + host: prometheus.istio-system.svc.cluster.local + port: + number: 9090 --- ################## @@ -298,12 +298,12 @@ metadata: namespace: istio-system spec: hosts: - - "servicegraph.${MY_DOMAIN}" + - servicegraph.${MY_DOMAIN} gateways: - - istio-autogenerated-k8s-ingress + - istio-autogenerated-k8s-ingress http: - - route: - - destination: - host: servicegraph.istio-system.svc.cluster.local - port: - number: 8088 + - route: + - destination: + host: servicegraph.istio-system.svc.cluster.local + port: + number: 8088