From b0f279ee0b6ee5328bc23a89ff727adcca273cf1 Mon Sep 17 00:00:00 2001 From: John Long Date: Fri, 2 Feb 2024 18:06:03 -0500 Subject: [PATCH] updated to reflect component key changes --- efs/hello-world/components/frontend/main.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- internal/kubernetes/client.go | 6 +++--- internal/repo/repo.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/efs/hello-world/components/frontend/main.go b/efs/hello-world/components/frontend/main.go index 035db8b..5057267 100644 --- a/efs/hello-world/components/frontend/main.go +++ b/efs/hello-world/components/frontend/main.go @@ -14,7 +14,7 @@ func main() { k := kit.New() backend = k.Component("backend") - k.Route("Path(`/{{.Env.subPath}}/hello`)", sayHello) + k.Route("Path(`/{{.Vars.subPath}}/hello`)", sayHello) k.Start() } diff --git a/go.mod b/go.mod index 7c99524..4f081ed 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 - github.com/xigxog/kubefox v0.4.0-alpha.0.20240201172225-6ca281a7189a + github.com/xigxog/kubefox v0.4.0-alpha.0.20240202230452-ce5b66032744 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.29.1 k8s.io/apimachinery v0.29.1 diff --git a/go.sum b/go.sum index c11191e..effb6f6 100644 --- a/go.sum +++ b/go.sum @@ -234,8 +234,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xigxog/kubefox v0.4.0-alpha.0.20240201172225-6ca281a7189a h1:T1EeEsFCQeFUCjV66ffiDKl7lcBqyKngtYXutaQq+/Y= -github.com/xigxog/kubefox v0.4.0-alpha.0.20240201172225-6ca281a7189a/go.mod h1:yAM9kmrDh2o+ynzpKsLavRwYrS36L5MYBmUxXjYrjIw= +github.com/xigxog/kubefox v0.4.0-alpha.0.20240202230452-ce5b66032744 h1:zmpKUxVMLGg3JY3TprP/BPv7C4LXHSjnmrOfUTS0b3o= +github.com/xigxog/kubefox v0.4.0-alpha.0.20240202230452-ce5b66032744/go.mod h1:yAM9kmrDh2o+ynzpKsLavRwYrS36L5MYBmUxXjYrjIw= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/internal/kubernetes/client.go b/internal/kubernetes/client.go index 51ec86f..08040e0 100644 --- a/internal/kubernetes/client.go +++ b/internal/kubernetes/client.go @@ -253,13 +253,13 @@ func (c *Client) CreatePlatform(namespace, name string) *v1alpha1.Platform { func (c *Client) WaitPlatformReady(ctx context.Context, p *v1alpha1.Platform, spec *v1alpha1.AppDeploymentSpec) { log.Info("Waiting for KubeFox Platform '%s' to be ready...", p.Name) - if err := c.WaitPodReady(ctx, p, "nats", ""); err != nil { + if err := c.WaitPodReady(ctx, p, api.PlatformComponentNATS, ""); err != nil { log.Fatal("Error while waiting: %v", err) } - if err := c.WaitPodReady(ctx, p, "broker", ""); err != nil { + if err := c.WaitPodReady(ctx, p, api.PlatformComponentBroker, ""); err != nil { log.Fatal("Error while waiting: %v", err) } - if err := c.WaitPodReady(ctx, p, "httpsrv", ""); err != nil { + if err := c.WaitPodReady(ctx, p, api.PlatformComponentHTTPSrv, ""); err != nil { log.Fatal("Error while waiting: %v", err) } diff --git a/internal/repo/repo.go b/internal/repo/repo.go index 118810c..365b3b7 100644 --- a/internal/repo/repo.go +++ b/internal/repo/repo.go @@ -139,7 +139,7 @@ func (r *repo) GetCompImageFromDir(compDirName string) string { } func (r *repo) GetCompImage(name, commit string) string { - return fmt.Sprintf("%s/%s:%s", r.cfg.ContainerRegistry.Address, name, commit) + return fmt.Sprintf("%s/%s/%s:%s", r.cfg.ContainerRegistry.Address, r.app.Name, name, commit) } func (r *repo) GetRepoURL() string {