Skip to content

Commit

Permalink
feat: testkube logs service chart (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
exu committed Mar 4, 2024
2 parents a2b6ed2 + 0f67633 commit f4200a1
Show file tree
Hide file tree
Showing 17 changed files with 729 additions and 2 deletions.
7 changes: 5 additions & 2 deletions charts/testkube-enterprise/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ dependencies:
- name: testkube-worker-service
repository: file://../testkube-worker-service
version: 1.29.0
- name: testkube-logs-service
repository: file://../testkube-logs-service
version: 1.0.0
- name: dex
repository: https://charts.dexidp.io
version: 0.15.3
Expand All @@ -23,5 +26,5 @@ dependencies:
- name: minio
repository: https://charts.bitnami.com/bitnami
version: 12.10.2
digest: sha256:aab9069e17bb1b76299aac246c0307f54b38ccad9b6e7a687927fc81d8f3e283
generated: "2024-02-27T12:57:28.261293288Z"
digest: sha256:7a06ca976c04ea180f33ef3f419912a9df30bcbf2bef58d2a69af691097b087f
generated: "2024-02-28T11:49:35.492151+01:00"
3 changes: 3 additions & 0 deletions charts/testkube-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ dependencies:
- name: testkube-worker-service
version: 1.29.0
repository: file://../testkube-worker-service
- name: testkube-logs-service
version: 1.0.0
repository: file://../testkube-logs-service
- name: dex
version: 0.15.3
repository: https://charts.dexidp.io
Expand Down
21 changes: 21 additions & 0 deletions charts/testkube-enterprise/local-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,27 @@ testkube-cloud-ui:
# -- Toggle whether to enable redirect Ingress which allows having a different subdomain redirecting to the actual Dashboard UI Ingress URL
ingressRedirect:
enabled: false

testkube-logs-service:
fullnameOverride: testkube-enterprise-logs-service
api:
tls:
serveHTTPS: false
certManager:
# -- Certificate Issuer kind (only used if `provider` is set to `cert-manager`)
issuerKind: ClusterIssuer
tlsSecret: testkube-enterprise-api-tls
mongo:
# -- Mongo DSN connection string
dsn: "mongodb://testkube-enterprise-mongodb:27017"
# -- Mongo database name
database: "testkubeEnterpriseDB"
nats:
# -- NATS URI
uri: "nats://testkube-enterprise-nats:4222"
image:
tag: v0-20240214-145418

testkube-worker-service:
fullnameOverride: testkube-enterprise-worker-service
image:
Expand Down
21 changes: 21 additions & 0 deletions charts/testkube-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,27 @@ testkube-worker-service:
image:
repository: testkubeenterprise/testkube-enterprise-worker-service
tag: 1.9.0-rc-e5167f6a

testkube-logs-service:
fullnameOverride: testkube-enterprise-logs-service
api:
tls:
serveHTTPS: false
certManager:
# -- Certificate Issuer kind (only used if `provider` is set to `cert-manager`)
issuerKind: ClusterIssuer
tlsSecret: testkube-enterprise-api-tls
mongo:
# -- Mongo DSN connection string
dsn: "mongodb://testkube-enterprise-mongodb:27017"
# -- Mongo database name
database: "testkubeEnterpriseDB"
nats:
# -- NATS URI
uri: "nats://testkube-enterprise-nats:4222"
image:
tag: v0-20240214-145418

## NATS chart parameter
## For more configuration parameters of NATS chart please look here: https://docs.nats.io/running-a-nats-service/nats-kubernetes/helm-charts
nats:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
helm:
parameters:
- name: image.name
value: kubeshop/testkube-log-service
forcestring: true
- name: image.tag
value: 1.8.0-dev-dfdb072f
forcestring: true
25 changes: 25 additions & 0 deletions charts/testkube-logs-service/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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/
# Argo Image Updater
.argocd-*
13 changes: 13 additions & 0 deletions charts/testkube-logs-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: testkube-logs-service
description: A Helm chart for Testkube log Service
type: application
version: 1.0.0
appVersion: 1.0.0
maintainers:
- name: testkube
url: https://testkube.io
icon: https://assets.website-files.com/61e00b3936e571a4ea7a5a4c/623b2bb9387ad04955b1f82c_testkube.svg
home: https://github.com/kubeshop/testkube-cloud-charts
sources:
- https://github.com/kubeshop/testkube-cloud-api
71 changes: 71 additions & 0 deletions charts/testkube-logs-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# testkube-log-service

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

A Helm chart for Testkube log Service

**Homepage:** <https://github.com/kubeshop/testkube-cloud-charts>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| testkube | | <https://testkube.io> |

## Source Code

* <https://github.com/kubeshop/testkube-log-service>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalEnv | object | `{}` | Additional env vars to be added to the deployment |
| affinity | object | `{}` | |
| api.minio.accessKeyId | string | `""` | MinIO access key id |
| api.minio.credsSecretRef | string | `""` | Credentials secret ref (secret should contain keys: root-user, root-password, token) (default is `testkube-cloud-minio-secret`) |
| api.minio.endpoint | string | `"minio.testkube.svc.cluster.local:9000"` | MinIO endpoint |
| api.minio.expirationPeriod | int | `0` | Expiration period in days |
| api.minio.region | string | `""` | S3 region |
| api.minio.secretAccessKey | string | `""` | MinIO secret access key |
| api.minio.secure | bool | `false` | Should be set to `true` if MinIO is behind |
| api.minio.token | string | `""` | MinIO token |
| api.nats.uri | string | `"nats://nats.messaging.svc.cluster.local:4222"` | NATS URI |
| api.outputsBucket | string | `"testkube-cloud-outputs"` | S3 bucket in which outputs are stored |
| autoscaling.enabled | bool | `false` | Toggle whether to enable Horizontal Pod Autoscaler |
| autoscaling.maxReplicas | int | `10` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| autoscaling.targetMemoryUtilizationPercentage | int | `80` | |
| externalSecrets.clusterSecretStoreName | string | `"secret-store"` | |
| externalSecrets.enabled | bool | `false` | |
| externalSecrets.keys | object | `{}` | |
| externalSecrets.refreshInterval | string | `"5m"` | |
| fullnameOverride | string | `""` | |
| global.imagePullSecrets | list | `[]` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"kubeshop/testkube-log-service"` | |
| image.tag | string | `"1.6.7"` | |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | Pod Security Context |
| prometheus.enabled | bool | `false` | Toggle whether to create ServiceMonitor resource for Prometheus Operator |
| prometheus.labels | object | `{}` | ServiceMonitor labels |
| prometheus.path | string | `"/metrics"` | Metrics path which will be scraped |
| prometheus.port | string | `"metrics"` | Metrics port which will be scraper |
| prometheus.scrapeInterval | string | `"15s"` | Scrape interval configuration in ServiceMonitor resource |
| replicaCount | int | `1` | |
| resources.limits | object | `{}` | It is strongly recommended to set limits for both cpu and memory |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"128Mi"` | |
| securityContext | object | `{"readOnlyRootFilesystem":true}` | Security Context for app container |
| serviceAccount.annotations | object | `{}` | Additional annotations to add to the ServiceAccount resource |
| serviceAccount.create | bool | `false` | Toggle whether to create a ServiceAccount resource |
| serviceAccount.labels | object | `{}` | Additional labels to add to the ServiceAccount resource |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Empty file.
88 changes: 88 additions & 0 deletions charts/testkube-logs-service/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "testkube-log-service.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-log-service.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-log-service.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common Testkube labels
*/}}
{{- define "testkube-log-service.labels" -}}
app.kubernetes.io/version: {{ .Values.image.tag | quote }}
app.kubernetes.io/component: backend
{{ include "testkube-log-service.selectorLabels" . }}
{{ include "testkube-log-service.baseLabels" . }}
{{- end }}

{{/*
Testkube selector labels
*/}}
{{- define "testkube-log-service.selectorLabels" -}}
app.kubernetes.io/name: {{ include "testkube-log-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}


{{/*
Base labels
*/}}
{{- define "testkube-log-service.baseLabels" -}}
helm.sh/chart: {{ include "testkube-log-service.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: testkube-{{ if .Values.global.enterpriseMode }}enterprise{{ else }}cloud{{ end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "testkube-log-service.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "testkube-log-service.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Get gRPC Ingress host
*/}}
{{- define "testkube-log-service.ingress.grpcHost" -}}
{{- if .Values.global.domain }}
{{- printf "%s.%s" .Values.global.grpcApiSubdomain .Values.global.domain }}
{{- else }}
{{- .Values.grpcIngress.host }}
{{- end }}
{{- end }}

{{/*
THIS IS A HACK TO WORKAROUND LET'S ENCRYPT RATE LIMITS
*/}}
{{- define "testkube-log-service.ingress.hackHost" -}}
{{- printf "health.%s" .Values.global.domain }}
{{- end }}
Loading

0 comments on commit f4200a1

Please sign in to comment.