Skip to content

Commit 7a76a1b

Browse files
committed
Merge branch 'readiness-get-action' into 'main'
Support customization of readiness probe get action See merge request weblogic-cloud/weblogic-kubernetes-operator!4654
2 parents 2a87c6a + 342009d commit 7a76a1b

File tree

25 files changed

+19116
-716
lines changed

25 files changed

+19116
-716
lines changed

documentation/domains/Cluster.json

Lines changed: 19 additions & 94 deletions
Large diffs are not rendered by default.

documentation/domains/Cluster.md

Lines changed: 18 additions & 43 deletions
Large diffs are not rendered by default.

documentation/domains/Domain.json

Lines changed: 38 additions & 113 deletions
Large diffs are not rendered by default.

documentation/domains/Domain.md

Lines changed: 36 additions & 61 deletions
Large diffs are not rendered by default.

documentation/domains/k8s1.13.5.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ HostAlias holds the mapping between IP and hostnames that will be injected as an
109109
| `hostnames` | Array of string | Hostnames for the above IP address. |
110110
| `ip` | string | IP address of the host file entry. |
111111

112+
### Probe
113+
114+
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
115+
116+
| Name | Type | Description |
117+
| --- | --- | --- |
118+
| `exec` | [Exec Action](#exec-action) | One and only one of the following should be specified. Exec specifies the action to take. |
119+
| `failureThreshold` | integer | Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
120+
| `httpGet` | [HTTP Get Action](#http-get-action) | HTTPGet specifies the http request to perform. |
121+
| `initialDelaySeconds` | integer | Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
122+
| `periodSeconds` | integer | How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
123+
| `successThreshold` | integer | Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. |
124+
| `tcpSocket` | [TCP Socket Action](#tcp-socket-action) | TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported |
125+
| `timeoutSeconds` | integer | Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
126+
112127
### Pod Security Context
113128

114129
PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
@@ -308,6 +323,21 @@ A label selector is a label query over a set of resources. The result of matchLa
308323
| Name | Type | Description |
309324
| --- | --- | --- |
310325

326+
### Exec Action
327+
328+
| Name | Type | Description |
329+
| --- | --- | --- |
330+
331+
### HTTP Get Action
332+
333+
| Name | Type | Description |
334+
| --- | --- | --- |
335+
336+
### TCP Socket Action
337+
338+
| Name | Type | Description |
339+
| --- | --- | --- |
340+
311341
### Sysctl
312342

313343
| Name | Type | Description |

documentation/domains/k8s1.28.2.md

Lines changed: 538 additions & 0 deletions
Large diffs are not rendered by default.

json-schema-generator/src/main/java/oracle/kubernetes/json/KubernetesSchemaReference.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2019, 2023, Oracle and/or its affiliates.
1+
// Copyright (c) 2019, 2024, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.json;
@@ -10,7 +10,7 @@
1010

1111
public class KubernetesSchemaReference {
1212
private static final String K8S_SCHEMA_URL =
13-
"https://github.com/garethr/kubernetes-json-schema/blob/master/v%s/_definitions.json";
13+
"https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v%s/_definitions.json";
1414
private static final String K8S_SCHEMA_CACHE = "caches/kubernetes-%s.json";
1515
private static final String K8S_MARKDOWN_LINK = "k8s%s.md";
1616

json-schema-generator/src/main/resources/oracle/kubernetes/json/caches/kubernetes-1.28.2.json

Lines changed: 17775 additions & 0 deletions
Large diffs are not rendered by default.

json-schema-generator/src/test/java/oracle/kubernetes/json/SchemaGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2018, 2023, Oracle and/or its affiliates.
1+
// Copyright (c) 2018, 2024, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.json;
@@ -27,7 +27,7 @@
2727
class SchemaGeneratorTest {
2828

2929
private static final String K8S_SCHEMA_URL =
30-
"https://github.com/garethr/kubernetes-json-schema/blob/master/v1.9.0/_definitions.json";
30+
"https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.9.0/_definitions.json";
3131
private static final String K8S_CACHE_FILE = "caches/kubernetes-1.9.0.json";
3232
private final SchemaGenerator generator = new SchemaGenerator();
3333

json-schema-generator/src/test/java/oracle/kubernetes/json/YamlDocGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2019, 2023, Oracle and/or its affiliates.
1+
// Copyright (c) 2019, 2024, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
package oracle.kubernetes.json;
@@ -20,7 +20,7 @@
2020
import static org.hamcrest.junit.MatcherAssert.assertThat;
2121

2222
class YamlDocGeneratorTest {
23-
private static final String K8S_VERSION = "1.13.5";
23+
private static final String K8S_VERSION = "1.28.2";
2424
private final SchemaGenerator schemaGenerator = new SchemaGenerator();
2525
@SuppressWarnings("unused")
2626
@Description("An annotated field")

kubernetes/crd/cluster-crd.yaml

Lines changed: 119 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1
55
kind: CustomResourceDefinition
66
metadata:
77
annotations:
8-
weblogic.sha256: 7146de067298f75bf803e2c8acf9f88980d1d5770e375122bcbb1fe4e6f9a64b
8+
weblogic.sha256: 25a60de9429ea0f9bad45b3083d18c9ff56c86c62a123cdff67af4bacf82eec5
99
name: clusters.weblogic.oracle
1010
spec:
1111
group: weblogic.oracle
@@ -264,34 +264,77 @@ spec:
264264
type: array
265265
readinessProbe:
266266
description: Settings for the readiness probe associated with
267-
a WebLogic Server instance.
267+
a WebLogic Server instance. If not specified, the operator will
268+
create an HTTP probe accessing the /weblogic/ready path. If
269+
an HTTP probe is specified then the operator will fill in `path`,
270+
`port`, and `scheme`, if they are missing. The operator will
271+
also fill in any missing tuning-related fields if they are unspecified.
272+
Tuning-related fields will be inherited from the domain and
273+
cluster scopes unless a more specific scope defines a different
274+
action, such as a different HTTP path to access.
268275
properties:
276+
terminationGracePeriodSeconds:
277+
type: integer
269278
failureThreshold:
270-
default: 1
271-
description: Number of times the check is performed before
272-
giving up. Giving up in case of liveness probe means restarting
273-
the container. In case of readiness probe, the Pod will
274-
be marked Unready. Defaults to 1.
275-
minimum: 1
276279
type: integer
277280
periodSeconds:
278-
description: The number of seconds between checks.
279281
type: integer
282+
tcpSocket:
283+
properties:
284+
port:
285+
x-kubernetes-int-or-string: true
286+
host:
287+
type: string
288+
required:
289+
- port
290+
type: object
280291
timeoutSeconds:
281-
description: The number of seconds with no response that indicates
282-
a failure.
283292
type: integer
284293
successThreshold:
285-
default: 1
286-
description: Minimum number of times the check needs to pass
287-
for the probe to be considered successful after having failed.
288-
Defaults to 1. Must be 1 for liveness Probe.
289-
minimum: 1
290294
type: integer
291295
initialDelaySeconds:
292-
description: The number of seconds before the first check
293-
is performed.
294296
type: integer
297+
exec:
298+
properties:
299+
command:
300+
items:
301+
type: string
302+
type: array
303+
type: object
304+
grpc:
305+
properties:
306+
port:
307+
type: integer
308+
service:
309+
type: string
310+
required:
311+
- port
312+
type: object
313+
httpGet:
314+
properties:
315+
path:
316+
type: string
317+
scheme:
318+
type: string
319+
port:
320+
x-kubernetes-int-or-string: true
321+
host:
322+
type: string
323+
httpHeaders:
324+
items:
325+
type: object
326+
properties:
327+
name:
328+
type: string
329+
value:
330+
type: string
331+
required:
332+
- name
333+
- value
334+
type: array
335+
required:
336+
- port
337+
type: object
295338
type: object
296339
containerSecurityContext:
297340
description: 'Container-level security attributes. Will override
@@ -396,34 +439,75 @@ spec:
396439
type: integer
397440
livenessProbe:
398441
description: Settings for the liveness probe associated with a
399-
WebLogic Server instance.
442+
WebLogic Server instance. If not specified, the operator will
443+
create a probe that executes a script provided by the operator.
444+
The operator will also fill in any missing tuning-related fields,
445+
if they are unspecified. Tuning-related fields will be inherited
446+
from the domain and cluster scopes unless a more specific scope
447+
defines a different action, such as a different script to execute.
400448
properties:
449+
terminationGracePeriodSeconds:
450+
type: integer
401451
failureThreshold:
402-
default: 1
403-
description: Number of times the check is performed before
404-
giving up. Giving up in case of liveness probe means restarting
405-
the container. In case of readiness probe, the Pod will
406-
be marked Unready. Defaults to 1.
407-
minimum: 1
408452
type: integer
409453
periodSeconds:
410-
description: The number of seconds between checks.
411454
type: integer
455+
tcpSocket:
456+
properties:
457+
port:
458+
x-kubernetes-int-or-string: true
459+
host:
460+
type: string
461+
required:
462+
- port
463+
type: object
412464
timeoutSeconds:
413-
description: The number of seconds with no response that indicates
414-
a failure.
415465
type: integer
416466
successThreshold:
417-
default: 1
418-
description: Minimum number of times the check needs to pass
419-
for the probe to be considered successful after having failed.
420-
Defaults to 1. Must be 1 for liveness Probe.
421-
minimum: 1
422467
type: integer
423468
initialDelaySeconds:
424-
description: The number of seconds before the first check
425-
is performed.
426469
type: integer
470+
exec:
471+
properties:
472+
command:
473+
items:
474+
type: string
475+
type: array
476+
type: object
477+
grpc:
478+
properties:
479+
port:
480+
type: integer
481+
service:
482+
type: string
483+
required:
484+
- port
485+
type: object
486+
httpGet:
487+
properties:
488+
path:
489+
type: string
490+
scheme:
491+
type: string
492+
port:
493+
x-kubernetes-int-or-string: true
494+
host:
495+
type: string
496+
httpHeaders:
497+
items:
498+
type: object
499+
properties:
500+
name:
501+
type: string
502+
value:
503+
type: string
504+
required:
505+
- name
506+
- value
507+
type: array
508+
required:
509+
- port
510+
type: object
427511
type: object
428512
topologySpreadConstraints:
429513
description: TopologySpreadConstraints describes how a group of

0 commit comments

Comments
 (0)