#
# 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/obeone/nfs-server
  # -- image tag
  # @default -- chart.appVersion
  tag:
  # -- image pull policy
  pullPolicy: Always

securityContext:
  privileged: true
  capabilities:
    add:
      - SYS_ADMIN

# -- environment variables. See more environment variables in the [petio documentation](https://petio.org/docs).
# @default -- See below
env:
  # -- Set the container timezone
  TZ: UTC
  NFS_EXPORT_0: /shared *(rw,sync,no_subtree_check,no_root_squash)


# -- Configures service settings for the chart.
# You can't mix TCP and UDP ports in the same service, so we need to create two
# services. But a lots of LB provide tag support, so we can use the same IP for
# both UDP/TCP.
# @default -- See values.yaml
service:
  main:
    enabled: true
    primary: true
    type: LoadBalancer
    externalTrafficPolicy: Local
    ports:
      http:
        enabled: false
      nfs-111:
        enabled: true
        port: 111
        protocol: TCP
      nfsd:
        enabled: true
        primary: true
        port: 2049
        protocol: TCP
      nfs-32765:
        enabled: true
        port: 32765
        protocol: TCP
      nfs-32767: 
        enabled: true
        port: 32767
        protocol: TCP

  udp:
    enabled: true
    type: LoadBalancer
    externalTrafficPolicy: Local
    ports:
      nfs-111-udp:
        enabled: true
        port: 111
        protocol: UDP
      nfsd-udp:
        enabled: true
        port: 2049
        protocol: UDP
      nfs-32765-udp:
        enabled: true
        port: 32765
        protocol: UDP
      nfs-32767-udp: 
        enabled: true
        port: 32767
        protocol: UDP


# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
  shared:
    enabled: true
    type: emptyDir
    mountPath: /shared
    
