Skip to content

fix: labels in testkube-operator #971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions charts/testkube-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ Define API environment in agent mode
{{- end}}
- name: "NATS_EMBEDDED"
value: "{{ .Values.nats.embedded }}"
{{- if .Values.nats.enabled }}
- name: NATS_URI
{{- if .Values.nats.secretName }}
{{- if .Values.nats.uri }}
value: {{ .Values.nats.uri }}
{{- else if .Values.nats.secretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.nats.secretName }}
Expand All @@ -185,7 +186,6 @@ Define API environment in agent mode
value: "{{ .Values.nats.tls.certSecret.baseMountPath }}/{{ .Values.nats.tls.certSecret.caFile }}"
{{- end }}
{{- end }}
{{- end }}
- name: "SCRAPPERENABLED"
value: "{{ .Values.storage.scrapperEnabled }}"
- name: "COMPRESSARTIFACTS"
Expand Down Expand Up @@ -265,9 +265,10 @@ Define API environment in standalone mode
value: "{{ .Values.mongodb.allowDiskUse }}"
- name: "NATS_EMBEDDED"
value: "{{ .Values.nats.embedded }}"
{{- if .Values.nats.enabled }}
- name: NATS_URI
{{- if .Values.nats.secretName }}
{{- if .Values.nats.uri }}
value: {{ .Values.nats.uri }}
{{- else if .Values.nats.secretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.nats.secretName }}
Expand All @@ -287,7 +288,6 @@ Define API environment in standalone mode
value: "{{ .Values.nats.tls.certSecret.baseMountPath }}/{{ .Values.nats.tls.certSecret.caFile }}"
{{- end }}
{{- end }}
{{- end }}
- name: "STORAGE_ENDPOINT"
{{- if .Values.storage.endpoint }}
value: "{{ .Values.storage.endpoint }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/testkube-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ nats:
## load URI from secrets
# secretName: XXX
# secretKey: XXX
## load URI from plain-text
uri: "nats://testkube-nats:4222"

## MINIO parameters
minio:
Expand Down
11 changes: 0 additions & 11 deletions charts/testkube-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,6 @@ spec:
- name: APISERVER_REGISTRY
value: {{ .Values.global.imageRegistry }}
{{- end }}
{{- if .Values.nats.enabled }}
- name: NATS_URI
{{- if .Values.nats.secretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.nats.secretName }}
key: {{ .Values.nats.secretKey }}
{{- else }}
value: "nats://{{ .Release.Name }}-nats"
{{- end }}
{{- end }}
{{- if .Values.purgeExecutions }}
- name: APISERVER_PURGE_EXECUTIONS
value: "true"
Expand Down
8 changes: 4 additions & 4 deletions charts/testkube-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-operator-manager-rolebinding
labels:
{{- if .Values.globalLabels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.globalLabels "context" $ ) | nindent 4 }}
{{- if .Values.global.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.global.annotations }}
annotations: {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }}
Expand All @@ -29,8 +29,8 @@ kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-operator-proxy-rolebinding
labels:
{{- if .Values.globalLabels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.globalLabels "context" $ ) | nindent 4 }}
{{- if .Values.global.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.global.annotations }}
annotations: {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }}
Expand Down
9 changes: 0 additions & 9 deletions charts/testkube-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,5 @@ testConnection:
## Note: podAffinityPreset, podAntiAffinityPreset, and nodeAffinityPreset will be ignored when it's set
affinity: {}

## NATS parameters
## ref: https://github.com/nats-io/nats-server
nats:
## Deploy NATS server to the cluster
enabled: true
## load URI from secrets
# secretName: XXX
# secretKey: XXX

## Pass a custom cronJobTemplate to the Testkube Operator Deployment
cronJobTemplate: ""
11 changes: 11 additions & 0 deletions charts/testkube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@ testkube-api:
enabled: true
skipVerify: true
```
To use external NATS server, it's possible to configure:

```yaml
testkube-api:
nats:
enabled: false
uri: nats://some-nats-address:4222
# or providing URI with Kubernetes secret:
# secretName: example-secret
# secretKey: example-key

```
#### MinIO/S3

Currently, Testkube doesn't support provisioning MinIO with TLS. However, if you use an external MinIO (or any S3-compatible storage)
Expand Down
Loading