From 5ff47451916d1c75a001b49960eb56ea04de88d6 Mon Sep 17 00:00:00 2001 From: Janis Eccarius Date: Mon, 1 Jun 2026 23:15:19 +0200 Subject: [PATCH] feat(analysis): add performance tests analysis template and update promotion template --- kargo-projects/nowchess/kustomization.yaml | 1 + .../nowchess/ncs-analysis-template.yaml | 100 ++++++++++++++++++ .../nowchess/ncs-promotion-template.yaml | 2 - kargo-projects/nowchess/ncs-stage.yaml | 3 + 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 kargo-projects/nowchess/ncs-analysis-template.yaml diff --git a/kargo-projects/nowchess/kustomization.yaml b/kargo-projects/nowchess/kustomization.yaml index 661dc4e..014551a 100644 --- a/kargo-projects/nowchess/kustomization.yaml +++ b/kargo-projects/nowchess/kustomization.yaml @@ -6,3 +6,4 @@ resources: - ncs-warehouse.yaml - ncs-stage.yaml - ncs-promotion-template.yaml + - ncs-analysis-template.yaml diff --git a/kargo-projects/nowchess/ncs-analysis-template.yaml b/kargo-projects/nowchess/ncs-analysis-template.yaml new file mode 100644 index 0000000..3a5334e --- /dev/null +++ b/kargo-projects/nowchess/ncs-analysis-template.yaml @@ -0,0 +1,100 @@ +apiVersion: argoproj.io/v1alpha1 +kind: AnalysisTemplate +metadata: + name: nowchess-performance-tests + namespace: nowchess-kargo +spec: + metrics: + - name: smoke-test + provider: + job: + spec: + backoffLimit: 0 + template: + spec: + restartPolicy: Never + containers: + - name: remotek6-client + image: ghcr.io/now-chess/remotek6-client:main + imagePullPolicy: Always + env: + - name: SERVER_URL + value: "https://130.61.135.202:6138" + - name: GIT_URL + value: "https://git.janis-eccarius.de/NowChess/PerformanceTests.git" + - name: SCRIPT_PATH + value: "simulations/smokeTest.js" + - name: CONTAINER_ID + valueFrom: + fieldRef: + fieldPath: metadata.uid + - name: K6_ENV_BASE_URL + value: "https://st.nowchess.janis-eccarius.de" + - name: CLIENT_CERT + value: /certs/client.crt + - name: CLIENT_KEY + value: /certs/client.key + - name: CA_CERT + value: /certs/ca.crt + volumeMounts: + - name: certs + mountPath: /certs + readOnly: true + resources: + requests: + memory: "16Mi" + cpu: "10m" + limits: + memory: "32Mi" + cpu: "100m" + volumes: + - name: certs + secret: + secretName: remotek6-certs + - name: load-test + initialDelay: 2m0s + provider: + job: + spec: + backoffLimit: 0 + template: + spec: + restartPolicy: Never + containers: + - name: remotek6-client + image: ghcr.io/now-chess/remotek6-client:main + imagePullPolicy: Always + env: + - name: SERVER_URL + value: "https://130.61.135.202:6138" + - name: GIT_URL + value: "https://git.janis-eccarius.de/NowChess/PerformanceTests.git" + - name: SCRIPT_PATH + value: "simulations/loadTest.js" + - name: CONTAINER_ID + valueFrom: + fieldRef: + fieldPath: metadata.uid + - name: K6_ENV_BASE_URL + value: "https://st.nowchess.janis-eccarius.de" + - name: CLIENT_CERT + value: /certs/client.crt + - name: CLIENT_KEY + value: /certs/client.key + - name: CA_CERT + value: /certs/ca.crt + volumeMounts: + - name: certs + mountPath: /certs + readOnly: true + resources: + requests: + memory: "16Mi" + cpu: "10m" + limits: + memory: "32Mi" + cpu: "100m" + volumes: + - name: certs + secret: + secretName: remotek6-certs diff --git a/kargo-projects/nowchess/ncs-promotion-template.yaml b/kargo-projects/nowchess/ncs-promotion-template.yaml index 32587fe..b1584bc 100644 --- a/kargo-projects/nowchess/ncs-promotion-template.yaml +++ b/kargo-projects/nowchess/ncs-promotion-template.yaml @@ -15,8 +15,6 @@ spec: value: 'ghcr.io/now-chess/now-chess-systems/${{ vars.component }}' - name: branch value: main - - name: tagSuffix - value: "" - name: imageTag value: ${{ imageFrom(vars.imageRepoUrl).Tag }}${{ vars.tagSuffix }} - name: discordWebhook diff --git a/kargo-projects/nowchess/ncs-stage.yaml b/kargo-projects/nowchess/ncs-stage.yaml index cdce4fc..2567b39 100644 --- a/kargo-projects/nowchess/ncs-stage.yaml +++ b/kargo-projects/nowchess/ncs-stage.yaml @@ -74,6 +74,9 @@ spec: sources: direct: true requiredSoakTime: 5m0s + verification: + analysisTemplates: + - name: nowchess-performance-tests promotionTemplate: spec: steps: