Skip to content

Kyverno 1.10.6 upgrade #151

Kyverno 1.10.6 upgrade

Kyverno 1.10.6 upgrade #151

Workflow file for this run

name: Test Private Helm
on:
pull_request:
paths:
- charts-private/**
- .github/workflows/test-private.yaml
jobs:
test-helm-lint:
runs-on: ubuntu-latest
name: Lint Helm Charts
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.0
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --config .github/config/cf.yaml --chart-dirs charts-private
test-helm-install:
needs: [test-helm-lint]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chart:
- "phylogatr-web"
- "focalmap"
- "sirmodel"
# TODO: Maybe too few resources with Kind cluster to support init job
# Init job is required to bootstrap Nominatim
#- nominatim
- "rigatoni"
- webmo
- emthub
- chatsqc
name: Test Install Helm Chart ${{ matrix.chart }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.0
- name: Set up chart-testing
uses: helm/[email protected]
- name: Create kind cluster
uses: helm/[email protected]
with:
version: v0.17.0
cluster_name: kind
node_image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
config: .github/config/kind.yaml
- name: Label kind nodes
run: |
kubectl label node kind-worker node-role.kubernetes.io/test=''
kubectl label node kind-worker2 node-role.kubernetes.io/test=''
- name: Build and Load nominatim images
if: matrix.chart == 'nominatim'
run: |
make -f docker-images/postgresql/Makefile build
make -f docker-images/postgresql/Makefile kind-load
make -f docker-images/nominatim/Makefile build
make -f docker-images/nominatim/Makefile kind-load
make -f docker-images/postgresql-nominatim/Makefile build
make -f docker-images/postgresql-nominatim/Makefile kind-load
- name: Set image pull secret
run: |
sed -i 's|IMAGE-PULL-PASSWORD|${{ secrets.OSC_REGISTRY_ROBOT_WEBSERVICES_READ_TOKEN}}|g' charts-private/${{ matrix.chart }}/ci/*.yaml
sed -i 's|IMAGE-PULL-PASSWORD|${{ secrets.OSC_REGISTRY_ROBOT_WEBSERVICES_READ_TOKEN}}|g' .github/config/*.yaml
- name: Install Keycloak
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install keycloak bitnami/keycloak -n keycloak --create-namespace --version 9.2.2
- name: Install Kyverno
run: |
helm repo add kyverno https://kyverno.github.io/kyverno/
helm install kyverno kyverno/kyverno -n kyverno --create-namespace -f .github/config/kyverno-values.yaml --version 3.0.8
helm dependency build charts/kyverno-policies
helm install kyverno-policies charts/kyverno-policies -n kyverno -f .github/config/kyverno-policies-values.yaml
kubectl apply -f .github/config/k8-ldap-configmaps.yaml
timeout 60 /bin/bash -c 'until kubectl get pods -n kyverno -l app.kubernetes.io/component=admission-controller -o jsonpath="{.items[0].status.phase}" | grep Running ; do echo "Waiting for Kyverno" ; sleep 10 ; done'
sleep 60
- name: Add namespaces
run: kubectl apply -f .github/config/namespaces.yaml
- name: Run chart-testing (install)
run: |
ct install --config .github/config/cf.yaml --charts charts-private/${{ matrix.chart }} --namespace ${{ matrix.chart }}
- name: Debug failure
if: failure()
run: |
kubectl describe node -A
kubectl describe pod -A
kubectl describe service -A
kubectl describe daemonset -A
if [ ${{ matrix.chart }} == "nominatim" ]; then
kubectl describe job -A
kubectl logs job.batch/$(kubectl get jobs -n nominatim -o jsonpath="{.items[0].metadata.name}") -n nominatim
fi
kubectl logs -n kyverno -l app.kubernetes.io/component=admission-controller