From c39725c468daef89623c5ca6441b7f7e2de6cfbb Mon Sep 17 00:00:00 2001 From: Kim Aharfi Date: Thu, 14 Apr 2022 00:05:21 +0300 Subject: [PATCH 1/2] wip --- VERSION | 2 +- pkg/codefresh/codefresh.go | 4 ++-- pkg/codefresh/model/app-proxy/models_gen.go | 4 ++-- pkg/codefresh/model/models_gen.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 72a8a63..9ed317f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.41.0 +0.41.1 diff --git a/pkg/codefresh/codefresh.go b/pkg/codefresh/codefresh.go index ccde0a9..a30d9c9 100644 --- a/pkg/codefresh/codefresh.go +++ b/pkg/codefresh/codefresh.go @@ -130,7 +130,7 @@ func (c *codefresh) AppProxy(ctx context.Context, runtime string, insecure bool) return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: %w", runtime, err) } - if rt.IngressHost == "" { + if rt.IngressHost == nil { return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: runtime does not have ingressHost configured", runtime) } @@ -143,7 +143,7 @@ func (c *codefresh) AppProxy(ctx context.Context, runtime string, insecure bool) } return newClient(&ClientOptions{ - Host: rt.IngressHost, + Host: *rt.IngressHost, Auth: AuthOptions{Token: c.token}, Client: httpClient, graphqlPath: "/app-proxy/api/graphql", diff --git a/pkg/codefresh/model/app-proxy/models_gen.go b/pkg/codefresh/model/app-proxy/models_gen.go index 088bcc2..c7d2694 100644 --- a/pkg/codefresh/model/app-proxy/models_gen.go +++ b/pkg/codefresh/model/app-proxy/models_gen.go @@ -4216,7 +4216,7 @@ type Runtime struct { // K8s cluster where the runtime is running Cluster *string `json:"cluster"` // Ingress host of the runtime - IngressHost string `json:"ingressHost"` + IngressHost *string `json:"ingressHost"` // Ingress host of the runtime IngressClass *string `json:"ingressClass"` // Runtime version @@ -4228,7 +4228,7 @@ type Runtime struct { // Installation Status InstallationStatus InstallationStatus `json:"installationStatus"` // Repo URL with optional path and branch info - Repo string `json:"repo"` + Repo *string `json:"repo"` // Clusters managed by this runtime ManagedClusters []*Cluster `json:"managedClusters"` // Total number of clusters managed by this runtime diff --git a/pkg/codefresh/model/models_gen.go b/pkg/codefresh/model/models_gen.go index 8d3d476..eb338b0 100644 --- a/pkg/codefresh/model/models_gen.go +++ b/pkg/codefresh/model/models_gen.go @@ -4300,7 +4300,7 @@ type Runtime struct { // K8s cluster where the runtime is running Cluster *string `json:"cluster"` // Ingress host of the runtime - IngressHost string `json:"ingressHost"` + IngressHost *string `json:"ingressHost"` // Ingress host of the runtime IngressClass *string `json:"ingressClass"` // Runtime version @@ -4312,7 +4312,7 @@ type Runtime struct { // Installation Status InstallationStatus InstallationStatus `json:"installationStatus"` // Repo URL with optional path and branch info - Repo string `json:"repo"` + Repo *string `json:"repo"` // Clusters managed by this runtime ManagedClusters []*Cluster `json:"managedClusters"` // Total number of clusters managed by this runtime From 93485f5ce5444a63a2f8e70677b6e6b5176efe5d Mon Sep 17 00:00:00 2001 From: Kim Aharfi Date: Thu, 14 Apr 2022 08:21:44 +0300 Subject: [PATCH 2/2] bump --- pkg/codefresh/codefresh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/codefresh/codefresh.go b/pkg/codefresh/codefresh.go index a30d9c9..4a4ff0f 100644 --- a/pkg/codefresh/codefresh.go +++ b/pkg/codefresh/codefresh.go @@ -130,7 +130,7 @@ func (c *codefresh) AppProxy(ctx context.Context, runtime string, insecure bool) return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: %w", runtime, err) } - if rt.IngressHost == nil { + if rt.IngressHost == nil || *rt.IngressHost == "" { return nil, fmt.Errorf("failed to create app-proxy client for runtime %s: runtime does not have ingressHost configured", runtime) }