diff --git a/clusters/kairos/samba/configmap.yaml b/clusters/kairos/samba/configmap.yaml new file mode 100644 index 0000000..1e5da3e --- /dev/null +++ b/clusters/kairos/samba/configmap.yaml @@ -0,0 +1,55 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: samba-config +data: + config.json: | + { + "samba-container-config": "v0", + "configs": { + "local": { + "shares": [ + "share" + ], + "globals": [ + "default" + ], + "instance_name": "SAMBA" + } + }, + "shares": { + "share": { + "options": { + "path": "/share", + "valid users": "user" + } + } + }, + "globals": { + "default": { + "options": { + "security": "user", + "server min protocol": "SMB2", + "load printers": "no", + "printing": "bsd", + "printcap name": "/dev/null", + "disable spoolss": "yes", + "guest ok": "yes", + "browsable": "yes", + "writable": "yes", + "guest account": "user", + "create mask": "0775", + "directory mask": "0755", + } + } + }, + "users": { + "all_entries": [ + { + "name": "user", + "password": "public" + } + ] + }, + "_footer": 1 + } \ No newline at end of file diff --git a/clusters/kairos/samba/deployment.yaml b/clusters/kairos/samba/deployment.yaml index 41e5d31..382ed9e 100644 --- a/clusters/kairos/samba/deployment.yaml +++ b/clusters/kairos/samba/deployment.yaml @@ -29,6 +29,9 @@ spec: ports: - containerPort: 445 hostPort: 445 + env: + - name: SAMBACC_CONFIG + value: /etc/samba-container/config.json resources: limits: cpu: 1000m @@ -43,4 +46,10 @@ spec: - name: local-path hostPath: path: /usr/local/data - type: Directory \ No newline at end of file + type: Directory + - name: samba-config + configMap: + name: samba-config + items: + - key: config.json + path: /etc/samba-container/config.json \ No newline at end of file