Skip to content

Commit

Permalink
Merge pull request #865 from kubeshop/develop
Browse files Browse the repository at this point in the history
feat: release
  • Loading branch information
ypoplavs authored May 29, 2024
2 parents 3780121 + 67eae1e commit dfef76c
Show file tree
Hide file tree
Showing 14 changed files with 2,324 additions and 402 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/helm-deploy-testkube-charts-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,6 @@ jobs:
with:
version: v3.10.0

- name: Modify executors.json file if any executor Docker image was updated
if: ${{ github.event.client_payload.image_tag_api}}
run: |
#pull the latest changes in case other GH workflow altered executors.json file
git pull origin develop
export image_tag=${{ github.event.client_payload.image_tag_api }}
export executor_names="artillery curl cypress ginkgo gradle init jmeter jmeterd k6 kubepug maven playwright postman scraper soapui tracetest zap logs-sidecar"
for executor_name in $executor_names; do
sed -i "s/\(\"image\":.*$executor_name.*:\)[^\"]*\(\"\)/\1$image_tag\2/" ./charts/testkube-api/executors.json
done
cat ./charts/testkube-api/executors.json
- name: Commit executors.json
if: ${{ github.event.client_payload.image_tag_api}}
run: |
git config user.name "kubeshop-bot"
git config user.email "[email protected]"
if [[ $(git status --porcelain ./charts/testkube-api/executors.json) ]]; then
git add ./charts/testkube-api/executors.json
git commit -m "Update executors.json"
git push --force origin develop
else
echo "Executors' image tags were not updated"
fi
- name: Installing repositories
run: |
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/helm-deploy-testkube-charts-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,6 @@ jobs:
with:
version: v3.10.0

- name: Modify executors.json file if any executor Docker image was updated
if: ${{ github.event.client_payload.image_tag_api }}
run: |
#pull the latest changes in case other GH workflow altered executors.json file
git pull origin develop
export image_tag=${{ github.event.client_payload.image_tag_api }}
export executor_names="artillery curl cypress ginkgo gradle init jmeter jmeterd k6 kubepug maven playwright postman scraper soapui tracetest zap logs-sidecar"
for executor_name in $executor_names; do
sed -i "s/\(\"image\":.*$executor_name.*:\)[^\"]*\(\"\)/\1$image_tag\2/" ./charts/testkube-api/executors.json
done
cat ./charts/testkube-api/executors.json
- name: Commit executors.json
if: ${{ github.event.client_payload.image_tag_api }}
run: |
git config user.name "kubeshop-bot"
git config user.email "[email protected]"
if [[ $(git status --porcelain ./charts/testkube-api/executors.json) ]]; then
git add ./charts/testkube-api/executors.json
git commit -m "Update executors.json"
git push --force origin develop
else
echo "Executors' image tags were not updated"
fi
- name: Installing repositories
run: |
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The following [Kusk Gateway](https://github.com/kubeshop/kusk-gateway/) Helm Cha
- `kusk-gateway`: The main Kusk Gateway chart which installs the CRDs as part of the main install.
- `kusk-gateway-envoyfleet`: The workhorse of Kusk Gateway; Creates a LoadBalancer envoy service which Kusk Gateway's manager component configures to route traffic to your APIs
- `kusk-gateway-api`: Kusk Gateway's API server
- `kusk-gateway-dashboard`: Subchart of Kusk Gateway's API server. Dashboard for UI interactions with the API Server.
- `kusk-gateway-dashboard`: Subchart of Kusk Gateway's API server. Dashboard for UI interactions with the API Server

## Other projects

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{{- define "testkube-api.executors" -}}
[
{
"name": "tracetest-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-tracetest-executor:1.17.48",
"image": "kubeshop/testkube-tracetest-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"tracetest"
],
Expand Down Expand Up @@ -39,7 +40,7 @@
"name": "zap-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-zap-executor:1.17.48",
"image": "kubeshop/testkube-zap-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"<pythonScriptPath>"
],
Expand Down Expand Up @@ -69,7 +70,7 @@
"name": "playwright-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-playwright-executor:1.17.48",
"image": "kubeshop/testkube-playwright-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"<depManager>"
],
Expand Down Expand Up @@ -98,7 +99,7 @@
"name": "jmeter-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-jmeter-executor:1.17.48",
"image": "kubeshop/testkube-jmeter-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"<entryPoint>"
],
Expand Down Expand Up @@ -138,12 +139,12 @@
"name": "jmeterd-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-jmeterd-executor:1.17.48",
"image": "kubeshop/testkube-jmeterd-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"<entryPoint>"
],
"slaves": {
"image": "kubeshop/testkube-jmeterd-slave:1.17.48"
"image": "kubeshop/testkube-jmeterd-slave:{{ .Values.image.tag | default .Chart.AppVersion }}"
},
"args": [
"-n",
Expand Down Expand Up @@ -181,7 +182,7 @@
"name": "ginkgo-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-ginkgo-executor:1.17.48",
"image": "kubeshop/testkube-ginkgo-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"ginkgo"
],
Expand Down Expand Up @@ -221,7 +222,7 @@
"name": "maven-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-maven-executor:1.17.48",
"image": "kubeshop/testkube-maven-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"mvn"
],
Expand Down Expand Up @@ -254,7 +255,7 @@
"name": "gradle-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-gradle-executor:1.17.48",
"image": "kubeshop/testkube-gradle-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"gradle"
],
Expand Down Expand Up @@ -286,7 +287,7 @@
"name": "kubepug-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-kubepug-executor:1.17.48",
"image": "kubeshop/testkube-kubepug-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"kubepug"
],
Expand Down Expand Up @@ -319,7 +320,7 @@
"name": "soapui-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-soapui-executor:1.17.48",
"image": "kubeshop/testkube-soapui-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"/bin/sh",
"/usr/local/SmartBear/EntryPoint.sh"
Expand Down Expand Up @@ -350,7 +351,7 @@
"name": "k6-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-k6-executor:1.17.48",
"image": "kubeshop/testkube-k6-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"k6"
],
Expand Down Expand Up @@ -382,7 +383,7 @@
"name": "cypress-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-cypress-executor:1.17.48",
"image": "kubeshop/testkube-cypress-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"./node_modules/cypress/bin/cypress"
],
Expand Down Expand Up @@ -418,7 +419,7 @@
"name": "curl-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-curl-executor:1.17.48",
"image": "kubeshop/testkube-curl-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"curl"
],
Expand Down Expand Up @@ -448,7 +449,7 @@
"name": "postman-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-postman-executor:1.17.48",
"image": "kubeshop/testkube-postman-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"newman"
],
Expand Down Expand Up @@ -485,7 +486,7 @@
"name": "artillery-executor",
"executor": {
"executorType": "job",
"image": "kubeshop/testkube-artillery-executor:1.17.48",
"image": "kubeshop/testkube-artillery-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"command": [
"artillery"
],
Expand Down Expand Up @@ -520,24 +521,25 @@
"name": "scraper-executor",
"executor": {
"executorType": "scraper",
"image": "kubeshop/testkube-scraper-executor:1.17.48",
"image": "kubeshop/testkube-scraper-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"types": []
}
},
{
"name": "init-executor",
"executor": {
"executorType": "init",
"image": "kubeshop/testkube-init-executor:1.17.48",
"image": "kubeshop/testkube-init-executor:{{ .Values.image.tag | default .Chart.AppVersion }}",
"types": []
}
},
{
"name": "logs-sidecar",
"executor": {
"executorType": "sidecar",
"image": "kubeshop/testkube-logs-sidecar:1.17.48",
"image": "kubeshop/testkube-logs-sidecar:{{ .Values.image.tag | default .Chart.AppVersion }}",
"types": []
}
}
]
]
{{- end }}
2 changes: 1 addition & 1 deletion charts/testkube-api/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
data:
executors.json: |-
{{ .Files.Get "executors.json" | indent 4 }}
{{ include "testkube-api.executors" . | indent 4 }}
job-container-template.yml: |-
{{- if .Values.jobContainerTemplate }}
{{ toYaml .Values.jobContainerTemplate | trimAll "|" | trim | indent 4 }}
Expand Down
36 changes: 36 additions & 0 deletions charts/testkube-api/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,41 @@ rules:
- get
- patch
- update
---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: Role
metadata:
name: testworkflowexecution-role-{{ .Release.Name }}
labels: {{- include "testkube-api.labels" . | nindent 4 }}
{{- if .Values.global.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.global.annotations}}
annotations: {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- testworkflows.testkube.io
resources:
- testworkflowexecutions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- deletecollection
- apiGroups:
- testworkflows.testkube.io
resources:
- testworkflowexecutions/status
verbs:
- get
- patch
- update

---

Expand Down Expand Up @@ -643,6 +678,7 @@ rules:
- update

---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: Role
metadata:
Expand Down
22 changes: 22 additions & 0 deletions charts/testkube-api/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,28 @@ subjects:

---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: RoleBinding
metadata:
name: testworkflowexecutions-crb-{{ .Release.Name }}
labels: {{- include "testkube-api.labels" . | nindent 4 }}
{{- if .Values.global.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.global.annotations}}
annotations: {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: testworkflowexecution-role-{{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ include "testkube-api.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}

---

apiVersion: {{ include "global.capabilities.rbac.apiVersion" . }}
kind: RoleBinding
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
type: string
default: "jmeter -n"
steps:
- name: Run k6 tests
- name: Run JMeter tests
run:
image: {{`"justb4/jmeter:{{ config.version }}"`}}
shell: {{`"{{ config.run }}"`}}
Expand Down
5 changes: 2 additions & 3 deletions charts/testkube-api/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Default values for testkube-api.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

### @section Global image parameters
## Important! Please, note that this will override sub-chart image parameters.
## Global Docker image registry
Expand Down Expand Up @@ -151,7 +150,7 @@ multinamespace:
enabled: false

## Extra Environment Variables which will be injected into the Testkube API container
extraEnvVars: {}
extraEnvVars: []
# - name: FOO
# value: BAR
## Additional namespaces for Testkube API to watch
Expand Down Expand Up @@ -487,7 +486,7 @@ minio:
## Deploy Minio server to the cluster
enabled: true
## Minio extra vars
extraEnvVars: {}
extraEnvVars: []
## PVC Access Modes for Minio. The volume is mounted as read-write by a single node.
## Read more about access modes here: http://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes
accessModes:
Expand Down
Loading

0 comments on commit dfef76c

Please sign in to comment.