Skip to content

Commit 86afebe

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
docs: document new podSettings key in SmbCommonConfig
The new podSettings key allows for control of certain parameters the operator can not guess at. Currently, this allows one to control scheduling via nodeSelector and affinity sections. Signed-off-by: John Mulligan <[email protected]>
1 parent 5b80f63 commit 86afebe

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/resources/SmbCommonConfig.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ metadata:
1212
spec:
1313
network:
1414
publish: external
15+
podSettings:
16+
nodeSelector:
17+
"kubernetes.io/os": "linux"
18+
"kubernetes.io/arch": "amd64"
19+
affinity:
20+
... <k8s affinity spec> ...
1521
```
1622
1723
## Specification
@@ -22,10 +28,48 @@ spec:
2228
Publishing to `cluster` means that the Service is set up for in-cluster
2329
networking only. Publishing the resource `external` means that the
2430
Service will be configured as a LoadBalancer service.
31+
* `podSettings`: Optional settings controlling how pods created by the operator
32+
are constructed.
33+
* `nodeSelector`: Optional map of Kubernetes labels to values.
34+
Equivalent to the pod spec value of the same name.
35+
See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
36+
* `affinity`: Optional specification controlling node affinity and pod affinities.
37+
Equivalent to the pod spec value of the same name.
38+
See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
2539

2640

2741
NOTE: A LoadBalancer Service requires support from the Kubernetes cluster to
2842
work. In the case of Kubernetes in the Cloud many providers automatically
2943
configured this feature. In the case of a bare-metal Kubernetes cluster you may
3044
need to set up and maintain your own load balancer. The samba-operator has been
3145
tested with [MetalLB](https://metallb.universe.tf/).
46+
47+
48+
Full example of an SmbCommonConfig with both node selector and node affinity
49+
settings applied:
50+
```yaml
51+
apiVersion: samba-operator.samba.org/v1alpha1
52+
kind: SmbCommonConfig
53+
metadata:
54+
name: domain-security1
55+
namespace: smb-shares
56+
spec:
57+
network:
58+
publish: external
59+
podSettings:
60+
nodeSelector:
61+
"kubernetes.io/os": "linux"
62+
"kubernetes.io/arch": "amd64"
63+
affinity:
64+
nodeAffinity:
65+
preferredDuringSchedulingIgnoredDuringExecution:
66+
- weight: 10
67+
preference:
68+
matchExpressions:
69+
- key: storage-server
70+
operator: In
71+
values:
72+
- samba
73+
- smb
74+
- default
75+
```

0 commit comments

Comments
 (0)