-
Notifications
You must be signed in to change notification settings - Fork 2
chore(core): Add static mount points #1343
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
Open
YuryLysov
wants to merge
4
commits into
main
Choose a base branch
from
mount-points
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
**/*.git | ||
**/.svn | ||
**/.hg | ||
images/**/mount-points.yaml | ||
**/werf*.yaml | ||
**/werf*.yml | ||
.werf/** | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* | ||
|
||
Template to bake mount points in the image. These static mount points | ||
are required so containerd can start a container with image integrity check. | ||
|
||
Problem: each directory specified in volumeMounts items should exist | ||
in image, containerd is unable to create mount point for us when | ||
integrity check is enabled. | ||
|
||
Solution: define all possible mount points in mount-points.yaml file and | ||
include this template in git section of the werf.inc.yaml. | ||
|
||
*/}} | ||
{{/* NOTE: Keep in sync with version in Deckhouse CSE */}} | ||
{{- define "image mount points" }} | ||
{{- $mountPoints := ($.Files.Get (printf "images/%s/mount-points.yaml" $.ImageName) | fromYaml) }} | ||
{{- $context := . }} | ||
{{- range $v := $mountPoints.dirs }} | ||
- add: /tools/mounts/mountdir | ||
to: {{ $v | trimSuffix "/" }} | ||
stageDependencies: | ||
install: | ||
- "**/*" | ||
{{- end }} | ||
{{- range $v := $mountPoints.files }} | ||
- add: /tools/mounts/mountfile | ||
to: {{ $v }} | ||
stageDependencies: | ||
install: | ||
- "**/*" | ||
{{- end }} | ||
{{- end }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
# Create dirs in /run, as /var/run is a symlink to /run. | ||
- /run/certs/cdi-apiserver-signer-bundle | ||
- /run/certs/cdi-apiserver-server-cert | ||
- /kubeconfig.local |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# See https://github.com/deckhouse/3p-containerized-data-importer/blob/80d763d788e06b3decaf22e4762076cec64582b3/pkg/controller/clone-controller.go#L699 | ||
|
||
dirs: | ||
# Create dirs in /run, as /var/run is a symlink to /run. | ||
- /run/cdi/clone/source |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# Some volume mounts are ignored: | ||
# - /tmp - already in the 'distroless' base image. | ||
|
||
dirs: | ||
# Create dirs in /run, as /var/run is a symlink to /run. | ||
- /run/cdi/token/keys | ||
- /run/certs/cdi-uploadserver-signer | ||
- /run/certs/cdi-uploadserver-client-signer | ||
- /run/ca-bundle/cdi-uploadserver-signer-bundle | ||
- /run/ca-bundle/cdi-uploadserver-client-signer-bundle | ||
- /kubeconfig.local |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# See https://github.com/deckhouse/3p-containerized-data-importer/blob/d5fa5124b8a645521843814fffecdf385b74b379/pkg/controller/import-controller.go#L962 | ||
# | ||
# Some volume mounts are ignored: | ||
# - /extraheaders - Etra headers not implemented in virtualization-controller. | ||
# - /google - No support for GCS data source in VirtualImage. | ||
# - /tmp - already in the 'distroless' base image. | ||
|
||
dirs: | ||
- /certs | ||
- /data | ||
- /opt | ||
- /proxycerts | ||
- /scratch | ||
- /shared | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /kubeconfig.local |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /dvcr-src-auth | ||
- /dvcr-auth | ||
- /certs | ||
- /proxycerts |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /dvcr-auth |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /etc/docker/registry | ||
- /etc/ssl/docker | ||
- /var/lib/registry | ||
- /auth |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /etc/virt-operator/certificates | ||
- /etc/virt-api/certificates | ||
# Create dirs in /run, as /var/run is a symlink to /run. | ||
- /run/certs/cdi-apiserver-server-cert |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# Some volume mounts are ignored: | ||
# - /tmp - already in the 'distroless' base image. | ||
|
||
dirs: | ||
- /etc/virt-api/certificates | ||
- /etc/virt-handler/clientcertificates | ||
- /profile-data | ||
- /kubeconfig.local |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /etc/virt-controller/certificates | ||
- /etc/virt-controller/exportca | ||
- /profile-data | ||
- /kubeconfig.local |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# Some volume mounts are ignored: | ||
# - /tmp - already in the 'distroless' base image. | ||
|
||
dirs: | ||
- /etc/virt-handler/clientcertificates | ||
- /etc/virt-handler/servercertificates | ||
- /kubeconfig.local | ||
- /profile-data | ||
- /etc/podinfo | ||
- /pods | ||
- /var/lib/kubevirt | ||
- /var/lib/kubelet/device-plugins | ||
- /var/lib/kubelet/pods | ||
- /var/lib/kubevirt-node-labeller | ||
# Create dirs in /run, as /var/run is a symlink to /run. | ||
- /run/kubevirt | ||
- /run/kubevirt-libvirt-runtimes | ||
- /run/kubevirt-private | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
# | ||
# See https://github.com/deckhouse/3p-kubevirt/blob/8aed630/pkg/virt-controller/services/rendervolumes.go | ||
# | ||
# Some volume mounts are ignored: | ||
# - /tmp - already in the 'distroless' base image. | ||
# - /var/run - already in the 'distroless' base image. | ||
# No need to pre-create a plethora of /var/run descendants, | ||
# as deckhouse/3p-kubevirt is patched to mount /var/run as emptyDir: | ||
# - /var/run/libvirt | ||
# - /var/run/kubevirt-ephemeral-disks | ||
# - /var/run/kubevirt-hooks | ||
# - /var/run/kubevirt-private | ||
# - /var/run/kubevirt-private/sysprep/<volname> | ||
# - /var/run/kubevirt-private/secret/cloudinit/userdata | ||
# - /var/run/kubevirt-private/secret/cloudinit/userData | ||
# - /var/run/kubevirt-private/secret/cloudinit/networkdata | ||
# - /var/run/kubevirt-private/secret/cloudinit/networkData | ||
# - /var/run/kubevirt-private/config-map | ||
# - /var/run/kubevirt-private/downwardapi | ||
# - /var/run/kubevirt-private/downwardapi-disks | ||
# - /var/run/kubevirt-private/vmi-disks | ||
# - /var/run/kubevirt-private/libvirt | ||
# - /var/run/kubevirt-private/libvirt/qemu | ||
# - /var/run/kubevirt-private/libvirt/qemu/nvram | ||
# - /var/run/kubevirt-private/libvirt/qemu/swtpm | ||
# - /var/run/kubevirt-private/var/lib/swtpm-localca | ||
# - There are more dirs in /var/run/kubevirt-private/ | ||
# - /var/run/kubevirt | ||
# - /var/run/kubevirt/container-disks | ||
# - /var/run/kubevirt/sockets | ||
# - /var/run/kubevirt/hotplug-disks | ||
# - /var/run/kubevirt/virtiofs-containers | ||
# /var/log is mounted as emptyDir too: | ||
# - /var/log/libvirt | ||
|
||
dirs: | ||
- /etc/libvirt | ||
- /etc/podinfo | ||
- /var/cache/libvirt | ||
- /var/lib/libvirt | ||
- /var/lib/libvirt/swtpm | ||
- /var/lib/libvirt/qemu/nvram | ||
- /var/lib/kubevirt-node-labeller | ||
- /var/lib/swtpm-localca | ||
- /var/log | ||
- /path # For hot-plugged disks, used in "hp Pods". | ||
- /init/usr/bin # For attaching images as "container disks". |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /etc/virt-operator/certificates | ||
- /profile-data | ||
- /kubeconfig.local |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# A list of pre-created mount points for containerd strict mode. | ||
|
||
dirs: | ||
- /etc/virtualization-api/certificates | ||
- /etc/virtualization-api-proxy/certificates | ||
- /etc/virt-api/certificates |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.