Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkg/provision/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/Yolean/y-cluster/pkg/dockerexec"
"github.com/Yolean/y-cluster/pkg/kubeconfig"
"github.com/Yolean/y-cluster/pkg/provision"
"github.com/Yolean/y-cluster/pkg/provision/certmanager"
"github.com/Yolean/y-cluster/pkg/provision/config"
"github.com/Yolean/y-cluster/pkg/provision/envoygateway"
"github.com/Yolean/y-cluster/pkg/provision/k3s"
Expand Down Expand Up @@ -268,6 +269,9 @@ func Provision(ctx context.Context, cfg config.DockerConfig, logger *zap.Logger)
ControllerMemRequest: cfg.Gateway.Resources.Controller.Memory,
ProxyCPURequest: cfg.Gateway.Resources.Proxy.CPU,
ProxyMemRequest: cfg.Gateway.Resources.Proxy.Memory,
// One node, ServiceLB, as on qemu: Gateways beyond y-cluster's
// own (ystack's, a site's) must share the proxy on :80/:443.
MergeGateways: true,
}); err != nil {
return nil, fmt.Errorf("install envoy gateway: %w", err)
}
Expand All @@ -277,6 +281,14 @@ func Provision(ctx context.Context, cfg config.DockerConfig, logger *zap.Logger)
)
}

// On macOS docker is the provider for the local dev clusters that qemu
// provisions on Linux, and they converge the same workloads, whose
// certificates come from y-cluster's CA issuer.
if err := certmanager.Install(ctx, certmanager.Options{ContextName: cfg.Context, Logger: logger}); err != nil {
return nil, fmt.Errorf("install cert-manager: %w", err)
}
logger.Info("cert-manager ready", zap.String("version", certmanager.Version), zap.String("issuer", certmanager.CAIssuer))

return c, nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/provision/envoygateway/embed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func TestEnvoyProxyYAML_DaemonSet(t *testing.T) {
}
}

// mergeGateways is rendered only when asked for; qemu asks, so ystack's and
// mergeGateways is rendered only when asked for; qemu and docker ask, so ystack's and
// a site's Gateways share the proxy ServiceLB publishes on the node.
func TestEnvoyProxyYAML_MergeGateways(t *testing.T) {
if strings.Contains(string(EnvoyProxyYAML("10m", "128Mi", nil, false, false)), "mergeGateways") {
Expand Down
Loading