Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5ef0d5b
chore(core): improve build and add libswtpm
universal-itengineer May 28, 2025
fe1623b
use ModuleNamePrefix for images
universal-itengineer Jun 9, 2025
33a1f65
use instead include
universal-itengineer Jun 9, 2025
55f642f
add rm git to src-artifact
universal-itengineer Jun 11, 2025
3a1d511
gnutls add rm git, upd submodules
universal-itengineer Jun 11, 2025
35250ec
add src
universal-itengineer Jun 11, 2025
0e25354
fix import images
universal-itengineer Jun 11, 2025
0e86e38
delete helpers template
universal-itengineer Jun 11, 2025
bbc5f04
back versions template
universal-itengineer Jun 11, 2025
f3b235a
glib2 coment git rm
universal-itengineer Jun 11, 2025
122f282
fix libbsd
universal-itengineer Jun 11, 2025
cea77c3
comment rm -rf git folder
universal-itengineer Jun 11, 2025
9a85412
add .ModuleNamePrefix to pkgs
universal-itengineer Jun 11, 2025
ec070de
++ fix typos in image names
diafour Jun 23, 2025
289d125
++ support fallback to global dockercfg if module is included as embe…
diafour Jun 23, 2025
2c2e21f
++ virtualization-artifact: use /src directory for sources instead of…
diafour Jun 26, 2025
0e18ae7
++ dvcr-artifact: add install stage with go mod download
diafour Jun 26, 2025
37d6605
++ edk2: add submodule url rewrite for berkeley-softfloat-3, sort com…
diafour Jun 26, 2025
e743a3d
++ remove GO111MODULE=on (I just need a new commit to debug submodule…
diafour Jun 26, 2025
9b78568
++ forgot ModulePathPrefix
diafour Jun 26, 2025
1d1f40a
++ svace builder: use builder/src to download sources
diafour Jun 27, 2025
fde43d8
++ edk2, qemu, gnutls, libvirt: replace set-url with git -c url.inste…
diafour Jun 30, 2025
67636de
++ sync with main: use svace builder from deckhouse base images
diafour Jul 2, 2025
68859dd
++ fixes to download sources via proxy
diafour Jul 2, 2025
3092e97
++ exclude "build only" non-final images
diafour Jul 4, 2025
8f29ab9
++ defines should not be inside ifs
diafour Jul 4, 2025
feebe0d
++ move all declarations to the top
diafour Jul 4, 2025
5c0275f
++ last fixes
diafour Jul 4, 2025
56eac1a
++ use more recent builder/alt
diafour Jul 4, 2025
7d292b4
src-artifact size reduse
alexey-gavrilov-flant Jul 7, 2025
3a3c450
item 17597
alexey-gavrilov-flant Jul 7, 2025
78cffeb
item 3899
alexey-gavrilov-flant Jul 7, 2025
7604342
item 30590
alexey-gavrilov-flant Jul 7, 2025
59d247c
item 12060
alexey-gavrilov-flant Jul 7, 2025
9d6e2d0
item 183
alexey-gavrilov-flant Jul 7, 2025
cd4b577
item 4667
alexey-gavrilov-flant Jul 7, 2025
baee9f1
item 10294
alexey-gavrilov-flant Jul 7, 2025
9cf4a2e
item 25451
alexey-gavrilov-flant Jul 7, 2025
1e96ec3
item 10266
alexey-gavrilov-flant Jul 7, 2025
7670cea
item 7139
alexey-gavrilov-flant Jul 7, 2025
6a5d700
item 27454
alexey-gavrilov-flant Jul 7, 2025
337ffea
item 31766
alexey-gavrilov-flant Jul 7, 2025
2261afd
item 18472
alexey-gavrilov-flant Jul 7, 2025
bdd36d5
item 8958
alexey-gavrilov-flant Jul 7, 2025
ff9b204
item 20275
alexey-gavrilov-flant Jul 7, 2025
23f5b66
item 25833
alexey-gavrilov-flant Jul 7, 2025
6e6f79f
item 14518
alexey-gavrilov-flant Jul 7, 2025
d40fe1b
item 2975
alexey-gavrilov-flant Jul 7, 2025
4bf83b6
item 27598
alexey-gavrilov-flant Jul 7, 2025
4320e33
item 7850
alexey-gavrilov-flant Jul 7, 2025
9b7f14c
item 30140
alexey-gavrilov-flant Jul 7, 2025
8e5c403
item 12488
alexey-gavrilov-flant Jul 7, 2025
8890b2a
item 18691
alexey-gavrilov-flant Jul 7, 2025
1ae968f
item 25042
alexey-gavrilov-flant Jul 7, 2025
8220d06
item 28823
alexey-gavrilov-flant Jul 7, 2025
64f8601
item 22054
alexey-gavrilov-flant Jul 7, 2025
a53e4be
item 5799
alexey-gavrilov-flant Jul 7, 2025
37c0405
item 28727
alexey-gavrilov-flant Jul 7, 2025
4810bab
item 16993
alexey-gavrilov-flant Jul 7, 2025
1ceae58
item 3654
alexey-gavrilov-flant Jul 7, 2025
0db9f24
item 14953
alexey-gavrilov-flant Jul 7, 2025
b24c203
item 22823
alexey-gavrilov-flant Jul 7, 2025
94fcbcb
1
alexey-gavrilov-flant Jul 7, 2025
d82b252
item 25610
alexey-gavrilov-flant Jul 8, 2025
2ccdb84
item 4821
alexey-gavrilov-flant Jul 8, 2025
7fd5c59
item 7252
alexey-gavrilov-flant Jul 8, 2025
8d30ee9
item 14541
alexey-gavrilov-flant Jul 8, 2025
33a5b92
item 14242
alexey-gavrilov-flant Jul 8, 2025
6accf77
item 21649
alexey-gavrilov-flant Jul 8, 2025
9b47908
add findmnt for fix hotplug fo sc like type file
universal-itengineer Jul 9, 2025
f517da1
chore(core): fix TLS in audit controller (#1262)
danilrwx Jul 21, 2025
f1ff5dc
chore(core): add cluster dns in cert for audit controller (#1269)
danilrwx Jul 22, 2025
a29d228
fix(core): audit controller nil pointer (#1272)
danilrwx Jul 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .werf/consts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Edition module settings
{{- $_ := set . "MODULE_EDITION" (env "MODULE_EDITION" "EE") }}

# Component versions
{{- $_ := set . "Version" dict -}}
{{- $_ := set . "Package" dict -}}
{{- $versions_path := "/component_versions/version_map.yml" -}}

{{- if .ModuleDir -}}
{{- $versions_path = (printf "%s%s" (trimPrefix "/" .ModuleDir ) $versions_path) -}}
{{- end -}}

{{- $versions_ctx := (.Files.Get $versions_path | fromYaml) -}}

{{- range $k, $v := $versions_ctx.firmware -}}
{{- $_ := set $.Version $k $v -}}
{{- end -}}

{{- range $k, $v := $versions_ctx.package -}}
{{- $_ := set $.Package $k $v -}}
{{- end -}}
2 changes: 1 addition & 1 deletion .werf/defines/packages-clean.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
{{- define "debian packages clean" }}
- apt-get clean
- find /var/lib/apt/ /var/cache/apt/ -type f -delete
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion .werf/defines/parse-base-images-map.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ image: {{ $k }}
from: {{ $v }}
final: false
{{- end }}
{{- end }}
{{- end }}
85 changes: 41 additions & 44 deletions .werf/images.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,57 @@
# Common dirs
{{/* # Common dirs */}}
{{- define "module_image_template" }}

{{- if eq .ImageInstructionType "Dockerfile" }}
---
image: images/{{ .ImageName }}
context: images/{{ .ImageName }}
dockerfile: Dockerfile
{{- else }}
{{- tpl .ImageBuildData . | nindent 0 }}
{{- tpl .ImageBuildData . }}
{{- end }}

{{- end }}

# Context inside folder images

{{/* # Context inside folder images */}}
{{- $Root := . }}

{{ $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }}
{{ $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }}

{{- range $path, $content := $ImagesBuildFiles }}
{{- $ctx := dict }}

{{- if regexMatch "/werf.inc.yaml$" $path }}
{{- $_ := set $ctx "ImageInstructionType" "Stapel" }}
{{- else }}
{{- $_ := set $ctx "ImageInstructionType" "Dockerfile" }}
{{- end }}

{{- $ImageData := $path | split "/" }}

{{- $_ := set $ctx "ImageName" $ImageData._1 }}
{{- $_ := set $ctx "ImageBuildData" $content }}
{{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }}
{{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }}
{{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }}
{{- $_ := set $ctx "Version" $Root.Version }}
{{- $_ := set $ctx "ProjectName" $ctx.ImageName }}
{{- $_ := set $ctx "Commit" $Root.Commit }}
{{- $_ := set $ctx "SVACE_ENABLED" $Root.SVACE_ENABLED }}
{{- $_ := set $ctx "SVACE_ANALYZE_SSH_USER" $Root.SVACE_ANALYZE_SSH_USER }}
{{- $_ := set $ctx "SVACE_ANALYZE_HOST" $Root.SVACE_ANALYZE_HOST }}
{{- $_ := set $ctx "SVACE_IMAGE_SUFFIX" $Root.SVACE_IMAGE_SUFFIX }}

{{- $ctx := dict }}
{{- $_ := set $ctx "ImageInstructionType" "Stapel" }}

{{- $ImageData := regexReplaceAll "^images/([0-9a-z-_]+)/(Dockerfile|werf.inc.yaml)$" $path "${1}#${2}" | split "#" }}

{{- $_ := set $ctx "ImageName" $ImageData._0 }}
{{- $_ := set $ctx "ImagePath" (printf "/images/%s" $ctx.ImageName) }}
{{- $_ := set $ctx "ModuleDir" "/" }}
{{- $_ := set $ctx "ModuleNamePrefix" "" }}
{{- $_ := set $ctx "ImageBuildData" $content }}
{{- $_ := set $ctx "Files" $Root.Files }}
{{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }}
{{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }}
{{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }}
{{- $_ := set $ctx "Version" $Root.Version }}
{{- $_ := set $ctx "Package" $Root.Package }}
{{- $_ := set $ctx "GOPROXY" (env "GOPROXY" "https://proxy.golang.org,direct") }}
{{- $_ := set $ctx "ProjectName" $ctx.ImageName }}
{{- $_ := set $ctx "Commit" $Root.Commit }}
{{- $_ := set $ctx "SVACE_ENABLED" $Root.SVACE_ENABLED }}
{{- $_ := set $ctx "SVACE_ANALYZE_SSH_USER" $Root.SVACE_ANALYZE_SSH_USER }}
{{- $_ := set $ctx "SVACE_ANALYZE_HOST" $Root.SVACE_ANALYZE_HOST }}
{{- $_ := set $ctx "SVACE_IMAGE_SUFFIX" $Root.SVACE_IMAGE_SUFFIX }}


{{- include "module_image_template" $ctx }}

{{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "module_image_template" $ctx) -1 }}
{{- $ImageManifest := $ImageYamlMainfest | fromYaml }}
{{- if $ImageManifest | dig "final" true }}
{{- if $ImageManifest.image }}
{{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }}
{{- end }}
{{- end }}
{{- end }}

{{- include "module_image_template" $ctx }}

{{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "module_image_template" $ctx) -1 }}
{{- $ImageManifest := $ImageYamlMainfest | fromYaml }}

{{- if $ImageManifest | dig "final" true }}

{{- if $ImageManifest.image }}
{{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }}
{{- end }}

{{- end }}

{{- end }}

{{- end }}
{{- end }}
59 changes: 0 additions & 59 deletions .werf/packages.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions base-images/deckhouse_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ base/python: "sha256:bda80f25bbfb09a9e6793a5fcc3a560ebb058ba6618f413a778056951e6
base/python-v3.12.10: "sha256:bda80f25bbfb09a9e6793a5fcc3a560ebb058ba6618f413a778056951e663461" # fromImage: builder/scratch
builder/alpine: "sha256:286e7fddf397a48ed2529f630881876284ff09c84c6dcfce9d982f4e035648cd" # from: alpine:3.20.6
builder/alpine-3.20: "sha256:286e7fddf397a48ed2529f630881876284ff09c84c6dcfce9d982f4e035648cd" # from: alpine:3.20.6
builder/alt: "sha256:7223768d0f8af786c3621de7761075cf6f8f025b3b4bf7edfdceac21038d5fef" # from: registry.altlinux.org/p11/alt:20250321
builder/alt-2025-04-24: "sha256:7223768d0f8af786c3621de7761075cf6f8f025b3b4bf7edfdceac21038d5fef" # from: registry.altlinux.org/p11/alt:20250321
builder/alt: "sha256:ee2b848c440ecbbe0e941bcbc1e7c75001ae05662742a015594edf470e4c5465" # from: registry.altlinux.org/p11/alt:20250321
builder/alt-2025-05-31: "sha256:ee2b848c440ecbbe0e941bcbc1e7c75001ae05662742a015594edf470e4c5465" # from: registry.altlinux.org/p11/alt:20250321
builder/golang-alpine: "sha256:f6f526535fdfcdf869a9e09831beeb3ed0d0eac3076a18840dfbfcd1b069c895" # from: golang:1.24.2-alpine3.20
builder/golang-alpine-1.23: "sha256:68747b189da26bd5bff8f6ec0a9d614940f4d05adcee91ab50b4ee39e335d1c2" # from: golang:1.23.8-alpine3.20
builder/golang-alpine-1.24: "sha256:f6f526535fdfcdf869a9e09831beeb3ed0d0eac3076a18840dfbfcd1b069c895" # from: golang:1.24.2-alpine3.20
Expand Down
4 changes: 2 additions & 2 deletions base-images/virtualization_images.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# REGISTRY_PATH is a special key which is concatenated with other base images
REGISTRY_PATH: "docker.io/"
#REGISTRY_PATH: "docker.io/"

# Digest for image created at 2024-09-20.
BASE_ALT_P11: "alt:p11@sha256:39f03d3bca1a92dc36835c28c2ba2f22ec15257e950b3930e0a3f034466e8dfb"
#BASE_ALT_P11: "alt:p11@sha256:39f03d3bca1a92dc36835c28c2ba2f22ec15257e950b3930e0a3f034466e8dfb"
1 change: 1 addition & 0 deletions component_versions/version_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ package:
dtc: v1.7.2
fuse3: fuse-3.16.2
libgcrypt: libgcrypt-1.10.2
libtpms: 0.10.0
12 changes: 5 additions & 7 deletions images/base-alt-p11-binaries/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ libraries:

{{ $builderDependencies := include "$name" . | fromYaml }}

image: {{ $.ImageName }}
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
final: false
fromImage: BASE_ALT_P11
fromImage: builder/alt
git:
- add: /images/{{ $.ImageName }}
to: /
includePaths:
- relocate_binaries.sh
- add: {{ .ImagePath }}/relocate_binaries.sh
to: /relocate_binaries.sh
shell:
install:
{{- include "alt packages proxy" . | nindent 2 }}
- |
apt-get install -y \
{{ $builderDependencies.packages | join " " }} \
{{ $builderDependencies.libraries | join " " }}
{{- include "alt packages clean" . | nindent 2 }}
{{- include "alt packages clean" . | nindent 2 }}
4 changes: 2 additions & 2 deletions images/base-alt-p11/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
image: {{ $.ImageName }}
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
final: false
fromImage: BASE_ALT_P11
fromImage: builder/alt
shell:
setup:
# Create nonroot-user group and user.
Expand Down
13 changes: 7 additions & 6 deletions images/bounder/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
image: {{ $.ImageName }}
fromImage: distroless
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
fromImage: {{ .ModuleNamePrefix }}distroless
import:
- image: {{ $.ImageName }}-cbuilder
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder
add: /bins
to: /usr/local/bin
after: setup
imageSpec:
config:
cmd: ["hello_bounder"]
---
image: {{ $.ImageName }}-cbuilder
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder
final: false
fromImage: builder/golang-bookworm-1.23
git:
- add: /images/{{ $.ImageName }}/static_binaries
to: /
- add: {{ .ImagePath }}/static_binaries
to: /static_binaries
stageDependencies:
install:
- '*.c'
Expand All @@ -26,6 +26,7 @@ shell:
{{- include "debian packages clean" . | nindent 2 }}
install:
- |
cd /static_binaries
echo "Building simple app that prints hello cdi"
mkdir -p /bins
musl-gcc -static -Os -o /bins/hello_bounder hello_bounder.c
Expand Down
6 changes: 3 additions & 3 deletions images/cdi-apiserver/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
image: {{ $.ImageName }}
fromImage: distroless
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
fromImage: {{ .ModuleNamePrefix }}distroless
import:
- image: cdi-artifact
- image: {{ .ModuleNamePrefix }}cdi-artifact
add: /cdi-binaries
to: /usr/bin
before: setup
Expand Down
48 changes: 39 additions & 9 deletions images/cdi-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,58 @@
{{- $version := "v1.60.3-v12n.1" }}
{{- $gitRepoUrl := "deckhouse/3p-containerized-data-importer" }}

image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
final: false
fromImage: builder/src
git:
- add: {{ .ImagePath }}
to: /src
stageDependencies:
install:
- '**/*'
excludePaths:
- patches/README.md
secrets:
- id: SOURCE_REPO
value: {{ $.SOURCE_REPO }}
shell:
install:
- |
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config
echo "Git clone CDI repository..."
git clone --depth 1 --branch {{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /src/containerized-data-importer

rm -rf /src/containerized-data-importer/.git

---
image: {{ $.ImageName }}
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
final: false
fromImage: builder/golang-bookworm-1.23
mount:
- fromPath: ~/go-pkg-cache
to: /go/pkg
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
add: /src/containerized-data-importer
to: /containerized-data-importer
before: install
secrets:
- id: SOURCE_REPO
value: {{ $.SOURCE_REPO }}
- id: GOPROXY
value: {{ .GOPROXY }}
shell:
beforeInstall:
{{- include "alt packages proxy" . | nindent 2 }}
{{- include "debian packages proxy" . | nindent 2 }}
- |
apt-get install --yes libnbd-dev
{{- include "alt packages clean" . | nindent 2 }}
{{- include "debian packages clean" . | nindent 2 }}

install:
- |
export GOPROXY=$(cat /run/secrets/GOPROXY)
mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config

echo "Git clone CDI repository..."
git config --global --add advice.detachedHead false
git clone --depth 1 --branch {{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /containerized-data-importer

- |
echo Download Go modules.
cd /containerized-data-importer
Expand Down Expand Up @@ -83,12 +110,14 @@ shell:
- ls -la /cdi-binaries

---
image: {{ $.ImageName }}-cbuilder
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder
final: false
fromImage: builder/golang-bookworm-1.23
git:
- add: /images/{{ $.ImageName }}/static_binaries
- add: {{ .ImagePath }}
to: /
includePaths:
- static_binaries
stageDependencies:
install:
- '*.c'
Expand All @@ -99,6 +128,7 @@ shell:
apt-get install --yes musl-dev musl-tools
{{- include "debian packages clean" . | nindent 2 }}
- |
cd /static_binaries
echo "Building simple app that prints hello cdi"
mkdir -p /bins
musl-gcc -static -Os -o /bins/hello hello.c
Expand Down
Loading
Loading