commit | 842536b10bd1b11e62317940feef215442a8ecb4 | [log] [tgz] |
---|---|---|
author | Lorenz Brun <lorenz@nexantic.com> | Tue Jan 26 13:54:57 2021 +0100 |
committer | Lorenz Brun <lorenz@nexantic.com> | Tue Jan 26 13:54:57 2021 +0100 |
tree | 264906157b5cd51ef39e952326b85da48b5bbb5b | |
parent | f12bedfa4cd144c3abc4deac58405067d55f9c87 [diff] |
Make Kubernetes work with read-only root This makes Kubernetes work with a read-only root. There's two places where they hardcode paths: One is the DeviceManager socket path (/var/lib/kubelet/device-plugins/kubelet.sock), that one is easy to fix because KubeletRootDir is available one scope above. The other one is the pod logs dir which is too far removed from the main Kubelet config, so I just changed their hardcoded path to ours. The first patch should be upstreamable, for the second one we'd need to take a different approach to upstream. Test Plan: Should be covered by existing E2E tests. X-Origin-Diff: phab/D693 GitOrigin-RevId: 4606ab228a24bd4a0274f8e3156123710a59f2aa
This is the main repository containing Monogon's public source code, including Metropolis.
We assume a Fedora host system provisioned using rW, and IntelliJ as the IDE.
For better reproducibility, all builds are executed in containers.
Spinning up: scripts/create_container.sh
Spinning down: scripts/destroy_container.sh
Running commands: scripts/run_in_container.sh <...>
Using bazel using a wrapper script: scripts/bin/bazel <...>
(add to your local $PATH for convenience)
This repository is compatible with the IntelliJ Bazel plugin. All commands run inside the container, and necessary paths are mapped into the container.
The following steps are necessary:
Install Google's Bazel plugin in IntelliJ.
Add the absolute path to your ~/.cache/bazel-nxt
folder to your idea64.vmoptions
(Help → Edit Custom VM Options) and restart IntelliJ:
-Dbazel.bep.path=/home/leopold/.cache/bazel-nxt
Set "Bazel Binary Location" in Other Settings → Bazel Settings to the absolute path of scripts/bin/bazel
. This is a wrapper that will execute Bazel inside the container.
Use File → Import Bazel project... to create a new project from .bazelproject
.
After running the first sync, everything should now resolve in the IDE, including generated code.
It's strongly recommend to use our project presets for file watchers and other IDE features. Run this command and re-open the project in order to install them:
bazel run intellij/localconfig $(pwd)
Launch the node:
bazel run //:launch
Run a kubectl command:
bazel run //metropolis/cli/dbg -- kubectl describe