Skip to content

Commit

Permalink
add toggle for dependency check init containers in api chart
Browse files Browse the repository at this point in the history
  • Loading branch information
dejanzele committed Jul 31, 2024
1 parent c5b7b8c commit 1249162
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 3 deletions.
6 changes: 5 additions & 1 deletion charts/testkube-cloud-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ A Helm chart for Testkube Cloud API
| image.tag | string | `"1.10.42"` | |
| imagePullSecrets | list | `[]` | |
| ingress.className | string | `"nginx"` | Common Ingress class name (NGINX is the only officially supported ingress controller and should not be changed) |
| init.enabled | bool | `false` | Toggle whether to enable the dependency check containers |
| init.mongo.image.pullPolicy | string | `"IfNotPresent"` | MongoSH image pull policy |
| init.mongo.image.repository | string | `"alpine/mongosh"` | MongoSH image repository |
| init.mongo.image.tag | string | `"2.0.2"` | MongoSH image tag |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| payments.apiKey | string | `""` | Payments API key (currently only Stripe is supported) |
Expand Down Expand Up @@ -208,4 +212,4 @@ A Helm chart for Testkube Cloud API
| websocketsIngress.labels | object | `{}` | Additional labels to add to the WebSocket Ingress resource |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
5 changes: 4 additions & 1 deletion charts/testkube-cloud-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ spec:
serviceAccountName: {{ include "testkube-cloud-api.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.init.enabled }}
initContainers:
- name: wait-for-mongo
image: alpine/mongosh:2.0.2
image: {{ .Values.init.mongo.image.repository }}:{{ .Values.init.mongo.image.tag }}
imagePullPolicy: {{ .Values.init.mongo.image.pullPolicy }}
command: ["/bin/sh", "-c"]
args:
- |
Expand All @@ -51,6 +53,7 @@ spec:
{{- else }}
value: {{ .Values.global.mongo.dsn | default .Values.api.mongo.dsn }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
14 changes: 14 additions & 0 deletions charts/testkube-cloud-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,20 @@ enterpriseLicenseKeyPath: /testkube/license.key
enterpriseLicenseFilePath: /testkube/license.lic
# -- Api can allow to set demo organization id where user who don't have Kubernetes cluster can play around
demoOrganizationId: ""

## Init block defines settings for the dependency check containers
init:
# -- Toggle whether to enable the dependency check containers
enabled: false
mongo:
image:
# -- MongoSH image repository
repository: alpine/mongosh
# -- MongoSH image tag
tag: 2.0.2
# -- MongoSH image pull policy
pullPolicy: IfNotPresent

analytics:
segmentio:
# -- Toggle whether to enable Segment.io analytics
Expand Down
6 changes: 5 additions & 1 deletion charts/testkube-enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ A Helm chart for Testkube Enterprise
| testkube-cloud-api.image.repository | string | `"kubeshop/testkube-enterprise-api"` | |
| testkube-cloud-api.image.tag | string | `"1.10.42"` | |
| testkube-cloud-api.ingress.className | string | `"nginx"` | |
| testkube-cloud-api.init.enabled | bool | `false` | Toggle whether to enable the dependency check containers |
| testkube-cloud-api.init.mongo.image.pullPolicy | string | `"IfNotPresent"` | MongoSH image pull policy |
| testkube-cloud-api.init.mongo.image.repository | string | `"alpine/mongosh"` | MongoSH image repository |
| testkube-cloud-api.init.mongo.image.tag | string | `"2.0.2"` | MongoSH image tag |
| testkube-cloud-api.prometheus.enabled | bool | `false` | |
| testkube-cloud-api.resources | object | `{"limits":{"cpu":1,"memory":"512Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}` | Set resources requests and limits for Testkube Api |
| testkube-cloud-api.serviceAccount.annotations | object | `{}` | Additional annotations to add to the ServiceAccount resource |
Expand Down Expand Up @@ -262,4 +266,4 @@ A Helm chart for Testkube Enterprise
| testkube-worker-service.resources | object | `{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"75m","memory":"64Mi"}}` | Set resources requests and limits for Testkube Worker Service |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 2 additions & 0 deletions charts/testkube-enterprise/profiles/values.demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ sharedSecretGenerator:
enabled: true

testkube-cloud-api:
init:
enabled: true
additionalEnv:
OAUTH_CLI_CLIENT_ID: testkube-cloud-cli
OAUTH_ENABLED: true
Expand Down
12 changes: 12 additions & 0 deletions charts/testkube-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ testkube-cloud-api:
image:
repository: kubeshop/testkube-enterprise-api
tag: 1.10.42
## Init block defines settings for the dependency check containers
init:
# -- Toggle whether to enable the dependency check containers
enabled: false
mongo:
image:
# -- MongoSH image repository
repository: alpine/mongosh
# -- MongoSH image tag
tag: 2.0.2
# -- MongoSH image pull policy
pullPolicy: IfNotPresent
# -- 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.
customCaDirPath: ""
# -- Specifies the path where the license key should be mounted.
Expand Down

0 comments on commit 1249162

Please sign in to comment.