Skip to content

Commit c77121c

Browse files
committed
More affinity updates and bump version
1 parent dd4e649 commit c77121c

File tree

17 files changed

+263
-54
lines changed

17 files changed

+263
-54
lines changed

docs/domains/Domain.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,6 @@
503503
"$ref": "https://github.com/garethr/kubernetes-json-schema/blob/master/v1.13.5/_definitions.json#/definitions/io.k8s.api.core.v1.EnvVar"
504504
}
505505
},
506-
"priority": {
507-
"description": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.",
508-
"type": "number"
509-
},
510506
"restartPolicy": {
511507
"description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy",
512508
"type": "string"

docs/domains/Domain.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ ServerPod describes the configuration for a Kubernetes pod for a server.
111111
| `nodeName` | string | NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. |
112112
| `nodeSelector` | Map | Selector which must match a node's labels for the pod to be scheduled on that node. |
113113
| `podSecurityContext` | [Pod Security Context](k8s1.13.5.md#pod-security-context) | Pod-level security attributes. |
114-
| `priority` | number | The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. |
115114
| `priorityClassName` | string | If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. |
116115
| `readinessGates` | array of [Pod Readiness Gate](k8s1.13.5.md#pod-readiness-gate) | If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md |
117116
| `readinessProbe` | [Probe Tuning](#probe-tuning) | Settings for the readiness probe associated with a server. |

docs/domains/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,10 +1423,6 @@
14231423
"$ref": "https://github.com/garethr/kubernetes-json-schema/blob/master/v1.13.5/_definitions.json#/definitions/io.k8s.api.core.v1.EnvVar"
14241424
}
14251425
},
1426-
"priority": {
1427-
"description": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.",
1428-
"type": "number"
1429-
},
14301426
"restartPolicy": {
14311427
"description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy",
14321428
"type": "string"

integration-tests/src/test/resources/OperatorIT.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ weblogicImageTag = 12.2.1.3
1111
weblogicImageDevTag = 12.2.1.3-dev
1212
weblogicImageName = container-registry.oracle.com/middleware/weblogic
1313
OCR_SERVER=container-registry.oracle.com
14-
DOMAIN_API_VERSION = weblogic.oracle/v4
14+
DOMAIN_API_VERSION = weblogic.oracle/v5

kubernetes/samples/scripts/common/domain-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This is an example of how to define a Domain resource.
66
#
7-
apiVersion: "weblogic.oracle/v4"
7+
apiVersion: "weblogic.oracle/v5"
88
kind: Domain
99
metadata:
1010
name: %DOMAIN_UID%

kubernetes/samples/scripts/create-weblogic-domain/manually-create-domain/domain.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This is an example of how to define a Domain resource. Please read through the comments which explain
66
# what updates are needed.
77
#
8-
apiVersion: "weblogic.oracle/v4"
8+
apiVersion: "weblogic.oracle/v5"
99
kind: Domain
1010
metadata:
1111
# Update this with the `domainUID` of your domain:

model/src/main/java/oracle/kubernetes/operator/KubernetesConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public interface KubernetesConstants {
2222
String DOMAIN_PLURAL = "domains";
2323
String DOMAIN_SINGULAR = "domain";
2424
String DOMAIN_SHORT = "dom";
25-
String DOMAIN_VERSION = "v4";
26-
String[] DOMAIN_ALTERNATE_VERSIONS = {"v2", "v3"};
25+
String DOMAIN_VERSION = "v5";
26+
String[] DOMAIN_ALTERNATE_VERSIONS = {"v2", "v3", "v4"};
2727

2828
boolean DEFAULT_INCLUDE_SERVER_OUT_IN_POD_LOG = true;
2929

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ public V1Affinity getAffinity() {
169169
return serverPod.getAffinity();
170170
}
171171

172-
public Integer getPriority() {
173-
return serverPod.getPriority();
174-
}
175-
176172
public String getPriorityClassName() {
177173
return serverPod.getPriorityClassName();
178174
}

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
import java.util.Map;
1010
import javax.annotation.Nonnull;
1111

12+
import io.kubernetes.client.models.V1Affinity;
1213
import io.kubernetes.client.models.V1Container;
14+
import io.kubernetes.client.models.V1PodReadinessGate;
15+
import io.kubernetes.client.models.V1Toleration;
1316

1417
public abstract class ClusterSpec {
1518
/**
@@ -79,4 +82,21 @@ public List<V1Container> getContainers() {
7982
*/
8083
@Nonnull
8184
public abstract Shutdown getShutdown();
85+
86+
public abstract V1Affinity getAffinity();
87+
88+
public abstract String getPriorityClassName();
89+
90+
public abstract List<V1PodReadinessGate> getReadinessGates();
91+
92+
public abstract String getRestartPolicy();
93+
94+
public abstract String getRuntimeClassName();
95+
96+
public abstract String getNodeName();
97+
98+
public abstract String getSchedulerName();
99+
100+
public abstract List<V1Toleration> getTolerations();
101+
82102
}

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import java.util.List;
88
import java.util.Map;
99

10+
import io.kubernetes.client.models.V1Affinity;
1011
import io.kubernetes.client.models.V1Container;
12+
import io.kubernetes.client.models.V1PodReadinessGate;
13+
import io.kubernetes.client.models.V1Toleration;
1114

1215
public class ClusterSpecCommonImpl extends ClusterSpec {
1316
private final Cluster cluster;
@@ -60,4 +63,45 @@ public List<V1Container> getContainers() {
6063
public Shutdown getShutdown() {
6164
return cluster.getShutdown();
6265
}
66+
67+
@Override
68+
public V1Affinity getAffinity() {
69+
return cluster.getAffinity();
70+
}
71+
72+
@Override
73+
public String getPriorityClassName() {
74+
return cluster.getPriorityClassName();
75+
}
76+
77+
@Override
78+
public List<V1PodReadinessGate> getReadinessGates() {
79+
return cluster.getReadinessGates();
80+
}
81+
82+
@Override
83+
public String getRestartPolicy() {
84+
return cluster.getRestartPolicy();
85+
}
86+
87+
@Override
88+
public String getRuntimeClassName() {
89+
return cluster.getRuntimeClassName();
90+
}
91+
92+
@Override
93+
public String getNodeName() {
94+
return cluster.getNodeName();
95+
}
96+
97+
@Override
98+
public String getSchedulerName() {
99+
return cluster.getSchedulerName();
100+
}
101+
102+
@Override
103+
public List<V1Toleration> getTolerations() {
104+
return cluster.getTolerations();
105+
}
106+
63107
}

0 commit comments

Comments
 (0)