mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
BREAKING CHANGE: move Uncloud API socket to /run/uncloud/api/uncloud.sock, activate it by systemd socket unit
This commit is contained in:
1 parent
c65f352250
commit
f68c9859d9
24 files changed
+345
-112
No files matched your search
@@ -192,7 +192,7 @@ func add(ctx context.Context, uncli *cli.CLI, remoteMachine *cli.RemoteMachine,
|
||||
// Deploy a Caddy service container to the added machine. If caddy service is already deployed on other machines,
|
||||
// use the deployed image version.
|
||||
// NOTE: We use the cluster client to inspect and scale the Caddy service because the newly added machine may have
|
||||
// issues accessing the Machine API of existing machines in the cluster.
|
||||
// issues accessing the API of existing machines in the cluster.
|
||||
// See the issue for more details: https://github.com/psviderski/uncloud/issues/65.
|
||||
caddyImage := ""
|
||||
caddySvc, err := clusterClient.InspectService(ctx, client.CaddyServiceName)
|
||||
|
||||
+3
-2
@@ -88,10 +88,11 @@ func main() {
|
||||
|
||||
configPath := fs.ExpandHomeDir(opts.configPath)
|
||||
|
||||
// Make uc connect via the local Unix socket when running on a cluster machine.
|
||||
if opts.connect == "" {
|
||||
if !fs.Exists(configPath) && fs.Exists(machine.DefaultUncloudSockPath) {
|
||||
if !fs.Exists(configPath) && fs.Exists(machine.DefaultClusterAPISockPath) {
|
||||
conn = &config.MachineConnection{
|
||||
Unix: machine.DefaultUncloudSockPath,
|
||||
Unix: machine.DefaultClusterAPISockPath,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user