Skip to content

Commit

Permalink
Merge branch 'readiness-get-action' into 'main'
Browse files Browse the repository at this point in the history
Support customization of readiness probe get action

See merge request weblogic-cloud/weblogic-kubernetes-operator!4654
  • Loading branch information
rjeberhard committed Apr 15, 2024
2 parents 2a87c6a + 342009d commit 7a76a1b
Show file tree
Hide file tree
Showing 25 changed files with 19,116 additions and 716 deletions.
113 changes: 19 additions & 94 deletions documentation/domains/Cluster.json

Large diffs are not rendered by default.

61 changes: 18 additions & 43 deletions documentation/domains/Cluster.md

Large diffs are not rendered by default.

151 changes: 38 additions & 113 deletions documentation/domains/Domain.json

Large diffs are not rendered by default.

97 changes: 36 additions & 61 deletions documentation/domains/Domain.md

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions documentation/domains/k8s1.13.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,21 @@ HostAlias holds the mapping between IP and hostnames that will be injected as an
| `hostnames` | Array of string | Hostnames for the above IP address. |
| `ip` | string | IP address of the host file entry. |

### Probe

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

| Name | Type | Description |
| --- | --- | --- |
| `exec` | [Exec Action](#exec-action) | One and only one of the following should be specified. Exec specifies the action to take. |
| `failureThreshold` | integer | Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
| `httpGet` | [HTTP Get Action](#http-get-action) | HTTPGet specifies the http request to perform. |
| `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 |
| `periodSeconds` | integer | How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
| `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. |
| `tcpSocket` | [TCP Socket Action](#tcp-socket-action) | TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported |
| `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 |

### Pod Security Context

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.
Expand Down Expand Up @@ -308,6 +323,21 @@ A label selector is a label query over a set of resources. The result of matchLa
| Name | Type | Description |
| --- | --- | --- |

### Exec Action

| Name | Type | Description |
| --- | --- | --- |

### HTTP Get Action

| Name | Type | Description |
| --- | --- | --- |

### TCP Socket Action

| Name | Type | Description |
| --- | --- | --- |

### Sysctl

| Name | Type | Description |
Expand Down
538 changes: 538 additions & 0 deletions documentation/domains/k8s1.28.2.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019, 2023, Oracle and/or its affiliates.
// Copyright (c) 2019, 2024, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.kubernetes.json;
Expand All @@ -10,7 +10,7 @@

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

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018, 2023, Oracle and/or its affiliates.
// Copyright (c) 2018, 2024, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.kubernetes.json;
Expand Down Expand Up @@ -27,7 +27,7 @@
class SchemaGeneratorTest {

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019, 2023, Oracle and/or its affiliates.
// Copyright (c) 2019, 2024, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

package oracle.kubernetes.json;
Expand All @@ -20,7 +20,7 @@
import static org.hamcrest.junit.MatcherAssert.assertThat;

class YamlDocGeneratorTest {
private static final String K8S_VERSION = "1.13.5";
private static final String K8S_VERSION = "1.28.2";
private final SchemaGenerator schemaGenerator = new SchemaGenerator();
@SuppressWarnings("unused")
@Description("An annotated field")
Expand Down
154 changes: 119 additions & 35 deletions kubernetes/crd/cluster-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
weblogic.sha256: 7146de067298f75bf803e2c8acf9f88980d1d5770e375122bcbb1fe4e6f9a64b
weblogic.sha256: 25a60de9429ea0f9bad45b3083d18c9ff56c86c62a123cdff67af4bacf82eec5
name: clusters.weblogic.oracle
spec:
group: weblogic.oracle
Expand Down Expand Up @@ -264,34 +264,77 @@ spec:
type: array
readinessProbe:
description: Settings for the readiness probe associated with
a WebLogic Server instance.
a WebLogic Server instance. If not specified, the operator will
create an HTTP probe accessing the /weblogic/ready path. If
an HTTP probe is specified then the operator will fill in `path`,
`port`, and `scheme`, if they are missing. The operator will
also fill in any missing tuning-related fields if they are unspecified.
Tuning-related fields will be inherited from the domain and
cluster scopes unless a more specific scope defines a different
action, such as a different HTTP path to access.
properties:
terminationGracePeriodSeconds:
type: integer
failureThreshold:
default: 1
description: Number of times the check is performed before
giving up. Giving up in case of liveness probe means restarting
the container. In case of readiness probe, the Pod will
be marked Unready. Defaults to 1.
minimum: 1
type: integer
periodSeconds:
description: The number of seconds between checks.
type: integer
tcpSocket:
properties:
port:
x-kubernetes-int-or-string: true
host:
type: string
required:
- port
type: object
timeoutSeconds:
description: The number of seconds with no response that indicates
a failure.
type: integer
successThreshold:
default: 1
description: Minimum number of times the check needs to pass
for the probe to be considered successful after having failed.
Defaults to 1. Must be 1 for liveness Probe.
minimum: 1
type: integer
initialDelaySeconds:
description: The number of seconds before the first check
is performed.
type: integer
exec:
properties:
command:
items:
type: string
type: array
type: object
grpc:
properties:
port:
type: integer
service:
type: string
required:
- port
type: object
httpGet:
properties:
path:
type: string
scheme:
type: string
port:
x-kubernetes-int-or-string: true
host:
type: string
httpHeaders:
items:
type: object
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: array
required:
- port
type: object
type: object
containerSecurityContext:
description: 'Container-level security attributes. Will override
Expand Down Expand Up @@ -396,34 +439,75 @@ spec:
type: integer
livenessProbe:
description: Settings for the liveness probe associated with a
WebLogic Server instance.
WebLogic Server instance. If not specified, the operator will
create a probe that executes a script provided by the operator.
The operator will also fill in any missing tuning-related fields,
if they are unspecified. Tuning-related fields will be inherited
from the domain and cluster scopes unless a more specific scope
defines a different action, such as a different script to execute.
properties:
terminationGracePeriodSeconds:
type: integer
failureThreshold:
default: 1
description: Number of times the check is performed before
giving up. Giving up in case of liveness probe means restarting
the container. In case of readiness probe, the Pod will
be marked Unready. Defaults to 1.
minimum: 1
type: integer
periodSeconds:
description: The number of seconds between checks.
type: integer
tcpSocket:
properties:
port:
x-kubernetes-int-or-string: true
host:
type: string
required:
- port
type: object
timeoutSeconds:
description: The number of seconds with no response that indicates
a failure.
type: integer
successThreshold:
default: 1
description: Minimum number of times the check needs to pass
for the probe to be considered successful after having failed.
Defaults to 1. Must be 1 for liveness Probe.
minimum: 1
type: integer
initialDelaySeconds:
description: The number of seconds before the first check
is performed.
type: integer
exec:
properties:
command:
items:
type: string
type: array
type: object
grpc:
properties:
port:
type: integer
service:
type: string
required:
- port
type: object
httpGet:
properties:
path:
type: string
scheme:
type: string
port:
x-kubernetes-int-or-string: true
host:
type: string
httpHeaders:
items:
type: object
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: array
required:
- port
type: object
type: object
topologySpreadConstraints:
description: TopologySpreadConstraints describes how a group of
Expand Down
Loading

0 comments on commit 7a76a1b

Please sign in to comment.