15
15
import javax .annotation .Nullable ;
16
16
import javax .validation .Valid ;
17
17
18
+ import com .google .gson .annotations .SerializedName ;
18
19
import io .kubernetes .client .custom .Quantity ;
20
+ import io .kubernetes .client .models .V1Affinity ;
19
21
import io .kubernetes .client .models .V1Capabilities ;
20
22
import io .kubernetes .client .models .V1Container ;
21
23
import io .kubernetes .client .models .V1EnvVar ;
24
+ import io .kubernetes .client .models .V1HostAlias ;
22
25
import io .kubernetes .client .models .V1HostPathVolumeSource ;
26
+ import io .kubernetes .client .models .V1LocalObjectReference ;
27
+ import io .kubernetes .client .models .V1PodDNSConfig ;
28
+ import io .kubernetes .client .models .V1PodReadinessGate ;
23
29
import io .kubernetes .client .models .V1PodSecurityContext ;
24
30
import io .kubernetes .client .models .V1ResourceRequirements ;
25
31
import io .kubernetes .client .models .V1SecurityContext ;
32
+ import io .kubernetes .client .models .V1Toleration ;
26
33
import io .kubernetes .client .models .V1Volume ;
27
34
import io .kubernetes .client .models .V1VolumeMount ;
28
35
import oracle .kubernetes .json .Description ;
36
43
class ServerPod extends KubernetesResource {
37
44
38
45
private static final Comparator <V1EnvVar > ENV_VAR_COMPARATOR =
39
- (a , b ) -> {
40
- return a .getName ().compareTo (b .getName ());
41
- };
46
+ Comparator .comparing (V1EnvVar ::getName );
42
47
private static final Comparator <V1Volume > VOLUME_COMPARATOR =
43
- (a , b ) -> {
44
- return a .getName ().compareTo (b .getName ());
45
- };
48
+ Comparator .comparing (V1Volume ::getName );
46
49
private static final Comparator <V1VolumeMount > VOLUME_MOUNT_COMPARATOR =
47
- (a , b ) -> {
48
- return a .getName ().compareTo (b .getName ());
49
- };
50
+ Comparator .comparing (V1VolumeMount ::getName );
51
+
50
52
/**
51
53
* Environment variables to pass while starting a server.
52
54
*
@@ -55,6 +57,7 @@ class ServerPod extends KubernetesResource {
55
57
@ Valid
56
58
@ Description ("A list of environment variables to add to a server." )
57
59
private List <V1EnvVar > env = new ArrayList <>();
60
+
58
61
/**
59
62
* Defines the settings for the liveness probe. Any that are not specified will default to the
60
63
* runtime liveness probe tuning settings.
@@ -63,6 +66,7 @@ class ServerPod extends KubernetesResource {
63
66
*/
64
67
@ Description ("Settings for the liveness probe associated with a server." )
65
68
private ProbeTuning livenessProbe = new ProbeTuning ();
69
+
66
70
/**
67
71
* Defines the settings for the readiness probe. Any that are not specified will default to the
68
72
* runtime readiness probe tuning settings.
@@ -71,6 +75,7 @@ class ServerPod extends KubernetesResource {
71
75
*/
72
76
@ Description ("Settings for the readiness probe associated with a server." )
73
77
private ProbeTuning readinessProbe = new ProbeTuning ();
78
+
74
79
/**
75
80
* Defines the key-value pairs for the pod to fit on a node, the node must have each of the
76
81
* indicated key-value pairs as labels.
@@ -80,6 +85,35 @@ class ServerPod extends KubernetesResource {
80
85
@ Description (
81
86
"Selector which must match a node's labels for the pod to be scheduled on that node." )
82
87
private Map <String , String > nodeSelector = new HashMap <>();
88
+
89
+ @ SerializedName ("activeDeadlineSeconds" )
90
+ private Long activeDeadlineSeconds = null ;
91
+ @ SerializedName ("affinity" )
92
+ private V1Affinity affinity = null ;
93
+ @ SerializedName ("dnsConfig" )
94
+ private V1PodDNSConfig dnsConfig = null ;
95
+ @ SerializedName ("hostAliases" )
96
+ private List <V1HostAlias > hostAliases = null ;
97
+ @ SerializedName ("priority" )
98
+ private Integer priority = null ;
99
+ @ SerializedName ("priorityClassName" )
100
+ private String priorityClassName = null ;
101
+ @ SerializedName ("readinessGates" )
102
+ private List <V1PodReadinessGate > readinessGates = null ;
103
+ @ SerializedName ("restartPolicy" )
104
+ private String restartPolicy = null ;
105
+ @ SerializedName ("runtimeClassName" )
106
+ private String runtimeClassName = null ;
107
+ @ SerializedName ("schedulerName" )
108
+ private String schedulerName = null ;
109
+ @ SerializedName ("securityContext" )
110
+ private V1PodSecurityContext securityContext = null ;
111
+ @ SerializedName ("shareProcessNamespace" )
112
+ private Boolean shareProcessNamespace = null ;
113
+ @ SerializedName ("tolerations" )
114
+ private List <V1Toleration > tolerations = null ;
115
+
116
+
83
117
/**
84
118
* Defines the requirements and limits for the pod server.
85
119
*
@@ -88,6 +122,7 @@ class ServerPod extends KubernetesResource {
88
122
@ Description ("Memory and CPU minimum requirements and limits for the server." )
89
123
private V1ResourceRequirements resources =
90
124
new V1ResourceRequirements ().limits (new HashMap <>()).requests (new HashMap <>());
125
+
91
126
/**
92
127
* PodSecurityContext holds pod-level security attributes and common container settings. Some
93
128
* fields are also present in container.securityContext. Field values of container.securityContext
@@ -97,6 +132,7 @@ class ServerPod extends KubernetesResource {
97
132
*/
98
133
@ Description ("Pod-level security attributes." )
99
134
private V1PodSecurityContext podSecurityContext = new V1PodSecurityContext ();
135
+
100
136
/**
101
137
* InitContainers holds a list of initialization containers that should be run before starting the
102
138
* main containers in this pod.
@@ -105,20 +141,23 @@ class ServerPod extends KubernetesResource {
105
141
*/
106
142
@ Description ("Initialization containers to be included in the server pod." )
107
143
private List <V1Container > initContainers = new ArrayList <>();
144
+
108
145
/**
109
146
* The additional containers.
110
147
*
111
148
* @since 2.1
112
149
*/
113
150
@ Description ("Additional containers to be included in the server pod." )
114
151
private List <V1Container > containers = new ArrayList <>();
152
+
115
153
/**
116
154
* Configures how the operator should shutdown the server instance.
117
155
*
118
156
* @since 2.2
119
157
*/
120
158
@ Description ("Configures how the operator should shutdown the server instance." )
121
159
private Shutdown shutdown = new Shutdown ();
160
+
122
161
/**
123
162
* SecurityContext holds security configuration that will be applied to a container. Some fields
124
163
* are present in both SecurityContext and PodSecurityContext. When both are set, the values in
@@ -129,13 +168,15 @@ class ServerPod extends KubernetesResource {
129
168
@ Description (
130
169
"Container-level security attributes. Will override any matching pod-level attributes." )
131
170
private V1SecurityContext containerSecurityContext = new V1SecurityContext ();
171
+
132
172
/**
133
173
* The additional volumes.
134
174
*
135
175
* @since 2.0
136
176
*/
137
177
@ Description ("Additional volumes to be created in the server pod." )
138
178
private List <V1Volume > volumes = new ArrayList <>();
179
+
139
180
/**
140
181
* The additional volume mounts.
141
182
*
0 commit comments