Skip to content

Commit

Permalink
charts: add option to specify pullSecrets per service (#655)
Browse files Browse the repository at this point in the history
* add option to specify secrets per service
  • Loading branch information
ypoplavs authored Oct 12, 2023
1 parent b6ce96f commit 64bf42a
Show file tree
Hide file tree
Showing 21 changed files with 490 additions and 58 deletions.
4 changes: 2 additions & 2 deletions charts/global/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 0.1.1
version: 0.1.2
name: global
description: A Library Helm Chart for definitions that can be shared by Helm templates in other charts.
home: https://github.com/kubeshop/helm-charts/tree/main/charts/global
Expand All @@ -20,4 +20,4 @@ sources:
- https://github.com/kubeshop/helm-charts
- https://testkube.io/

appVersion: "0.1.1"
appVersion: "0.1.2"
53 changes: 26 additions & 27 deletions charts/global/READme.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
# Testkube global Library Chart

A [Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for definitions that can be shared by Helm templates in other charts.
##Usage
```sh
dependencies:
- name: global
version: 1.x.x
repository: https://kubeshop.github.io/helm-charts
```

``
$ helm dependency update
``

Example of using `global` template:
```sh
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "global.names.fullname" . }}
data:
myvalue: "Hello World"
```

##Prerequisites
- Helm 3.0.0+
# global

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square)

A Library Helm Chart for definitions that can be shared by Helm templates in other charts.

**Homepage:** <https://github.com/kubeshop/helm-charts/tree/main/charts/global>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Testkube | | <https://github.com/kubeshop/testkube> |

## Source Code

* <https://github.com/kubeshop/helm-charts>
* <https://testkube.io/>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| exampleValue | string | `"global-chart"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
16 changes: 12 additions & 4 deletions charts/global/templates/_images.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,20 @@ Return the proper Docker Image Registry Secret Names evaluating values as templa
{{ include "global.images.renderPullSecrets" . }}
*/}}
{{- define "global.images.renderPullSecrets" -}}
{{- $global := .Values.global }}

{{- $context := . }}
{{- $global := index $context "global" }}
{{- $path := index $context "secretPath" }}
{{- if $global.imagePullSecrets }}
imagePullSecrets:
{{- range $global.imagePullSecrets }}
{{- range $global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else -}}
{{- if $path }}
imagePullSecrets:
{{- range $path }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end -}}
{{- end }}
{{- end }}
161 changes: 161 additions & 0 deletions charts/testkube-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# 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)

A Helm chart for Testkube api

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| file://../global | global | 0.1.1 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalNamespaces | list | `[]` | |
| affinity | object | `{}` | |
| analyticsEnabled | bool | `true` | |
| autoscaling.annotations | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.labels | object | `{}` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| autoscaling.targetMemoryUtilizationPercentage | int | `80` | |
| cdeventsTarget | string | `""` | |
| cliIngress.annotations | object | `{}` | |
| cliIngress.enabled | bool | `false` | |
| cliIngress.hosts | list | `[]` | |
| cliIngress.labels | object | `{}` | |
| cliIngress.oauth.clientID | string | `""` | |
| cliIngress.oauth.clientSecret | string | `""` | |
| cliIngress.oauth.provider | string | `"github"` | |
| cliIngress.oauth.scopes | string | `""` | |
| cliIngress.path | string | `"/results/(v\\d/.*)"` | |
| cliIngress.tls | list | `[]` | |
| cliIngress.tlsenabled | bool | `false` | |
| cloud.envId | string | `""` | |
| cloud.existingSecret.envId | string | `""` | |
| cloud.existingSecret.key | string | `""` | |
| cloud.existingSecret.name | string | `""` | |
| cloud.existingSecret.orgId | string | `""` | |
| cloud.key | string | `""` | |
| cloud.migrate | string | `""` | |
| cloud.orgId | string | `""` | |
| cloud.url | string | `"agent.testkube.io:443"` | |
| clusterName | string | `""` | |
| configValues | string | `""` | |
| dashboardUri | string | `""` | |
| executors | string | `""` | |
| extraEnvVars | object | `{}` | |
| fullnameOverride | string | `""` | |
| global.annotations | object | `{}` | |
| global.imagePullSecrets | list | `[]` | |
| global.imageRegistry | string | `""` | |
| global.labels | object | `{}` | |
| httpReadBufferSize | int | `8192` | |
| image.digest | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.pullSecret | list | `[]` | |
| image.registry | string | `"docker.io"` | |
| image.repository | string | `"kubeshop/testkube-api-server"` | |
| jobServiceAccountName | string | `""` | |
| kubeVersion | string | `""` | |
| livenessProbe.initialDelaySeconds | int | `30` | |
| logs.bucket | string | `"testkube-logs"` | |
| logs.storage | string | `"minio"` | |
| minio.accessModes[0] | string | `"ReadWriteOnce"` | |
| minio.affinity | object | `{}` | |
| minio.enabled | bool | `true` | |
| minio.extraEnvVars | object | `{}` | |
| minio.extraVolumeMounts | list | `[]` | |
| minio.extraVolumes | list | `[]` | |
| minio.image.pullPolicy | string | `"IfNotPresent"` | |
| minio.image.pullSecrets | list | `[]` | |
| minio.image.registry | string | `"docker.io"` | |
| minio.image.repository | string | `"minio/minio"` | |
| minio.image.tag | string | `"2023.2.27"` | |
| minio.livenessProbe.initialDelaySeconds | int | `3` | |
| minio.livenessProbe.periodSeconds | int | `10` | |
| minio.matchLabels | list | `[]` | |
| minio.minioRootPassword | string | `""` | |
| minio.minioRootUser | string | `""` | |
| minio.nodeSelector | object | `{}` | |
| minio.podSecurityContext | object | `{}` | |
| minio.priorityClassName | string | `""` | |
| minio.readinessProbe.initialDelaySeconds | int | `3` | |
| minio.readinessProbe.periodSeconds | int | `10` | |
| minio.replicaCount | int | `1` | |
| minio.resources | object | `{}` | |
| minio.secretPasswordKey | string | `""` | |
| minio.secretPasswordName | string | `""` | |
| minio.secretUserKey | string | `""` | |
| minio.secretUserName | string | `""` | |
| minio.securityContext | object | `{}` | |
| minio.serviceAccountName | string | `""` | |
| minio.storage | string | `"10Gi"` | |
| minio.tolerations | list | `[]` | |
| mongodb.allowDiskUse | bool | `true` | |
| mongodb.dsn | string | `"mongodb://testkube-mongodb:27017"` | |
| multinamespace.enabled | bool | `false` | |
| nameOverride | string | `""` | |
| nats.enabled | bool | `true` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| podStartTimeout | string | `"30m"` | Testkube timeout for pod start |
| priorityClassName | string | `""` | |
| prometheus.enabled | bool | `false` | |
| prometheus.interval | string | `"15s"` | |
| prometheus.monitoringLabels | object | `{}` | |
| rbac.create | bool | `true` | |
| readinessProbe.initialDelaySeconds | int | `45` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
| service.annotations | object | `{}` | |
| service.labels | object | `{}` | |
| service.port | int | `8088` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| slackConfig | string | `""` | |
| slackSecret | string | `""` | |
| slackToken | string | `""` | |
| storage.SSL | bool | `false` | |
| storage.accessKey | string | `""` | |
| storage.accessKeyId | string | `""` | |
| storage.bucket | string | `"testkube-artifacts"` | |
| storage.compressArtifacts | bool | `true` | |
| storage.endpoint | string | `""` | |
| storage.endpoint_port | string | `"9000"` | |
| storage.expiration | int | `0` | |
| storage.region | string | `""` | |
| storage.scrapperEnabled | bool | `true` | |
| storage.secretKeyAccessKeyId | string | `""` | |
| storage.secretKeySecretAccessKey | string | `""` | |
| storage.secretNameAccessKeyId | string | `""` | |
| storage.secretNameSecretAccessKey | string | `""` | |
| storage.token | string | `""` | |
| templates.job | string | `""` | |
| templates.jobContainer | string | `""` | |
| templates.pvcContainer | string | `""` | |
| templates.scraperContainer | string | `""` | |
| testConnection.enabled | bool | `false` | |
| testServiceAccount.annotations | object | `{}` | |
| testServiceAccount.create | bool | `true` | |
| tolerations | list | `[]` | |
| uiIngress.annotations | object | `{}` | |
| uiIngress.enabled | bool | `false` | |
| uiIngress.hosts | list | `[]` | |
| uiIngress.labels | object | `{}` | |
| uiIngress.path | string | `"/results/(v\\d/executions.*)"` | |
| uiIngress.tls | list | `[]` | |
| uiIngress.tlsenabled | bool | `false` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2)
2 changes: 1 addition & 1 deletion charts/testkube-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 8 }}
{{- end }}
spec:
{{- include "global.images.renderPullSecrets" . | nindent 6 }}
{{- include "global.images.renderPullSecrets" (dict "global" .Values.global "secretPath" .Values.image.pullSecrets) | nindent 6 }}
serviceAccountName: {{ include "testkube-api.serviceAccountName" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
Expand Down
4 changes: 2 additions & 2 deletions charts/testkube-api/templates/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ spec:
# This label is used as a selector in Service definition
app: testkube-minio-{{ .Release.Namespace }}
spec:
{{- include "global.images.renderPullSecrets" . | nindent 6 }}
{{- if .Values.minio.priorityClassName }}
{{- include "global.images.renderPullSecrets" (dict "global" .Values.global "secretPath" .Values.minio.image.pullSecrets) | nindent 6 }}
{{- if .Values.minio.priorityClassName }}
priorityClassName: {{ .Values.minio.priorityClassName }}
{{- end }}
# Volumes used by this deployment
Expand Down
3 changes: 3 additions & 0 deletions charts/testkube-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ podLabels: {}
## image.tag Testkube API image tag
## image.digest Testkube API image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
## image.pullPolicy Testkube API Image pull policy
## image.secret k8s secret for private registries
image:
registry: docker.io
repository: kubeshop/testkube-api-server
pullPolicy: IfNotPresent
## Overrides the image tag whose default is the chart appVersion.
# tag: "1.7.24"
digest: ""
pullSecret: []

## Chart parameters
## nameOverride Overrides Chart name
Expand Down Expand Up @@ -315,6 +317,7 @@ minio:
repository: minio/minio
tag: 2023.2.27
pullPolicy: IfNotPresent
pullSecrets: []
## ServiceAccount name to use for Minio
serviceAccountName: ""
## Optionally specify extra list of additional volumeMounts for Minio
Expand Down
Loading

0 comments on commit 64bf42a

Please sign in to comment.