@Test void testParseConfig() throws IOException { File configFile = new File(getClass().getResource("/test-kubeconfig").getPath()); Config config = KubeConfigUtils.parseConfig(configFile); assertNotNull(config); assertEquals(1, config.getClusters().size()); assertEquals(3, config.getContexts().size()); assertEquals(3, config.getUsers().size()); }
public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = Serialization.yamlMapper(); return mapper.readValue(file, Config.class); }
KubeConfigUtils { public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = Serialization.yamlMapper(); return mapper.readValue(file, Config.class); } }
KubeConfigUtils { public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = Serialization.yamlMapper(); return mapper.readValue(file, Config.class); } private  KubeConfigUtils(); }
KubeConfigUtils { public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = Serialization.yamlMapper(); return mapper.readValue(file, Config.class); } private  KubeConfigUtils(); static Config parseConfig(File file); static Config parseConfigFromString(String contents); static NamedContext getCurrentContext(Config config); static String getUserToken(Config config, Context context); static AuthInfo getUserAuthInfo(Config config, Context context); static Cluster getCluster(Config config, Context context); static int getNamedUserIndexFromConfig(Config config, String userName); static void persistKubeConfigIntoFile(Config kubeConfig, String kubeConfigPath); }
KubeConfigUtils { public static Config parseConfig(File file) throws IOException { ObjectMapper mapper = Serialization.yamlMapper(); return mapper.readValue(file, Config.class); } private  KubeConfigUtils(); static Config parseConfig(File file); static Config parseConfigFromString(String contents); static NamedContext getCurrentContext(Config config); static String getUserToken(Config config, Context context); static AuthInfo getUserAuthInfo(Config config, Context context); static Cluster getCluster(Config config, Context context); static int getNamedUserIndexFromConfig(Config config, String userName); static void persistKubeConfigIntoFile(Config kubeConfig, String kubeConfigPath);  }