This repository was archived by the owner on Sep 30, 2024. It is now read-only.
appliance: deploy cadvisor#62942
Merged
Merged
Conversation
craigfurman
commented
May 28, 2024
Contributor
Author
There was a problem hiding this comment.
Annotated diff of:
❯ go run ./internal/appliance/dev/compare-helm \
-deploy-sourcegraph-helm-path ../../deploy-sourcegraph-helm \
-component cadvisor \
-golden-file internal/appliance/reconciler/testdata/golden-fixtures/cadvisor/default.yaml
2c2
< # helm: ServiceAccount/cadvisor
---
> # golden: ServiceAccount/cadvisor
5a6,8
> annotations:
> appliance.sourcegraph.com/configHash: 6ad4c69be1e1c5d02dbd71d1f427fc7d197bf3d18c4acb8d53092dc659455920
> creationTimestamp: "2024-04-19T00:00:00Z"
7,9d9
< app: cadvisor
< app.kubernetes.io/component: cadvisor
< category: rbac
11a12,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
13c23
< # helm: DaemonSet/cadvisor
---
> # golden: DaemonSet/cadvisor
18,19c28,31
< description: DaemonSet to ensure all nodes run a cAdvisor pod.
< seccomp.security.alpha.kubernetes.io/pod: docker/default
---
> appliance.sourcegraph.com/configHash: 6ad4c69be1e1c5d02dbd71d1f427fc7d197bf3d18c4acb8d53092dc659455920
> deprecated.daemonset.template.generation: "1"
> creationTimestamp: "2024-04-19T00:00:00Z"
> generation: 1
22,23d33
< app.kubernetes.io/instance: release-name
< app.kubernetes.io/managed-by: Helm
25c35
< app.kubernetes.io/version: 5.3.2
---
> app.kubernetes.io/version: 5.3.9104
27d36
< helm.sh/chart: sourcegraph-5.3.2
28a38,47
> 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
29a49,50
> minReadySeconds: 10
> revisionHistoryLimit: 10
33,34d53
< app.kubernetes.io/instance: release-name
< app.kubernetes.io/name: sourcegraph
38,39d56
< description: Collects and exports container metrics.
< kubectl.kubernetes.io/default-container: cadvisor
41a59
> creationTimestamp: null
44,45d61
< app.kubernetes.io/instance: release-name
< app.kubernetes.io/name: sourcegraph
46a63
> name: cadvisor
48d64
< affinity: null
54d69
< env: null
70a86,87
> terminationMessagePath: /dev/termination-log
> terminationMessagePolicy: FallbackToLogsOnError
90,91c107,111
< nodeSelector: null
< securityContext: null
---
> dnsPolicy: ClusterFirst
> restartPolicy: Always
> schedulerName: default-scheduler
> securityContext: {}
> serviceAccount: cadvisor
94d113
< tolerations: null
97a117
> type: ""
100a121
> type: ""
103a125
> type: ""
106a129
> type: ""
109a133
> type: ""
112a137
> type: ""
113a139,222
> updateStrategy:
> rollingUpdate:
> maxSurge: 0
> maxUnavailable: 1
> type: RollingUpdate
> status:
> currentNumberScheduled: 0
> desiredNumberScheduled: 0
> numberMisscheduled: 0
> numberReady: 0
> ---
> # golden: ConfigMap/sg
> apiVersion: v1
> data:
> spec: |
> spec:
> requestedVersion: "5.3.9104"
>
> blobstore:
> disabled: true
>
> codeInsights:
> disabled: true
>
> 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
>
> redisStore:
> disabled: true
>
> repoUpdater:
> disabled: true
>
> searcher:
> disabled: true
>
> symbols:
> disabled: true
>
> syntectServer:
> disabled: true
>
> worker:
> disabled: true
>
> prometheus:
> disabled: true
>
> cadvisor:
> disabled: false
> 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_TESTINGNothing stands out.
There are a few intentional differences from our Helm chart: * The cadvisor privileged option is removed. Cadvisor runs with a privileged containerSecurityContext by default, but the component is made opt-in (disabled by default). * The PodSecurityPolicy is removed entirely, since it was removed from recent versions of Kubernetes.
7f7a406 to
c76fcec
Compare
Chickensoupwithrice
approved these changes
May 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://linear.app/sourcegraph/issue/REL-54/service-definition-cadvisor.
There are a few intentional differences from our Helm chart:
Test plan
Golden tests included.