Skip to content

Commit 24b47ad

Browse files
committed
feat(deploy): save service annotations inside Helm release
Into the field `info.annotations` inside of the Helm release structure Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
1 parent a11edab commit 24b47ad

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

Diff for: cmd/werf/bundle/apply/apply.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ func runApply(ctx context.Context) error {
215215
ChartRepositorySkipUpdate: *commonCmdData.SkipDependenciesRepoRefresh,
216216
DefaultSecretValuesDisable: *commonCmdData.DisableDefaultSecretValues,
217217
DefaultValuesDisable: *commonCmdData.DisableDefaultValues,
218+
ExtraAnnotations: extraAnnotations,
219+
ExtraLabels: extraLabels,
220+
ExtraRuntimeAnnotations: serviceAnnotations,
218221
InstallGraphPath: common.GetDeployGraphPath(&commonCmdData),
219222
InstallGraphSave: common.GetDeployGraphPath(&commonCmdData) != "",
220223
InstallReportPath: deployReportPath,
221224
InstallReportSave: common.GetSaveDeployReport(&commonCmdData),
222-
ExtraAnnotations: extraAnnotations,
223-
ExtraLabels: extraLabels,
224-
ExtraRuntimeAnnotations: serviceAnnotations,
225225
KubeAPIServerName: *commonCmdData.KubeApiServer,
226226
KubeBurstLimit: *commonCmdData.KubeBurstLimit,
227227
KubeCAPath: *commonCmdData.KubeCaPath,
@@ -240,6 +240,7 @@ func runApply(ctx context.Context) error {
240240
ProgressTablePrintInterval: time.Duration(*commonCmdData.StatusProgressPeriodSeconds) * time.Second,
241241
RegistryCredentialsPath: registryCredentialsPath,
242242
ReleaseHistoryLimit: *commonCmdData.ReleasesHistoryMax,
243+
ReleaseInfoAnnotations: serviceAnnotations,
243244
ReleaseStorageDriver: action.ReleaseStorageDriver(os.Getenv("HELM_DRIVER")),
244245
RollbackGraphPath: common.GetRollbackGraphPath(&commonCmdData),
245246
RollbackGraphSave: common.GetRollbackGraphPath(&commonCmdData) != "",

Diff for: cmd/werf/converge/converge.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,13 @@ func run(
440440
DefaultChartVersion: "1.0.0",
441441
DefaultSecretValuesDisable: *commonCmdData.DisableDefaultSecretValues,
442442
DefaultValuesDisable: *commonCmdData.DisableDefaultValues,
443+
ExtraAnnotations: extraAnnotations,
444+
ExtraLabels: extraLabels,
445+
ExtraRuntimeAnnotations: serviceAnnotations,
443446
InstallGraphPath: common.GetDeployGraphPath(&commonCmdData),
444447
InstallGraphSave: common.GetDeployGraphPath(&commonCmdData) != "",
445448
InstallReportPath: deployReportPath,
446449
InstallReportSave: common.GetSaveDeployReport(&commonCmdData),
447-
ExtraAnnotations: extraAnnotations,
448-
ExtraLabels: extraLabels,
449-
ExtraRuntimeAnnotations: serviceAnnotations,
450450
KubeAPIServerName: *commonCmdData.KubeApiServer,
451451
KubeBurstLimit: *commonCmdData.KubeBurstLimit,
452452
KubeCAPath: *commonCmdData.KubeCaPath,
@@ -465,6 +465,7 @@ func run(
465465
ProgressTablePrintInterval: time.Duration(*commonCmdData.StatusProgressPeriodSeconds) * time.Second,
466466
RegistryCredentialsPath: registryCredentialsPath,
467467
ReleaseHistoryLimit: *commonCmdData.ReleasesHistoryMax,
468+
ReleaseInfoAnnotations: serviceAnnotations,
468469
ReleaseStorageDriver: action.ReleaseStorageDriver(os.Getenv("HELM_DRIVER")),
469470
RollbackGraphPath: common.GetRollbackGraphPath(&commonCmdData),
470471
RollbackGraphSave: common.GetRollbackGraphPath(&commonCmdData) != "",

Diff for: go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ require (
5858
github.com/sirupsen/logrus v1.9.3
5959
github.com/spf13/cobra v1.8.0
6060
github.com/spf13/pflag v1.0.5
61-
github.com/werf/3p-helm v0.0.0-20250228131406-d579a5860ae3
61+
github.com/werf/3p-helm v0.0.0-20250321133401-c2dd64fffad4
6262
github.com/werf/3p-helm-for-werf-helm v0.0.0-20241217155820-089f92cd5c9d
63-
github.com/werf/common-go v0.0.0-20250315175823-f08787c56be1
63+
github.com/werf/common-go v0.0.0-20250317135621-3a6772a9f88d
6464
github.com/werf/copy-recurse v0.2.7
6565
github.com/werf/kubedog v0.13.1-0.20250225170820-367e45be4347
6666
github.com/werf/kubedog-for-werf-helm v0.0.0-20241217155728-9d45c48b82b6
6767
github.com/werf/lockgate v0.1.1
6868
github.com/werf/logboek v0.6.1
69-
github.com/werf/nelm v0.0.0-20250315180032-d061795d7b74
69+
github.com/werf/nelm v1.0.1-0.20250321133539-da7359f71736
7070
github.com/werf/nelm-for-werf-helm v0.0.0-20241217155925-b0e6734d1dbf
7171
go.opentelemetry.io/otel v1.24.0
7272
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0

Diff for: go.sum

+6-6
Original file line numberDiff line numberDiff line change
@@ -1435,14 +1435,14 @@ github.com/werf/3p-buildah v1.35.2-0.20241120093816-5b80b7b735de h1:adTANOZyNmmn
14351435
github.com/werf/3p-buildah v1.35.2-0.20241120093816-5b80b7b735de/go.mod h1:vVSVUlTu8+99H5j43gBJscpkb/quZvdJg78+6X1HeTM=
14361436
github.com/werf/3p-docker-buildx v0.13.0-rc2.0.20241111114615-d77c2e1444ad h1:FBDNACfjjpDBwXhALF5LgvEiu08HpUurb/2G323SVsQ=
14371437
github.com/werf/3p-docker-buildx v0.13.0-rc2.0.20241111114615-d77c2e1444ad/go.mod h1:Q3gtkv8D3sdaa5LJXbzMooYR/A5vBiEB2yQ56wywohM=
1438-
github.com/werf/3p-helm v0.0.0-20250228131406-d579a5860ae3 h1:tpo9FpjMI6ytzl1balAZL9azpOWGG7HMdBd44YYsClE=
1439-
github.com/werf/3p-helm v0.0.0-20250228131406-d579a5860ae3/go.mod h1:X2Ab7KcvII0xWOT3+sY0+erA6lR4M4uHV5+lfU9Ag/c=
1438+
github.com/werf/3p-helm v0.0.0-20250321133401-c2dd64fffad4 h1:vB93Z0ylusgOddNPtapLQxc1lkbtvM0Gl5josb+QI5Y=
1439+
github.com/werf/3p-helm v0.0.0-20250321133401-c2dd64fffad4/go.mod h1:X2Ab7KcvII0xWOT3+sY0+erA6lR4M4uHV5+lfU9Ag/c=
14401440
github.com/werf/3p-helm-for-werf-helm v0.0.0-20241217155820-089f92cd5c9d h1:HN9jmAG2Gyhf8hJca9yoAO2xawNZQ/6OYDomxkKr5Sw=
14411441
github.com/werf/3p-helm-for-werf-helm v0.0.0-20241217155820-089f92cd5c9d/go.mod h1:fozJ+C/Llp1e+jHxrJOZUu+D4QEw+laQK6W6RFqvTsg=
14421442
github.com/werf/3p-oras v0.9.1-0.20240115121544-03962ecbd40a h1:PsU9szHZlIH+CjcuIuPXRLc5dsdoaFldvYjS6YHI7YQ=
14431443
github.com/werf/3p-oras v0.9.1-0.20240115121544-03962ecbd40a/go.mod h1:XTePf8biMMCkqbuuWBZ24xOwo3hZej+BBM0uvd8aGqk=
1444-
github.com/werf/common-go v0.0.0-20250315175823-f08787c56be1 h1:dXryOt3jpvHMMY37CcibxRT/Q8yUvnXipOYPN0bjwxs=
1445-
github.com/werf/common-go v0.0.0-20250315175823-f08787c56be1/go.mod h1:7pkHNfgZ2wvdwcMWCuDjdkY7iR3mIX5snYwbd1Iu7T4=
1444+
github.com/werf/common-go v0.0.0-20250317135621-3a6772a9f88d h1:u+0+ivCKL6E/OLGScAhxbbDtkk6BY6OGaB8BhiHpnjQ=
1445+
github.com/werf/common-go v0.0.0-20250317135621-3a6772a9f88d/go.mod h1:7pkHNfgZ2wvdwcMWCuDjdkY7iR3mIX5snYwbd1Iu7T4=
14461446
github.com/werf/copy-recurse v0.2.7 h1:3FTOarbJ9uhFLi75oeUCioK9zxZwuV7o28kuUBPDZPM=
14471447
github.com/werf/copy-recurse v0.2.7/go.mod h1:6Ypb+qN+hRBJgoCgEkX1vpbqcQ+8q69BQ3hi8s8Y6Qc=
14481448
github.com/werf/kubedog v0.13.1-0.20250225170820-367e45be4347 h1:vKg9b/+s2y4fVWRQuqOKGJ7LCv9h2WTYiIwJTIikRdA=
@@ -1453,8 +1453,8 @@ github.com/werf/lockgate v0.1.1 h1:S400JFYjtWfE4i4LY9FA8zx0fMdfui9DPrBiTciCrx4=
14531453
github.com/werf/lockgate v0.1.1/go.mod h1:0yIFSLq9ausy6ejNxF5uUBf/Ib6daMAfXuCaTMZJzIE=
14541454
github.com/werf/logboek v0.6.1 h1:oEe6FkmlKg0z0n80oZjLplj6sXcBeLleCkjfOOZEL2g=
14551455
github.com/werf/logboek v0.6.1/go.mod h1:Gez5J4bxekyr6MxTmIJyId1F61rpO+0/V4vjCIEIZmk=
1456-
github.com/werf/nelm v0.0.0-20250315180032-d061795d7b74 h1:eRHBfZZA/YN5CwBFIP282rfS6oqfbNE/SXWGjRls4aA=
1457-
github.com/werf/nelm v0.0.0-20250315180032-d061795d7b74/go.mod h1:m9D+jPSSi5x5lm4wBHAcZqJa2Mv7QhIIt5XZIx29KEg=
1456+
github.com/werf/nelm v1.0.1-0.20250321133539-da7359f71736 h1:aFyiUy/xZdg5+yAPHz5sf8sQV27Se6HXrwr4D304VkM=
1457+
github.com/werf/nelm v1.0.1-0.20250321133539-da7359f71736/go.mod h1:MCgjfhdyFsRmk8F+wYU2/WnwYGZejzt9h9zahphEAJ8=
14581458
github.com/werf/nelm-for-werf-helm v0.0.0-20241217155925-b0e6734d1dbf h1:K51qz209c1yJgKzPw8AeS72T21F/ACp0VI3RJvT4THA=
14591459
github.com/werf/nelm-for-werf-helm v0.0.0-20241217155925-b0e6734d1dbf/go.mod h1:7RJXSGPKKPEvfPqrTwNA8jT7y52O0ebwhSbSn29ESMA=
14601460
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=

0 commit comments

Comments
 (0)