Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,36 @@ imagePullSecrets:
- name: "my-image-pull-secret"
```

##### `annotations`
Specifies a set of key-value annotations that will be added to each pod running the operator. If no customer defined annotations are required, then omit this property.

Example:
```yaml
annotations:
stage: production
```

You may also specify annotations [using the "--set" parameter to the Helm install command](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing), as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"--set" -> Is it possible for this parameter to be in code font, --set? (I forget if it does or does not render correctly when inside a x-ref.) If it works, please make the same edit in the labels section.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


```
--set annotations.stage=production
```

##### `labels`
Specifies a set of key-value labels that will be added to each pod running the operator. The Helm chart will automatically add any required labels, so the customer is not required to define those here. If no customer defined labels are required, then omit this property.

Example:
```yaml
labels:
sidecar.istio.io/inject: "false"
```

You may also specify labels [using the "--set" parameter to the Helm install command](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing), as follows:

```
--set labels."sidecar\.istio\.io/inject"=false
```

##### `nodeSelector`
Allows you to run the operator Pod on a Node whose labels match the specified `nodeSelector` labels. You can use this optional feature if you want the operator Pod to run on a Node with particular labels. See [Assign Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) in the Kubernetes documentation for more details. This is not required if the operator Pod can run on any Node.

Expand All @@ -137,8 +167,8 @@ nodeSelector:
disktype: ssd
```

##### `nodeAffinity`
Allows you to constrain the operator Pod to be scheduled on a Node with certain labels; it is conceptually similar to `nodeSelector`. `nodeAffinity` provides advanced capabilities to limit Pod placement on specific Nodes. See [Assign Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) in the Kubernetes documentation for more details. This is optional and not required if the operator Pod can run on any Node or when using `nodeSelector`.
##### `affinity`
Allows you to constrain the operator Pod to be scheduled on a Node with certain labels; it is conceptually similar to `nodeSelector`. `affinity` provides advanced capabilities to limit Pod placement on specific Nodes. See [Assign Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity) in the Kubernetes documentation for more details. This is optional and not required if the operator Pod can run on any Node or when using `nodeSelector`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For more details, see Assign Pods to Nodes in the Kubernetes documentation. (Our Oracle standard format for x-refs to more information.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


Example:
```yaml
Expand Down Expand Up @@ -260,7 +290,7 @@ domainNamespaceLabelSelector: environment notin (production,systemtest)

{{% notice note %}}
To specify the above sample on the Helm command line, escape spaces and commas as follows:
```yaml
```
--set "domainNamespaceLabelSelector=environment\\ notin\\ (production\\,systemtest)"
```
{{% /notice %}}
Expand Down
19 changes: 14 additions & 5 deletions kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ spec:
replicas: 1
template:
metadata:
labels:
{{- with .annotations }}
annotations:
{{- end }}
{{- range $key, $value := .annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
weblogic.operatorName: {{ .Release.Namespace | quote }}
app: "weblogic-operator"
{{- range $key, $value := .labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
serviceAccountName: {{ .serviceAccount | quote }}
{{- with .nodeSelector }}
Expand Down Expand Up @@ -103,15 +112,15 @@ spec:
livenessProbe:
exec:
command:
- "bash"
- "/operator/livenessProbe.sh"
- "bash"
- "/operator/livenessProbe.sh"
initialDelaySeconds: 20
periodSeconds: 5
readinessProbe:
exec:
command:
- "bash"
- "/operator/readinessProbe.sh"
- "bash"
- "/operator/readinessProbe.sh"
initialDelaySeconds: 2
periodSeconds: 10
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions kubernetes/charts/weblogic-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ javaLoggingFileSizeLimit: 20000000
# directory as the files are rotated.
javaLoggingFileCount: 10

# labels specifies a set of key-value labels that will be added to each pod running the operator.
# See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
#labels:

# annotations specifies a set of key-value annotations that will be added to each pod running the operator.
# See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
#annotations:

# nodeSelector specifies a matching rule that the Kubernetes scheduler will use when selecting the node
# where the operator will run. If the nodeSelector value is specified, then this content will be added to
# the operator's deployment. See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
Expand Down