Skip to content
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

[feature] Discovery storage network #115

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .werf/consts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# base images
{{- $_ := set $ "BASE_ALPINE_DEV" "registry.deckhouse.io/base_images/dev-alpine:3.16.3@sha256:c706fa83cc129079e430480369a3f062b8178cac9ec89266ebab753a574aca8e" }}
{{- $_ := set $ "BASE_ALT_DEV" "registry.deckhouse.ru/base_images/dev-alt:p10@sha256:76e6e163fa982f03468166203488b569e6d9fc10855d6a259c662706436cdcad" }}
{{- $_ := set $ "BASE_GOLANG_1_22" "registry.deckhouse.io/base_images/golang:1.22.7-bullseye@sha256:e5dc67bf84590c008338a0e30f56a6ed2092a38e0d2895c797dd501db73a2330" }}
{{- $_ := set $ "BASE_SCRATCH" "registry.deckhouse.io/base_images/scratch@sha256:653ae76965c98c8cd1c8c9ff7725316d2983986f896655b30e0f44d2f8b2dd7e" }}


# component versions
{{- $versions := dict }}
{{- $_ := set $versions "UTIL_LINUX" "2.39.3" }}
{{- $_ := set $versions "LVM2" "d786a8f820d54ce87a919e6af5426c333c173b11" }}

{{- $_ := set $ "VERSIONS" $versions }}


# custom constants
2 changes: 1 addition & 1 deletion .werf/images.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }}

{{- range $path, $content := $ImagesBuildFiles }}
{{ $ctx := (dict "ImageName" ($path | split "/")._1) }}
{{ $ctx := (dict "ImageName" ($path | split "/")._1 "Root" $ "Versions" $.VERSIONS) }}
---
{{- /* For Dockerfile just render it from the folder. */ -}}
{{- if not (regexMatch "/werf.inc.yaml$" $path) }}
Expand Down
3 changes: 2 additions & 1 deletion .werf/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Release image, stored in your.registry.io/modules/<module-name>/release:<semver>
---
artifact: release-channel-version-artifact
image: release-channel-version-artifact
final: false
from: registry.deckhouse.io/base_images/alpine:3.16.3
shell:
beforeInstall:
Expand Down
16 changes: 5 additions & 11 deletions images/agent/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{{- $_ := set . "BASE_GOLANG" "registry.deckhouse.io/base_images/golang:1.22.8-alpine@sha256:54bb7313917c733191a079ccae2e52bd3b80664e46c7879efa06513d4221d804" }}
{{- $_ := set . "BASE_SCRATCH" "registry.deckhouse.ru/base_images/scratch@sha256:b054705fcc9f2205777d80a558d920c0b4209efdc3163c22b5bfcb5dda1db5fc" }}
{{- $_ := set . "BASE_ALPINE_DEV" "registry.deckhouse.ru/base_images/dev-alpine:3.16.3@sha256:c706fa83cc129079e430480369a3f062b8178cac9ec89266ebab753a574aca8e" }}
{{- $_ := set . "BASE_ALT_DEV" "registry.deckhouse.ru/base_images/dev-alt:p10@sha256:76e6e163fa982f03468166203488b569e6d9fc10855d6a259c662706436cdcad" }}

{{ $binaries := "/opt/deckhouse/sds/lib/libblkid.so.1 /opt/deckhouse/sds/lib/libmount.so.1 /opt/deckhouse/sds/lib/libsmartcols.so.1 /opt/deckhouse/sds/bin/nsenter.static /opt/deckhouse/sds/lib/x86_64-linux-gnu/libudev.so.1 /opt/deckhouse/sds/lib/x86_64-linux-gnu/libcap.so.2 ld-linux-x86-64.so.2 /opt/deckhouse/sds/bin/lsblk.dynamic" }}
{{ $version := "2.39.3" }}
---
image: {{ $.ImageName }}-binaries-artifact
from: {{ $.BASE_ALT_DEV }}
from: {{ $.Root.BASE_ALT_DEV }}
final: false

shell:
Expand All @@ -32,7 +26,7 @@ shell:
- cd /
- git clone {{ env "SOURCE_REPO" }}/util-linux/util-linux.git
- cd /util-linux
- git checkout v{{ $version }}
- git checkout v{{ $.Versions.UTIL_LINUX }}
- ./autogen.sh
- ./configure LDFLAGS="-static" --enable-static-programs -disable-all-programs --enable-nsenter
- make install-strip
Expand All @@ -49,7 +43,7 @@ shell:

---
image: {{ $.ImageName }}-golang-artifact
from: {{ $.BASE_GOLANG }}
from: {{ $.Root.BASE_GOLANG_1_22 }}
final: false

git:
Expand All @@ -70,7 +64,7 @@ shell:

---
image: {{ $.ImageName }}-distroless-artifact
from: {{ $.BASE_ALPINE_DEV }}
from: {{ $.Root.BASE_ALPINE_DEV }}
final: false

shell:
Expand All @@ -88,7 +82,7 @@ shell:

---
image: {{ $.ImageName }}-distroless
from: {{ $.BASE_SCRATCH }}
from: {{ $.Root.BASE_SCRATCH }}
final: false

import:
Expand Down
4 changes: 2 additions & 2 deletions images/sds-health-watcher-controller/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

---
image: {{ $.ImageName }}-golang-artifact
from: {{ $.BASE_GOLANG }}
from: {{ $.Root.BASE_GOLANG_1_22 }}
final: false

git:
Expand All @@ -26,7 +26,7 @@ shell:

---
image: {{ $.ImageName }}
from: {{ $.BASE_SCRATCH }}
from: {{ $.Root.BASE_SCRATCH }}

import:
- image: {{ $.ImageName }}-golang-artifact
Expand Down
16 changes: 5 additions & 11 deletions images/sds-utils-installer/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{{- $_ := set . "BASE_GOLANG" "registry.deckhouse.io/base_images/golang:1.22.8-alpine@sha256:54bb7313917c733191a079ccae2e52bd3b80664e46c7879efa06513d4221d804" }}
{{- $_ := set . "BASE_SCRATCH" "registry.deckhouse.ru/base_images/scratch@sha256:b054705fcc9f2205777d80a558d920c0b4209efdc3163c22b5bfcb5dda1db5fc" }}
{{- $_ := set . "BASE_ALPINE_DEV" "registry.deckhouse.ru/base_images/dev-alpine:3.16.3@sha256:c706fa83cc129079e430480369a3f062b8178cac9ec89266ebab753a574aca8e" }}
{{- $_ := set . "BASE_ALT_DEV" "registry.deckhouse.ru/base_images/dev-alt:p10@sha256:76e6e163fa982f03468166203488b569e6d9fc10855d6a259c662706436cdcad" }}

{{ $binaries := "/sds-utils/bin/lvm.static" }}
{{ $version := "d786a8f820d54ce87a919e6af5426c333c173b11" }}
---
image: {{ $.ImageName }}-binaries-artifact
from: {{ $.BASE_ALT_DEV }}
from: {{ $.Root.BASE_ALT_DEV }}
final: false

shell:
Expand All @@ -28,7 +22,7 @@ shell:
- cd /
- git clone {{ env "SOURCE_REPO" }}/lvmteam/lvm2.git
- cd /lvm2
- git checkout {{ $version }}
- git checkout {{ $.Versions.LVM2 }}
- ./configure --enable-static_link --disable-silent-rules --disable-readline --enable-blkid_wiping --build=x86_64-linux-gnu
- make
- mkdir -p /sds-utils/bin/
Expand All @@ -37,7 +31,7 @@ shell:

---
image: {{ $.ImageName }}-golang-artifact
from: {{ $.BASE_GOLANG }}
from: {{ $.Root.BASE_GOLANG_1_22 }}
final: false

git:
Expand All @@ -55,7 +49,7 @@ shell:

---
image: {{ $.ImageName }}-distroless-artifact
from: {{ $.BASE_ALPINE_DEV }}
from: {{ $.Root.BASE_ALPINE_DEV }}
final: false

shell:
Expand All @@ -73,7 +67,7 @@ shell:

---
image: {{ $.ImageName }}-distroless
from: {{ $.BASE_SCRATCH }}
from: {{ $.Root.BASE_SCRATCH }}
final: false

import:
Expand Down
65 changes: 65 additions & 0 deletions images/storage-network-discoverer/src/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
module storage-network-controller

go 1.22.7

require (
github.com/go-logr/logr v1.4.2
github.com/square/exit v1.1.0
k8s.io/api v0.31.0
k8s.io/apimachinery v0.31.0 // indirect
k8s.io/client-go v0.31.0
k8s.io/klog/v2 v2.130.1
sigs.k8s.io/controller-runtime v0.19.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.31.0 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading
Loading