use of oracle.kubernetes.operator.wlsconfig.WlsDomainConfig in project weblogic-kubernetes-operator by oracle.
the class RestBackendImpl method getWLSConfiguredClusters.
private Map<String, WlsClusterConfig> getWLSConfiguredClusters(String namespace, String adminServerServiceName, String adminSecretName) {
WlsRetriever wlsConfigRetriever = WlsRetriever.create(namespace, adminServerServiceName, adminSecretName);
WlsDomainConfig wlsDomainConfig = wlsConfigRetriever.readConfig(principal);
return wlsDomainConfig.getClusterConfigs();
}
use of oracle.kubernetes.operator.wlsconfig.WlsDomainConfig in project weblogic-kubernetes-operator by oracle.
the class RestBackendImpl method getWLSConfiguredClusterSize.
private int getWLSConfiguredClusterSize(String adminServerServiceName, String cluster, String namespace, String adminSecretName) {
WlsRetriever wlsConfigRetriever = WlsRetriever.create(namespace, adminServerServiceName, adminSecretName);
WlsDomainConfig wlsDomainConfig = wlsConfigRetriever.readConfig(principal);
WlsClusterConfig wlsClusterConfig = wlsDomainConfig.getClusterConfig(cluster);
return wlsClusterConfig.getClusterSize();
}
use of oracle.kubernetes.operator.wlsconfig.WlsDomainConfig in project weblogic-kubernetes-operator by oracle.
the class IngressHelperTest method setUp.
@Before
public void setUp() throws ApiException {
// make sure test bed is clean
tearDown();
// Create domain
Domain domain = new Domain();
V1ObjectMeta metadata = new V1ObjectMeta();
metadata.setName("domianIngressHelperTest");
metadata.setNamespace(namespace);
domain.setMetadata(metadata);
DomainSpec spec = new DomainSpec();
spec.setDomainName("base_domain");
spec.setDomainUID(domainUID);
domain.setSpec(spec);
info = new DomainPresenceInfo(domain);
// Create scan
WlsDomainConfig scan = new WlsDomainConfig();
WlsServerConfig server1Scan = new WlsServerConfig(server1Name, server1Port, server1Name, null);
WlsServerConfig server2Scan = new WlsServerConfig(server2Name, server2Port, server2Name, null);
scan.getServerConfigs().put(server1Name, server1Scan);
scan.getServerConfigs().put(server2Name, server2Scan);
WlsClusterConfig cluster1Scan = new WlsClusterConfig(clusterName);
cluster1Scan.getServerConfigs().add(server1Scan);
cluster1Scan.getServerConfigs().add(server2Scan);
scan.getClusterConfigs().put(clusterName, cluster1Scan);
info.setScan(scan);
ServerKubernetesObjects sko = new ServerKubernetesObjects();
V1Service service = new V1Service();
V1ObjectMeta sm = new V1ObjectMeta();
sm.setName(service1Name);
sm.setNamespace(namespace);
service.setMetadata(sm);
V1ServiceSpec ss = new V1ServiceSpec();
V1ServicePort port = new V1ServicePort();
port.setPort(server1Port);
ss.addPortsItem(port);
service.setSpec(ss);
sko.getService().set(service);
info.getServers().put(server1Name, sko);
sko = new ServerKubernetesObjects();
service = new V1Service();
sm = new V1ObjectMeta();
sm.setName(service2Name);
sm.setNamespace(namespace);
service.setMetadata(sm);
ss = new V1ServiceSpec();
port = new V1ServicePort();
port.setPort(server2Port);
ss.addPortsItem(port);
service.setSpec(ss);
sko.getService().set(service);
info.getServers().put(server2Name, sko);
engine = new Engine("IngressHelperTest");
}
Aggregations