use of org.ballerinax.kubernetes.models.knative.KnativeContainerModel in project kubernetes by ballerinax.
the class KnativeContainerHandler method createArtifacts.
@Override
public void createArtifacts() throws KubernetesPluginException {
// Service
ServiceModel deploymentModel = knativeDataHolder.getServiceModel();
Map<String, KnativeContainerModel> serviceModels = knativeDataHolder.getbListenerToK8sServiceMap();
int count = 0;
for (KnativeContainerModel serviceModel : serviceModels.values()) {
count++;
String balxFileName = extractJarName(KnativeContext.getInstance().getDataHolder().getUberJarPath());
serviceModel.addLabel(KubernetesConstants.KUBERNETES_SELECTOR_KEY, balxFileName);
serviceModel.setSelector(balxFileName);
generate(serviceModel);
deploymentModel.addPort(serviceModel.getTargetPort());
}
}
Aggregations