Skip to content

Commit 4988806

Browse files
OWLS-89704 - Documented clusterService.sessionAffinity cluster spec element and updated generated desciption. (#3662)
* Documented `clusterService.sessionAffinity` cluster spec element and updated generated description. (#3662) Co-authored-by: Rosemary Marano <[email protected]>
1 parent df88235 commit 4988806

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

documentation/4.0/content/managing-domains/domain-resource.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ $ kubectl describe cluster <cluster-resource-name> -n <namespace>
7171

7272
### Domain and cluster resource attribute references
7373

74-
The domain resource `metadata` section names the Domain and its namespace. The name of the Domain is the default value for the `domainUID` which is used by the operator to distinguish domains running in the Kubernetes cluster that may have the same domain name. The Domain name must be unique in the namespace and the `domainUID` should be unique across the cluster. The `domainUID`, Domain resource name, and domain name (from the WebLogic domain configuration) may all be different. Similarly, the cluster resource `metadata` section names the Cluster and its namespace. The `metadata.name` of a cluster resource must be referenced from the `spec.clusters` field of the domain resource. This name does not need to be the same as the name of the WebLogic cluster. The `spec.clusterName` field of the cluster resource must name the WebLogic cluster from the domain configuration.
74+
The domain resource `metadata` section names the Domain and its namespace. The name of the Domain is the default value for the `domainUID` which is used by the operator to distinguish domains running in the Kubernetes cluster that may have the same domain name. The Domain name must be unique in the namespace and the `domainUID` should be unique across the cluster. The `domainUID`, Domain resource name, and domain name (from the WebLogic domain configuration) may all be different. Similarly, the cluster resource `metadata` section names the Cluster and its namespace. The `metadata.name` of a cluster resource must be referenced from the `spec.clusters` field of the domain resource. This name does not need to be the same as the name of the WebLogic cluster. The `spec.clusterName` field of the cluster resource must name the WebLogic cluster from the domain configuration.
7575

7676
The domain resource `spec` section describes the intended running state of the domain, including intended runtime state of WebLogic Server instances, and details about Kubernetes Pod or Service generation, such as resource constraints, scheduling requirements, or volume mounts. The cluster resource `spec` section describes the intended number of member servers of that cluster to run and can set or override the other settings inherited from the domain resource.
7777

7878
The operator automatically updates the `status` section of a deployed domain or cluster resource to describe the actual running state, including WebLogic Server instance runtime states and current health.
7979

8080
Here are some references you can use for the fields in these sections:
8181

82-
- See [Domain spec elements](#domain-spec-elements), [Pod Generation](#pod-generation), and [JVM memory and Java option environment variables](#jvm-memory-and-java-option-environment-variables) in this doc.
82+
- See [Domain and cluster spec elements](#domain-and-cluster-spec-elements), [Pod Generation](#pod-generation), and [JVM memory and Java option environment variables](#jvm-memory-and-java-option-environment-variables) in this doc.
8383
- See the Domain Resource [reference document](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Domain.md).
8484
- See the Cluster Resource [reference document](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Cluster.md).
8585
- Use [kubectl explain](#using-kubectl-explain) from the command line.
@@ -108,9 +108,11 @@ DESCRIPTION:
108108
```
109109
**NOTE**: The `VERSION` field's value may be different, depending on the operator version you are using.
110110

111-
### Domain spec elements
111+
### Domain and cluster spec elements
112112

113-
The Domain `spec` section contains elements for configuring the domain operation and sub-sections specific to the Administration Server, specific clusters, or specific Managed Servers.
113+
The Domain `spec` section contains elements for configuring the domain operation and sub-sections specific to the Administration Server, specific clusters, or specific Managed Servers. The Cluster `spec` section contains elements for configuring the lifecycle options for all of the Managed Server members of a WebLogic cluster, including Java options, environment variables, additional Pod content, and the ability to explicitly start, stop, or restart cluster members.
114+
115+
#### Domain spec elements
114116

115117
Elements related to domain identification, container image, and domain home:
116118

@@ -206,8 +208,18 @@ The elements `serverStartPolicy`, `serverPod` and `serverService` are repeated u
206208
Elements related to the customization of liveness and readiness probes:
207209
* See [Liveness probe customization]({{< relref "/managing-domains/domain-lifecycle/liveness-readiness-probe-customization#liveness-probe-customization" >}}) for details about the elements related to liveness probe customization and [Readiness probe customization]({{< relref "/managing-domains/domain-lifecycle/liveness-readiness-probe-customization#readiness-probe-customization" >}}) for details about the elements related to readiness probe customization.
208210

211+
#### Cluster spec elements
212+
213+
For a complete list of the Cluster spec elements, see [Cluster Spec](https://github.com/oracle/weblogic-kubernetes-operator/blob/{{< latestMinorVersion >}}/documentation/domains/Cluster.md#cluster-spec).
214+
215+
Additional information for the `clusterService.sessionAffinity` element:
216+
217+
* `sessionAffinity`: This is an advanced setting that is applicable only when the `kube-proxy` is running in non-default proxy modes, such as [User space (legacy) proxy mode](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-userspace) and [IPVS proxy mode](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs). It is used to enable session affinity based on the client's IP addresses. For more information, see the [Virtual IPs and service proxies](https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies). Must be `ClientIP` or `None`. Defaults to `None`.
218+
219+
**Note:** This setting is not applicable when the `kube-proxy` is running in the default [`iptables` proxy mode](https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-iptables).
220+
209221
{{% notice note %}}
210-
For additional domain resource attribute reference material, see [Domain resource attribute references](#domain-resource-attribute-references).
222+
For additional domain and cluster resource attribute reference material, see [Domain and cluster resource attribute references](#domain-and-cluster-resource-attribute-references).
211223
{{% /notice %}}
212224

213225
### JVM memory and Java option environment variables

documentation/domains/Cluster.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"properties": {
130130
"sessionAffinity": {
131131
"default": "None",
132-
"description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies",
132+
"description": "Advanced setting to enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/#cluster-spec-elements",
133133
"type": "string"
134134
},
135135
"annotations": {

documentation/domains/Cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The specification of the operation of the WebLogic cluster. Required.
4747
| --- | --- | --- |
4848
| `annotations` | Map | The annotations to be added to generated resources. |
4949
| `labels` | Map | The labels to be added to generated resources. The label names must not start with "weblogic.". |
50-
| `sessionAffinity` | string | Supports "ClientIP" and "None". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies |
50+
| `sessionAffinity` | string | Advanced setting to enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/#cluster-spec-elements |
5151

5252
### Server Pod
5353

kubernetes/crd/cluster-crd.yaml

Lines changed: 4 additions & 4 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: 6b6e7832ef6cdeef81d2c704a38636f9d1eb3b9c5fa76be64391d1939943003b
8+
weblogic.sha256: 46ef88005b68d9fb13a122b63fece506c555770209221581cb056c15f1ac7e6a
99
name: clusters.weblogic.oracle
1010
spec:
1111
group: weblogic.oracle
@@ -2868,9 +2868,9 @@ spec:
28682868
properties:
28692869
sessionAffinity:
28702870
default: None
2871-
description: 'Supports "ClientIP" and "None". Used to maintain
2872-
session affinity. Enable client IP based session affinity. Must
2873-
be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies'
2871+
description: 'Advanced setting to enable client IP based session
2872+
affinity. Must be ClientIP or None. Defaults to None. More info:
2873+
https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/#cluster-spec-elements'
28742874
type: string
28752875
annotations:
28762876
additionalProperties:

operator/src/main/java/oracle/kubernetes/weblogic/domain/model/ClusterService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
public class ClusterService extends KubernetesResource {
1515

1616
@Description(
17-
"Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. "
17+
"Advanced setting to enable client IP based session affinity. "
1818
+ "Must be ClientIP or None. Defaults to None. More info: "
19-
+ "https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies")
19+
+ "https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/#cluster-spec-elements")
2020
@Default(strDefault = "None")
2121
private String sessionAffinity;
2222

0 commit comments

Comments
 (0)