Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for nodeHostsFileContent (0.14 sec)

  1. pkg/kubelet/kubelet_pods.go

    	if err := os.WriteFile(fileName, hostsFileContent, hostsFilePerm); err != nil {
    		return err
    	}
    	return os.Chmod(fileName, hostsFilePerm)
    }
    
    // nodeHostsFileContent reads the content of node's hosts file.
    func nodeHostsFileContent(hostsFilePath string, hostAliases []v1.HostAlias) ([]byte, error) {
    	hostsFileContent, err := os.ReadFile(hostsFilePath)
    	if err != nil {
    		return nil, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
  2. pkg/kubelet/kubelet_pods_test.go

    			tmpdir, err := writeHostsFile(testCase.hostsFileName, testCase.rawHostsFileContent)
    			require.NoError(t, err, "could not create a temp hosts file")
    			defer os.RemoveAll(tmpdir)
    
    			actualContent, fileReadErr := nodeHostsFileContent(filepath.Join(tmpdir, testCase.hostsFileName), testCase.hostAliases)
    			require.NoError(t, fileReadErr, "could not create read hosts file")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
Back to top