in teamcity-kubernetes-plugin-server/src/main/java/jetbrains/buildServer/clouds/kubernetes/KubeProfilePropertiesProcessor.java [30:49]
public Collection<InvalidProperty> process(Map<String, String> map) {
Collection<InvalidProperty> invalids = new ArrayList<>();
final String authStrategy = map.get(AUTH_STRATEGY);
if (StringUtil.isEmptyOrSpaces(authStrategy)) {
invalids.add(new InvalidProperty(AUTH_STRATEGY, "Authentication strategy must be selected"));
return invalids;
}
KubeAuthStrategy strategy = myKubeAuthStrategyProvider.find(authStrategy);
if (strategy != null) {
if(strategy.requiresServerUrl() && StringUtil.isEmptyOrSpaces(map.get(API_SERVER_URL))) {
invalids.add(new InvalidProperty(API_SERVER_URL, "Kubernetes API server URL must not be empty"));
}
Collection<InvalidProperty> strategyCollection = strategy.process(map);
if (strategyCollection != null && !strategyCollection.isEmpty()){
invalids.addAll(strategyCollection);
}
}
return invalids;
}