@@ -59,27 +59,10 @@ func clusterDownGKE(gceZone, gceRegion string) error {
5959 return nil
6060}
6161
62- const hardcodeBuildChange = `/template:/,/spec:/s/spec:$/spec:\n\ \ \ \ \ \ nodeSelector:\n\ \ \ \ \ \ \ \ kubernetes.io\/os: linux/`
63-
6462func buildKubernetes (k8sDir , command string ) error {
65- // TODO: REMOVE THESE HARDCODED LINES
66- cmd := exec .Command ("sed" , "-i" , hardcodeBuildChange , fmt .Sprintf ("%s/cluster/addons/node-problem-detector/npd.yaml" , k8sDir ))
67- cmd .Env = os .Environ ()
68- err := runCommand (fmt .Sprintf ("Make hardcoded change in path=%s" , k8sDir ), cmd )
69- if err != nil {
70- return fmt .Errorf ("failed to make hardcoded changes before building Kubernetes: %w" , err )
71- }
72-
73- cmd = exec .Command ("cat" , fmt .Sprintf ("%s/cluster/addons/node-problem-detector/npd.yaml" , k8sDir ))
74- cmd .Env = os .Environ ()
75- err = runCommand (fmt .Sprintf ("Check hardcoded change in path=%s" , k8sDir ), cmd )
76- if err != nil {
77- return fmt .Errorf ("failed to check hardcoded changes before building Kubernetes: %w" , err )
78- }
79-
80- cmd = exec .Command ("make" , "-C" , k8sDir , command )
63+ cmd := exec .Command ("make" , "-C" , k8sDir , command )
8164 cmd .Env = os .Environ ()
82- err = runCommand (fmt .Sprintf ("Running command in kubernetes/kubernetes path=%s" , k8sDir ), cmd )
65+ err : = runCommand (fmt .Sprintf ("Running command in kubernetes/kubernetes path=%s" , k8sDir ), cmd )
8366 if err != nil {
8467 return fmt .Errorf ("failed to build Kubernetes: %w" , err )
8568 }
0 commit comments