Skip to content

Commit b690702

Browse files
design: add SmbCommonConfig to the design doc
SmbCommonConfig allows certain, non-share specific, parameters to be specified. Unlike SmbSecurityConfig these are not related to share security. Like SmbSecurityConfig, the values here help act as a template for the resources the operator will create and manage. Signed-off-by: John Mulligan <jmulligan@redhat.com>
1 parent c79e5b6 commit b690702

File tree

1 file changed

+56
-6
lines changed

1 file changed

+56
-6
lines changed

docs/design/crd-proposal-phase1.md

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,26 @@ The following CRD types are proposed for Phase 1:
1919
single share
2020
* SmbSecurityConfig - A CR that encapsulates the knowledge needed to define
2121
"local" users or become part of an Active Directory domain
22+
* SmbCommonConfig - A optional CR that helps define properties common across
23+
many shares. For example, if shares should be "exported" outside of the
24+
kuberntes cluster.
2225

2326
The operator will take the SmbShare and SmbSecurityConfig resources as inputs
2427
and create as many smbd, winbind, or other backing services as needed. Users
2528
will have limited input into what backing services the operator will create.
2629
The operator may, or may not, combine one or more share into a single smbd
2730
instance.
2831

29-
One or more SmbSecurityConfig resources can be defined in the cluster. Each
30-
SmbShare CR can refer to one of those SmbSecurityConfig resources, or rely on
31-
the default settings of the operator. The SmbSecurityConfig reference will
32-
define the security properties of the smbd instance that hosts the share. If
33-
two SmbShare CRs are defined and each one refers to different SmbSecurityConfig
34-
they must not be combined using one smbd.
32+
One or more SmbSecurityConfig resources can be defined in the cluster. One or
33+
more SmbCommonConfig resources can be defined in the cluster. Each SmbShare CR
34+
can refer to one SmbSecurityConfig resource and one SmbCommonConfig resource.
35+
The operator will provide a mechanism for marking SmbSecurityConfig and
36+
SmbCommonConfig resources as "default". If an SmbShare does not name a specifc
37+
config resource the operator will use settings from the "default" resources, or
38+
if no defaults are set rely on the default settings of the operator. The
39+
SmbSecurityConfig reference will define the security properties of the smbd
40+
instance that hosts the share. If two SmbShare CRs are defined and each one
41+
refers to different SmbSecurityConfig they must not be combined using one smbd.
3542

3643
The listings below are not meant to be entirely complete but they outline
3744
the general direction to make the operator a fully-fledged tool to
@@ -73,6 +80,15 @@ Spec Options:
7380
mode="active-directory"; configures if server instances created by the
7481
operator should register IP addresses with AD DNS.
7582

83+
## SmbCommonConfig
84+
85+
Spec Options:
86+
* `network` - subsection - Settings pertaining to current and possible future
87+
pod/service/etc networking config.
88+
* `publish` - enumerated string - "cluster", "external" - Controls if the smb
89+
services should be set up for in-cluster use or made available to systems
90+
external to the Kubernetes cluster.
91+
7692

7793
## SmbShare
7894

@@ -90,6 +106,8 @@ Spec Options:
90106
* TBD - Any other more custom storage back-ends if needed
91107
* `securityConfig` - string - The name of the SmbSecurityConfig CR associated
92108
with this share
109+
* `commonConfig` - string - The name of the SmbCommonConfig CR associated
110+
with this share
93111
* `scaling` - mapping - Settings pertaining to how resources (servers) managed
94112
by the operator may be scaled
95113
* `groupMode` - string - Optional string. May be one of `never` or `basic`.
@@ -250,5 +268,37 @@ spec:
250268
```
251269
252270
271+
An AD enabled share, configured to be accessed outside the kubernetes cluster:
272+
```yaml
273+
---
274+
apiVersion: samba-operator.samba.org/v1alpha1
275+
kind: SmbSecurityConfig
276+
metadata:
277+
name: "rad-domain"
278+
spec:
279+
mode: "active-directory"
280+
realm: "my-rad-ad.int.example.org"
281+
---
282+
apiVersion: samba-operator.samba.org/v1alpha1
283+
kind: SmbCommonConfig
284+
metadata:
285+
name: "public1"
286+
spec:
287+
network:
288+
publish: external
289+
---
290+
apiVersion: samba-operator.samba.org/v1alpha1
291+
kind: SmbShare
292+
metadata:
293+
name: "documents"
294+
spec:
295+
securityConfig: "rad-domain"
296+
commonConfig: "public1"
297+
storage:
298+
pvc:
299+
name: "docs"
300+
```
301+
302+
253303
254304
[1] - This option doesn't currently combine all that well with using an embedded PVC spec as there'd be no way of loading data into the PVC. However, with a named PVC one could pre-load data onto it.

0 commit comments

Comments
 (0)