Skip to content

Commit 38ddf81

Browse files
committed
Roll services using recipe hash
1 parent 3542c36 commit 38ddf81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2115
-1087
lines changed

docs/domains/Domain.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@
5151
"items": {
5252
"$ref": "#/definitions/Channel"
5353
}
54+
},
55+
"annotations": {
56+
"description": "Annotations to associate with the external channel service",
57+
"$ref": "#/definitions/Map"
58+
},
59+
"labels": {
60+
"description": "Labels to associate with the external channel service",
61+
"$ref": "#/definitions/Map"
5462
}
5563
}
5664
},

docs/domains/Domain.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ ServerPod describes the configuration for a Kubernetes pod for a server.
144144

145145
| Name | Type | Description |
146146
| --- | --- | --- |
147+
| annotations | Map | Annotations to associate with the external channel service |
147148
| channels | array of [Channel](#channel) | Specifies which of the admin server's WebLogic channels should be exposed outside the Kubernetes cluster via a node port service, along with the node port for each channel. If not specified, the admin server's node port service will not be created. |
149+
| labels | Map | Labels to associate with the external channel service |
148150

149151
### Probe Tuning
150152

docs/domains/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,14 @@
971971
"items": {
972972
"$ref": "#/definitions/Channel"
973973
}
974+
},
975+
"annotations": {
976+
"description": "Annotations to associate with the external channel service",
977+
"$ref": "#/definitions/Map"
978+
},
979+
"labels": {
980+
"description": "Labels to associate with the external channel service",
981+
"$ref": "#/definitions/Map"
974982
}
975983
}
976984
},

model/src/main/java/oracle/kubernetes/weblogic/domain/ClusterConfigurator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/** An interface for an object to configure a cluster in a test. */
1212
@SuppressWarnings("UnusedReturnValue")
13-
public interface ClusterConfigurator {
13+
public interface ClusterConfigurator extends ServiceConfigurator {
1414
ClusterConfigurator withReplicas(int replicas);
1515

1616
ClusterConfigurator withMaxUnavailable(int maxUnavailable);

model/src/main/java/oracle/kubernetes/weblogic/domain/EffectiveConfigurationFactory.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package oracle.kubernetes.weblogic.domain;
66

77
import java.util.List;
8-
import oracle.kubernetes.weblogic.domain.model.Channel;
8+
import oracle.kubernetes.weblogic.domain.model.AdminServerSpec;
99
import oracle.kubernetes.weblogic.domain.model.ClusterSpec;
1010
import oracle.kubernetes.weblogic.domain.model.ServerSpec;
1111

@@ -15,7 +15,7 @@
1515
*/
1616
public interface EffectiveConfigurationFactory {
1717

18-
ServerSpec getAdminServerSpec();
18+
AdminServerSpec getAdminServerSpec();
1919

2020
ServerSpec getServerSpec(String serverName, String clusterName);
2121

@@ -30,8 +30,4 @@ public interface EffectiveConfigurationFactory {
3030
boolean isShuttingDown();
3131

3232
List<String> getAdminServerChannelNames();
33-
34-
List<Channel> getAdminServerChannels();
35-
36-
Integer getDefaultReplicaLimit();
3733
}

model/src/main/java/oracle/kubernetes/weblogic/domain/ServerConfigurator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
/** An interface for an object to configure a server in a test. */
1212
@SuppressWarnings("UnusedReturnValue")
13-
public interface ServerConfigurator {
13+
public interface ServerConfigurator extends ServiceConfigurator {
1414
ServerConfigurator withDesiredState(String desiredState);
1515

1616
ServerConfigurator withEnvironmentVariable(String name, String value);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at
3+
// http://oss.oracle.com/licenses/upl.
4+
5+
package oracle.kubernetes.weblogic.domain;
6+
7+
@SuppressWarnings("UnusedReturnValue")
8+
public interface ServiceConfigurator {
9+
ServiceConfigurator withServiceLabel(String name, String value);
10+
11+
ServiceConfigurator withServiceAnnotation(String name, String value);
12+
}

model/src/main/java/oracle/kubernetes/weblogic/domain/model/AdminServer.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,6 @@ public List<Channel> getChannels() {
6363
return adminService.getChannels();
6464
}
6565

66-
/**
67-
* Gets channel.
68-
*
69-
* @param channelName Channel name
70-
* @return Channel
71-
*/
72-
public Channel getChannel(String channelName) {
73-
if (adminService != null) {
74-
for (Channel c : adminService.getChannels()) {
75-
if (channelName.equals(c.getChannelName())) {
76-
return c;
77-
}
78-
}
79-
}
80-
return null;
81-
}
82-
8366
@Override
8467
public String toString() {
8568
return new ToStringBuilder(this)
@@ -115,10 +98,7 @@ public int hashCode() {
11598
}
11699

117100
public AdminService getAdminService() {
101+
if (adminService == null) adminService = new AdminService();
118102
return adminService;
119103
}
120-
121-
public void setAdminService(AdminService adminService) {
122-
this.adminService = adminService;
123-
}
124104
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2019 Oracle Corporation and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at
3+
// http://oss.oracle.com/licenses/upl.
4+
5+
package oracle.kubernetes.weblogic.domain.model;
6+
7+
/** Represents the effective configuration for an admin server, as seen by the operator runtime. */
8+
public interface AdminServerSpec extends ServerSpec {
9+
10+
/**
11+
* Returns the admin service configuration for the admin server, which controls the external
12+
* channel service.
13+
*
14+
* @return the admin service configuration
15+
*/
16+
AdminService getAdminService();
17+
}
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
// Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
// Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
22
// Licensed under the Universal Permissive License v 1.0 as shown at
33
// http://oss.oracle.com/licenses/upl.
44

55
package oracle.kubernetes.weblogic.domain.model;
66

7-
public class AdminServerSpecCommonImpl extends ServerSpecCommonImpl {
8-
public AdminServerSpecCommonImpl(DomainSpec spec, AdminServer server) {
7+
public class AdminServerSpecCommonImpl extends ServerSpecCommonImpl implements AdminServerSpec {
8+
private final AdminServer adminServer;
9+
10+
AdminServerSpecCommonImpl(DomainSpec spec, AdminServer server) {
911
super(spec, server, null, null);
12+
adminServer = server;
13+
}
14+
15+
@Override
16+
public AdminService getAdminService() {
17+
return adminServer.getAdminService();
1018
}
1119
}

0 commit comments

Comments
 (0)