use of org.eclipse.jkube.kit.config.resource.GroupArtifactVersion in project jkube by eclipse.
the class ProjectLabelEnricher method createLabels.
private Map<String, String> createLabels(boolean withoutVersion) {
Map<String, String> ret = new HashMap<>();
boolean enableProjectLabel = Configs.asBoolean(getConfig(Config.USE_PROJECT_LABEL));
final GroupArtifactVersion groupArtifactVersion = getContext().getGav();
if (enableProjectLabel) {
ret.put("project", groupArtifactVersion.getArtifactId());
} else {
ret.put("app", getConfig(Config.APP, groupArtifactVersion.getArtifactId()));
}
ret.put("group", groupArtifactVersion.getGroupId());
ret.put(LABEL_PROVIDER, getConfig(Config.PROVIDER));
if (!withoutVersion) {
ret.put("version", groupArtifactVersion.getVersion());
}
return ret;
}
Aggregations