Skip to content

Commit 7a4c1ac

Browse files
refactor: remove helmchart installation and update logic (#167)
* refactor: remove helmchart installation and update logic - Deleted the install.go and update.go files along with their associated test files. - Removed the postrenderer.go file which handled post-rendering of Helm charts. - Introduced a new processor package to handle release decoding and hashing. - Added processor tests and benchmarks for performance evaluation. - Implemented a tracer for HTTP requests to log resource interactions. - Updated main.go to integrate the new dynamic tools and REST mapper. * chore: update .gitignore, go.mod, and go.sum; refactor composition logic and tests * refactor: streamline helm chart installation and upgrade logic * feat: enable caching for helm client in Observe, Create, Update, and Delete methods * fix: handle nil release in DecodeRelease function * docs: update README to reflect changes in HELM_REGISTRY_CONFIG_PATH usage refactor: clean up unused helm registry config variables in composition.go * refactor: remove unused environment variable handling for helm registry config * fix: ignore not found error during helm chart uninstallation * refactor: update helm client initialization to use functional options and enable caching * fix: correct testdataPath for getter_test.go to ensure proper test execution * fix: update empty manifest check in DecodeRelease to trim whitespace
1 parent df72b9b commit 7a4c1ac

48 files changed

Lines changed: 1368 additions & 5194 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,6 @@ cover.out
5252
.tool-versions
5353
**/*.xpkg
5454

55+
.github/skills
56+
5557
.vscode

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ These enviroment varibles can be changed in the Deployment of the composition-dy
243243
| URL_PLURALS | NOT USED from version 0.17.1 - URL to krateo pluraliser service | `http://snowplow.krateo-system.svc.cluster.local:8081/api-info/names` | Ignored from version 0.17.1 |
244244
| URL_CHART_INSPECTOR | url to chart inspector | `http://chart-inspector.krateo-system.svc.cluster.local:8081/` |
245245
| KRATEO_NAMESPACE | namespace where krateo is installed | krateo-system |
246-
| HELM_REGISTRY_CONFIG_PATH | default helm config path | /tmp |
246+
| HELM_REGISTRY_CONFIG_PATH | NOT USED from version '1.0.0' - default helm config path | /tmp |
247247
| HELM_MAX_HISTORY | Max Helm History | 3 |
248248
| COMPOSITION_CONTROLLER_MAX_ERROR_RETRY_INTERVAL | The maximum interval between retries when an error occurs. This should be less than the half of the poll interval. | 60s |
249249
| COMPOSITION_CONTROLLER_MIN_ERROR_RETRY_INTERVAL | The minimum interval between retries when an error occurs. This should be less than max-error-retry-interval. | 1s |

go.mod

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,53 @@
11
module github.com/krateoplatformops/composition-dynamic-controller
22

3-
go 1.25.0
3+
go 1.25.3
44

55
require (
6-
github.com/Masterminds/semver v1.5.0
7-
github.com/Masterminds/semver/v3 v3.4.0
86
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
97
github.com/go-logr/logr v1.4.3
108
github.com/gobuffalo/flect v1.0.3
11-
github.com/golang/mock v1.6.0
12-
github.com/krateoplatformops/plumbing v0.7.2
13-
github.com/krateoplatformops/unstructured-runtime v0.3.1
14-
github.com/pkg/errors v0.9.1
15-
github.com/spf13/pflag v1.0.10
9+
github.com/krateoplatformops/plumbing v1.0.0
10+
github.com/krateoplatformops/unstructured-runtime v0.3.2
1611
github.com/stretchr/testify v1.11.1
17-
helm.sh/helm/v3 v3.19.2
18-
k8s.io/api v0.34.2
19-
k8s.io/apiextensions-apiserver v0.34.2
20-
k8s.io/apimachinery v0.34.2
21-
k8s.io/cli-runtime v0.34.2
22-
k8s.io/client-go v0.34.2
12+
k8s.io/api v0.35.0
13+
k8s.io/apiextensions-apiserver v0.35.0
14+
k8s.io/apimachinery v0.35.0
15+
k8s.io/client-go v0.35.0
2316
sigs.k8s.io/e2e-framework v0.6.0
24-
sigs.k8s.io/kustomize/kyaml v0.20.1
25-
sigs.k8s.io/yaml v1.6.0
2617
)
2718

2819
require (
29-
dario.cat/mergo v1.0.1 // indirect
20+
dario.cat/mergo v1.0.2 // indirect
3021
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
31-
github.com/BurntSushi/toml v1.5.0 // indirect
22+
github.com/BurntSushi/toml v1.6.0 // indirect
3223
github.com/MakeNowJust/heredoc v1.0.0 // indirect
3324
github.com/Masterminds/goutils v1.1.1 // indirect
25+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
3426
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
3527
github.com/Masterminds/squirrel v1.5.4 // indirect
3628
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
3729
github.com/beorn7/perks v1.0.1 // indirect
3830
github.com/blang/semver/v4 v4.0.0 // indirect
3931
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4032
github.com/chai2010/gettext-go v1.0.2 // indirect
41-
github.com/containerd/containerd v1.7.29 // indirect
33+
github.com/containerd/containerd v1.7.30 // indirect
4234
github.com/containerd/errdefs v1.0.0 // indirect
4335
github.com/containerd/log v0.1.0 // indirect
4436
github.com/containerd/platforms v0.2.1 // indirect
45-
github.com/cyphar/filepath-securejoin v0.6.0 // indirect
37+
github.com/cyphar/filepath-securejoin v0.6.1 // indirect
4638
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
4739
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
48-
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
40+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
4941
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
5042
github.com/fatih/color v1.18.0 // indirect
5143
github.com/fsnotify/fsnotify v1.9.0 // indirect
5244
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
5345
github.com/go-errors/errors v1.5.1 // indirect
5446
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
55-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
56-
github.com/go-openapi/jsonreference v0.20.4 // indirect
57-
github.com/go-openapi/swag v0.23.0 // indirect
47+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
48+
github.com/go-openapi/jsonreference v0.21.0 // indirect
49+
github.com/go-openapi/swag v0.23.1 // indirect
5850
github.com/gobwas/glob v0.2.3 // indirect
59-
github.com/gogo/protobuf v1.3.2 // indirect
6051
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
6152
github.com/google/btree v1.1.3 // indirect
6253
github.com/google/gnostic-models v0.7.0 // indirect
@@ -77,7 +68,7 @@ require (
7768
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
7869
github.com/lib/pq v1.10.9 // indirect
7970
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
80-
github.com/mailru/easyjson v0.7.7 // indirect
71+
github.com/mailru/easyjson v0.9.0 // indirect
8172
github.com/mattn/go-colorable v0.1.13 // indirect
8273
github.com/mattn/go-isatty v0.0.20 // indirect
8374
github.com/mattn/go-runewidth v0.0.15 // indirect
@@ -94,52 +85,58 @@ require (
9485
github.com/opencontainers/go-digest v1.0.0 // indirect
9586
github.com/opencontainers/image-spec v1.1.1 // indirect
9687
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
88+
github.com/pkg/errors v0.9.1 // indirect
9789
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
98-
github.com/prometheus/client_golang v1.22.0 // indirect
99-
github.com/prometheus/client_model v0.6.1 // indirect
100-
github.com/prometheus/common v0.62.0 // indirect
101-
github.com/prometheus/procfs v0.15.1 // indirect
90+
github.com/prometheus/client_golang v1.23.2 // indirect
91+
github.com/prometheus/client_model v0.6.2 // indirect
92+
github.com/prometheus/common v0.66.1 // indirect
93+
github.com/prometheus/procfs v0.17.0 // indirect
10294
github.com/rivo/uniseg v0.4.7 // indirect
103-
github.com/rubenv/sql-migrate v1.8.0 // indirect
95+
github.com/rubenv/sql-migrate v1.8.1 // indirect
10496
github.com/russross/blackfriday/v2 v2.1.0 // indirect
10597
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
10698
github.com/shopspring/decimal v1.4.0 // indirect
10799
github.com/sirupsen/logrus v1.9.3 // indirect
108100
github.com/spf13/cast v1.7.0 // indirect
109-
github.com/spf13/cobra v1.10.1 // indirect
101+
github.com/spf13/cobra v1.10.2 // indirect
102+
github.com/spf13/pflag v1.0.10 // indirect
110103
github.com/stretchr/objx v0.5.2 // indirect
111104
github.com/twmb/murmur3 v1.1.8 // indirect
112105
github.com/vladimirvivien/gexe v0.4.1 // indirect
113106
github.com/x448/float16 v0.8.4 // indirect
114107
github.com/xlab/treeprint v1.2.0 // indirect
115-
go.opentelemetry.io/otel v1.35.0 // indirect
116-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
117-
go.yaml.in/yaml/v2 v2.4.2 // indirect
108+
go.opentelemetry.io/otel v1.37.0 // indirect
109+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
110+
go.yaml.in/yaml/v2 v2.4.3 // indirect
118111
go.yaml.in/yaml/v3 v3.0.4 // indirect
119-
golang.org/x/crypto v0.45.0 // indirect
120-
golang.org/x/net v0.47.0 // indirect
112+
golang.org/x/crypto v0.46.0 // indirect
113+
golang.org/x/net v0.48.0 // indirect
121114
golang.org/x/oauth2 v0.30.0 // indirect
122-
golang.org/x/sync v0.18.0 // indirect
123-
golang.org/x/sys v0.38.0 // indirect
124-
golang.org/x/term v0.37.0 // indirect
125-
golang.org/x/text v0.31.0 // indirect
115+
golang.org/x/sync v0.19.0 // indirect
116+
golang.org/x/sys v0.40.0 // indirect
117+
golang.org/x/term v0.39.0 // indirect
118+
golang.org/x/text v0.33.0 // indirect
126119
golang.org/x/time v0.12.0 // indirect
127-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
128-
google.golang.org/grpc v1.72.1 // indirect
129-
google.golang.org/protobuf v1.36.5 // indirect
130-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
120+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect
121+
google.golang.org/grpc v1.72.2 // indirect
122+
google.golang.org/protobuf v1.36.8 // indirect
123+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
131124
gopkg.in/inf.v0 v0.9.1 // indirect
132125
gopkg.in/yaml.v3 v3.0.1 // indirect
133-
k8s.io/apiserver v0.34.2 // indirect
134-
k8s.io/component-base v0.34.2 // indirect
126+
helm.sh/helm/v3 v3.20.0 // indirect
127+
k8s.io/apiserver v0.35.0 // indirect
128+
k8s.io/cli-runtime v0.35.0 // indirect
129+
k8s.io/component-base v0.35.0 // indirect
135130
k8s.io/klog/v2 v2.130.1 // indirect
136-
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
137-
k8s.io/kubectl v0.34.0 // indirect
138-
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
131+
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect
132+
k8s.io/kubectl v0.35.0 // indirect
133+
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 // indirect
139134
oras.land/oras-go/v2 v2.6.0 // indirect
140-
sigs.k8s.io/controller-runtime v0.20.0 // indirect
141-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
135+
sigs.k8s.io/controller-runtime v0.22.3 // indirect
136+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
142137
sigs.k8s.io/kustomize/api v0.20.1 // indirect
138+
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
143139
sigs.k8s.io/randfill v1.0.0 // indirect
144140
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
141+
sigs.k8s.io/yaml v1.6.0 // indirect
145142
)

0 commit comments

Comments
 (0)