Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

feat(appliance): deploy codeinsights-db#63042

Merged
craigfurman merged 2 commits into
mainfrom
craig/rel-3-service-definition-codeinsights
Jun 4, 2024
Merged

feat(appliance): deploy codeinsights-db#63042
craigfurman merged 2 commits into
mainfrom
craig/rel-3-service-definition-codeinsights

Conversation

@craigfurman

@craigfurman craigfurman commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

Closes https://linear.app/sourcegraph/issue/REL-3/service-definition-codeinsights

Changelog

Add optional diff extra args to compare-helm

I wanted this to do diff --side-by-side, may as well commit it as a
feature.

feat(appliance): deploy codeinsights-db


Ready for review, but draft until base branch merged.

Test plan

Golden tests included.

Changelog

  • Appliance can deploy codeinsights-db.

@cla-bot cla-bot Bot added the cla-signed label Jun 3, 2024
@craigfurman craigfurman force-pushed the craig/rel-3-service-definition-codeinsights branch from 56d2faf to b667a24 Compare June 3, 2024 13:47

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotated output of:

❯ go run ./internal/appliance/dev/compare-helm \
  -deploy-sourcegraph-helm-path ../../deploy-sourcegraph-helm \
  -component codeinsights-db \
  -golden-file internal/appliance/reconciler/testdata/golden-fixtures/codeinsights/default.yaml \
  -helm-template-extra-args '--set codeInsightsDB.serviceAccount.create=true'

Nothing stands out to me as a problem but as always it pays to put 4 eyeballs on this.

2c2
< # helm: ServiceAccount/codeinsights-db
---
> # golden: ServiceAccount/codeinsights-db
5a6,8
>   annotations:
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
>   creationTimestamp: "2024-04-19T00:00:00Z"
7,8d9
<     app.kubernetes.io/component: codeinsights-db
<     category: rbac
10a12,21
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
12c23
< # helm: Secret/codeinsights-db-auth
---
> # golden: Secret/codeinsights-db-auth
21a33,35
>   annotations:
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
>   creationTimestamp: "2024-04-19T00:00:00Z"
23,24c37,39
<     app: codeinsights-db
<     app.kubernetes.io/component: codeinsights-db
---
>     app.kubernetes.io/component: codeinsights-db-auth
>     app.kubernetes.io/name: sourcegraph
>     app.kubernetes.io/version: 5.3.9104
26a42,51
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
29c54
< # helm: ConfigMap/codeinsights-db-conf
---
> # golden: ConfigMap/codeinsights-db-conf
89a115
> immutable: false
93c119,120
<     description: Configuration for Code Insights
---
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
>   creationTimestamp: "2024-04-19T00:00:00Z"
95d121
<     app.kubernetes.io/component: codeinsights-db
97a124,133
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
99c135
< # helm: PersistentVolumeClaim/codeinsights-db
---
> # golden: PersistentVolumeClaim/codeinsights-db
102a139,143
>   annotations:
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   finalizers:
>     - kubernetes.io/pvc-protection
104d144
<     app.kubernetes.io/component: codeinsights-db
106a147,156
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
113c163,165
<   storageClassName: sourcegraph
---
>   volumeMode: Filesystem
> status:
>   phase: Pending
115c167
< # helm: Service/codeinsights-db
---
> # golden: Service/codeinsights-db
119a172
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
121a175
>   creationTimestamp: "2024-04-19T00:00:00Z"
126a181,190
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
127a192,198
>   clusterIP: NORMALIZED_FOR_TESTING
>   clusterIPs:
>     - NORMALIZED_FOR_TESTING
>   internalTrafficPolicy: Cluster
>   ipFamilies:
>     - IPv4
>   ipFamilyPolicy: SingleStack
130a202
>       protocol: TCP
134,135c206
<     app.kubernetes.io/instance: release-name
<     app.kubernetes.io/name: sourcegraph
---
>   sessionAffinity: None
136a208,209
> status:
>   loadBalancer: {}
138c211
< # helm: StatefulSet/codeinsights-db
---
> # golden: StatefulSet/codeinsights-db
143c216,218
<     description: Code Insights Postgresql instance.
---
>     appliance.sourcegraph.com/configHash: 18dd4e4e970066ab9a3dab34f8ed6fc75edf971b75e13f569abcf7a31ec1a330
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   generation: 1
146,147d220
<     app.kubernetes.io/instance: release-name
<     app.kubernetes.io/managed-by: Helm
149c222
<     app.kubernetes.io/version: 5.3.2
---
>     app.kubernetes.io/version: 5.3.9104
151d223
<     helm.sh/chart: sourcegraph-5.3.2
152a225,234
>   namespace: NORMALIZED_FOR_TESTING
>   ownerReferences:
>     - apiVersion: v1
>       blockOwnerDeletion: true
>       controller: true
>       kind: ConfigMap
>       name: sg
>       uid: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING
153a236,240
>   minReadySeconds: 10
>   persistentVolumeClaimRetentionPolicy:
>     whenDeleted: Retain
>     whenScaled: Retain
>   podManagementPolicy: OrderedReady
159,160d245
<       app.kubernetes.io/instance: release-name
<       app.kubernetes.io/name: sourcegraph
165,166c250,251
<         checksum/codeinsights-db.secret: 35cdc8301ff913b04e452737cd8989472d5337078306836ec521da1a1bd7384a
<         kubectl.kubernetes.io/default-container: codeinsights
---
>         kubectl.kubernetes.io/default-container: codeinsights-db
>       creationTimestamp: null

See https://linear.app/sourcegraph/issue/REL-14/ensure-pods-roll-when-referenced-secret-changes

169,170d253
<         app.kubernetes.io/instance: release-name
<         app.kubernetes.io/name: sourcegraph
172c255
<         group: backend
---
>       name: codeinsights-db
174d256
<       affinity: null
213a296
>               protocol: TCP
225a309
>           terminationMessagePath: /dev/termination-log
256c340
<               value: localhost:$(DATA_SOURCE_PORT)/$(DATA_SOURCE_DB)?sslmode=disable
---
>               value: 127.0.0.1:$(DATA_SOURCE_PORT)/$(DATA_SOURCE_DB)?sslmode=disable
259a344
>           imagePullPolicy: IfNotPresent
267a353,358
>           securityContext:
>             allowPrivilegeEscalation: false
>             readOnlyRootFilesystem: true
>             runAsGroup: 101
>             runAsUser: 100
>           terminationMessagePath: /dev/termination-log
268a360
>       dnsPolicy: ClusterFirst
288a381,382
>           terminationMessagePath: /dev/termination-log
>           terminationMessagePolicy: FallbackToLogsOnError
290c384
<             - mountPath: /var/lib/postgresql/data/
---
>             - mountPath: /var/lib/postgresql/data
292c386,387
<       nodeSelector: null
---
>       restartPolicy: Always
>       schedulerName: default-scheduler
295a391
>         runAsGroup: 70
296a393
>       serviceAccount: codeinsights-db
299d395
<       tolerations: null
311a408,486
> status:
>   availableReplicas: 0
>   replicas: 0
> ---
> # golden: ConfigMap/sg
> apiVersion: v1
> data:
>   spec: |
>     spec:
>       requestedVersion: "5.3.9104"
> 
>       blobstore:
>         disabled: true
> 
>       codeInsights: {}
> 
>       codeIntel:
>         disabled: true
> 
>       frontend:
>         disabled: true
> 
>       gitServer:
>         disabled: true
> 
>       indexedSearch:
>         disabled: true
> 
>       indexedSearchIndexer:
>         disabled: true
> 
>       pgsql:
>         disabled: true
> 
>       postgresExporter:
>         disabled: true
> 
>       preciseCodeIntel:
>         disabled: true
> 
>       redisCache:
>         disabled: true
> 
>       redisExporter:
>         disabled: true
> 
>       redisStore:
>         disabled: true
> 
>       repoUpdater:
>         disabled: true
> 
>       searcher:
>         disabled: true
> 
>       symbols:
>         disabled: true
> 
>       syntectServer:
>         disabled: true
> 
>       worker:
>         disabled: true
> 
>       prometheus:
>         disabled: true
> 
>       embeddings:
>         disabled: true
> kind: ConfigMap
> metadata:
>   annotations:
>     appliance.sourcegraph.com/currentVersion: 5.3.9104
>     appliance.sourcegraph.com/managed: "true"
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   name: sg
>   namespace: NORMALIZED_FOR_TESTING
>   resourceVersion: NORMALIZED_FOR_TESTING
>   uid: NORMALIZED_FOR_TESTING

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️ 👁️ Nothing stands out to me either.

@craigfurman craigfurman requested review from a team, Chickensoupwithrice and jdpleiness and removed request for a team and Chickensoupwithrice June 3, 2024 13:59

@jdpleiness jdpleiness left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues that I can see 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️ 👁️ Nothing stands out to me either.

Base automatically changed from craig/rel-83-service-definition-worker to main June 4, 2024 09:09
@craigfurman craigfurman force-pushed the craig/rel-3-service-definition-codeinsights branch from b667a24 to 52ff319 Compare June 4, 2024 09:14
@craigfurman craigfurman marked this pull request as ready for review June 4, 2024 09:14
@craigfurman craigfurman enabled auto-merge (squash) June 4, 2024 09:15
@craigfurman craigfurman force-pushed the craig/rel-3-service-definition-codeinsights branch from 52ff319 to e449c44 Compare June 4, 2024 09:36
Craig Furman added 2 commits June 4, 2024 11:14
I wanted this to do `diff --side-by-side`, may as well commit it as a
feature.
@craigfurman craigfurman force-pushed the craig/rel-3-service-definition-codeinsights branch from e449c44 to 0c92cd7 Compare June 4, 2024 10:14
@craigfurman craigfurman merged commit 9847d67 into main Jun 4, 2024
@craigfurman craigfurman deleted the craig/rel-3-service-definition-codeinsights branch June 4, 2024 10:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants