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

[internal] Prepare to CSE 1.67 #30

Merged
merged 46 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
adf0f8d
Bump lib-helm version
duckhawk Jan 9, 2025
e509797
Add src artifact
duckhawk Jan 9, 2025
11593ef
Fix
duckhawk Jan 9, 2025
4efb8e0
Fix
duckhawk Jan 9, 2025
e306bbe
Fix
duckhawk Jan 9, 2025
82363a5
Fix
duckhawk Jan 9, 2025
ed4d3e6
Fix
duckhawk Jan 9, 2025
f24184d
Fix
duckhawk Jan 9, 2025
6c22df1
Fix
duckhawk Jan 9, 2025
a8cf31a
Fix
duckhawk Jan 9, 2025
214aec4
Fix
duckhawk Jan 10, 2025
22f016f
Fix
duckhawk Jan 10, 2025
92894be
Fix
duckhawk Jan 10, 2025
693e7a0
Fix
duckhawk Jan 10, 2025
652c1bf
Fix
duckhawk Jan 10, 2025
04f064f
Fix
duckhawk Jan 10, 2025
286a130
Fix
duckhawk Jan 10, 2025
aab8ea5
Fix
duckhawk Jan 10, 2025
7135a40
Fix
duckhawk Jan 10, 2025
c259b05
Fix
duckhawk Jan 10, 2025
81abd21
Fix
duckhawk Jan 10, 2025
67ceed2
Fix
duckhawk Jan 10, 2025
fbdb7e1
Fix
duckhawk Jan 10, 2025
8e12151
Fix
duckhawk Jan 10, 2025
c71ee56
Fix
duckhawk Jan 10, 2025
f1b857c
Fix
duckhawk Jan 10, 2025
66f40e4
Fix
duckhawk Jan 10, 2025
db50bd8
Fix
duckhawk Jan 10, 2025
ef53d8f
Fix
duckhawk Jan 10, 2025
4078af9
Fix
duckhawk Jan 10, 2025
6df55b1
Fix
duckhawk Jan 14, 2025
8cc9042
Fix
duckhawk Jan 14, 2025
af6bdff
Fix
duckhawk Jan 14, 2025
94e95a2
Fix
duckhawk Jan 14, 2025
7017e09
Fix
duckhawk Jan 14, 2025
c25c891
Fix
duckhawk Jan 14, 2025
6ff4e88
Fix
duckhawk Jan 14, 2025
ef86bce
Fix
duckhawk Jan 14, 2025
85b242f
Fix
duckhawk Jan 14, 2025
531b164
[werf] disabled DEPRECATION WARNINGS
krpsh123 Jan 14, 2025
10d24d1
fox gomod
AleksZimin Jan 14, 2025
61efd1f
fix gomod with vendor
AleksZimin Jan 14, 2025
a24a250
another fix
AleksZimin Jan 14, 2025
f51fb05
add docker USER
krpsh123 Jan 14, 2025
f80b13c
fix 1: add docker USER
krpsh123 Jan 14, 2025
d7ca85b
fix port and kubeconfig
AleksZimin Jan 14, 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
2 changes: 1 addition & 1 deletion .werf/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
---
image: bundle
from: registry.deckhouse.io/base_images/scratch@sha256:b054705fcc9f2205777d80a558d920c0b4209efdc3163c22b5bfcb5dda1db5fc
fromCacheVersion: "2023-11-27.1"

import:
# Rendering .werf/images-digests.yaml is required!
- image: images-digests
Expand Down
5 changes: 3 additions & 2 deletions .werf/release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release image, stored in your.registry.io/modules/<module-name>/release:<semver>
---
artifact: release-channel-version-artifact
image: release-channel-version-artifact
from: registry.deckhouse.io/base_images/alpine:3.16.3
final: false
shell:
beforeInstall:
- apk add --no-cache curl
Expand All @@ -14,7 +15,7 @@ shell:
image: release-channel-version
from: registry.deckhouse.io/base_images/scratch@sha256:b054705fcc9f2205777d80a558d920c0b4209efdc3163c22b5bfcb5dda1db5fc
import:
- artifact: release-channel-version-artifact
- image: release-channel-version-artifact
add: /
to: /
after: install
Expand Down
4 changes: 2 additions & 2 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -49,8 +49,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
Expand Down
Binary file removed charts/deckhouse_lib_helm-1.40.0.tgz
Binary file not shown.
Binary file added charts/deckhouse_lib_helm-1.41.0.tgz
Binary file not shown.
10 changes: 5 additions & 5 deletions images/controller/src/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module d8-controller

go 1.22.2
go 1.23.4

require (
github.com/deckhouse/csi-ceph/api v0.0.0-20240820170126-01a5c651eb9d
Expand Down Expand Up @@ -54,11 +54,11 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.24.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
Expand Down
16 changes: 8 additions & 8 deletions images/controller/src/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -127,14 +127,14 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
8 changes: 6 additions & 2 deletions images/controller/src/pkg/kubutils/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ import (
)

func KubernetesDefaultConfigCreate() (*rest.Config, error) {
// todo validate empty
config, err := rest.InClusterConfig()
if err == nil {
return config, nil
}

clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
clientcmd.NewDefaultClientConfigLoadingRules(),
&clientcmd.ConfigOverrides{},
)

// Get a config to talk to API server
config, err := clientConfig.ClientConfig()
config, err = clientConfig.ClientConfig()
if err != nil {
return nil, fmt.Errorf("config kubernetes error %w", err)
}
Expand Down
65 changes: 55 additions & 10 deletions images/controller/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,76 @@
{{- $_ := 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" }}
{{- $_ := set . "BASE_SCRATCH" "registry.deckhouse.io/base_images/scratch@sha256:653ae76965c98c8cd1c8c9ff7725316d2983986f896655b30e0f44d2f8b2dd7e" }}
{{- $_ := set . "BASE_GOLANG" "registry.deckhouse.io/base_images/golang:1.23.4-bullseye@sha256:9b3176d53704a9b1be19d307b660733cc691af02906d7e918dbe4d11427a422c" }}
{{- $_ := set . "BASE_ALT" "registry.deckhouse.io/base_images/alt:p11@sha256:e47d84424485d3674240cb2f67d3a1801b37d327e6d1eb8cc8d01be8ed3b34f3" }}

---
image: {{ $.ImageName }}-golang-artifact
from: {{ $.BASE_GOLANG }}
image: {{ $.ImageName }}-src-artifact
from: {{ $.BASE_ALT }}
final: false

git:
- add: /
to: /
to: /src
includePaths:
- api
- images/controller/src
stageDependencies:
setup:
- "**/*"
install:
- '**/*'

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

import:
- image: {{ $.ImageName }}-src-artifact
add: /src
to: /src
before: setup

mount:
- fromPath: ~/go-pkg-cache
to: /go/pkg

shell:
setup:
- cd /images/controller/src/cmd
- cd /src/images/controller/src/cmd
- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /controller
- chmod +x /controller

---
image: {{ $.ImageName }}
image: {{ $.ImageName }}-distroless-artifact
from: {{ $.BASE_ALT }}
final: false
shell:
beforeInstall:
- apt-get update
- apt-get install -y openssl libtirpc
- rm -rf /var/lib/apt/lists/* /var/cache/apt/* && mkdir -p /var/lib/apt/lists/partial /var/cache/apt/archives/partial
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: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: {{ $.BASE_SCRATCH }}
final: false
import:
- image: {{ $.ImageName }}-distroless-artifact
add: /relocate
to: /
before: setup

---
image: {{ $.ImageName }}
fromImage: {{ $.ImageName }}-distroless

import:
- image: {{ $.ImageName }}-golang-artifact
Expand All @@ -36,3 +80,4 @@ import:

docker:
ENTRYPOINT: ["/controller"]
USER: deckhouse:deckhouse
Loading
Loading