Skip to content
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

fix: allow external NATS #701

Closed
wants to merge 3 commits into from
Closed
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
6 changes: 3 additions & 3 deletions charts/testkube-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ spec:
{{- end }}
- name: API_MONGO_ALLOW_DISK_USE
value: "{{ .Values.mongodb.allowDiskUse }}"
{{- 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 @@ -133,7 +134,6 @@ spec:
value: "{{ .Values.nats.tls.certSecret.baseMountPath }}/{{ .Values.nats.tls.certSecret.caFile }}"
{{- end }}
{{- end }}
{{- end }}
- name: POSTMANEXECUTOR_URI
value: "{{ .Values.postmanExecutorURI }}"
- name: TESTKUBE_ANALYTICS_ENABLED
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 @@ -348,6 +348,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 @@ -83,17 +83,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 }}
ports:
- containerPort: 9443
name: webhook-server
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 @@ -333,12 +333,3 @@ preUpgrade:
operator: Equal
value: arm64
effect: NoSchedule

## 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
14 changes: 14 additions & 0 deletions charts/testkube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ testkube-api:
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

# […] other options like `tls`
```

#### 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
14 changes: 14 additions & 0 deletions charts/testkube/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ testkube-api:
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

# […] other options like `tls`
```

#### 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