Repository navigation
Commit 090121f
databases: run permission init containers on the DB images (#506)
The `correct-data-dir-permissions` init containers on `pgsql`,
`codeintel-db` and `codeinsights-db` pull `sourcegraph/alpine-3.14`,
which is a frozen November 2023 build of an Alpine release that went
end-of-life in May 2023 (OpenSSL 1.1.1t, curl 8.4.0, ...), and
customers' scanners rightly flag it. The init container only runs `sh -c
chmod`, which the database images already have via busybox, so it now
uses the same pinned image as the database container. The
`migrate-to-nonprivileged` component copies the pgsql init container
image into its chown init containers, so those now get `postgresql-16`,
whose busybox has the same `sh`, `stat` and `chown`. Afterwards nothing
in this repo references alpine.
Sister change in Helm: sourcegraph/deploy-sourcegraph-helm#997. Docker
Compose doesn't use the image. Once both land,
sourcegraph/sourcegraph#18714 retires the `alpine-3.14` image.
Test plan: rendered every example overlay before and after; the only
diff is the three init container images. With `migrate-to-nonprivileged`
included, all its init containers resolve to the pinned `postgresql-16`.
Ran the gitserver/searcher chown command from that component as root in
`postgresql-16`. `.buildkite/check-image-names.sh` passes. The same init
container change in Helm was exercised end to end on kind (upgrade from
main with existing data, and fresh install).
Co-authored-by: Amp <amp@ampcode.com>1 parent 3c3be20 commit 090121f
11 files changed
Lines changed: 11 additions & 11 deletions
File tree
- base/sourcegraph
- codeinsights-db
- codeintel-db
- pgsql
- components/utils/migrate-to-nonprivileged
- blobstore
- gitserver
- grafana
- indexed-search
- prometheus
- redis
- searcher
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments