Try other samba share

This commit is contained in:
2025-07-08 21:48:51 +01:00
parent ef3cc756cc
commit 31a4ba8fa9
7 changed files with 55 additions and 75 deletions

View File

@@ -1,4 +1,3 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:

View File

@@ -3,57 +3,29 @@ 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": "sambauser",
"writeable": "yes",
"guest ok": "yes",
"guest only": "yes"
}
}
},
"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": "sambauser",
"create mask": "0775",
"directory mask": "0755",
"map to guest": "bad user"
}
}
},
"users": {
"all_entries": [
{
"name": "sambauser",
"password": "samba"
}
]
},
"_footer": 1
}
smb.default: |
[global]
server string = samba
idmap config * : range = 3000-7999
security = user
server min protocol = SMB2
map to guest = Bad User
guest account = samba
# disable printing services
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
[Share]
path = /storage
comment = Shared
valid users = @smb
browseable = yes
writable = yes
read only = no
printable = no
public = yes

View File

@@ -18,21 +18,9 @@ spec:
spec:
containers:
- name: samba
image: quay.io/samba.org/samba-server:latest
securityContext:
privileged: true
capabilities:
add: ["NET_ADMIN"]
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
image: dockurr/samba:latest
ports:
- containerPort: 445
hostPort: 445
env:
- name: SAMBACC_CONFIG
value: /etc/samba-container/config.json
- name: SAMBA_CONTAINER_ID
value: local
resources:
limits:
cpu: 1000m
@@ -41,14 +29,15 @@ spec:
cpu: 10m
memory: 64Mi
volumeMounts:
- mountPath: /share
- mountPath: /storage
name: local-path
- mountPath: /etc/samba-container
- mountPath: /etc/samba
name: samba-config
volumes:
- name: local-path
hostPath:
path: /usr/local/data
type: DirectoryOrCreate
- name: samba-config
configMap:
name: samba-config

View File

@@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
resources:
- configmap.yaml
- deployment.yaml
- configmap.yaml
- deployment.yaml
- service.yaml

View File

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

View File

@@ -72,8 +72,6 @@ spec:
serviceAccountName: system-upgrade
cordon: false
upgrade:
# Here goes the image which is tied to the flavor being used.
# Currently can pick between opensuse and alpine
image: quay.io/kairos/debian:bookworm-standard-amd64-generic-v3.3.0-k3sv1.32.0-k3s1
command:
- "/bin/bash"

View File

@@ -111,3 +111,10 @@ You should be able to access `http://traefik.k3s/dashboard#/` (at the time of wr
## Grafana
Grab the admin user password from the `monitoring-grafana` secret
## Removing a PVC
After removing a pvc, you may need to force the removal by patching the finalize out
`kubectl delete pv <pv_name> --grace-period=0 --force`
`kubectl patch pv <pv_name> -p '{"metadata": {"finalizers": null}}'`