private DeploymentConfig getDeploymentConfig(KubernetesList list, String svcName) { if (list != null) { List<HasMetadata> items = list.getItems(); String dcName = null; for (HasMetadata item : items) { if (item instanceof Service && item.getMetadata().getName().equals(svcName)) { Map<String, String> selector = ((Service) item).getSpec().getSelector(); dcName = selector.get("deploymentconfig"); if (dcName == null) { dcName = selector.get("deploymentConfig"); } break; } } if (dcName != null) { for (HasMetadata item : items) { if (item instanceof DeploymentConfig && item.getMetadata().getName().equals(dcName)) { return (DeploymentConfig) item; } } } } return null; }
private DeployableScalableResource<DeploymentConfig, DoneableDeploymentConfig> getDeploymentConfigResource(Service service) { if (service != null) { String prjName = service.getMetadata().getNamespace(); Map<String, String> selector = service.getSpec().getSelector(); String dcName = selector.get("deploymentconfig"); if (dcName == null) { dcName = selector.get("deploymentConfig"); } if (dcName != null) { return delegate.deploymentConfigs().inNamespace(prjName).withName(dcName); } } return null; }
public ServiceSpecBuilder( ServiceSpecFluent<?> fluent , ServiceSpec instance ){ this.fluent = fluent; fluent.withDeprecatedPublicIPs(instance.getDeprecatedPublicIPs()); fluent.withPortalIP(instance.getPortalIP()); fluent.withPorts(instance.getPorts()); fluent.withSelector(instance.getSelector()); fluent.withSessionAffinity(instance.getSessionAffinity()); fluent.withType(instance.getType()); } public ServiceSpecBuilder( ServiceSpec instance ){
public ServiceSpecBuilder( ServiceSpec instance ){ this.fluent = this; this.withDeprecatedPublicIPs(instance.getDeprecatedPublicIPs()); this.withPortalIP(instance.getPortalIP()); this.withPorts(instance.getPorts()); this.withSelector(instance.getSelector()); this.withSessionAffinity(instance.getSessionAffinity()); this.withType(instance.getType()); }
public ServiceSpecBuilder( ServiceSpec instance ){ this.fluent = this; this.withCreateExternalLoadBalancer(instance.getCreateExternalLoadBalancer()); this.withPortalIP(instance.getPortalIP()); this.withPorts(instance.getPorts()); this.withPublicIPs(instance.getPublicIPs()); this.withSelector(instance.getSelector()); this.withSessionAffinity(instance.getSessionAffinity()); this.withType(instance.getType()); }
public ServiceSpecBuilder( ServiceSpecFluent<?> fluent , ServiceSpec instance ){ this.fluent = fluent; fluent.withCreateExternalLoadBalancer(instance.getCreateExternalLoadBalancer()); fluent.withPortalIP(instance.getPortalIP()); fluent.withPorts(instance.getPorts()); fluent.withPublicIPs(instance.getPublicIPs()); fluent.withSelector(instance.getSelector()); fluent.withSessionAffinity(instance.getSessionAffinity()); fluent.withType(instance.getType()); } public ServiceSpecBuilder( ServiceSpec instance ){
public ServiceSpecFluentImpl(ServiceSpec instance){ this.withClusterIP(instance.getClusterIP()); this.withDeprecatedPublicIPs(instance.getDeprecatedPublicIPs()); this.withExternalIPs(instance.getExternalIPs()); this.withLoadBalancerIP(instance.getLoadBalancerIP()); this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); this.withPortalIP(instance.getPortalIP()); this.withPorts(instance.getPorts()); this.withSelector(instance.getSelector()); this.withSessionAffinity(instance.getSessionAffinity()); this.withType(instance.getType()); }
public ServiceSpecBuilder(ServiceSpecFluent<?> fluent,ServiceSpec instance,Boolean validationEnabled){ this.fluent = fluent; fluent.withClusterIP(instance.getClusterIP()); fluent.withDeprecatedPublicIPs(instance.getDeprecatedPublicIPs()); fluent.withExternalIPs(instance.getExternalIPs()); fluent.withLoadBalancerIP(instance.getLoadBalancerIP()); fluent.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); fluent.withPortalIP(instance.getPortalIP()); fluent.withPorts(instance.getPorts()); fluent.withSelector(instance.getSelector()); fluent.withSessionAffinity(instance.getSessionAffinity()); fluent.withType(instance.getType()); this.validationEnabled = validationEnabled; } public ServiceSpecBuilder(ServiceSpec instance){
public ServiceSpecBuilder(ServiceSpec instance,Boolean validationEnabled){ this.fluent = this; this.withClusterIP(instance.getClusterIP()); this.withDeprecatedPublicIPs(instance.getDeprecatedPublicIPs()); this.withExternalIPs(instance.getExternalIPs()); this.withLoadBalancerIP(instance.getLoadBalancerIP()); this.withLoadBalancerSourceRanges(instance.getLoadBalancerSourceRanges()); this.withPortalIP(instance.getPortalIP()); this.withPorts(instance.getPorts()); this.withSelector(instance.getSelector()); this.withSessionAffinity(instance.getSessionAffinity()); this.withType(instance.getType()); this.validationEnabled = validationEnabled; }
.editOrNewSpec() .withPorts(servicePorts) .withSelector(service.getSpec().getSelector()) .withLoadBalancerSourceRanges(exposeSpec.getLoadBalancerSourceRanges() != null ? exposeSpec.getLoadBalancerSourceRanges() : Collections.emptyList()) .withType("LoadBalancer")