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

test-connection: allow test-connection pod configuration #208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
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: []