Skip to content

Commit 1d74654

Browse files
🚢 helm release management (#654)
* single antd box style * show service external IPs * helm releases tab * single antd box style * register helm release routes * sse to receive path * helm logos * support helm releases * bump go.mod * add helm methods to k8s client interface * add service external IPs * k8s client helm support implementation * helm release mapper * helm release client * helm release handler * make mockery * add deps * ⚙️ update cyclops to v0.15.0-rc.1 * remove root from deps * ⚙️ update cyclops to v0.15.0-rc.2 * remove error deletion * return nil on empty schema * await for release chart schema * ⚙️ update cyclops to v0.15.0-rc.3 * helm tab key * release telemetry * namespaced scoped helm release management (#658) * namespaced scope release management * fix typo * terminate loading * reorder sidebar * uninstall error * highlight release name on delete * inline --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 95e5d76 commit 1d74654

File tree

32 files changed

+2022
-52
lines changed

32 files changed

+2022
-52
lines changed

cyclops-ctrl/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
DISABLE_TELEMETRY=true
22
PORT=8888
33
WATCH_NAMESPACE=cyclops
4+
WATCH_NAMESPACE_HELM=
45
CYCLOPS_VERSION=v0.0.0

cyclops-ctrl/cmd/main/main.go

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121

2222
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/auth"
2323
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/handler"
24+
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/integrations/helm"
2425
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/modulecontroller"
2526
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/prometheus"
2627
"github.com/cyclops-ui/cyclops/cyclops-ctrl/internal/telemetry"
@@ -90,7 +91,9 @@ func main() {
9091

9192
prometheus.StartCacheMetricsUpdater(&monitor, templatesRepo.ReturnCache(), 10*time.Second, setupLog)
9293

93-
handler, err := handler.New(templatesRepo, k8sClient, renderer, telemetryClient, monitor)
94+
helmReleaseClient := helm.NewReleaseClient(getHelmWatchNamespace())
95+
96+
handler, err := handler.New(templatesRepo, k8sClient, helmReleaseClient, renderer, telemetryClient, monitor)
9497
if err != nil {
9598
panic(err)
9699
}
@@ -110,7 +113,7 @@ func main() {
110113
}),
111114
Cache: ctrlCache.Options{
112115
DefaultNamespaces: map[string]ctrlCache.Config{
113-
getWatchNamespace("WATCH_NAMESPACE"): {},
116+
getWatchNamespace(): {},
114117
},
115118
},
116119
})
@@ -161,10 +164,18 @@ func getEnvBool(key string) bool {
161164
return b
162165
}
163166

164-
func getWatchNamespace(key string) string {
165-
value := os.Getenv(key)
167+
func getWatchNamespace() string {
168+
value := os.Getenv("WATCH_NAMESPACE")
166169
if value == "" {
167170
return "cyclops"
168171
}
169172
return value
170173
}
174+
175+
func getHelmWatchNamespace() string {
176+
value := os.Getenv("WATCH_NAMESPACE_HELM")
177+
if value == "" {
178+
return ""
179+
}
180+
return value
181+
}

cyclops-ctrl/go.mod

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,20 @@ require (
3434
require (
3535
dario.cat/mergo v1.0.0 // indirect
3636
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
37+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
3738
github.com/BurntSushi/toml v1.3.2 // indirect
39+
github.com/MakeNowJust/heredoc v1.0.0 // indirect
3840
github.com/Masterminds/goutils v1.1.1 // indirect
3941
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
42+
github.com/Masterminds/squirrel v1.5.4 // indirect
4043
github.com/Microsoft/go-winio v0.6.1 // indirect
4144
github.com/Microsoft/hcsshim v0.11.4 // indirect
4245
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
46+
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
4347
github.com/beorn7/perks v1.0.1 // indirect
4448
github.com/bytedance/sonic v1.9.1 // indirect
4549
github.com/cespare/xxhash/v2 v2.2.0 // indirect
50+
github.com/chai2010/gettext-go v1.0.2 // indirect
4651
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
4752
github.com/cloudflare/circl v1.3.7 // indirect
4853
github.com/containerd/containerd v1.7.12 // indirect
@@ -59,12 +64,17 @@ require (
5964
github.com/dustin/go-humanize v1.0.1 // indirect
6065
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
6166
github.com/emirpasic/gods v1.18.1 // indirect
67+
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
6268
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
69+
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
70+
github.com/fatih/color v1.13.0 // indirect
6371
github.com/felixge/httpsnoop v1.0.3 // indirect
6472
github.com/fsnotify/fsnotify v1.7.0 // indirect
6573
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
6674
github.com/gin-contrib/sse v0.1.0 // indirect
75+
github.com/go-errors/errors v1.4.2 // indirect
6776
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
77+
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
6878
github.com/go-logr/stdr v1.2.2 // indirect
6979
github.com/go-logr/zapr v1.3.0 // indirect
7080
github.com/go-openapi/jsonpointer v0.19.6 // indirect
@@ -80,41 +90,65 @@ require (
8090
github.com/golang/glog v1.1.0 // indirect
8191
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
8292
github.com/golang/protobuf v1.5.4 // indirect
93+
github.com/google/btree v1.0.1 // indirect
8394
github.com/google/gnostic-models v0.6.8 // indirect
8495
github.com/google/go-cmp v0.6.0 // indirect
8596
github.com/google/gofuzz v1.2.0 // indirect
8697
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
98+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
8799
github.com/gorilla/mux v1.8.0 // indirect
100+
github.com/gorilla/websocket v1.5.0 // indirect
101+
github.com/gosuri/uitable v0.0.4 // indirect
102+
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
103+
github.com/hashicorp/errwrap v1.1.0 // indirect
104+
github.com/hashicorp/go-multierror v1.1.1 // indirect
88105
github.com/huandu/xstrings v1.4.0 // indirect
89106
github.com/imdario/mergo v0.3.13 // indirect
107+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
90108
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
109+
github.com/jmoiron/sqlx v1.3.5 // indirect
91110
github.com/josharian/intern v1.0.0 // indirect
92111
github.com/kevinburke/ssh_config v1.2.0 // indirect
93112
github.com/klauspost/compress v1.16.0 // indirect
94113
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
114+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
115+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
95116
github.com/leodido/go-urn v1.2.4 // indirect
117+
github.com/lib/pq v1.10.9 // indirect
118+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
96119
github.com/mailru/easyjson v0.7.7 // indirect
120+
github.com/mattn/go-colorable v0.1.13 // indirect
97121
github.com/mattn/go-isatty v0.0.19 // indirect
122+
github.com/mattn/go-runewidth v0.0.9 // indirect
98123
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
99124
github.com/mitchellh/copystructure v1.2.0 // indirect
125+
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
100126
github.com/mitchellh/reflectwalk v1.0.2 // indirect
101127
github.com/moby/locker v1.0.1 // indirect
128+
github.com/moby/spdystream v0.2.0 // indirect
129+
github.com/moby/term v0.5.0 // indirect
102130
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
103131
github.com/modern-go/reflect2 v1.0.2 // indirect
132+
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
104133
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
134+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
105135
github.com/opencontainers/go-digest v1.0.0 // indirect
106136
github.com/opencontainers/image-spec v1.1.0-rc6 // indirect
107137
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
138+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
108139
github.com/pjbgf/sha1cd v0.3.0 // indirect
109140
github.com/pmezard/go-difflib v1.0.0 // indirect
110141
github.com/prometheus/client_model v0.4.0 // indirect
111142
github.com/prometheus/common v0.44.0 // indirect
112143
github.com/prometheus/procfs v0.12.0 // indirect
144+
github.com/rubenv/sql-migrate v1.5.2 // indirect
145+
github.com/russross/blackfriday/v2 v2.1.0 // indirect
113146
github.com/sergi/go-diff v1.1.0 // indirect
114147
github.com/shopspring/decimal v1.3.1 // indirect
115148
github.com/sirupsen/logrus v1.9.3 // indirect
116149
github.com/skeema/knownhosts v1.2.1 // indirect
117150
github.com/spf13/cast v1.5.0 // indirect
151+
github.com/spf13/cobra v1.8.0 // indirect
118152
github.com/spf13/pflag v1.0.5 // indirect
119153
github.com/stretchr/objx v0.5.0 // indirect
120154
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
@@ -123,10 +157,12 @@ require (
123157
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
124158
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
125159
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
160+
github.com/xlab/treeprint v1.2.0 // indirect
126161
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
127162
go.opentelemetry.io/otel v1.19.0 // indirect
128163
go.opentelemetry.io/otel/metric v1.19.0 // indirect
129164
go.opentelemetry.io/otel/trace v1.19.0 // indirect
165+
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
130166
go.uber.org/multierr v1.11.0 // indirect
131167
go.uber.org/zap v1.26.0 // indirect
132168
golang.org/x/arch v0.3.0 // indirect
@@ -149,10 +185,16 @@ require (
149185
gopkg.in/inf.v0 v0.9.1 // indirect
150186
gopkg.in/warnings.v0 v0.1.2 // indirect
151187
gotest.tools/v3 v3.5.1 // indirect
188+
k8s.io/apiserver v0.30.1 // indirect
189+
k8s.io/cli-runtime v0.30.0 // indirect
190+
k8s.io/component-base v0.30.1 // indirect
152191
k8s.io/klog/v2 v2.120.1 // indirect
153192
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
193+
k8s.io/kubectl v0.30.0 // indirect
154194
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
155195
oras.land/oras-go v1.2.5 // indirect
156196
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
197+
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
198+
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
157199
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
158200
)

0 commit comments

Comments
 (0)