-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Prepare to CSE 1.67 (#60)
Signed-off-by: Pavel Karpov <pavel.karpov@flant.com> Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com> Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com> Co-authored-by: v.oleynikov <vasily.oleynikov@flant.com> Co-authored-by: Aleksandr Zimin <alexandr.zimin@flant.com>
- Loading branch information
1 parent
560829f
commit 92edf4a
Showing
22 changed files
with
616 additions
and
176 deletions.
There are no files selected for viewing
This file contains 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 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 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,15 @@ | ||
# base images | ||
{{- $_ := set . "BASE_GOLANG_1_23" "registry.deckhouse.io/base_images/golang:1.23.4-bookworm@sha256:a9147a48ac5e925a66764afae7cf4b1cfd37a6e94ad7519eca74c1fd8993ae45" }} | ||
{{- $_ := set . "BASE_SCRATCH" "registry.deckhouse.io/base_images/scratch@sha256:653ae76965c98c8cd1c8c9ff7725316d2983986f896655b30e0f44d2f8b2dd7e" }} | ||
{{- $_ := set . "BASE_ALT_P11" "registry.deckhouse.io/base_images/alt:p11@sha256:e47d84424485d3674240cb2f67d3a1801b37d327e6d1eb8cc8d01be8ed3b34f3" }} | ||
|
||
# component versions | ||
{{- $versions := dict }} | ||
{{- $_ := set $versions "CSI_DRIVER_NFS" "v4.7.0" }} | ||
{{- $_ := set $versions "NFS_UTILS" "nfs-utils-2-7-1" }} # must match the nfs-utils package from BASE_ALT_P11 | ||
{{- $_ := set $ "VERSIONS" $versions }} | ||
|
||
# custom constants | ||
{{- $_ := set $ "DEV_PACKAGES" "make automake pkg-config gcc libtool git curl" }} | ||
{{- $_ := set $ "DECKHOUSE_UID_GID" "64535" }} | ||
{{- $_ := set $ "ALT_CLEANUP_CMD" "rm -rf /var/lib/apt/lists/* /var/cache/apt/* && mkdir -p /var/lib/apt/lists/partial /var/cache/apt/archives/partial" }} |
This file contains 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 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 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 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 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 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 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 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,36 +1,79 @@ | ||
{{- $_ := set . "BASE_GOLANG" "registry.deckhouse.io/base_images/golang:1.22.6-bullseye@sha256:260918a3795372a6d33225d361fe5349723be9667de865a23411b50fbcc76c5a" }} | ||
{{- $_ := set . "BASE_SCRATCH" "registry.deckhouse.io/base_images/scratch@sha256:b054705fcc9f2205777d80a558d920c0b4209efdc3163c22b5bfcb5dda1db5fc" }} | ||
|
||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.BASE_GOLANG }} | ||
# do not remove this image: used in external audits (DKP CSE) | ||
image: {{ $.ImageName }}-src-artifact | ||
from: {{ $.Root.BASE_ALT_P11 }} | ||
final: false | ||
|
||
git: | ||
- add: /images/controller/src | ||
- add: / | ||
to: /src | ||
includePaths: | ||
- api | ||
- images/{{ $.ImageName }}/src | ||
stageDependencies: | ||
setup: | ||
- "**/*" | ||
install: | ||
- '**/*' | ||
shell: | ||
install: | ||
- rm -rf /src/.git | ||
|
||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
final: false | ||
import: | ||
- image: {{ $.ImageName }}-src-artifact | ||
add: /src | ||
to: /src | ||
before: setup | ||
mount: | ||
- fromPath: ~/go-pkg-cache | ||
to: /go/pkg | ||
shell: | ||
setup: | ||
- cd /src/cmd | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o controller | ||
- mv controller /controller | ||
- cd /src/images/{{ $.ImageName }}/src/cmd | ||
- export CGO_ENABLED=0 GOOS=linux GOARCH=amd64 | ||
- go build -ldflags="-s -w" -o /controller | ||
- chmod +x /controller | ||
|
||
--- | ||
image: {{ $.ImageName }} | ||
from: {{ $.BASE_SCRATCH }} | ||
image: {{ $.ImageName }}-distroless-artifact | ||
from: {{ $.Root.BASE_ALT_P11 }} | ||
final: false | ||
shell: | ||
beforeInstall: | ||
- apt-get update | ||
- apt-get install -y openssl libtirpc | ||
- {{ $.Root.ALT_CLEANUP_CMD }} | ||
install: | ||
- mkdir -p /relocate/bin /relocate/sbin /relocate/etc /relocate/var/lib/ssl /relocate/usr/bin /relocate/usr/sbin /relocate/usr/share | ||
- cp -pr /tmp /relocate | ||
- cp -pr /etc/passwd /etc/group /etc/hostname /etc/hosts /etc/shadow /etc/protocols /etc/services /etc/nsswitch.conf /etc/netconfig /relocate/etc | ||
- cp -pr /usr/share/ca-certificates /relocate/usr/share | ||
- cp -pr /usr/share/zoneinfo /relocate/usr/share | ||
- cp -pr /var/lib/ssl/cert.pem /relocate/var/lib/ssl | ||
- cp -pr /var/lib/ssl/certs /relocate/var/lib/ssl | ||
- echo "deckhouse:x:{{ $.Root.DECKHOUSE_UID_GID }}:{{ $.Root.DECKHOUSE_UID_GID }}:deckhouse:/:/sbin/nologin" >> /relocate/etc/passwd | ||
- echo "deckhouse:x:{{ $.Root.DECKHOUSE_UID_GID }}:" >> /relocate/etc/group | ||
- echo "deckhouse:!::0:::::" >> /relocate/etc/shadow | ||
|
||
--- | ||
image: {{ $.ImageName }}-distroless | ||
from: {{ $.Root.BASE_SCRATCH }} | ||
final: false | ||
import: | ||
- image: {{ $.ImageName }}-distroless-artifact | ||
add: /relocate | ||
to: / | ||
before: setup | ||
|
||
--- | ||
image: {{ $.ImageName }} | ||
fromImage: {{ $.ImageName }}-distroless | ||
import: | ||
- image: {{ $.ImageName }}-golang-artifact | ||
add: /controller | ||
to: /controller | ||
before: setup | ||
|
||
docker: | ||
ENTRYPOINT: ["/controller"] | ||
USER: deckhouse:deckhouse |
Oops, something went wrong.