Skip to content

Commit d15ebcf

Browse files
committed
mco: set KUBELET_NODE_IPS environment variable for kubelet
1 parent 51f95d2 commit d15ebcf

File tree

1 file changed

+18
-0
lines changed
  • pkg/asset/machines/machineconfig

1 file changed

+18
-0
lines changed

pkg/asset/machines/machineconfig/ipv6.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"fmt"
55

66
igntypes "github.com/coreos/ignition/v2/config/v3_2/types"
7+
"github.com/vincent-petithory/dataurl"
78
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
9+
"k8s.io/utils/ptr"
810

911
mcfgv1 "github.com/openshift/api/machineconfiguration/v1"
1012
"github.com/openshift/installer/pkg/asset/ignition"
@@ -16,6 +18,22 @@ func ForDualStackAddresses(role string) (*mcfgv1.MachineConfig, error) {
1618
Ignition: igntypes.Ignition{
1719
Version: igntypes.MaxVersion.String(),
1820
},
21+
Storage: igntypes.Storage{
22+
Files: []igntypes.File{
23+
{
24+
Node: igntypes.Node{
25+
Path: "/etc/kubernetes/kubelet-workaround",
26+
Overwrite: ptr.To(true),
27+
},
28+
FileEmbedded1: igntypes.FileEmbedded1{
29+
Mode: ptr.To(644),
30+
Contents: igntypes.Resource{
31+
Source: ptr.To(dataurl.EncodeBytes([]byte(fmt.Sprint("KUBELET_NODE_IPS=0.0.0.0")))),
32+
},
33+
},
34+
},
35+
},
36+
},
1937
}
2038

2139
rawExt, err := ignition.ConvertToRawExtension(ignConfig)

0 commit comments

Comments
 (0)