#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#

image:
  # -- image repository
  repository: ghcr.io/crazy-max/samba
  # -- image tag
  tag: 4.15.5
  # -- image pull policy
  pullPolicy: Always

# -- environment variables. See [image docs](https://github.com/crazy-max/docker-samba#environment-variables) for more details.
# @default -- See below
env:
  # -- Set the container timezone
  TZ: UTC
  # SAMBA_WORKGROUP: NT-Domain-Name or Workgroup-Name. (default WORKGROUP)
  # SAMBA_SERVER_STRING: Server string is the equivalent of the NT Description field. (default Docker Samba Server)
  # SAMBA_LOG_LEVEL: Log level. (default 0)
  # SAMBA_FOLLOW_SYMLINKS: Allow to follow symlinks. (default yes)
  # SAMBA_WIDE_LINKS: Controls whether or not links in the UNIX file system may be followed by the server. (default yes)
  # SAMBA_HOSTS_ALLOW: Set of hosts which are permitted to access a service. (default 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16)
  # SAMBA_INTERFACES: Allows you to override the default network interfaces list.

# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
  main:
    ports:
      tcp:
        enabled: true
        protocol: TCP
        port: 445
      netbios:
        enabled: true
        protocol: TCP
        port: 139

ingress:
  # -- Enable and configure ingress settings for the chart under this key.
  # @default -- See values.yaml
  main:
    enabled: false

# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
  my-hostpath:
    enabled: false
    type: hostPath
    hostPath: /share/samba/share1

configmap:
  config:
    # -- Store samba configuration as a ConfigMap
    enabled: false
    # -- Samba configuration. See [image documentation](https://github.com/crazy-max/docker-samba#configuration) for more information.
    # @default -- See values.yaml
    data:
      config.yml: |
        auth:
          - user: foo
            group: foo
            uid: 1000
            gid: 1000
            password: bar
          - user: baz
            group: xxx
            uid: 1100
            gid: 1200
            password: foobar

        global:
          - "force user = foo"
          - "force group = foo"

        share:
          - name: foo
            path: /share/samba/share1
            browsable: yes
            readonly: no
            guestok: no
            validusers: foo
            writelist: foo
            veto: no
