move no-lb setting to createClusterOpts

This commit is contained in:
iwilltry42 2020-02-01 14:37:57 +01:00
parent 3ff51a0446
commit 2d35895edc
No known key found for this signature in database
GPG Key ID: 7BA57AD1CFF16110

View File

@ -403,7 +403,7 @@ func parseCreateClusterCmd(cmd *cobra.Command, args []string, createClusterOpts
**********************/
// TODO: create load balancer and other util containers // TODO: for now, this will only work with the docker provider (?) -> can replace dynamic docker lookup with static traefik config (?)
if masterCount > 1 && !noLB { // TODO: add traefik to the same network and add traefik labels to the master node containers
if masterCount > 1 && !createClusterOpts.DisableLoadbalancer { // TODO: add traefik to the same network and add traefik labels to the master node containers
log.Debugln("Creating LB in front of master nodes")
cluster.MasterLoadBalancer = &k3d.ClusterLoadbalancer{
Image: k3d.DefaultLBImage,