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

[chore] Make all images distroless #189

Draft
wants to merge 66 commits into
base: main
Choose a base branch
from
Draft

Conversation

Ranger-X
Copy link
Contributor

@Ranger-X Ranger-X commented Oct 18, 2024

Description

Make all images distroless and build it via werf for security improvements.

Why do we need it, and what problem does it solve?

Less image size and improve security of images.

What is the expected result?

Distroless images.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Images distroless status

Legend:
✅ - fully distroless image (images based on scratch)
✔️ - partially distroless image (most of images based on ALTLinux)
⛔ - not a distroless image for now

Image name Status Distro Comments
drbd
drbd-reactor ✔️ ALTLinux We need some additional packages like libkeyutils, kmod
linstor-affinity-controller
linstor-csi ✔️ Actually fully distroless (based on scratch image) but some binaries extracted from Ubuntu's one .DEB-packages
linstor-drbd-wait
linstor-scheduler-admission
linstor-scheduler-extender
linstor-server ✔️ ALTLinux We need some additional packages like JRE and Python3
linstor-wait-until
metadata-backup ✔️ ALTLinux We need Python3
sds-replicated-volume-controller
semver
service-scripts
spaas ✔️ ALTLinux We need gcc, make and some other build tools to build kernel patches for DRBD
webhooks

Trivy checks

Trivy checks with HIGH and CRITICAL severities (for future PRs with fixes):

Image / file Library Severity Comments
webhooks stdlib HIGH fixed in 1.22.7, 1.23.1
linstor-scheduler-extender golang.org/x/net HIGH https://avd.aquasec.com/nvd/cve-2023-39325
linstor-scheduler-extender google.golang.org/grpc HIGH fixed in 1.56.3, 1.57.1, 1.58.3
linstor-scheduler-extender k8s.io/kubernetes HIGH fixed in 1.28.1, 1.27.5, 1.26.8, 1.25.13, 1.24.17
linstor-affinity-controller golang.org/x/net HIGH fixed in 0.17.0
linstor-affinity-controller google.golang.org/grpc HIGH fixed in 1.56.3, 1.57.1, 1.58.3
linstor-scheduler-admission golang.org/x/net HIGH fixed in 0.17.0
linstor-server logback-classic-1.3.8.jar HIGH fixed in 1.3.12, 1.4.12, 1.2.13
linstor-server protobuf-java-3.23.3.jar HIGH fixed in 3.25.5, 4.27.5, 4.28.2
linstor-server h2-1.4.197.jar CRITICAL fixed in 2.0.206
linstor-server grpc-protobuf-1.50.0.jar HIGH fixed in 1.53.0
linstor-server netty-codec-http2-4.1.79.Final.jar HIGH fixed in 4.1.100.Final
linstor-server postgresql-42.5.4.jar CRITICAL fixed in 42.2.28, 42.3.9, 42.4.4, 42.5.5, 42.6.1, 42.7.2
linstor-server ion-java-1.0.2.jar HIGH fixed in 1.10.5
linstor-server setuptools HIGH fixed in 70.0.0
linstor-server usr/bin/k8s-await-election golang.org/x/net HIGH fixed in 0.0.0-20220906165146-f3363e06e74c
linstor-server usr/bin/k8s-await-election golang.org/x/text HIGH fixed in 0.3.7
linstor-server usr/bin/k8s-await-election gopkg.in/yaml.v3 HIGH fixed in 3.0.0-20220521103104-8f96da9f5d5e

@Ranger-X Ranger-X self-assigned this Oct 21, 2024
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
[linstor-affinity-controller] now distroless

Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
…11-openjdk-headless` because `java-11-openjre-headless` does not exists

Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
…xt changed (and remove redundant fromCacheVersion)

Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Signed-off-by: Ivan.Makeev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant