Add samba csi
This commit is contained in:
59
clusters/kairos/samba-server/configmap.yaml
Normal file
59
clusters/kairos/samba-server/configmap.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
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": "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
|
||||
}
|
||||
54
clusters/kairos/samba-server/deployment.yaml
Normal file
54
clusters/kairos/samba-server/deployment.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: samba
|
||||
labels:
|
||||
app: samba
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: samba
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: samba
|
||||
spec:
|
||||
containers:
|
||||
- name: samba
|
||||
image: quay.io/samba.org/samba-server:latest
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["NET_ADMIN"]
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
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
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 64Mi
|
||||
volumeMounts:
|
||||
- mountPath: /share
|
||||
name: local-path
|
||||
- mountPath: /etc/samba-container
|
||||
name: samba-config
|
||||
volumes:
|
||||
- name: local-path
|
||||
hostPath:
|
||||
path: /usr/local/data
|
||||
- name: samba-config
|
||||
configMap:
|
||||
name: samba-config
|
||||
6
clusters/kairos/samba-server/kustomization.yaml
Normal file
6
clusters/kairos/samba-server/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: kube-system
|
||||
resources:
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
Reference in New Issue
Block a user