Skip to content
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
4 changes: 4 additions & 0 deletions charts/sourcegraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ In addition to the documented values, all services also support the following va
| syntectServer.resources | object | `{"limits":{"cpu":"4","memory":"6G"},"requests":{"cpu":"250m","memory":"2G"}}` | Resource requests & limits for the `syntect-server` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
| syntectServer.serviceAccount.create | bool | `false` | Enable creation of ServiceAccount for `syntect-server` |
| syntectServer.serviceAccount.name | string | `""` | Name of the ServiceAccount to be created or an existing ServiceAccount |
| testConnection.enabled | bool | `true` | Enable `test-connection` |
| testConnection.image.defaultTag | string | `"latest"` | Docker image tag for the `test-connection` image |
| testConnection.image.name | string | `"busybox"` | Docker image name for the `test-connection` image |
| testConnection.name | string | `"sg-test-connection"` | Name used by resources. Does not affect service names or PVCs. |
| worker.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"runAsGroup":101,"runAsUser":100}` | Security context for the `worker` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
| worker.image.defaultTag | string | `"4.1.2@sha256:79c85866469e96379a6f0b36c2deee08ba3d81520f6fffc8de16a6e7667a67ab"` | Docker image tag for the `worker` image |
| worker.image.name | string | `"worker"` | Docker image name for the `worker` image |
Expand Down
11 changes: 8 additions & 3 deletions charts/sourcegraph/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{{- if .Values.testConnection.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: "sg-test-connection"
name: {{ .Values.testConnection.name }}
labels:
{{- include "sourcegraph.labels" . | nindent 4 }}
{{- if .Values.testConnection.labels }}
{{- toYaml .Values.testConnection.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
image: {{ .Values.testConnection.image.name }}:{{ .Values.testConnection.image.defaultTag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's use the helper partial template like other deployment

Suggested change
image: {{ .Values.testConnection.image.name }}:{{ .Values.testConnection.image.defaultTag }}
image: {{ include "sourcegraph.image" (list . "testConnection") }}

command: ['wget']
args: ['sourcegraph-frontend:30080/']
restartPolicy: Never
restartPolicy: Never
{{- end }}
11 changes: 11 additions & 0 deletions charts/sourcegraph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,17 @@ worker:
create: false
# -- Name of the ServiceAccount to be created or an existing ServiceAccount
name: ""

testConnection:
# -- Enable `test-connection`
enabled: true
image:
# -- Docker image tag for the `test-connection` image
defaultTag: "latest"
# -- Docker image name for the `test-connection` image
name: "busybox"
# -- Name used by resources. Does not affect service names or PVCs.
name: "sg-test-connection"

# -- Additional resources to include in the rendered manifest. Templates are supported.
extraResources: []