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

Update to the Appliance Helm chart #524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 2 additions & 2 deletions charts/sourcegraph-appliance/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 5.5.3738
version: 5.5.3956

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "5.5.3738"
appVersion: "5.5.3956"
16 changes: 13 additions & 3 deletions charts/sourcegraph-appliance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@
# Sourcegraph Appliance Helm Chart

Install this chart through Helm:
`helm upgrade --install ./charts/sourcegraph-appliance/ --namespace sourcegraph-appliance`

kubectl create namespace $NAMESPACE
kubectl --namespace $NAMESPACE create secret generic appliance-password \
--from-literal password=$MY_PASSWORD

helm repo add sourcegraph https://helm.sourcegraph.com/release
helm --namespace $NAMESPACE install appliance sourcegraph/sourcegraph-appliance

To run from source (from this repo):

helm upgrade --install ./charts/sourcegraph-appliance/ --namespace sourcegraph-appliance

## Configuration Options

Expand All @@ -30,12 +40,12 @@ In addition to the documented values, all services also support the following va
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| frontend.image.image | string | `"appliance-frontend"` | |
| frontend.image.tag | string | `"5.5.3738"` | |
| frontend.image.tag | string | `"5.5.3956"` | |
| fullnameOverride | string | `""` | |
| image.image | string | `"appliance"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"index.docker.io/sourcegraph"` | |
| image.tag | string | `"5.5.3738"` | |
| image.tag | string | `"5.5.3956"` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
Expand Down
14 changes: 12 additions & 2 deletions charts/sourcegraph-appliance/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@

# Sourcegraph Appliance Helm Chart

Install this chart through Helm:
`helm upgrade --install ./charts/sourcegraph-appliance/ --namespace sourcegraph-appliance`
Install this chart through Helm:

kubectl create namespace $NAMESPACE
kubectl --namespace $NAMESPACE create secret generic appliance-password \
--from-literal password=$MY_PASSWORD

helm repo add sourcegraph https://helm.sourcegraph.com/release
helm --namespace $NAMESPACE install appliance sourcegraph/sourcegraph-appliance

To run from source (from this repo):

helm upgrade --install ./charts/sourcegraph-appliance/ --namespace sourcegraph-appliance

## Configuration Options

Expand Down
59 changes: 37 additions & 22 deletions charts/sourcegraph-appliance/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "sourcegraph-appliance.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "sourcegraph-appliance.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "sourcegraph-appliance.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "sourcegraph-appliance.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
==============================================================
____ ____ _ _ ____ ____ ____ ____ ____ ____ ___ _ _
[__ | | | | |__/ | |___ | __ |__/ |__| |__] |__|
___] |__| |__| | \ |___ |___ |__] | \ | | | | |

____ ___ ___ _ _ ____ __ _ ____ ____
|--| |--' |--' |___ | |--| | \| |___ |===

Version: {{ .Chart.Version }}

--------------------------------------------------------------

Thanks for installing the Sourcegraph Appliance!

To check if the appliance is running, try:

$ helm status {{ .Release.Name }} --namespace {{ .Release.Namespace }}
$ helm get all {{ .Release.Name }} --namespace {{ .Release.Namespace }}

--------------------------------------------------------------

Get the application URL by running these commands:

$ kubectl get ingress sourcegraph-frontend --namespace {{ .Release.Namespace }}

Observe the IP address of the output. Then you reach with your browser to:

http://<ip-address>

Alternatively, if your Ingress controller answers with a specific DNS, you can
also use it to reach the Appliance:

http://<your-public-facing-name/ (or https:// if you are running TLS)

Note that if your cluster does not have public facing Ingress controller, you
will need to tunnel the traffic. Please consult your Kubernetes distribution on
how to do so.
42 changes: 4 additions & 38 deletions charts/sourcegraph-appliance/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
image: appliance
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: &version "5.5.3738"
tag: &version "5.5.3956"
# Version and Tag (above) are subtley different
# Tag is the docker container tag
# Version is the internal version number as understood by appliance
Expand Down Expand Up @@ -56,32 +56,11 @@ service:
ingress:
enabled: true
className: ""
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
annotations: {}
hosts: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
resources: {}

livenessProbe:
httpGet:
Expand All @@ -92,23 +71,10 @@ readinessProbe:
path: /
port: http

# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
# secret:
# secretName: mysecret
# optional: false

# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true

nodeSelector: {}

tolerations: []

affinity: {}

frontend:
Expand Down
Loading