Skip to content

Commit

Permalink
feat(rel): add syntactic code intel worker service
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpleiness committed Mar 5, 2025
1 parent 4b92ae7 commit 1a7734b
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/sourcegraph/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ resources:
- repo-updater
- searcher
- symbols
- syntactic-code-intel
- syntect-server
- worker
5 changes: 5 additions & 0 deletions base/sourcegraph/syntactic-code-intel/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- worker.Deployment.yaml
- worker.Service.yaml
77 changes: 77 additions & 0 deletions base/sourcegraph/syntactic-code-intel/worker.Deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
description: High level syntax analysis
labels:
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
app.kubernetes.io/component: syntactic-code-intel
name: syntactic-code-intel
spec:
minReadySeconds: 10
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: syntactic-code-intel
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
deploy: sourcegraph
app: syntactic-code-intel
spec:
containers:
- name: syntactic-code-intel
env:
- name: PRECISE_CODE_INTEL_UPLOAD_BACKEND
value: blobstore
- name: PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT
value: http://blobstore:9000
- name: SYNTACTIC_CODE_INTEL_WORKER_ADDR
value: ":3188"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
image: index.docker.io/sourcegraph/syntactic-code-intel-worker:6.0.0@sha256:50bdeb38b196f0fc21404969016bf8263f78144292e905867e93480f66c8251c
terminationMessagePath: FallbackToLogsOnError
livenessProbe:
httpGet:
path: /healthz
port: debug
scheme: HTTP
initialDelaySeconds: 60
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /ready
port: debug
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 5
ports:
- containerPort: 3188
name: http
- containerPort: 6060
name: debug
resources:
limits:
cpu: "2"
memory: 4G
requests:
cpu: 500m
memory: 2G
securityContext:
allowPrivilegeEscalation: false
runAsGroup: 101
runAsUser: 100
securityContext:
fsGroup: 101
runAsUser: 100
fsGroupChangePolicy: OnRootMismatch
23 changes: 23 additions & 0 deletions base/sourcegraph/syntactic-code-intel/worker.Service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "6060"
sourcegraph.prometheus/scrape: "true"
labels:
app: syntactic-code-intel
app.kubernetes.io/component: syntactic-code-intel
deploy: sourcegraph
sourcegraph-resource-requires: no-cluster-admin
name: syntactic-code-intel
spec:
ports:
- name: http
port: 3188
targetPort: http
- name: debug
port: 6060
targetPort: debug
selector:
app: syntactic-code-intel
type: ClusterIP

0 comments on commit 1a7734b

Please sign in to comment.