chore: caddy client to get caddy config

This commit is contained in:
Pasha Sviderski
2025-08-22 15:58:21 +10:00
parent 75fdbaf2f4
commit 3cda5cc564
6 changed files with 55 additions and 7 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func runDeploy(ctx context.Context, uncli *cli.CLI, opts deployOptions) error {
placement := api.Placement{
Machines: cli.ExpandCommaSeparatedValues(opts.machines),
}
d, err := clusterClient.NewCaddyDeployment(opts.image, placement)
d, err := clusterClient.NewCaddyDeployment(opts.image, "", placement)
if err != nil {
return fmt.Errorf("create caddy deployment: %w", err)
}
+1 -1
View File
@@ -146,7 +146,7 @@ func add(ctx context.Context, uncli *cli.CLI, remoteMachine *cli.RemoteMachine,
// TODO: scale the existing Caddy service to the new machine instead of running a new deployment
// that may cause a small downtime.
d, err := clusterClient.NewCaddyDeployment(caddyImage, api.Placement{})
d, err := clusterClient.NewCaddyDeployment(caddyImage, "", api.Placement{})
if err != nil {
return fmt.Errorf("create caddy deployment: %w", err)
}
+1 -1
View File
@@ -147,7 +147,7 @@ func initCluster(ctx context.Context, uncli *cli.CLI, remoteMachine *cli.RemoteM
}
if !opts.noCaddy {
d, err := client.NewCaddyDeployment("", api.Placement{})
d, err := client.NewCaddyDeployment("", "", api.Placement{})
if err != nil {
return fmt.Errorf("create caddy deployment: %w", err)
}