Try a new differetn samba image

This commit is contained in:
2025-07-09 20:05:20 +01:00
parent 93908c6b52
commit 48eb97d68e
5 changed files with 24 additions and 52 deletions

View File

@@ -81,4 +81,3 @@ spec:
server: 192.168.1.100 server: 192.168.1.100
path: /tv path: /tv
readOnly: true readOnly: true

View File

@@ -3,33 +3,16 @@ kind: ConfigMap
metadata: metadata:
name: samba-config name: samba-config
data: data:
smb.default: | FAIL_FAST: "true"
[global] SAMBA_GLOBAL_STANZA: "map to guest = Bad User;guest account = samba;wins support = yes;load printers = no;"
server string = samba SAMBA_VOLUME_CONFIG_share: |
security = user
server min protocol = SMB2
map to guest = Bad User
guest account = samba
wins support = yes
local master = yes
preferred master = yes
tls enabled = no
bind interfaces only = no
# disable printing services
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
[share] [share]
path = /storage path = /storage
comment = Shared comment = Shared
valid users = @smb valid users = @smb
browseable = yes browseable = yes
writable = yes writable = yes
read only = no read only = no
printable = no printable = no
public = yes public = yes

View File

@@ -18,9 +18,14 @@ spec:
spec: spec:
containers: containers:
- name: samba - name: samba
image: dockurr/samba:latest image: ghcr.io/servercontainers/samba:a3.22.0-s4.21.4-r4
ports: ports:
- containerPort: 445 - containerPort: 445
hostNetwork: true
securityContext:
privileged: true
capabilities:
add: ["NET_ADMIN"]
resources: resources:
limits: limits:
cpu: 1000m cpu: 1000m
@@ -29,16 +34,16 @@ spec:
cpu: 10m cpu: 10m
memory: 64Mi memory: 64Mi
volumeMounts: volumeMounts:
- mountPath: /storage - mountPath: /shares/data
name: local-path name: share-path
- mountPath: /etc/samba/smb.default - mountPath: /etc/samba/smb.default
name: samba-config name: samba-config
subPath: smb.default subPath: smb.default
envFrom:
- configMapRef:
name: samba-config
volumes: volumes:
- name: local-path - name: share-path
hostPath: hostPath:
path: /usr/local/data path: /usr/local/data
type: DirectoryOrCreate type: DirectoryOrCreate
- name: samba-config
configMap:
name: samba-config

View File

@@ -4,4 +4,3 @@ namespace: kube-system
resources: resources:
- configmap.yaml - configmap.yaml
- deployment.yaml - deployment.yaml
- service.yaml

View File

@@ -1,14 +0,0 @@
kind: Service
apiVersion: v1
metadata:
name: samba
namespace: kube-system
labels:
app: samba
spec:
type: NodePort
selector:
app: samba
ports:
- port: 445
name: samba