Try other samba share
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: HelmRelease
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -3,57 +3,29 @@ kind: ConfigMap
|
|||||||
metadata:
|
metadata:
|
||||||
name: samba-config
|
name: samba-config
|
||||||
data:
|
data:
|
||||||
config.json: |
|
smb.default: |
|
||||||
{
|
[global]
|
||||||
"samba-container-config": "v0",
|
server string = samba
|
||||||
"configs": {
|
idmap config * : range = 3000-7999
|
||||||
"local": {
|
security = user
|
||||||
"shares": [
|
server min protocol = SMB2
|
||||||
"share"
|
|
||||||
],
|
map to guest = Bad User
|
||||||
"globals": [
|
guest account = samba
|
||||||
"default"
|
|
||||||
],
|
# disable printing services
|
||||||
"instance_name": "SAMBA"
|
load printers = no
|
||||||
}
|
printing = bsd
|
||||||
},
|
printcap name = /dev/null
|
||||||
"shares": {
|
disable spoolss = yes
|
||||||
"share": {
|
|
||||||
"options": {
|
[Share]
|
||||||
"path": "/share",
|
path = /storage
|
||||||
"valid users": "sambauser",
|
comment = Shared
|
||||||
"writeable": "yes",
|
valid users = @smb
|
||||||
"guest ok": "yes",
|
browseable = yes
|
||||||
"guest only": "yes"
|
writable = yes
|
||||||
}
|
read only = no
|
||||||
}
|
|
||||||
},
|
printable = no
|
||||||
"globals": {
|
public = yes
|
||||||
"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
|
|
||||||
}
|
|
||||||
@@ -18,21 +18,9 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: samba
|
- name: samba
|
||||||
image: quay.io/samba.org/samba-server:latest
|
image: dockurr/samba:latest
|
||||||
securityContext:
|
|
||||||
privileged: true
|
|
||||||
capabilities:
|
|
||||||
add: ["NET_ADMIN"]
|
|
||||||
hostNetwork: true
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 445
|
- containerPort: 445
|
||||||
hostPort: 445
|
|
||||||
env:
|
|
||||||
- name: SAMBACC_CONFIG
|
|
||||||
value: /etc/samba-container/config.json
|
|
||||||
- name: SAMBA_CONTAINER_ID
|
|
||||||
value: local
|
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 1000m
|
cpu: 1000m
|
||||||
@@ -41,14 +29,15 @@ spec:
|
|||||||
cpu: 10m
|
cpu: 10m
|
||||||
memory: 64Mi
|
memory: 64Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /share
|
- mountPath: /storage
|
||||||
name: local-path
|
name: local-path
|
||||||
- mountPath: /etc/samba-container
|
- mountPath: /etc/samba
|
||||||
name: samba-config
|
name: samba-config
|
||||||
volumes:
|
volumes:
|
||||||
- name: local-path
|
- name: local-path
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /usr/local/data
|
path: /usr/local/data
|
||||||
|
type: DirectoryOrCreate
|
||||||
- name: samba-config
|
- name: samba-config
|
||||||
configMap:
|
configMap:
|
||||||
name: samba-config
|
name: samba-config
|
||||||
@@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
resources:
|
resources:
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
|||||||
14
clusters/kairos/samba-server/service.yaml
Normal file
14
clusters/kairos/samba-server/service.yaml
Normal 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
|
||||||
@@ -55,7 +55,7 @@ stringData:
|
|||||||
mount --rbind /host/dev /dev
|
mount --rbind /host/dev /dev
|
||||||
mount --rbind /host/run /run
|
mount --rbind /host/run /run
|
||||||
nsenter -i -m -t 1 -- reboot
|
nsenter -i -m -t 1 -- reboot
|
||||||
exit 1
|
exit 1
|
||||||
---
|
---
|
||||||
apiVersion: upgrade.cattle.io/v1
|
apiVersion: upgrade.cattle.io/v1
|
||||||
kind: Plan
|
kind: Plan
|
||||||
@@ -72,8 +72,6 @@ spec:
|
|||||||
serviceAccountName: system-upgrade
|
serviceAccountName: system-upgrade
|
||||||
cordon: false
|
cordon: false
|
||||||
upgrade:
|
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
|
image: quay.io/kairos/debian:bookworm-standard-amd64-generic-v3.3.0-k3sv1.32.0-k3s1
|
||||||
command:
|
command:
|
||||||
- "/bin/bash"
|
- "/bin/bash"
|
||||||
|
|||||||
@@ -111,3 +111,10 @@ You should be able to access `http://traefik.k3s/dashboard#/` (at the time of wr
|
|||||||
## Grafana
|
## Grafana
|
||||||
|
|
||||||
Grab the admin user password from the `monitoring-grafana` secret
|
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}}'`
|
||||||
Reference in New Issue
Block a user