mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
No need to call out to update anything, as set doesnt use uncloud dns
Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
1 parent
5fb80e2071
commit
81d36edc66
1 file changed
+3
-14
+3
-14
@@ -6,11 +6,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"github.com/psviderski/uncloud/cmd/uc/caddy"
|
|
||||||
"github.com/psviderski/uncloud/internal/cli"
|
"github.com/psviderski/uncloud/internal/cli"
|
||||||
"github.com/psviderski/uncloud/internal/machine/api/pb"
|
"github.com/psviderski/uncloud/internal/machine/api/pb"
|
||||||
"github.com/psviderski/uncloud/pkg/api"
|
|
||||||
"github.com/psviderski/uncloud/pkg/client"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
@@ -54,15 +51,7 @@ func set(ctx context.Context, uncli *cli.CLI, name string) error {
|
|||||||
|
|
||||||
fmt.Printf("Set cluster domain: %s\n", domain.Name)
|
fmt.Printf("Set cluster domain: %s\n", domain.Name)
|
||||||
|
|
||||||
// Update cluster domain records in Uncloud DNS to point to machines running caddy service if it has been deployed.
|
// No need to update anything as the domain records pointing to this cluster should be wildcard, so all
|
||||||
if _, err = clusterClient.InspectService(ctx, client.CaddyServiceName); err != nil {
|
// names already exist.
|
||||||
if errors.Is(err, api.ErrNotFound) {
|
return nil
|
||||||
fmt.Println("Deploy the Caddy reverse proxy service ('uc caddy deploy') to enable internet access " +
|
|
||||||
"to your services via the reserved or your custom domain.")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return fmt.Errorf("inspect caddy service: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return caddy.UpdateDomainRecords(ctx, clusterClient, uncli.ProgressOut())
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user