Skip to content
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
46 changes: 22 additions & 24 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,25 @@ jobs:
env:
DMT_METRICS_URL: ${{ secrets.DMT_METRICS_URL }}
DMT_METRICS_TOKEN: ${{ secrets.DMT_METRICS_TOKEN }}

lint:
runs-on: [self-hosted, large]
name: Lint
steps:
- name: Set up Go ${{ vars.GO_VERSION }}
uses: actions/setup-go@v6
with:
go-version: "${{ vars.GO_VERSION }}"

- uses: actions/checkout@v6

- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install golangci-lint
run: task --yes deps:install:golangci-lint

- name: Run linters
run: task --yes lint


# waiting for golangci-lint for go 1.26
# lint:
# runs-on: [self-hosted, large]
# name: Lint
# steps:
# - name: Set up Go ${{ vars.GO_VERSION }}
# uses: actions/setup-go@v6
# with:
# go-version: "${{ vars.GO_VERSION }}"

# - uses: actions/checkout@v6

# - name: Install Task
# uses: arduino/setup-task@v2
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}

# - name: Install golangci-lint
# run: task --yes deps:install:golangci-lint

# - name: Run linters
# run: task --yes lint
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ includes:
taskfile: ./images/hooks/Taskfile.dist.yaml
dir: ./images/hooks
artifact:
taskfile: ./images/operator-helm-artifact/Taskfile.dist.yaml
dir: ./images/operator-helm-artifact
taskfile: ./images/operator-helm-controller/Taskfile.dist.yaml
dir: ./images/operator-helm-controller

deps:
taskfile: https://raw.githubusercontent.com/werf/common-ci/refs/heads/main/Taskfile.deps.yml
Expand Down
2 changes: 1 addition & 1 deletion api/scripts/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function generate::v1alpha1 {

# go tool openapi-gen \
# --output-pkg "openapi" \
# --output-dir "${ROOT}/images/operator-helm-artifact/pkg/api/openapi" \
# --output-dir "${ROOT}/images/operator-helm/pkg/api/openapi" \
# --output-file "zz_generated.openapi.go" \
# --go-header-file "${SCRIPT_DIR}/boilerplate.go.txt" \
# -r /dev/null \
Expand Down
966 changes: 661 additions & 305 deletions build/base-images/deckhouse_images.yml

Large diffs are not rendered by default.

43 changes: 42 additions & 1 deletion images/helm-controller/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
{{- $helmControllerTag := "v0.1.5" }}
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
final: false
fromImage: builder/src
secrets:
- id: SOURCE_REPO
value: {{ .SOURCE_REPO }}
shell:
install:
- git clone --branch {{ $helmControllerTag }} --single-branch $(cat /run/secrets/SOURCE_REPO)/werf/3p-helm-controller.git /src/3p-helm-controller
- rm -rf /src/3p-helm-controller/.git
---

image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact
final: false
fromImage: builder/golang
secrets:
- id: SOURCE_REPO
value: {{ .SOURCE_REPO }}
- id: GOPROXY
value: {{ .GOPROXY }}
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
add: /src
to: /src
before: install
shell:
install:
- cd /src/3p-helm-controller
- |
export GOPROXY=$(cat /run/secrets/GOPROXY)
{{- include "image-build.build" (set $ "BuildCommand" `go build -trimpath -a -o helm-controller main.go`) | indent 6 }}
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
from: registry.werf.io/nelm/helm-controller:v0.1.3
fromImage: base/distroless
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact
add: /src/3p-helm-controller/helm-controller
to: /usr/bin/helm-controller
before: install
imageSpec:
config:
entrypoint: ["helm-controller"]
2 changes: 1 addition & 1 deletion images/hooks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckhouse/deckhouse/pkg/log v0.2.0 // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/cli v29.2.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
Expand Down
10 changes: 8 additions & 2 deletions images/hooks/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4
github.com/DataDog/gostackparse v0.7.0 h1:i7dLkXHvYzHV308hnkvVGDL3BR4FWl7IsXNPz/IGQh4=
github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/caarlos0/env/v11 v11.3.1 h1:cArPWC15hWmEt+gWk7YBi7lEXTXCvpaSdCiZE2X5mCA=
Expand All @@ -21,8 +22,8 @@ github.com/deckhouse/deckhouse/pkg/log v0.2.0 h1:6tmZQLwNb1o/hP1gzJQBjcwfA/bubbg
github.com/deckhouse/deckhouse/pkg/log v0.2.0/go.mod h1:pbAxTSDcPmwyl3wwKDcEB3qdxHnRxqTV+J0K+sha8bw=
github.com/deckhouse/module-sdk v0.10.2 h1:jYxFTgjdaZ9NKWKbFP95RvD55WJvhwjPAeSMFKhZb0o=
github.com/deckhouse/module-sdk v0.10.2/go.mod h1:Z1jfmd0fICoYww0daMijWAU+OZTxeJUXfMciKKuYAYA=
github.com/docker/cli v28.2.2+incompatible h1:qzx5BNUDFqlvyq4AHzdNB7gSyVTmU4cgsyN9SdInc1A=
github.com/docker/cli v28.2.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/cli v29.2.0+incompatible h1:9oBd9+YM7rxjZLfyMGxjraKBKE4/nVyvVfN4qNl9XRM=
github.com/docker/cli v29.2.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
Expand Down Expand Up @@ -117,6 +118,7 @@ github.com/mreiferson/go-httpclient v0.0.0-20201222173833-5e475fde3a4d/go.mod h1
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns=
github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo=
github.com/onsi/gomega v1.38.3 h1:eTX+W6dobAYfFeGC2PV6RwXRu/MyT+cQguijutvkpSM=
github.com/onsi/gomega v1.38.3/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
Expand All @@ -140,6 +142,7 @@ github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y=
github.com/sebdah/goldie/v2 v2.5.3/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI=
Expand All @@ -164,6 +167,7 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/sylabs/oci-tools v0.7.0 h1:SIisUvcEL+Vpa9/kmQDy1W3AwV2XVGad83sgZmXLlb0=
github.com/sylabs/oci-tools v0.7.0/go.mod h1:Ry6ngChflh20WPq6mLvCKSw2OTd9iDB5aR8OQzeq4hM=
github.com/sylabs/sif/v2 v2.15.0 h1:Nv0tzksFnoQiQ2eUwpAis9nVqEu4c3RcNSxX8P3Cecw=
Expand Down Expand Up @@ -218,6 +222,7 @@ golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI=
golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand Down Expand Up @@ -274,6 +279,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
Expand Down
17 changes: 2 additions & 15 deletions images/hooks/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,13 @@ git:
stageDependencies:
install:
- "**/*"
- add: {{ .ModuleDir }}/images/operator-helm-artifact
to: /src/images/operator-helm-artifact
stageDependencies:
install:
- "**/*"
- add: {{ .ModuleDir }}/api
to: /src/api
stageDependencies:
install:
- "**/*"
shell:
install:
- cd /src
---
image: {{ .ModuleNamePrefix }}go-hooks-artifact
final: false
fromImage: builder/golang-bookworm-1.25
fromImage: builder/golang
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
add: /src
Expand All @@ -38,11 +28,8 @@ secrets:
value: {{ .GOPROXY }}
shell:
install:
- export GOPROXY=$(cat /run/secrets/GOPROXY)
- cd /app/images/hooks
- go mod download
setup:
- cd /app/images/hooks
- GOPROXY=$(cat /run/secrets/GOPROXY) go mod download
- |
export GOOS=linux
export GOARCH=amd64
Expand Down
2 changes: 1 addition & 1 deletion images/kube-api-rewriter/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/deckhouse/kube-api-rewriter

go 1.25.0
go 1.26.0

require (
github.com/fsnotify/fsnotify v1.9.0
Expand Down
10 changes: 3 additions & 7 deletions images/kube-api-rewriter/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ git:
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder
final: false
fromImage: builder/golang-bookworm-1.25
fromImage: builder/golang
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
add: /src
Expand All @@ -27,11 +27,8 @@ mount:
to: /go/pkg
shell:
install:
- export GOPROXY=$(cat /run/secrets/GOPROXY)
- cd /src/kube-api-rewriter
- go mod download
setup:
- cd /src/kube-api-rewriter
- GOPROXY=$(cat /run/secrets/GOPROXY) go mod download
- export GOOS=linux
- export CGO_ENABLED=0
- export GOARCH=amd64
Expand All @@ -40,7 +37,7 @@ shell:
{{- include "image-build.build" (set $ "BuildCommand" `go build -v -a -o kube-api-rewriter ./cmd/kube-api-rewriter`) | nindent 6 }}
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
fromImage: builder/scratch
fromImage: base/distroless
git:
{{- include "image mount points" . }}
import:
Expand All @@ -57,6 +54,5 @@ import:
after: install
imageSpec:
config:
user: "64535:64535"
workingDir: "/app"
entrypoint: ["/app/kube-api-rewriter"]
42 changes: 41 additions & 1 deletion images/nelm-source-controller/werf.inc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
{{- $nelmSourceControllerTag := "v0.1.5" }}
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
final: false
fromImage: builder/src
secrets:
- id: SOURCE_REPO
value: {{ .SOURCE_REPO }}
shell:
install:
- git clone --branch {{ $nelmSourceControllerTag }} --single-branch $(cat /run/secrets/SOURCE_REPO)/werf/nelm-source-controller.git /src/nelm-source-controller
- rm -rf /src/nelm-source-controller/.git
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact
final: false
fromImage: builder/golang
secrets:
- id: SOURCE_REPO
value: {{ .SOURCE_REPO }}
- id: GOPROXY
value: {{ .GOPROXY }}
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact
add: /src
to: /src
before: install
shell:
install:
- cd /src/nelm-source-controller
- |
export GOPROXY=$(cat /run/secrets/GOPROXY)
{{- include "image-build.build" (set $ "BuildCommand" `go build -trimpath -a -o source-controller main.go`) | indent 6 }}
---
image: {{ .ModuleNamePrefix }}{{ .ImageName }}
from: registry.werf.io/nelm/source-controller:v0.1.4
fromImage: base/distroless
import:
- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact
add: /src/nelm-source-controller/source-controller
to: /usr/bin/source-controller
before: install
imageSpec:
config:
entrypoint: ["source-controller"]
48 changes: 0 additions & 48 deletions images/operator-helm-artifact/werf.inc.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/deckhouse/operator-helm

go 1.25.0
go 1.26.3

replace github.com/deckhouse/operator-helm/api => ../../api

Expand All @@ -9,13 +9,12 @@ require (
github.com/deckhouse/operator-helm/api v0.0.0-00010101000000-000000000000
github.com/google/go-containerregistry v0.20.6
github.com/opencontainers/go-digest v1.0.0
github.com/stretchr/testify v1.11.1
github.com/werf/3p-fluxcd-pkg/apis/meta v1.23.0-nelm.1
github.com/werf/3p-fluxcd-pkg/chartutil v1.17.0-nelm.1
github.com/werf/3p-helm-controller/api v0.1.4
github.com/werf/nelm-source-controller/api v0.1.4
github.com/werf/3p-helm-controller/api v0.1.5
github.com/werf/nelm-source-controller/api v0.1.5
go.yaml.in/yaml/v3 v3.0.4
helm.sh/helm/v3 v3.20.1
helm.sh/helm/v3 v3.20.2
k8s.io/api v0.35.1
k8s.io/apimachinery v0.35.1
k8s.io/client-go v0.35.1
Expand All @@ -29,7 +28,7 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v28.2.2+incompatible // indirect
github.com/docker/cli v29.2.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
Expand Down
Loading
Loading