[FIX] do not ignore --no-hostip and don't try to inject if network = host (#471)
This commit is contained in:
parent
092f26a4e2
commit
73e1548264
@ -93,7 +93,11 @@ func ClusterRun(ctx context.Context, runtime k3drt.Runtime, clusterConfig *confi
|
||||
|
||||
// add /etc/hosts and CoreDNS entry for host.k3d.internal, referring to the host system
|
||||
if !clusterConfig.ClusterCreateOpts.PrepDisableHostIPInjection {
|
||||
if clusterConfig.Cluster.Network.Name != "host" {
|
||||
prepInjectHostIP(ctx, runtime, &clusterConfig.Cluster)
|
||||
} else {
|
||||
log.Infoln("Hostnetwork selected -> Skipping injection of docker host into the cluster")
|
||||
}
|
||||
}
|
||||
|
||||
// create the registry hosting configmap
|
||||
|
@ -219,6 +219,7 @@ func TransformSimpleToClusterConfig(ctx context.Context, runtime runtimes.Runtim
|
||||
**************************/
|
||||
|
||||
clusterCreateOpts := k3d.ClusterCreateOpts{
|
||||
PrepDisableHostIPInjection: simpleConfig.Options.K3dOptions.PrepDisableHostIPInjection,
|
||||
DisableImageVolume: simpleConfig.Options.K3dOptions.DisableImageVolume,
|
||||
WaitForServer: simpleConfig.Options.K3dOptions.Wait,
|
||||
Timeout: simpleConfig.Options.K3dOptions.Timeout,
|
||||
|
Loading…
Reference in New Issue
Block a user