Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Owls 83534 - Changes to allow setting nodeAffinity and nodeSelector values in operator Helm chart #1869

Merged
merged 3 commits into from
Aug 17, 2020
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 @@ -125,6 +125,40 @@ imagePullSecrets:
- name: "my-image-pull-secret"
```

##### `nodeSelector`
`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.
Copy link
Member

Choose a reason for hiding this comment

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

nodeSelector allows you to run... -> (to align with the style of the other value descriptions) -> Allows you to run...
on a node -> on a Node (capitalize consistently)


Example:
```
nodeSelector:
disktype: ssd
```

##### `nodeAffinity`
Copy link
Member

Choose a reason for hiding this comment

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

nodeAffinity is conceptually similar to nodeSelector, it allows you to constrain... -> Allows you to constrain the operator Pod to be scheduled on a node with certain labels; conceptually similar to nodeSelector.
node -> Node

`nodeAffinity` is conceptually similar to `nodeSelector`, it allows you to constrain the operator Pod to be scheduled on a node with certain labels. Node affinity feature 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
Member

Choose a reason for hiding this comment

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

Node affinity feature provides advanced capabilities to limit... -> 'nodeAffinity` provides advanced capabilities to limit...
nodes ->Nodes


Example:
```
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: nodeType
operator: In
values:
- dev
- test
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: another-node-label-key
operator: In
values:
- another-node-label-value
```

##### `enableClusterRoleBinding`
Specifies whether the roles necessary for the operator to manage domains
will be granted using a ClusterRoleBinding rather than using RoleBindings in each managed namespace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ spec:
app: "weblogic-operator"
spec:
serviceAccountName: {{ .serviceAccount | quote }}
{{- with .nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: "weblogic-operator"
image: {{ .image | quote }}
Expand Down