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

feat(rel): add syntactic code intel worker service #242

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
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