-
Notifications
You must be signed in to change notification settings - Fork 0
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 (#98)
Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com> Signed-off-by: Alexey Yakubov <alexey.yakubov@flant.com> Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com> Co-authored-by: Alexey Yakubov <ayakubov@MacBook-Pro-Alexey.local> Co-authored-by: Alexey Yakubov <alexey.yakubov@flant.com> Co-authored-by: Aleksandr Zimin <alexandr.zimin@flant.com>
- Loading branch information
1 parent
95fa34b
commit 5d75d40
Showing
18 changed files
with
478 additions
and
131 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
Binary file not shown.
Binary file not shown.
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,115 @@ | ||
{{- $csiBinaries := "/usr/bin/curl" }} | ||
# Required for external analytics. Do not remove! | ||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
image: {{ $.ImageName }}-src-artifact | ||
from: {{ $.Root.BASE_ALT }} | ||
final: false | ||
|
||
git: | ||
- add: / | ||
to: / | ||
includePaths: | ||
- api | ||
- images/sds-local-volume-controller/src | ||
- add: /images/{{ $.ImageName }}/src | ||
to: /src/images/{{ $.ImageName }}/src | ||
stageDependencies: | ||
install: | ||
- "**/*" | ||
- add: /api | ||
to: /src/api | ||
stageDependencies: | ||
setup: | ||
install: | ||
- "**/*" | ||
|
||
shell: | ||
install: | ||
- echo "src artifact" | ||
|
||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
final: false | ||
|
||
import: | ||
- image: {{ $.ImageName }}-src-artifact | ||
add: /src | ||
to: /src | ||
before: install | ||
|
||
mount: | ||
- fromPath: ~/go-pkg-cache | ||
to: /go/pkg | ||
shell: | ||
setup: | ||
- cd /images/sds-local-volume-controller/src/cmd | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /sds-local-volume-controller | ||
- chmod +x /sds-local-volume-controller | ||
- cd /src/images/{{ $.ImageName }}/src/cmd | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /{{ $.ImageName }} | ||
- chmod +x /{{ $.ImageName }} | ||
|
||
|
||
--- | ||
image: {{ $.ImageName }} | ||
image: {{ $.ImageName }}-binaries-artifact | ||
from: {{ $.Root.BASE_ALT }} | ||
final: false | ||
|
||
git: | ||
- add: /tools/dev_images/additional_tools/binary_replace.sh | ||
to: /binary_replace.sh | ||
stageDependencies: | ||
install: | ||
- '**/*' | ||
|
||
shell: | ||
install: | ||
- apt-get update | ||
- apt-get -y install glibc-utils mount nfs-utils curl | ||
- rm -rf /var/lib/apt/lists/* /var/cache/apt/* && mkdir -p /var/lib/apt/lists/partial /var/cache/apt/archives/partial | ||
- chmod +x /binary_replace.sh | ||
- /binary_replace.sh -i "{{ $csiBinaries }}" -o /relocate | ||
|
||
--- | ||
image: {{ $.ImageName }}-distroless-artifact | ||
from: {{ $.Root.BASE_ALT }} | ||
final: false | ||
|
||
shell: | ||
install: | ||
- apt-get update | ||
- apt-get -y install ca-certificates tzdata | ||
- mkdir -p /relocate/bin /relocate/sbin /relocate/etc /relocate/etc/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 /relocate/etc | ||
- cp -pr /usr/share/ca-certificates /relocate/usr/share | ||
- cp -pr /usr/share/zoneinfo /relocate/usr/share | ||
# changed from /etc/ssl/* to ALTLinux specific | ||
- cp -pr /etc/pki/tls/cert.pem /relocate/etc/ssl | ||
- cp -pr /etc/pki/tls/certs /relocate/etc/ssl | ||
- echo "deckhouse:x:64535:64535:deckhouse:/:/sbin/nologin" >> /relocate/etc/passwd | ||
- echo "deckhouse:x:64535:" >> /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: install | ||
|
||
--- | ||
image: {{ $.ImageName }} | ||
fromImage: {{ $.ImageName }}-distroless | ||
|
||
import: | ||
- image: {{ $.ImageName }}-golang-artifact | ||
add: /sds-local-volume-controller | ||
to: /sds-local-volume-controller | ||
before: setup | ||
add: /{{ $.ImageName }} | ||
to: /{{ $.ImageName }} | ||
before: install | ||
- image: {{ $.ImageName }}-binaries-artifact | ||
add: /relocate | ||
to: / | ||
before: install | ||
includePaths: | ||
- '**/*' | ||
|
||
docker: | ||
ENTRYPOINT: ["/sds-local-volume-controller"] | ||
ENTRYPOINT: ["/{{ $.ImageName }}"] | ||
USER: deckhouse:deckhouse |
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,45 +1,68 @@ | ||
# Required for external analytics. Do not remove! | ||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
image: {{ $.ImageName }}-src-artifact | ||
from: {{ $.Root.BASE_ALT_P11 }} | ||
final: false | ||
|
||
git: | ||
- add: / | ||
to: / | ||
includePaths: | ||
- api | ||
- images/sds-local-volume-csi/src | ||
- add: /images/{{ $.ImageName }}/src | ||
to: /src/images/{{ $.ImageName }}/src | ||
stageDependencies: | ||
setup: | ||
install: | ||
- "**/*" | ||
- add: /api | ||
to: /src/api | ||
stageDependencies: | ||
install: | ||
- "**/*" | ||
|
||
shell: | ||
install: | ||
- echo "src artifact" | ||
|
||
--- | ||
image: {{ $.ImageName }}-golang-artifact | ||
from: {{ $.Root.BASE_GOLANG_1_23 }} | ||
final: false | ||
|
||
import: | ||
- image: {{ $.ImageName }}-src-artifact | ||
add: /src | ||
to: /src | ||
before: install | ||
|
||
mount: | ||
- fromPath: ~/go-pkg-cache | ||
to: /go/pkg | ||
shell: | ||
setup: | ||
- cd /images/sds-local-volume-csi/src/cmd | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /sds-local-volume-csi | ||
- chmod +x /sds-local-volume-csi | ||
- cd /src/images/{{ $.ImageName }}/src/cmd | ||
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /{{ $.ImageName }} | ||
- chmod +x /{{ $.ImageName }} | ||
|
||
--- | ||
image: {{ $.ImageName }} | ||
from: {{ $.Root.BASE_ALT_P11 }} | ||
|
||
import: | ||
- image: {{ $.ImageName }}-golang-artifact | ||
add: /sds-local-volume-csi | ||
to: /sds-local-volume-csi | ||
before: setup | ||
add: /{{ $.ImageName }} | ||
to: /{{ $.ImageName }} | ||
before: install | ||
|
||
shell: | ||
beforeInstall: | ||
- export DEBIAN_FRONTEND=noninteractive | ||
- apt-get update | ||
- apt-get install -y curl | ||
- | | ||
apt-get update \ | ||
&& apt-get -y install lvm2 e2fsprogs xfsprogs \ | ||
apt-get -y install lvm2 e2fsprogs xfsprogs \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
- echo "deckhouse:x:64535:64535:deckhouse:/:/sbin/nologin" >> /etc/passwd | ||
- echo "deckhouse:x:64535:" >> /etc/group | ||
- echo "deckhouse:!::0:::::" >> /etc/shadow | ||
|
||
docker: | ||
ENTRYPOINT: ["/sds-local-volume-csi"] | ||
ENTRYPOINT: ["/{{ $.ImageName }}"] | ||
USER: deckhouse:deckhouse |
Oops, something went wrong.