Skip to content

Commit 0584c49

Browse files
authored
Merge pull request #46 from openinfradev/develop
20241002 release from develop
2 parents b7917e7 + 66aec14 commit 0584c49

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

cmd/server/cluster_status.go

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ func processClusterStatus() error {
4545
switch workflow.Status.Phase {
4646
case "Running":
4747
newStatus = domain.ClusterStatus_INSTALLING
48+
49+
paused, err := argowfClient.IsPausedWorkflow(context.TODO(), "argo", workflowId)
50+
if err == nil && paused {
51+
newStatus = domain.ClusterStatus_STOPPED
52+
}
53+
case "Stopped":
54+
newStatus = domain.ClusterStatus_STOPPED
4855
case "Succeeded":
4956
newStatus = domain.ClusterStatus_RUNNING
5057
case "Failed":

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ require (
4949
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5050
github.com/modern-go/reflect2 v1.0.2 // indirect
5151
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
52-
github.com/openinfradev/tks-api v0.0.0-20240509015017-73cfae88477f // indirect
52+
github.com/openinfradev/tks-api v0.0.0-20240702055309-610554b9f520 // indirect
5353
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
5454
github.com/sagikazarmark/locafero v0.4.0 // indirect
5555
github.com/sagikazarmark/slog-shim v0.1.0 // indirect

go.sum

+2-6
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,8 @@ github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
142142
github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo=
143143
github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys=
144144
github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
145-
github.com/openinfradev/tks-api v0.0.0-20240411053710-5b8a434e8797 h1:DQ5naso3RdA0XxQ2Fj70xZ4O3vBhtWYR9Kpdy7LQqRE=
146-
github.com/openinfradev/tks-api v0.0.0-20240411053710-5b8a434e8797/go.mod h1:Ph4lPgdWg06R1GUNCtmXfzHNlNCW/XjUAvei+m5DD2o=
147-
github.com/openinfradev/tks-api v0.0.0-20240508035732-2495843420e9 h1:UWP8YleZKOq4RBvcquMSKZdguvwcnQOsj/bJgjSoLW0=
148-
github.com/openinfradev/tks-api v0.0.0-20240508035732-2495843420e9/go.mod h1:d7dJJYRDarGe73yxJ6UKxYgQuiftPhqNVGYcH13nmIk=
149-
github.com/openinfradev/tks-api v0.0.0-20240509015017-73cfae88477f h1:G1HC9OHMJb6aGMzM3xouE3P5YCQTj9xHSKAioUH26+4=
150-
github.com/openinfradev/tks-api v0.0.0-20240509015017-73cfae88477f/go.mod h1:d7dJJYRDarGe73yxJ6UKxYgQuiftPhqNVGYcH13nmIk=
145+
github.com/openinfradev/tks-api v0.0.0-20240702055309-610554b9f520 h1:h57Bw+UYtVIpmtmBgYyXPNS9E9JsC5i3hFfu/WE+J2Q=
146+
github.com/openinfradev/tks-api v0.0.0-20240702055309-610554b9f520/go.mod h1:01x6TpTcRwEFo89/+f+6MHPri562UoxflwhiacIm978=
151147
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
152148
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
153149
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=

internal/cluster/cluster.go

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ type Cluster struct {
1818
Status domain.ClusterStatus
1919
StatusDesc string
2020
IsStack bool
21+
CloudService string
2122
}
2223

2324
// Accessor accesses cluster info in DB.

0 commit comments

Comments
 (0)