Skip to content

Commit 608a5f8

Browse files
committed
Document common Helm upgrade error and preserve chart version
1 parent d0fa742 commit 608a5f8

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

documentation/site/content/managing-operators/common-mistakes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ description: "Help for common installing and upgrading mistakes."
1111

1212
Common namespace-related mistakes.
1313

14+
#### Changes in default Helm chart values from WebLogic Kubernetes Operator version 3.4 to 4.0
15+
16+
The default for the `domainNamespaceSelectionStrategy` Helm chart value, which specifies how the operator will select the namespaces that it will manage, was changed between version 3.4 and 4.0.
17+
In version 3.4, the default was `List` and in version 4.0, the default is `LabelSelector`. This means that the operator used to default to managing the set of namespaces listed in the `domainNamespaces` Helm chart value and
18+
the updated default is that the operator searches for namespaces that have the label specified in the `domainNamespaceLabelSelector` Helm chart value, which defaults to `weblogic-operator=enabled`.
19+
20+
When upgrading the operator from 3.4 to 4.0, you can use the `--reuse-values` option, such as `helm upgrade --reuse-values`, to install the upgraded chart with the values that were used during the original installation, including default values.
21+
If you do not use `--reuse-values`, then the upgraded chart will be installed with the updated default values, which could result in an unanticipated change in the set of namespaces that the operator is managing. Alternatively, you can also set
22+
the value of `domainNamespaceSelectionStragegy` (or any other value) using a values file or the `--set` option.
23+
1424
#### Deleting and recreating a namespace that an operator manages without informing the operator
1525

1626
If you create a new domain in a namespace that is deleted and recreated, the domain does not start up until you notify the operator.

kubernetes/charts/weblogic-operator/templates/_operator-cm.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
---
66
apiVersion: "v1"
77
data:
8+
helmChartVersion: {{ .Chart.Version }}
89
{{- if .externalRestEnabled }}
910
{{- if (hasKey . "externalRestIdentitySecret") }}
1011
externalRestIdentitySecret: {{ .externalRestIdentitySecret | quote }}

kubernetes/src/test/java/oracle/kubernetes/operator/create/CreateOperatorGeneratedFilesTestBase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private V1ConfigMap getExpectedWeblogicOperatorConfigMap() {
118118
.name("weblogic-operator-cm")
119119
.namespace(getInputs().getNamespace())
120120
.putLabelsItem(OPERATORNAME_LABEL, getInputs().getNamespace()))
121+
.putDataItem("helmChartVersion", "4.0.0-RELEASE-MARKER")
121122
.putDataItem("serviceaccount", getInputs().getServiceAccount())
122123
.putDataItem("domainNamespaceSelectionStrategy", getInputs().getDomainNamespaceSelectionStrategy())
123124
.putDataItem("domainNamespaces", getInputs().getDomainNamespaces())

0 commit comments

Comments
 (0)