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

codeintel-service-def#62870

Merged
jdpleiness merged 1 commit into
mainfrom
05-22-codeintel-service-def
May 23, 2024
Merged

codeintel-service-def#62870
jdpleiness merged 1 commit into
mainfrom
05-22-codeintel-service-def

Conversation

@jdpleiness

@jdpleiness jdpleiness commented May 22, 2024

Copy link
Copy Markdown
Contributor

Service definition for code intel.

Test plan

Golden files

@cla-bot cla-bot Bot added the cla-signed label May 22, 2024

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jdpleiness and the rest of your teammates on Graphite Graphite

@jdpleiness jdpleiness force-pushed the 05-22-codeintel-service-def branch from 212724c to 165d2c7 Compare May 22, 2024 22:19

Copy link
Copy Markdown
Contributor Author

Nothing stands out to me in the diff with Helm:

sourcegraph 05-22-codeintel-service-def ≡
❯ go run ./internal/appliance/dev/compare-helm \
        -component codeintel-db \
        -golden-file internal/appliance/reconciler/testdata/golden-fixtures/codeintel/default.yaml
2c2
< # helm: Secret/codeintel-db-auth
---
> # golden: Secret/codeintel-db-auth
11a12,14
>   annotations:
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
>   creationTimestamp: "2024-04-19T00:00:00Z"
13,14c16,18
<     app: codeintel-db
<     app.kubernetes.io/component: codeintel-db
---
>     app.kubernetes.io/component: codeintel-db-auth
>     app.kubernetes.io/name: sourcegraph
>     app.kubernetes.io/version: 5.3.9104
16a21,30
>   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
19c33
< # helm: ConfigMap/codeintel-db-conf
---
> # golden: ConfigMap/codeintel-db-conf
78a93
> immutable: false
82c97,98
<     description: Configuration for PostgreSQL
---
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
>   creationTimestamp: "2024-04-19T00:00:00Z"
84d99
<     app.kubernetes.io/component: codeintel-db
86a102,111
>   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
88c113
< # helm: PersistentVolumeClaim/codeintel-db
---
> # golden: PersistentVolumeClaim/codeintel-db
91a117,121
>   annotations:
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   finalizers:
>   - kubernetes.io/pvc-protection
93d122
<     app.kubernetes.io/component: codeintel-db
95a125,134
>   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
102c141,143
<   storageClassName: sourcegraph
---
>   volumeMode: Filesystem
> status:
>   phase: Pending
104c145
< # helm: Service/codeintel-db
---
> # golden: Service/codeintel-db
108a150
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
110a153
>   creationTimestamp: "2024-04-19T00:00:00Z"
115a159,168
>   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
116a170,176
>   clusterIP: NORMALIZED_FOR_TESTING
>   clusterIPs:
>   - NORMALIZED_FOR_TESTING
>   internalTrafficPolicy: Cluster
>   ipFamilies:
>   - IPv4
>   ipFamilyPolicy: SingleStack
119a180
>     protocol: TCP
123,124c184
<     app.kubernetes.io/instance: release-name
<     app.kubernetes.io/name: sourcegraph
---
>   sessionAffinity: None
125a186,187
> status:
>   loadBalancer: {}
127c189
< # helm: StatefulSet/codeintel-db
---
> # golden: StatefulSet/codeintel-db
132c194,196
<     description: Postgres database for various data.
---
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   generation: 1
135,136d198
<     app.kubernetes.io/instance: release-name
<     app.kubernetes.io/managed-by: Helm
138c200
<     app.kubernetes.io/version: 5.3.2
---
>     app.kubernetes.io/version: 5.3.9104
140d201
<     helm.sh/chart: sourcegraph-5.3.2
141a203,212
>   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
142a214,218
>   minReadySeconds: 10
>   persistentVolumeClaimRetentionPolicy:
>     whenDeleted: Retain
>     whenScaled: Retain
>   podManagementPolicy: OrderedReady
148,149d223
<       app.kubernetes.io/instance: release-name
<       app.kubernetes.io/name: sourcegraph
154,155c228,229
<         checksum/codeintel-db.secret: c3b334535727d67be427cac1cf5763e2f365faad18866237b3d3e89b6375f72f
<         kubectl.kubernetes.io/default-container: pgsql
---
>         kubectl.kubernetes.io/default-container: codeintel-db
>       creationTimestamp: null
158,159d231
<         app.kubernetes.io/instance: release-name
<         app.kubernetes.io/name: sourcegraph
161c233
<         group: backend
---
>       name: codeintel-db
163d234
<       affinity: null
198a270
>           failureThreshold: 3
200c272,275
<         name: pgsql
---
>           periodSeconds: 10
>           successThreshold: 1
>           timeoutSeconds: 1
>         name: codeintel-db
203a279
>           protocol: TCP
207a284,287
>           failureThreshold: 3
>           periodSeconds: 10
>           successThreshold: 1
>           timeoutSeconds: 1
210d289
<             cpu: "4"
211a291
>             requests.cpu: "4"
213d292
<             cpu: "4"
214a294
>             requests.cpu: "4"
225a306,308
>           successThreshold: 1
>           timeoutSeconds: 1
>         terminationMessagePath: /dev/termination-log
256c339
<           value: localhost:$(DATA_SOURCE_PORT)/$(DATA_SOURCE_DB)?sslmode=disable
---
>           value: 127.0.0.1:$(DATA_SOURCE_PORT)/$(DATA_SOURCE_DB)?sslmode=disable
259a343
>         imagePullPolicy: IfNotPresent
264c348
<             memory: 50Mi
---
>             memory: 50M
267c351,357
<             memory: 50Mi
---
>             memory: 50M
>         securityContext:
>           allowPrivilegeEscalation: false
>           readOnlyRootFilesystem: true
>           runAsGroup: 999
>           runAsUser: 999
>         terminationMessagePath: /dev/termination-log
268a359
>       dnsPolicy: ClusterFirst
280c371
<             memory: 50Mi
---
>             memory: 50M
283c374
<             memory: 50Mi
---
>             memory: 50M
288a380,381
>         terminationMessagePath: /dev/termination-log
>         terminationMessagePolicy: FallbackToLogsOnError
292c385,386
<       nodeSelector: null
---
>       restartPolicy: Always
>       schedulerName: default-scheduler
295a390
>         runAsGroup: 999
296a392,393
>       serviceAccount: codeintel-db
>       serviceAccountName: codeintel-db
298d394
<       tolerations: null
299a396,397
>       - emptyDir: {}
>         name: lockdir
307,308d404
<       - emptyDir: {}
<         name: lockdir
310a407,500
> status:
>   availableReplicas: 0
>   replicas: 0
> ---
> # golden: ConfigMap/sg
> apiVersion: v1
> data:
>   spec: |
>     spec:
>       requestedVersion: "5.3.9104"
>
>       blobstore:
>         disabled: true
>
>       codeInsights:
>         disabled: true
>
>       codeIntel: {}
>
>       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
> 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
> ---
> # golden: ServiceAccount/codeintel
> apiVersion: v1
> kind: ServiceAccount
> metadata:
>   annotations:
>     appliance.sourcegraph.com/configHash: 08a9f89fce0d5a0784d40c635aac4b63182af3bcf52068f2e8bc5941aa9706df
>   creationTimestamp: "2024-04-19T00:00:00Z"
>   labels:
>     deploy: sourcegraph
>   name: codeintel
>   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
exit status 1
exit status 1

Comment thread internal/appliance/config/defaults.go Outdated
@jdpleiness jdpleiness requested review from a team and craigfurman May 22, 2024 22:25
Comment thread internal/k8s/resource/container/container.go Outdated
@jdpleiness jdpleiness marked this pull request as ready for review May 22, 2024 22:27

@craigfurman craigfurman 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.

One typo on resources, other notes nits 🙌

Comment thread internal/appliance/config/defaults.go Outdated
Comment thread internal/appliance/config/embed.go Outdated
Comment thread internal/appliance/reconciler/codeintel.go Outdated

@craigfurman craigfurman 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.

Approving now since this really doesn't need another review after that CPU requests fix lands 🚀

@jdpleiness jdpleiness force-pushed the 05-22-codeintel-service-def branch from 165d2c7 to 364ce74 Compare May 23, 2024 17:56
@jdpleiness jdpleiness merged commit 23759ca into main May 23, 2024
@jdpleiness jdpleiness deleted the 05-22-codeintel-service-def branch May 23, 2024 19:14
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