Skip to content

Commit

Permalink
testkube: add support for defining image credentials cache ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
dejanzele committed Jul 12, 2024
1 parent 3541785 commit 25cbc1d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 2 additions & 0 deletions charts/testkube-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ spec:
{{- end }}
- name: WHITELISTED_CONTAINERS
value: "{{ .Values.global.features.whitelistedContainers }}"
- name: TESTKUBE_IMAGE_CREDENTIALS_CACHE_TTL
value: "{{ .Values.imageSecretsCache.ttl }}"
image: {{ include "testkube-api.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
Expand Down
5 changes: 5 additions & 0 deletions charts/testkube-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ imageInspectionCache:
## ConfigMap name to persist cache
name: "testkube-image-cache"

## Cache configuration for image pull secrets
imageSecretsCache:
## TTL for image pull secrets cache (set to 0 to disable)
ttl: 30m

## Multinamespace feature. Disabled by default
multinamespace:
enabled: false
Expand Down
12 changes: 7 additions & 5 deletions charts/testkube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Testkube is an open-source platform that simplifies the deployment and management of automated testing infrastructure.

![Version: 2.0.10](https://img.shields.io/badge/Version-2.0.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 2.0.13](https://img.shields.io/badge/Version-2.0.13-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

## Install

Expand Down Expand Up @@ -136,7 +136,7 @@ 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 | 2.0.6 |
| file://../testkube-api | testkube-api | 2.0.8 |
| file://../testkube-logs | testkube-logs | 0.2.0 |
| file://../testkube-operator | testkube-operator | 2.0.0 |
| https://charts.bitnami.com/bitnami | mongodb | 13.10.1 |
Expand All @@ -162,7 +162,7 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag
| global.testWorkflows.globalTemplate.enabled | bool | `false` | Is global template enabled |
| global.testWorkflows.globalTemplate.name | string | `"global-template"` | Name of the global template |
| global.testWorkflows.globalTemplate.spec | object | `{}` | Specification for the global template |
| global.tls.caCertPath | string | `""` | Path to the CA certificate file |
| global.tls.caCertPath | string | `""` | Path to the PEM-encoded CA certificate file (needs to be mounted to the container previously) |
| global.tls.skipVerify | bool | `false` | Toggle whether to globally skip certificate verification |
| global.tolerations | list | `[{"effect":"NoSchedule","key":"kubernetes.io/arch","operator":"Equal","value":"arm64"}]` | Tolerations to add to all deployed pods |
| global.volumes | object | `{"additionalVolumeMounts":[],"additionalVolumes":[]}` | Global volume settings (API & Test Jobs) |
Expand Down Expand Up @@ -232,6 +232,7 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag
| testkube-api.cloud.tls.certificate.certFile | string | `"/tmp/agent-cert/cert.crt"` | Default path for certificate file |
| testkube-api.cloud.tls.certificate.keyFile | string | `"/tmp/agent-cert/cert.key"` | Default path for certificate key file |
| testkube-api.cloud.tls.certificate.secretRef | string | `""` | When provided, it will use the provided certificates when authenticating with the Agent (gRPC) API (secret should contain cert.crt, key.crt and ca.crt) |
| testkube-api.cloud.tls.customCaDirPath | string | `""` | Specifies the path to the directory (skip the trailing slash) where CA certificates should be mounted. The mounted file should container a PEM encoded CA certificate. |
| testkube-api.cloud.tls.customCaSecretRef | string | `""` | |
| 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 |
Expand All @@ -256,8 +257,9 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag
| 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.imageInspectionCache.enabled | bool | `true` | |
| testkube-api.imageInspectionCache.name | string | `"testkube-image-cache"` | |
| testkube-api.imageInspectionCache.enabled | bool | `true` | Status of the persistent cache |
| testkube-api.imageInspectionCache.name | string | `"testkube-image-cache"` | ConfigMap name to persist cache |
| testkube-api.imageSecretsCache.ttl | string | `"30m"` | TTL for image pull secrets cache (set to 0 to disable) |
| testkube-api.imageTwInit.digest | string | `""` | Test Workflows image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag |
| testkube-api.imageTwInit.pullSecrets | list | `[]` | Test Workflows image k8s secret for private registries |
| testkube-api.imageTwInit.registry | string | `"docker.io"` | Test Workflows image registry |
Expand Down
9 changes: 7 additions & 2 deletions charts/testkube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,16 @@ testkube-api:

## Persistent cache for Docker
imageInspectionCache:
## Status of the persistent cache
# -- Status of the persistent cache
enabled: true
## ConfigMap name to persist cache
# -- ConfigMap name to persist cache
name: "testkube-image-cache"

## Cache configuration for image pull secrets
imageSecretsCache:
# -- TTL for image pull secrets cache (set to 0 to disable)
ttl: 30m

# 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: []
Expand Down

0 comments on commit 25cbc1d

Please sign in to comment.