diff --git a/.github/workflows/lint-and-test-chart.yaml b/.github/workflows/lint-and-test-chart.yaml deleted file mode 100644 index 01edac4f..00000000 --- a/.github/workflows/lint-and-test-chart.yaml +++ /dev/null @@ -1,45 +0,0 @@ -name: Lint and Test Unguard Helm Chart - -on: - pull_request: - paths: - - chart/** - -jobs: - lint-and-test-chart: - name: Lint and Test Helm Chart - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@v3.5 - with: - version: v3.12.3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - check-latest: true - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.4.0 - - - name: Run chart-testing (lint) - run: ct lint --chart-dirs . --charts ./chart --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} - - - name: Create kind cluster - uses: helm/kind-action@v1.7.0 - - - name: Add MariaDB repo - run: helm repo add bitnami https://charts.bitnami.com/bitnami - - - name: Install MariaDB - run: helm install unguard-mariadb bitnami/mariadb --set primary.persistence.enabled=false --wait --namespace unguard --create-namespace - - - name: Run chart-testing (install) - run: ct install --chart-dirs . --charts ./chart --namespace unguard --target-branch ${{ github.event.repository.default_branch }} \ No newline at end of file diff --git a/.github/workflows/test-skaffold.yaml b/.github/workflows/test.yaml similarity index 86% rename from .github/workflows/test-skaffold.yaml rename to .github/workflows/test.yaml index 63da90b1..40495159 100644 --- a/.github/workflows/test-skaffold.yaml +++ b/.github/workflows/test.yaml @@ -1,9 +1,8 @@ -name: Run Skaffold Pipeline, Deploy to Minikube Cluster and Test Unguard +name: Run Skaffold Pipeline, Deploy to Minikube Cluster and run Unguard Helm Test on: pull_request: paths: - src/** - - k8s-manifests - skaffold.yaml - chart/** @@ -30,7 +29,7 @@ jobs: uses: helm/chart-testing-action@v2.4.0 - name: Run chart-testing (lint) - run: ct lint --chart-dirs . --charts ./chart --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} + run: ct lint --chart-dirs . --charts ./chart --validate-maintainers=false --check-version-increment=false --target-branch ${{ github.event.repository.default_branch }} - name: Set up Minikube uses: medyagh/setup-minikube@v0.0.14 diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 048c6f29..80f30e83 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -2,9 +2,9 @@ annotations: licenses: Apache-2.0 apiVersion: v2 name: unguard -version: 0.8.2 +version: 0.8.1 description: Unguard is an insecure cloud-native microservices demo application. type: application home: https://github.com/dynatrace-oss/unguard icon: https://github.com/dynatrace-oss/unguard/blob/main/docs/images/logo/unguard-logo-red-small.png -appVersion: 0.8.2 +appVersion: 0.8.1 diff --git a/chart/templates/tests/test-connection.yaml b/chart/templates/tests/test-connection.yaml deleted file mode 100644 index 3f3d9997..00000000 --- a/chart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: unguard--test-connection - labels: - app.kubernetes.io/name: unguard--test-connection - app.kubernetes.io/part-of: unguard - annotations: - "helm.sh/hook": test -spec: - containers: - - name: unguard-{{.Values.userSimulator.name}} - image: {{.Values.userSimulator.cronJob.jobTemplate.container.image.repository}}:{{.Values.userSimulator.cronJob.jobTemplate.container.image.tag}} - imagePullPolicy: {{.Values.userSimulator.cronJob.jobTemplate.container.image.pullPolicy}} - env: - - name: FRONTEND_ADDR - value: {{quote .Values.userSimulator.cronJob.jobTemplate.container.env.FRONTEND_ADDR}} - - name: SIMULATE_PRIVATE_RANGES - value: {{quote .Values.userSimulator.cronJob.jobTemplate.container.env.SIMULATE_PRIVATE_RANGES}} - resources: - requests: - cpu: {{quote .Values.userSimulator.cronJob.jobTemplate.container.resources.requests.cpu}} - memory: {{quote .Values.userSimulator.cronJob.jobTemplate.container.resources.requests.memory}} - limits: - cpu: {{quote .Values.userSimulator.cronJob.jobTemplate.container.resources.limits.cpu}} - memory: {{quote .Values.userSimulator.cronJob.jobTemplate.container.resources.limits.memory}} - restartPolicy: Never \ No newline at end of file diff --git a/chart/templates/tests/test-frontend-connection.yaml b/chart/templates/tests/test-frontend-connection.yaml new file mode 100644 index 00000000..e6df7d32 --- /dev/null +++ b/chart/templates/tests/test-frontend-connection.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Pod +metadata: + name: unguard-frontend-connection + labels: + app.kubernetes.io/name: unguard-frontend-connection + app.kubernetes.io/part-of: unguard + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ .Values.userSimulator.cronJob.jobTemplate.container.env.FRONTEND_ADDR }}/login'] + restartPolicy: Never \ No newline at end of file