diff --git a/.github/workflows/helm-deploy-testkube-charts-develop.yaml b/.github/workflows/helm-deploy-testkube-charts-develop.yaml index f348c2ec9..f4cd2e4cc 100644 --- a/.github/workflows/helm-deploy-testkube-charts-develop.yaml +++ b/.github/workflows/helm-deploy-testkube-charts-develop.yaml @@ -57,7 +57,7 @@ jobs: 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" + 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 @@ -238,4 +238,4 @@ jobs: SLACK_USERNAME: GitHub SLACK_LINK_NAMES: true SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_FOOTER: "Kubeshop --> TestKube" \ No newline at end of file + SLACK_FOOTER: "Kubeshop --> TestKube" diff --git a/.github/workflows/helm-deploy-testkube-charts-stage.yaml b/.github/workflows/helm-deploy-testkube-charts-stage.yaml index 718eff160..d427e6134 100644 --- a/.github/workflows/helm-deploy-testkube-charts-stage.yaml +++ b/.github/workflows/helm-deploy-testkube-charts-stage.yaml @@ -6,9 +6,9 @@ on: repository_dispatch: types: [ - trigger-workflow-api-release, - trigger-workflow-dashboard-release, - trigger-workflow-operator-release, + trigger-workflow-api-release, + trigger-workflow-dashboard-release, + trigger-workflow-operator-release, ] env: @@ -18,7 +18,6 @@ env: DEPLOYMENT_NAME: testkube-integration # Add your deployment name here. ENV: stage - jobs: release_charts_if_image_updated: runs-on: ubuntu-latest @@ -58,7 +57,7 @@ jobs: 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" + 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 @@ -207,10 +206,10 @@ jobs: - name: Run Executor tests run: kubectl testkube run testsuite staging-testsuite -f --git-branch develop --namespace ${{ env.DEPLOYMENT_NAME }} - + - name: Run Dashboard E2E tests run: kubectl testkube run test dashboard-e2e-tests -f --variable TESTKUBE_NAMESPACE=${{ env.DEPLOYMENT_NAME }} --namespace ${{ env.DEPLOYMENT_NAME }} - + notify_slack_if_test_suite_stage_succeeds: runs-on: ubuntu-latest needs: test_suite_run @@ -242,4 +241,4 @@ jobs: SLACK_USERNAME: GitHub SLACK_LINK_NAMES: true SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_FOOTER: "Kubeshop --> TestKube" \ No newline at end of file + SLACK_FOOTER: "Kubeshop --> TestKube" diff --git a/.github/workflows/helm-releaser-testkube-charts.yaml b/.github/workflows/helm-releaser-testkube-charts.yaml index 7a41d5d9e..29f26f21f 100644 --- a/.github/workflows/helm-releaser-testkube-charts.yaml +++ b/.github/workflows/helm-releaser-testkube-charts.yaml @@ -189,7 +189,7 @@ jobs: # Deploy the Docker image to the GKE cluster - name: Deploy run: |- - helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube --create-namespace --values ./charts/testkube/values-demo.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set testkube-api.minio.storage=80Gi --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false + helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube --create-namespace --values ./charts/testkube/values-demo.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false notify_slack_if_deploy_dev_succeeds: runs-on: ubuntu-latest diff --git a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml index 4971d6109..e08c2c714 100644 --- a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml +++ b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml @@ -189,7 +189,7 @@ jobs: # Deploy the Docker image to the GKE cluster - name: Deploy run: |- - helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube --create-namespace --values ./charts/testkube/values-demo.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set testkube-api.minio.storage=80Gi --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false + helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube --create-namespace --values ./charts/testkube/values-demo.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false notify_slack_if_deploy_dev_succeeds: runs-on: ubuntu-latest diff --git a/charts/testkube-api/README.md b/charts/testkube-api/README.md index e6a38654c..0fe2a7c67 100644 --- a/charts/testkube-api/README.md +++ b/charts/testkube-api/README.md @@ -1,6 +1,6 @@ # testkube-api -![Version: 1.14.6](https://img.shields.io/badge/Version-1.14.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.14.6](https://img.shields.io/badge/AppVersion-1.14.6-informational?style=flat-square) +![Version: 1.15.2](https://img.shields.io/badge/Version-1.15.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.15.2](https://img.shields.io/badge/AppVersion-1.15.2-informational?style=flat-square) A Helm chart for Testkube api @@ -45,9 +45,11 @@ A Helm chart for Testkube api | cloud.migrate | string | `""` | | | cloud.orgId | string | `""` | | | cloud.url | string | `"agent.testkube.io:443"` | | +| cloud.uiUrl | string | `""` | | | clusterName | string | `""` | | | configValues | string | `""` | | | dashboardUri | string | `""` | | +| dnsPolicy | string | `""` | | | disableMongoMigrations | bool | `false` | | | enableSecretsEndpoint | bool | `false` | | | executors | string | `""` | | @@ -57,6 +59,7 @@ A Helm chart for Testkube api | global.imagePullSecrets | list | `[]` | | | global.imageRegistry | string | `""` | | | global.labels | object | `{}` | | +| hostNetwork | string | `""` | | | httpReadBufferSize | int | `8192` | | | image.digest | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | | diff --git a/charts/testkube-api/job-container-template.yml.tmpl b/charts/testkube-api/job-container-template.yml.tmpl index 6a5588933..4818be017 100644 --- a/charts/testkube-api/job-container-template.yml.tmpl +++ b/charts/testkube-api/job-container-template.yml.tmpl @@ -48,6 +48,31 @@ spec: {{- end }} {{- end }} containers: + {{ if .Features.LogsV2 -}} + - name: "{{ .Name }}-logs" + {{- if .Registry }} + image: {{ .Registry }}/{{ .LogSidecarImage }} + {{- else }} + image: {{ .LogSidecarImage }} + {{- end }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: DEBUG + value: {{ .Debug }} + - name: NAMESPACE + value: {{ .Namespace }} + - name: NATS_URI + value: {{ .NatsUri }} + - name: GROUP + value: test + - name: SOURCE + value: "test:{{ .Name }}" + - name: ID + value: "{{ .Name }}" + {{- end }} - name: "{{ .Name }}" {{- if .Registry }} image: {{ .Registry }}/{{ .Image }} diff --git a/charts/testkube-api/job-scraper-template.yml.tmpl b/charts/testkube-api/job-scraper-template.yml.tmpl index fb5b58ec0..2b72e2cb6 100644 --- a/charts/testkube-api/job-scraper-template.yml.tmpl +++ b/charts/testkube-api/job-scraper-template.yml.tmpl @@ -10,6 +10,27 @@ spec: template: spec: containers: + {{ if .Features.LogsV2 -}} + - name: "{{ .Name }}-logs" + image: {{ .Registry }}/{{ .LogSidecarImage }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: DEBUG + value: {{ .Debug }} + - name: NAMESPACE + value: {{ .Namespace }} + - name: NATS_URI + value: {{ .NatsUri }} + - name: ID + value: {{ .Name }} + - name: GROUP + value: scraper + - name: SOURCE + value: "scraper:{{ .Name }}" + {{- end }} - name: {{ .Name }}-scraper {{- if .Registry }} image: {{ .Registry }}/{{ .ScraperImage }} diff --git a/charts/testkube-api/job-template.yml.tmpl b/charts/testkube-api/job-template.yml.tmpl index e35d5c080..bd28255e1 100644 --- a/charts/testkube-api/job-template.yml.tmpl +++ b/charts/testkube-api/job-template.yml.tmpl @@ -46,6 +46,31 @@ spec: {{- end }} {{- end }} containers: + {{ if .Features.LogsV2 -}} + - name: "{{ .Name }}-logs" + {{- if .Registry }} + image: {{ .Registry }}/{{ .LogSidecarImage }} + {{- else }} + image: {{ .LogSidecarImage }} + {{- end }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: DEBUG + value: {{ .Debug }} + - name: NAMESPACE + value: {{ .Namespace }} + - name: NATS_URI + value: {{ .NatsUri }} + - name: ID + value: {{ .Name }} + - name: GROUP + value: test + - name: SOURCE + value: "test:{{ .Name }}" + {{- end }} - name: "{{ .Name }}" {{- if .Registry }} image: {{ .Registry }}/{{ .Image }} diff --git a/charts/testkube-api/slave-pod-template.yml.tmpl b/charts/testkube-api/slave-pod-template.yml.tmpl index 316f6a7f7..0c8fd2990 100644 --- a/charts/testkube-api/slave-pod-template.yml.tmpl +++ b/charts/testkube-api/slave-pod-template.yml.tmpl @@ -137,7 +137,7 @@ spec: {{- if and .ArtifactRequest.VolumeMountPath .ArtifactRequest.StorageClassName }} - name: artifact-volume persistentVolumeClaim: - claimName: {{ .Name }}-pvc + claimName: {{ .JobName }}-pvc {{- end }} {{- end }} {{- range $configmap := .EnvConfigMaps }} diff --git a/charts/testkube-api/templates/deployment.yaml b/charts/testkube-api/templates/deployment.yaml index 56bec3a3e..e3f605061 100644 --- a/charts/testkube-api/templates/deployment.yaml +++ b/charts/testkube-api/templates/deployment.yaml @@ -39,9 +39,19 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} + {{- if .Values.hostNetwork }} + hostNetwork: {{ .Values.hostNetwork }} + {{- end }} + {{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} + {{- end }} containers: - name: {{ .Chart.Name }} env: + {{- if .Values.global.features.logsV2 }} + - name: FF_LOGS_V2 + value: "{{ .Values.global.features.logsV2 }}" + {{- end }} - name: APISERVER_PORT value: "{{ .Values.service.port }}" - name: API_MONGO_DSN @@ -276,7 +286,19 @@ spec: {{- if .Values.cloud.url }} - name: TESTKUBE_CLOUD_URL value: "{{ .Values.cloud.url }}" + {{- end }} + {{- if .Values.cloud.uiUrl}} + - name: TESTKUBE_CLOUD_UI_URL + value: "{{ .Values.cloud.uiUrl }}" {{- end}} + {{- if not .Values.cloud.tls.enabled }} + - name: TESTKUBE_PRO_TLS_INSECURE + value: "true" + {{- end }} + {{- if .Values.cloud.tls.skipVerify }} + - name: TESTKUBE_PRO_SKIP_VERIFY + value: "true" + {{- end }} {{- if .Values.cloud.orgId }} - name: TESTKUBE_CLOUD_ORG_ID value: "{{ .Values.cloud.orgId }}" diff --git a/charts/testkube-api/templates/serviceaccount.yaml b/charts/testkube-api/templates/serviceaccount.yaml index 9cb42eb2f..3902649c9 100644 --- a/charts/testkube-api/templates/serviceaccount.yaml +++ b/charts/testkube-api/templates/serviceaccount.yaml @@ -36,3 +36,4 @@ metadata: {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} {{- end }} {{- end }} + diff --git a/charts/testkube-api/templates/ui-ingress.yaml b/charts/testkube-api/templates/ui-ingress.yaml index 3f5ae0ad3..74b718124 100644 --- a/charts/testkube-api/templates/ui-ingress.yaml +++ b/charts/testkube-api/templates/ui-ingress.yaml @@ -12,8 +12,8 @@ metadata: {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} {{- end }} annotations: - {{- if and .Values.cliIngress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version)) }} - kubernetes.io/ingress.class: {{ .Values.cliIngress.className }} + {{- if and .Values.uiIngress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version)) }} + kubernetes.io/ingress.class: {{ .Values.uiIngress.className }} {{- end }} {{- if .Values.uiIngress.annotations }} {{- include "global.tplvalues.render" (dict "value" .Values.uiIngress.annotations "context" $) | nindent 4 }} @@ -43,7 +43,7 @@ spec: http: paths: - path: {{ $.Values.uiIngress.path }} - pathType: Prefix + pathType: {{ default "Prefix" $.Values.uiIngress.pathType }} backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} service: diff --git a/charts/testkube-api/values.yaml b/charts/testkube-api/values.yaml index 3a5eab32a..76163a50b 100644 --- a/charts/testkube-api/values.yaml +++ b/charts/testkube-api/values.yaml @@ -11,6 +11,8 @@ global: imagePullSecrets: [] labels: {} annotations: {} + features: + logsV2: false ### @section Common parameters ## Kubernetes version (using Helm capabilities if not set) @@ -53,7 +55,7 @@ image: nameOverride: "" fullnameOverride: "" -## Custom job-template.yml that will passed to Testkube API +## Custom job-template.yml that will be passed to Testkube API configValues: "" ## Testkube API Deployment parameters @@ -61,6 +63,8 @@ configValues: "" cloud: ## URL of the Cloud Saas Control Plane url: "agent.testkube.io:443" + ## URL of the Cloud UI + uiUrl: "" ## License Key key: "" ## Organization ID @@ -69,6 +73,11 @@ cloud: envId: "" ## true if migration from OSS migrate: "" + tls: + ## Toggle should the connection to Agent API in Cloud/Enterprise use secure GRPC (GRPCS) (if false, it will use insecure GRPC) + enabled: true + ## Toggle should the client skip verifying the Agent API server cert in Cloud/Enterprise + skipVerify: false ## Retrieve cloud information from existing secret existingSecret: ## Name of the secret. If set, this will be used instead of the above values @@ -116,8 +125,8 @@ templates: scraperContainer: "" ## Base64 encoded PVC Container template pvcContainer: "" - ## Base64 encoded Slave Pod template - slavePod: "" + ## Base64 encoded Slave Pod template + slavePod: "" ## base64 encoded executors.json alike data executors: "" @@ -185,6 +194,12 @@ affinity: {} ## Specify priorityClassName for Testkube API Deployment priorityClassName: "" +## Specify hostNetwork for Testkube API Deployment +hostNetwork: "" + +## Specify dnsPolicy for Testkube API Deployment +dnsPolicy: "" + ## Additional volumes to be added ## ref: https://kubernetes.io/docs/concepts/storage/volumes/ additionalVolumes: [] @@ -252,6 +267,16 @@ serviceAccount: ## If not set and create is true, a name is generated using the fullname template name: "" +## Logs service and sidecar service account parameters +logsServiceAccount: + ## Specifies whether a service account should be created + create: true + ## Annotations to add to the service account + annotations: {} + ## The name of the service account to use. + ## If not set and create is true, a name is generated using the fullname template + name: "" + ## Test Job ServiceAccount parameters testServiceAccount: ## Specifies whether a service account should be created @@ -424,6 +449,8 @@ uiIngress: annotations: {} ## The Path to Nginx. path: /results/(v\d/executions.*) + ## The PathType to Nginx. + pathType: Prefix ## Hostnames must be provided if Ingress is enabled. hosts: [] # - testkube.example.com diff --git a/charts/testkube-dashboard/templates/ingress.yaml b/charts/testkube-dashboard/templates/ingress.yaml index d869614f9..892d25ac8 100644 --- a/charts/testkube-dashboard/templates/ingress.yaml +++ b/charts/testkube-dashboard/templates/ingress.yaml @@ -43,7 +43,7 @@ spec: http: paths: - path: {{ $.Values.ingress.path }} - pathType: Prefix + pathType: {{ default "Prefix" $.Values.ingress.pathType }} backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} service: diff --git a/charts/testkube-dashboard/values.yaml b/charts/testkube-dashboard/values.yaml index 6f25dc5d7..cc30ac743 100644 --- a/charts/testkube-dashboard/values.yaml +++ b/charts/testkube-dashboard/values.yaml @@ -113,6 +113,8 @@ ingress: annotations: {} ## The Path to Nginx. path: / + ## The PathType to Nginx. + pathType: Prefix ## Hostnames must be provided if Ingress is enabled. hosts: [] # - testkube.example.com diff --git a/charts/testkube-logs/.helmignore b/charts/testkube-logs/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/testkube-logs/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/testkube-logs/Chart.yaml b/charts/testkube-logs/Chart.yaml new file mode 100644 index 000000000..cbe6d1e44 --- /dev/null +++ b/charts/testkube-logs/Chart.yaml @@ -0,0 +1,29 @@ +apiVersion: v2 +name: testkube-logs +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.2.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.0.0" +dependencies: + - name: global + version: 0.1.2 + #repository: https://kubeshop.github.io/helm-charts + repository: "file://../global" diff --git a/charts/testkube-logs/README.md b/charts/testkube-logs/README.md new file mode 100644 index 000000000..af5c24f25 --- /dev/null +++ b/charts/testkube-logs/README.md @@ -0,0 +1,62 @@ +# testkube-logs + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) + +A Helm chart for Kubernetes + +## Requirements + +| Repository | Name | Version | +|------------|------|---------| +| file://../global | global | 0.1.2 | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.annotations | object | `{}` | | +| autoscaling.enabled | bool | `true` | | +| autoscaling.labels | object | `{}` | | +| autoscaling.maxReplicas | int | `10` | | +| autoscaling.minReplicas | int | `3` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | | +| extraEnvVars | object | `{}` | | +| fullnameOverride | string | `""` | | +| global.annotations | object | `{}` | Annotations to add to all deployed objects | +| global.imagePullSecrets | list | `[]` | Global Docker registry secret names as an array | +| global.imageRegistry | string | `""` | Global Docker image registry | +| global.labels | object | `{}` | Labels to add to all deployed objects | +| image.digest | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.pullSecret | list | `[]` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"kubeshop/testkube-logs-server"` | | +| image.tag | string | `"latest"` | | +| jobServiceAccountName | string | `""` | | +| kubeVersion | string | `""` | | +| nameOverride | string | `""` | | +| nats.uri | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| priorityClassName | string | `""` | | +| replicaCount | int | `3` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.annotations | object | `{}` | | +| service.labels | object | `{}` | | +| service.port | int | `8080` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| testConnection.enabled | bool | `false` | | +| testServiceAccount.annotations | object | `{}` | | +| testServiceAccount.create | bool | `true` | | +| tolerations | list | `[]` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2) diff --git a/charts/testkube-logs/templates/NOTES.txt b/charts/testkube-logs/templates/NOTES.txt new file mode 100644 index 000000000..6bcb67ecb --- /dev/null +++ b/charts/testkube-logs/templates/NOTES.txt @@ -0,0 +1,7 @@ +1. Get the application URL by running these commands: +{{- if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "testkube-logs.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/testkube-logs/templates/_helpers.tpl b/charts/testkube-logs/templates/_helpers.tpl new file mode 100644 index 000000000..8142fae54 --- /dev/null +++ b/charts/testkube-logs/templates/_helpers.tpl @@ -0,0 +1,97 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "testkube-logs.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "testkube-logs.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "testkube-logs.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "testkube-logs.labels" -}} +helm.sh/chart: {{ include "testkube-logs.chart" . }} +{{ include "testkube-logs.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "testkube-logs.selectorLabels" -}} +app.kubernetes.io/name: {{ include "testkube-logs.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "testkube-logs.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "testkube-logs.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the name of the test service account to use +*/}} +{{- define "testkube-logs.testServiceAccountName" -}} +{{- if .Values.testServiceAccount.create }} +{{- $prefix := default (include "testkube-logs.fullname" .) .Values.jobServiceAccountName }} +{{- printf "%s-%s" $prefix "tests-job" }} +{{- else }} +{{- default "default" .Values.jobServiceAccountName }} +{{- end }} +{{- end }} + +{{/* +Define Testkube Logs image +*/}} +{{- define "testkube-logs.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := default .Chart.AppVersion .Values.image.tag | toString -}} +{{- $separator := ":" -}} +{{- if .Values.image.digest }} + {{- $separator = "@" -}} + {{- $tag = .Values.image.digest | toString -}} +{{- end -}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s%s%s" .Values.global.imageRegistry $repositoryName $separator $tag -}} + {{- else -}} + {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s%s%s" $registryName $repositoryName $separator $tag -}} +{{- end -}} +{{- end -}} diff --git a/charts/testkube-logs/templates/deployment.yaml b/charts/testkube-logs/templates/deployment.yaml new file mode 100644 index 000000000..00c17ad07 --- /dev/null +++ b/charts/testkube-logs/templates/deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "testkube-logs.fullname" . }} + labels: + {{- include "testkube-logs.labels" . | nindent 4 }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + annotations: + {{- if .Values.global.annotations}} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "testkube-logs.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} + labels: + {{- include "testkube-logs.selectorLabels" . | nindent 8 }} + {{- if .Values.podLabels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.podLabels "context" $ ) | nindent 8 }} + {{- end }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 8 }} + {{- end }} + spec: + {{- include "global.images.renderPullSecrets" (dict "global" .Values.global "secretPath" .Values.image.pullSecrets) | nindent 6 }} + serviceAccountName: {{ include "testkube-logs.serviceAccountName" . }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + env: + - name: NATS_URI + value: {{ .Values.nats.uri }} + {{- if .Values.extraEnvVars }} + {{ include "global.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 | trim }} + {{- end }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/testkube-logs/templates/hpa.yaml b/charts/testkube-logs/templates/hpa.yaml new file mode 100644 index 000000000..c40c7e6f2 --- /dev/null +++ b/charts/testkube-logs/templates/hpa.yaml @@ -0,0 +1,43 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: {{ include "global.capabilities.hpa.apiVersion" . }} +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "testkube-logs.fullname" . }} + labels: {{- include "global.labels.standard" . | nindent 4 }} + {{- if .Values.autoscaling.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.autoscaling.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.autoscaling.annotations }} + annotations: {{- include "global.tplvalues.render" ( dict "value" .Values.autoscaling.annotations "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.global.annotations}} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + scaleTargetRef: + apiVersion: {{ include "global.capabilities.deployment.apiVersion" . }} + kind: Deployment + name: {{ include "testkube-logs.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} + {{- end }} diff --git a/charts/testkube-logs/templates/service.yaml b/charts/testkube-logs/templates/service.yaml new file mode 100644 index 000000000..cbb98cf14 --- /dev/null +++ b/charts/testkube-logs/templates/service.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "testkube-logs.fullname" . }} + labels: + {{- include "testkube-logs.labels" . | nindent 4 }} + {{- if .Values.service.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.service.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.global.annotations }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: http + selector: {{- include "testkube-logs.selectorLabels" . | nindent 4 }} diff --git a/charts/testkube-logs/templates/serviceaccount.yaml b/charts/testkube-logs/templates/serviceaccount.yaml new file mode 100644 index 000000000..67f42f8f2 --- /dev/null +++ b/charts/testkube-logs/templates/serviceaccount.yaml @@ -0,0 +1,38 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "testkube-logs.serviceAccountName" . }} + labels: + {{- include "global.labels.standard" . | nindent 4 }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.global.annotations }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +{{- end }} + +{{- if .Values.testServiceAccount.create }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "testkube-logs.testServiceAccountName" . }} + labels: + {{- include "global.labels.standard" . | nindent 4 }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.global.annotations }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/testkube-logs/templates/tests/test-connection.yaml b/charts/testkube-logs/templates/tests/test-connection.yaml new file mode 100644 index 000000000..090824d6d --- /dev/null +++ b/charts/testkube-logs/templates/tests/test-connection.yaml @@ -0,0 +1,30 @@ +{{- if .Values.testConnection.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "testkube-logs.fullname" . }}-test-connection" + labels: + {{- include "global.labels.standard" . | nindent 4 }} + {{- if .Values.global.labels }} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} + {{- end }} + annotations: + "helm.sh/hook": test + {{- if .Values.global.annotations}} + {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} + {{- end }} +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "testkube-logs.fullname" . }}:{{ .Values.service.port }}'] + {{- if .Values.testConnection.resources }} + resources: {{ toYaml .Values.testConnection.resources | nindent 8 }} + {{- end }} + restartPolicy: Never + {{- with .Values.testConnection.tolerations }} + tolerations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/testkube-logs/values.yaml b/charts/testkube-logs/values.yaml new file mode 100644 index 000000000..bef1c7e47 --- /dev/null +++ b/charts/testkube-logs/values.yaml @@ -0,0 +1,153 @@ +# Default values for testkube-logs. +# 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 +## Global Docker registry secret names as an array +global: + # -- Global Docker image registry + imageRegistry: "" + # -- Global Docker registry secret names as an array + imagePullSecrets: [] + # -- Labels to add to all deployed objects + labels: {} + # -- Annotations to add to all deployed objects + annotations: {} + +### @section Common parameters +## Kubernetes version (using Helm capabilities if not set) +kubeVersion: "" + +## Number of Testkube Logs Pod replicas +replicaCount: 3 + +## Testkube Pod annotations +## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +podAnnotations: {} + +## Extra labels for Testkube API pods +## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +podLabels: {} + +### @section Specific parameters +## image.registry Testkube Logs image registry +## image.repository Testkube Logs image name +## image.tag Testkube Logs image tag +## image.digest Testkube Logs image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag +## image.pullPolicy Testkube Logs Image pull policy +## image.secret k8s secret for private registries +image: + registry: docker.io + repository: kubeshop/testkube-logs-server + pullPolicy: IfNotPresent + tag: "latest" + digest: "" + pullSecret: [] + +## Chart parameters +## nameOverride Overrides Chart name +## fullnameOverride Full name that overrides Chart name +nameOverride: "" +fullnameOverride: "" + +## Service Account parameters +serviceAccount: + ## Specifies whether a service account should be created + create: true + ## Annotations to add to the service account + annotations: {} + ## The name of the service account to use. + ## If not set and create is true, a name is generated using the fullname template + name: "" + +## Test Job ServiceAccount parameters +testServiceAccount: + ## Specifies whether a service account should be created + create: true + ## Annotations to add to the service account + annotations: {} + +## Test Job ServiceAccount name +jobServiceAccountName: "" + +## Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +podSecurityContext: {} + +## Configure Container Security Context for Testkube Logs +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +## +securityContext: {} + +## Service parameters +service: + ## Adapter service type + type: ClusterIP + ## HTTP Port + port: 8080 + ## Annotations + annotations: {} + ## Service labels + labels: {} + +## Testkube Logs Deployment parameters +## Dependecy to NATS +nats: + ## URI that testkube logs uses to connect to NATS + uri: "nats://testkube-nats" + +## Extra Environment Variables which will be injected into the Testkube Logs container +extraEnvVars: {} +# - name: FOO +# value: BAR + +## Testkube Logs resource requests and limits +resources: + {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +## Autoscaling parameters +## Enable autoscaling for Testkube API deployment +## Add custom labels to autoscaling +## Add custom annotations to autoscaling +## Minimum number of replicas to scale back +## Maximum number of replicas to scale out +## Target CPU utilization percentage +## Target Memory utilization percentage +autoscaling: + enabled: true + labels: {} + annotations: {} + minReplicas: 3 + maxReplicas: 10 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +## Node labels for Testkube Logs pod assignment. +nodeSelector: {} + +## Tolerations for Testkube Logs assignment. +tolerations: [] + +## Affinity for Testkube API Logs assignment. +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set +affinity: {} + +## Specify priorityClassName for Testkube Logs Deployment +priorityClassName: "" + +##Test Connection pod +testConnection: + enabled: false diff --git a/charts/testkube/Chart.yaml b/charts/testkube/Chart.yaml index 3c38246a3..24f70092c 100644 --- a/charts/testkube/Chart.yaml +++ b/charts/testkube/Chart.yaml @@ -26,6 +26,11 @@ dependencies: #repository: https://kubeshop.github.io/helm-charts repository: "file://../testkube-dashboard" condition: testkube-dashboard.enabled + - name: testkube-logs + version: 0.2.0 + #repository: https://kubeshop.github.io/helm-charts + repository: "file://../testkube-logs" + condition: global.features.logsV2 - name: global version: 0.1.2 #repository: https://kubeshop.github.io/helm-charts diff --git a/charts/testkube/README.md b/charts/testkube/README.md index 672023923..c8eb4129d 100644 --- a/charts/testkube/README.md +++ b/charts/testkube/README.md @@ -2,7 +2,7 @@ Testkube is an open-source platform that simplifies the deployment and management of automated testing infrastructure. -![Version: 1.16.10](https://img.shields.io/badge/Version-1.16.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 1.16.28](https://img.shields.io/badge/Version-1.16.28-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ## Install @@ -136,9 +136,9 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | Repository | Name | Version | |------------|------|---------| | file://../global | global | 0.1.2 | -| file://../testkube-api | testkube-api | 1.16.9 | -| file://../testkube-dashboard | testkube-dashboard | 1.16.1 | -| file://../testkube-operator | testkube-operator | 1.16.0 | +| file://../testkube-api | testkube-api | 1.16.22 | +| file://../testkube-dashboard | testkube-dashboard | 1.16.2 | +| file://../testkube-operator | testkube-operator | 1.16.21 | | https://charts.bitnami.com/bitnami | mongodb | 13.10.1 | | https://nats-io.github.io/k8s/helm/charts/ | nats | 0.19.1 | @@ -146,8 +146,9 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | Key | Type | Default | Description | |-----|------|---------|-------------| -| global | object | `{"annotations":{},"imagePullSecrets":[],"imageRegistry":"","labels":{}}` | Important! Please, note that this will override sub-chart image parameters. | +| global | object | `{"annotations":{},"features":{"logsV2":false},"imagePullSecrets":[],"imageRegistry":"","labels":{}}` | Important! Please, note that this will override sub-chart image parameters. | | global.annotations | object | `{}` | Annotations to add to all deployed objects | +| global.features | object | `{"logsV2":false}` | Features map for the whole chart | | global.imagePullSecrets | list | `[]` | Global Docker registry secret names as an array | | global.imageRegistry | string | `""` | Global Docker image registry | | global.labels | object | `{}` | Labels to add to all deployed objects | @@ -166,9 +167,12 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | nats.exporter.resources | object | `{}` | Exporter resources settings | | nats.exporter.securityContext | object | `{}` | Security Context for Exporter container | | nats.imagePullSecrets | list | `[]` | | +| nats.nats.jetstream.enabled | bool | `true` | Toggle whether to enable JetStream (should not be disabled as Testkube uses Jetstream features) | | nats.nats.limits.maxPayload | string | `"8MB"` | Max payload | | nats.nats.resources | object | `{}` | NATS resource settings | | nats.nats.securityContext | object | `{}` | Security Context for NATS container | +| nats.natsbox.enabled | bool | `true` | | +| nats.natsbox.nodeSelector."cloud.google.com/gke-provisioning" | string | `"standard"` | | | nats.natsbox.securityContext | object | `{}` | Security Context for NATS Box container | | nats.natsbox.tolerations | list | `[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]` | NATS Box tolerations settings | | nats.reloader.securityContext | object | `{}` | Security Context for Reloader container | @@ -203,19 +207,24 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | testkube-api.cliIngress.tls | list | `[]` | Placing a host in the TLS config will indicate a certificate should be created | | testkube-api.cliIngress.tlsenabled | bool | `false` | Toggle whether to enable TLS on the ingress | | testkube-api.cloud.key | string | `""` | Testkube Clouc License Key (for Environment) | +| testkube-api.cloud.tls.enabled | bool | `true` | Toggle should the connection to Agent API in Cloud/Enterprise use secure GRPC (GRPCS) (if false, it will use insecure GRPC) | +| testkube-api.cloud.tls.skipVerify | bool | `false` | Toggle should the client skip verifying the Agent API server cert in Cloud/Enterprise | +| testkube-api.cloud.uiUrl | string | `""` | | | testkube-api.cloud.url | string | `"agent.testkube.io:443"` | Testkube Cloud API URL | | testkube-api.clusterName | string | `""` | | | testkube-api.dashboardUri | string | `""` | | -| testkube-api.enableSecretsEndpoint | bool | `false` | | +| testkube-api.dnsPolicy | string | `""` | Specify dnsPolicy for Testkube API Deployment | +| testkube-api.enableSecretsEndpoint | bool | `false` | enable endpoint to list testkube namespace secrets | +| testkube-api.enabledExecutors | string | `nil` | | | testkube-api.executors | string | `""` | default executors as base64-encoded string | | testkube-api.extraEnvVars | list | `[]` | Extra environment variables to be set on deployment | | testkube-api.fullnameOverride | string | `"testkube-api-server"` | Testkube API full name override | +| testkube-api.hostNetwork | string | `""` | Specify hostNetwork for Testkube API Deployment | | testkube-api.image.digest | string | `""` | Testkube API image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | | testkube-api.image.pullPolicy | string | `"IfNotPresent"` | Testkube API image tag | | testkube-api.image.pullSecrets | list | `[]` | Testkube API k8s secret for private registries | | testkube-api.image.registry | string | `"docker.io"` | Testkube API image registry | | testkube-api.image.repository | string | `"kubeshop/testkube-api-server"` | Testkube API image name | -| testkube-api.enabledExecutors | object | `{}` | Enable only specified executors with enabled flag | | testkube-api.jobServiceAccountName | string | `""` | SA that is used by a job. Can be annotated with the IAM Role Arn to access S3 service in AWS Cloud. | | testkube-api.livenessProbe | object | `{"initialDelaySeconds":15}` | Testkube API Liveness probe parameters | | testkube-api.livenessProbe.initialDelaySeconds | int | `15` | Initial delay for liveness probe | @@ -448,7 +457,7 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | testkube-operator.testConnection | object | `{"enabled":true,"resources":{},"tolerations":[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]}` | Test Connection pod | | testkube-operator.testConnection.resources | object | `{}` | Test Connection resource settings | | testkube-operator.testConnection.tolerations | list | `[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]` | Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. | -| testkube-operator.tolerations | list | `[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]` | Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. | +| testkube-operator.tolerations | list | `[]` | Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. note: kubebuilder/kube-rbac-proxy:v0.8.0, image used by testkube-operator proxy deployment, doesn't support arm64 nodes | | testkube-operator.useArgoCDSync | bool | `false` | Use ArgoCD sync owner references | | testkube-operator.volumes.secret.defaultMode | int | `420` | Testkube Operator webhook certificate volume default mode | | testkube-operator.webhook.annotations | object | `{}` | Webhook specific annotations | diff --git a/charts/testkube/values-demo.yaml b/charts/testkube/values-demo.yaml index 74cae840a..39683da85 100644 --- a/charts/testkube/values-demo.yaml +++ b/charts/testkube/values-demo.yaml @@ -110,11 +110,14 @@ nats: maxPayload: 8MB nodeSelector: cloud.google.com/gke-provisioning: standard + + # NATS Box container settings + # TODO remove this container after tests on dev and stage + # nats-box is A lightweight container with NATS utilities. It's not needed for nats server natsbox: nodeSelector: cloud.google.com/gke-provisioning: standard - testkube-api: rbac: createRoles: true @@ -139,6 +142,7 @@ testkube-api: tolerations: [] affinity: {} priorityClassName: "highest-priority" + storage: 80Gi image: registry: docker.io repository: minio/minio @@ -267,8 +271,7 @@ testkube-api: region: "" token: "" bucket: "testkube-artifacts" - # -- MinIO Expiration period in days - expiration: 0 + expiration: 90 SSL: false scrapperEnabled: true compressArtifacts: true @@ -454,4 +457,3 @@ testkube-operator: nodeSelector: cloud.google.com/gke-provisioning: standard - diff --git a/charts/testkube/values-develop.yaml b/charts/testkube/values-develop.yaml index 4890a7090..d64e0e883 100644 --- a/charts/testkube/values-develop.yaml +++ b/charts/testkube/values-develop.yaml @@ -2,6 +2,10 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + features: + logsV2: false + replicaCount: 1 image: @@ -98,9 +102,9 @@ mongodb: repository: zcube/bitnami-compat-mongodb tag: 6.0.5-debian-11-r64 resources: {} -# requests: -# memory: "1500Mi" -# cpu: "200m" + # requests: + # memory: "1500Mi" + # cpu: "200m" nodeSelector: cloud.google.com/gke-provisioning: standard @@ -113,9 +117,7 @@ nats: nodeSelector: cloud.google.com/gke-provisioning: standard natsbox: - nodeSelector: - cloud.google.com/gke-provisioning: standard - + enabled: false testkube-api: prometheus: @@ -138,14 +140,15 @@ testkube-api: tolerations: [] affinity: {} priorityClassName: "highest-priority" + storage: 25Gi image: registry: docker.io repository: minio/minio tag: RELEASE.2023-09-16T01-01-47Z resources: {} -# requests: -# memory: "1000Mi" -# cpu: "200m" + # requests: + # memory: "1000Mi" + # cpu: "200m" uiIngress: enabled: true @@ -156,9 +159,9 @@ testkube-api: nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/enable-cors: "true" nginx.ingress.kubernetes.io/cors-allow-credentials: "false" -# nginx.ingress.kubernetes.io/auth-type: basic -# nginx.ingress.kubernetes.io/auth-secret: htpasswd -# nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: htpasswd + # nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" # specify the name of the global IP address resource to be associated with the HTTP(S) Load Balancer. kubernetes.io/ingress.global-static-ip-name: testkube-develop # add an annotation indicating the issuer to use. @@ -214,8 +217,7 @@ testkube-api: region: "" token: "" bucket: "testkube-artifacts" - # -- MinIO Expiration period in days - expiration: 0 + expiration: 30 SSL: false scrapperEnabled: true compressArtifacts: true @@ -271,9 +273,9 @@ testkube-api: timeoutSeconds: 10 resources: {} -# requests: -# memory: "200Mi" -# cpu: "200m" + # requests: + # memory: "200Mi" + # cpu: "200m" analyticsEnabled: true podStartTimeout: "30m" @@ -315,9 +317,9 @@ testkube-dashboard: nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/enable-cors: "true" nginx.ingress.kubernetes.io/cors-allow-credentials: "false" -# nginx.ingress.kubernetes.io/auth-type: basic -# nginx.ingress.kubernetes.io/auth-secret: htpasswd -# nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: htpasswd + # nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" # specify the name of the global IP address resource to be associated with the HTTP(S) Load Balancer. kubernetes.io/ingress.global-static-ip-name: testkube-develop cert-manager.io/issue-temporary-certificate: "true" @@ -363,9 +365,9 @@ testkube-dashboard: enabled: true resources: {} -# requests: -# memory: "100Mi" -# cpu: "100m" + # requests: + # memory: "100Mi" + # cpu: "100m" nodeSelector: cloud.google.com/gke-provisioning: standard @@ -388,9 +390,9 @@ testkube-operator: useArgoCDSync: true resources: {} -# requests: -# memory: "200Mi" -# cpu: "100m" + # requests: + # memory: "200Mi" + # cpu: "100m" ##Test Connection pod testConnection: @@ -398,4 +400,3 @@ testkube-operator: nodeSelector: cloud.google.com/gke-provisioning: standard - diff --git a/charts/testkube/values-stage.yaml b/charts/testkube/values-stage.yaml index 92c685c9c..2542d11c0 100644 --- a/charts/testkube/values-stage.yaml +++ b/charts/testkube/values-stage.yaml @@ -98,9 +98,9 @@ mongodb: repository: zcube/bitnami-compat-mongodb tag: 6.0.5-debian-11-r64 resources: {} -# requests: -# memory: "1000Mi" -# cpu: "200m" + # requests: + # memory: "1000Mi" + # cpu: "200m" nodeSelector: cloud.google.com/gke-provisioning: standard @@ -113,8 +113,7 @@ nats: nodeSelector: cloud.google.com/gke-provisioning: standard natsbox: - nodeSelector: - cloud.google.com/gke-provisioning: standard + enabled: false testkube-api: prometheus: @@ -135,14 +134,15 @@ testkube-api: tolerations: [] affinity: {} priorityClassName: "highest-priority" + storage: 25Gi image: registry: docker.io repository: minio/minio tag: RELEASE.2023-09-16T01-01-47Z resources: {} -# requests: -# memory: "1000Mi" -# cpu: "200m" + # requests: + # memory: "1000Mi" + # cpu: "200m" nodeSelector: cloud.google.com/gke-provisioning: standard @@ -156,9 +156,9 @@ testkube-api: nginx.ingress.kubernetes.io/enable-cors: "true" nginx.ingress.kubernetes.io/cors-allow-methods: "GET" nginx.ingress.kubernetes.io/cors-allow-credentials: "false" -# nginx.ingress.kubernetes.io/auth-type: basic -# nginx.ingress.kubernetes.io/auth-secret: htpasswd -# nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: htpasswd + # nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" # specify the name of the global IP address resource to be associated with the HTTP(S) Load Balancer. kubernetes.io/ingress.global-static-ip-name: testkube-integration # add an annotation indicating the issuer to use. @@ -214,8 +214,7 @@ testkube-api: region: "" token: "" bucket: "testkube-artifacts" - # -- MinIO Expiration period in days - expiration: 0 + expiration: 30 SSL: false scrapperEnabled: true compressArtifacts: true @@ -271,9 +270,9 @@ testkube-api: timeoutSeconds: 10 resources: {} -# requests: -# memory: "200Mi" -# cpu: "200m" + # requests: + # memory: "200Mi" + # cpu: "200m" analyticsEnabled: true podStartTimeout: "30m" @@ -318,9 +317,9 @@ testkube-dashboard: nginx.ingress.kubernetes.io/enable-cors: "true" nginx.ingress.kubernetes.io/cors-allow-methods: "GET" nginx.ingress.kubernetes.io/cors-allow-credentials: "false" -# nginx.ingress.kubernetes.io/auth-type: basic -# nginx.ingress.kubernetes.io/auth-secret: htpasswd -# nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" + # nginx.ingress.kubernetes.io/auth-type: basic + # nginx.ingress.kubernetes.io/auth-secret: htpasswd + # nginx.ingress.kubernetes.io/auth-realm: "Enter your credentials" # specify the name of the global IP address resource to be associated with the HTTP(S) Load Balancer. kubernetes.io/ingress.global-static-ip-name: testkube-integration # add an annotation indicating the issuer to use. @@ -363,9 +362,9 @@ testkube-dashboard: enabled: true resources: {} -# requests: -# memory: "100Mi" -# cpu: "100m" + # requests: + # memory: "100Mi" + # cpu: "100m" nodeSelector: cloud.google.com/gke-provisioning: standard @@ -385,9 +384,9 @@ testkube-operator: containerPort: 8443 resources: {} -# requests: -# memory: "200Mi" -# cpu: "100m" + # requests: + # memory: "200Mi" + # cpu: "100m" ##Test Connection pod testConnection: diff --git a/charts/testkube/values.yaml b/charts/testkube/values.yaml index cf658e614..e5dd6c2f0 100644 --- a/charts/testkube/values.yaml +++ b/charts/testkube/values.yaml @@ -13,6 +13,9 @@ global: labels: {} # -- Annotations to add to all deployed objects annotations: {} + # -- Features map for the whole chart + features: + logsV2: false # -- MongoDB pre-upgrade parameters preUpgradeHook: @@ -56,7 +59,6 @@ preUpgradeHook: value: arm64 effect: NoSchedule - # MongoDB parameters # For more configuration parameters of MongoDB chart please look here: https://github.com/bitnami/charts/tree/master/bitnami/mongodb#parameters mongodb: @@ -114,6 +116,26 @@ mongodb: ## Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. ## More info: https://cloud.google.com/kubernetes-engine/docs/how-to/prepare-arm-workloads-for-deployment#node-affinity-multi-arch-arm nats: + # NATS Box container settings + # TODO remove this container after tests on dev and stage + # nats-box is A lightweight container with NATS utilities. It's not needed for nats server + # change it to + # natsbox: + # enabled: false + natsbox: + enabled: true + # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container + # -- Security Context for NATS Box container + securityContext: {} + # -- NATS Box tolerations settings + tolerations: + - key: kubernetes.io/arch + operator: Equal + value: arm64 + effect: NoSchedule + nodeSelector: + cloud.google.com/gke-provisioning: standard + #fullnameOverride: testkube-nats tolerations: - key: kubernetes.io/arch @@ -130,6 +152,9 @@ nats: # NATS container settings nats: + jetstream: + # -- Toggle whether to enable JetStream (should not be disabled as Testkube uses Jetstream features) + enabled: false # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container # -- Security Context for NATS container securityContext: {} @@ -155,18 +180,6 @@ nats: # -- Security Context for Reloader container securityContext: {} - # NATS Box container settings - natsbox: - # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container - # -- Security Context for NATS Box container - securityContext: {} - # -- NATS Box tolerations settings - tolerations: - - key: kubernetes.io/arch - operator: Equal - value: arm64 - effect: NoSchedule - # Exporter container settings exporter: # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container @@ -175,6 +188,12 @@ nats: # -- Exporter resources settings resources: {} +testkube-logs: + # -- Testkube API full name override + fullnameOverride: testkube-logs + # -- Testkube API name override + nameOverride: logs + # Testkube API parameters testkube-api: # -- Testkube API full name override @@ -190,31 +209,31 @@ testkube-api: multinamespace: enabled: false -# Custom job-template.yml that will be passed to Testkube API. Example: -# configValues: | -# apiVersion: batch/v1 -# kind: Job -# metadata: -# labels: -# key1: value1 -# key2: value2 -# spec: -# template: -# metadata: -# labels: -# key1: value1 -# key2: value2 -# annotations: -# key1: value1 -# key2: value2 -# spec: -# containers: -# - name: "{{ .Name }}" -# image: {{ .Image }} -# imagePullPolicy: Always -# command: -# - "/bin/runner" -# - '{{ .Jsn }}' + # Custom job-template.yml that will be passed to Testkube API. Example: + # configValues: | + # apiVersion: batch/v1 + # kind: Job + # metadata: + # labels: + # key1: value1 + # key2: value2 + # spec: + # template: + # metadata: + # labels: + # key1: value1 + # key2: value2 + # annotations: + # key1: value1 + # key2: value2 + # spec: + # containers: + # - name: "{{ .Name }}" + # image: {{ .Image }} + # imagePullPolicy: Always + # command: + # - "/bin/runner" + # - '{{ .Jsn }}' # Monitoring parameters prometheus: @@ -274,8 +293,15 @@ testkube-api: cloud: # -- Testkube Cloud API URL url: "agent.testkube.io:443" + ## URL of the Cloud UI + uiUrl: "" # -- Testkube Clouc License Key (for Environment) key: "" + tls: + # -- Toggle should the connection to Agent API in Cloud/Enterprise use secure GRPC (GRPCS) (if false, it will use insecure GRPC) + enabled: true + # -- Toggle should the client skip verifying the Agent API server cert in Cloud/Enterprise + skipVerify: false # ref: https://cloud.google.com/kubernetes-engine/docs/how-to/prepare-arm-workloads-for-deployment#node-affinity-multi-arch-arm # -- Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. @@ -550,7 +576,6 @@ testkube-api: # -- Key for SSL CA File Key k8s Secret # sslCAFileKeySecretKey: sslCAFileKeySecretKey - # -- k8s Secret Name for SSL Cert Secret # sslCertSecretSecretName: sslCertSecretSecretName @@ -590,7 +615,7 @@ testkube-api: dashboardUri: "" ## cluster name to be used in events clusterName: "" - ## enable endpoint to list testkube namespace secrets + # -- enable endpoint to list testkube namespace secrets enableSecretsEndpoint: false ## enable only specified executors with enabled flag enabledExecutors: @@ -622,6 +647,12 @@ testkube-api: ## Specify priorityClassName for Testkube API priorityClassName: "" + # -- Specify hostNetwork for Testkube API Deployment + hostNetwork: "" + + # -- Specify dnsPolicy for Testkube API Deployment + dnsPolicy: "" + # -- Testkube Dashboard parameters testkube-dashboard: # -- Deploy dashboard @@ -711,9 +742,9 @@ testkube-dashboard: # -- Path to controller path: / # -- Hostnames must be provided if Ingress is enabled. - hosts: - [] - ipv6enabled: false + hosts: [] + ipv6enabled: + false # - testkube.example.com tlsenabled: false # -- Placing a host in the TLS config will indicate a certificate should be created @@ -754,7 +785,8 @@ testkube-dashboard: # -- Add additional labels to the pod (evaluated as a template) podLabels: {} # -- Array of args for oauth2 provider or github as default - args: [] + args: + [] #- --provider=github #- --email-domain=* #- --upstream=file:///dev/null @@ -762,7 +794,8 @@ testkube-dashboard: # -- Array with extra environment variables to add to Locator nodes extraEnvVars: [] # -- Array with extra sources for environment variables - extraEnvFrom: [] + extraEnvFrom: + [] #- configMapRef: # name: my-configmap-name #- secretRef: @@ -1118,7 +1151,8 @@ testkube-operator: port: 80 # -- Testkube Operator resource settings - resources: {} + resources: + {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -1129,11 +1163,8 @@ testkube-operator: # ref: https://cloud.google.com/kubernetes-engine/docs/how-to/prepare-arm-workloads-for-deployment#node-affinity-multi-arch-arm # -- Tolerations to schedule a workload to nodes with any architecture type. Required for deployment to GKE cluster. - tolerations: - - key: kubernetes.io/arch - operator: Equal - value: arm64 - effect: NoSchedule + # note: kubebuilder/kube-rbac-proxy:v0.8.0, image used by testkube-operator proxy deployment, doesn't support arm64 nodes + tolerations: [] # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity # note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set diff --git a/scripts/chart_releaser.sh b/scripts/chart_releaser.sh index 38aa8c6e3..1bcf33665 100755 --- a/scripts/chart_releaser.sh +++ b/scripts/chart_releaser.sh @@ -75,7 +75,7 @@ then else echo "Executors will be updated" - executor_name="artillery curl cypress ginkgo gradle init jmeter jmeterd k6 kubepug maven playwright postman scraper soapui tracetest zap" + executor_name="artillery curl cypress ginkgo gradle init jmeter jmeterd k6 kubepug maven playwright postman scraper soapui tracetest zap logs-sidecar" for executor in $executor_name; do sed -i "s/\(\"image\":.*$executor.*:\)[^\"]*\(\"\)/\1$VERSION_FULL\2/" ../charts/testkube-api/executors.json echo -e "\nChecking if TestKube's executors.json $executor executor has been updated:\n"