Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: debug
port: http-debug
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: debug
port: http-debug
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
ports:
- containerPort: 6060
name: debug
- name: http-debug
containerPort: 6060
terminationMessagePolicy: FallbackToLogsOnError
env:
{{- range $name, $item := .Values.executor.env }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ metadata:
name: executor
spec:
ports:
- name: debug
- name: http-debug
port: 6060
targetPort: debug
targetPort: http-debug
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: {{include "executor.name" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ spec:
- name: REGISTRY_PROXY_REMOTEURL
value: http://registry-1.docker.io
ports:
- containerPort: 5000
name: registry
- name: http
containerPort: 5000
livenessProbe:
httpGet:
path: /
port: registry
port: http
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: registry
port: http
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
- name: http
port: 5000
protocol: TCP
targetPort: 5000
targetPort: http
selector:
app: private-docker-registry
type: ClusterIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ spec:
securityContext:
privileged: {{ .Values.executor.securityContext.privileged }}
ports:
- containerPort: 6060
name: debug
- name: http-debug
containerPort: 6060
envFrom:
- configMapRef:
name: {{ include "executor.name" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ metadata:
name: {{ include "executor.name" . }}
spec:
ports:
- name: debug
- name: http-debug
port: 6060
targetPort: debug
targetPort: http-debug
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: {{ include "executor.name" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/sourcegraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ In addition to the documented values, all services also support the following va
| openTelemetry.agent.containerSecurityContext.allowPrivilegeEscalation | bool | `false` | |
| openTelemetry.agent.containerSecurityContext.runAsGroup | int | `101` | |
| openTelemetry.agent.containerSecurityContext.runAsUser | int | `100` | |
| openTelemetry.agent.hostPorts | object | `{"otlpGrpc":4317,"otlpHttp":4318,"zpages":55679}` | Resource requests & limits for the `otel-agent` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
| openTelemetry.agent.hostPorts | object | `{"grpcOtlp":4317,"httpOtlp":4318,"httpZpages":55679}` | Resource requests & limits for the `otel-agent` container, learn more from the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) |
| openTelemetry.agent.name | string | `"otel-agent"` | Name used by resources. Does not affect service names or PVCs. |
| openTelemetry.agent.resources.limits.cpu | string | `"500m"` | |
| openTelemetry.agent.resources.limits.memory | string | `"500Mi"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/sourcegraph/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ app.kubernetes.io/name: jaeger
fieldRef:
fieldPath: status.hostIP
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://$(OTEL_AGENT_HOST):{{ toYaml .Values.openTelemetry.agent.hostPorts.otlpGrpc }}
value: http://$(OTEL_AGENT_HOST):{{ toYaml .Values.openTelemetry.agent.hostPorts.grpcOtlp }}
{{- end }}
{{- end }}

Expand Down
18 changes: 9 additions & 9 deletions charts/sourcegraph/templates/_worker.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- define "sourcegraph.worker" -}}
{{- $top := index . 0 }}
{{- $suffix := index . 1 -}}
{{- $allowlist := index . 2 -}}
{{- $allowlist := index . 2 -}}
{{- $blocklist := index . 3 -}}
{{- $resources := index . 4 -}}

Expand Down Expand Up @@ -100,24 +100,24 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: debug
port: http-debug
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: debug
port: http-debug
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
ports:
- containerPort: 3189
name: http
- containerPort: 6060
name: debug
- containerPort: 6996
name: prom
- name: http
containerPort: 3189
- name: http-debug
containerPort: 6060
- name: http-debug-exec
containerPort: 6996
{{- if not $top.Values.sourcegraph.localDevMode }}
resources:
{{- toYaml $resources | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ spec:
args: {{- default (list "") .Values.blobstore.args | toYaml | nindent 8 }}
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 9000
name: blobstore
- name: http
containerPort: 9000
livenessProbe:
httpGet:
path: /
port: blobstore
port: http
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: blobstore
port: http
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
Expand Down
4 changes: 2 additions & 2 deletions charts/sourcegraph/templates/blobstore/blobstore.Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ metadata:
name: blobstore
spec:
ports:
- name: blobstore
- name: http
port: 9000
targetPort: blobstore
targetPort: http
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: blobstore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ spec:
metadata:
annotations:
description: Collects and exports container metrics.
kubectl.kubernetes.io/default-container: cadvisor
prometheus.io/port: "48080"
sourcegraph.prometheus/scrape: "true"
kubectl.kubernetes.io/default-container: cadvisor
{{- if .Values.sourcegraph.podAnnotations }}
{{- toYaml .Values.sourcegraph.podAnnotations | nindent 8 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ metadata:
name: codeinsights-db
spec:
ports:
- name: http-metrics
port: 9187
targetPort: http-metrics
- name: codeinsights-db
port: 5432
targetPort: codeinsights-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ spec:
value: "/conf"
terminationMessagePolicy: FallbackToLogsOnError
ports:
- containerPort: 5432
name: codeinsights-db
- name: codeinsights-db
containerPort: 5432
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.codeInsightsDB.resources | nindent 10 }}
Expand All @@ -97,7 +97,8 @@ spec:
{{- if .Values.codeInsightsDB.extraVolumeMounts }}
{{- toYaml .Values.codeInsightsDB.extraVolumeMounts | nindent 8 }}
{{- end }}
- env:
- name: pgsql-exporter
env:
{{- include "sourcegraph.dataSource" (list . "codeInsightsDB" ) | nindent 8 }}
{{- range $name, $item := .Values.codeInsightsDB.postgresExporter.env}}
- name: {{ $name }}
Expand All @@ -106,14 +107,16 @@ spec:
- name: PG_EXPORTER_EXTEND_QUERY_PATH
value: /config/code_insights_queries.yaml
image: {{ include "sourcegraph.image" (list . "postgresExporter") }}
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
ports:
- name: http-metrics
containerPort: 9187
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.postgresExporter.resources | nindent 10 }}
{{- end }}
securityContext:
{{- toYaml .Values.postgresExporter.containerSecurityContext | nindent 10 }}
terminationMessagePolicy: FallbackToLogsOnError
{{- if .Values.codeInsightsDB.extraContainers }}
{{- toYaml .Values.codeInsightsDB.extraContainers | nindent 6 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ metadata:
name: codeintel-db
spec:
ports:
- name: http-metrics
port: 9187
targetPort: http-metrics
- name: pgsql
port: 5432
targetPort: pgsql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ spec:
failureThreshold: 360
periodSeconds: 10
ports:
- containerPort: 5432
name: pgsql
- name: pgsql
containerPort: 5432
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.codeIntelDB.resources | nindent 10 }}
Expand All @@ -111,7 +111,8 @@ spec:
{{- if .Values.codeIntelDB.extraContainers }}
{{- toYaml .Values.codeIntelDB.extraContainers | nindent 6 }}
{{- end }}
- env:
- name: pgsql-exporter
env:
{{- include "sourcegraph.dataSource" (list . "codeIntelDB" ) | nindent 8 }}
{{- range $name, $item := .Values.codeIntelDB.postgresExporter.env}}
- name: {{ $name }}
Expand All @@ -120,14 +121,16 @@ spec:
- name: PG_EXPORTER_EXTEND_QUERY_PATH
value: /config/code_intel_queries.yaml
image: {{ include "sourcegraph.image" (list . "postgresExporter") }}
terminationMessagePolicy: FallbackToLogsOnError
name: pgsql-exporter
ports:
- name: http-metrics
containerPort: 9187
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.postgresExporter.resources | nindent 10 }}
{{- end }}
securityContext:
{{- toYaml .Values.postgresExporter.containerSecurityContext | nindent 10 }}
terminationMessagePolicy: FallbackToLogsOnError
terminationGracePeriodSeconds: 120
securityContext:
{{- toYaml .Values.codeIntelDB.podSecurityContext | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ metadata:
name: sourcegraph-frontend-internal
spec:
ports:
- name: http-internal
- name: grpc-internal
port: 80
targetPort: http-internal
targetPort: grpc-internal
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: sourcegraph-frontend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,24 +107,24 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: debug
port: http-debug
scheme: HTTP
initialDelaySeconds: 300
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: debug
port: http-debug
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
ports:
- containerPort: 3080
name: http
- containerPort: 3090
name: http-internal
- containerPort: 6060
name: debug
- name: grpc-internal
containerPort: 3090
- name: http
containerPort: 3080
- name: http-debug
containerPort: 6060
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.frontend.resources | nindent 10 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
- name: http
port: 30080
targetPort: http
- name: http-debug
port: 6060
targetPort: http-debug
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: sourcegraph-frontend
Expand Down
9 changes: 6 additions & 3 deletions charts/sourcegraph/templates/gitserver/gitserver.Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ metadata:
spec:
clusterIP: None
ports:
- name: unused
port: 10811
targetPort: 10811
- name: grpc
port: 3178
targetPort: grpc
- name: http-debug
port: 6060
targetPort: http-debug
selector:
{{- include "sourcegraph.selectorLabels" . | nindent 4 }}
app: gitserver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,19 @@ spec:
# pod because of a failed liveness probe, we give it 2 minutes to start up.
startupProbe:
tcpSocket:
port: rpc
port: grpc
failureThreshold: 120
periodSeconds: 1
livenessProbe:
initialDelaySeconds: 5
tcpSocket:
port: rpc
port: grpc
timeoutSeconds: 5
ports:
- containerPort: 3178
name: rpc
- name: grpc
containerPort: 3178
- name: http-debug
containerPort: 6060
{{- if not .Values.sourcegraph.localDevMode }}
resources:
{{- toYaml .Values.gitserver.resources | nindent 10 }}
Expand Down
Loading
Loading