nicholaswilde / helm-charts

My collection of Helm charts.
https://artifacthub.io/packages/search?repo=nicholaswilde
Apache License 2.0
70 stars 32 forks source link

code-server - config on NFS ? #53

Open m4dm4rtig4n opened 3 years ago

m4dm4rtig4n commented 3 years ago

Details

Hello,

I'm trying to make sure to store the code-server /config on an NFS except I'm having trouble writing to some directory.

Example:

[2021-06-30T07: 39: 48.711Z] error EACCES: permission denied, mkdir '/config/.config/code-server'

The pod easily writes a few folder files, but it cannot create the .config.

my values.yml :

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

image:
  repository: ghcr.io/linuxserver/code-server
  pullPolicy: IfNotPresent
  tag: "v3.10.2-ls82"

secret: {}
# PASSWORD: password
# SUDO_PASSWORD: password
# HASHED_PASSWORD

# See more environment variables in the code-server documentation
# https://github.com/linuxserver/docker-code-server#parameters
env:
  TZ: 'Europe/Paris'
  PUID: '1000'
  PGID: '1000'
#  PROXY_DOMAIN: '#DOMAIN#'

podSecurityContext: {}
#  runAsUser: 1000
#  fsGroup: 1000

#initContainers: []

service:
  port:
    port: 8443

ingress:
  enabled: false

persistence:
  config:
    enabled: true
    emptyDir: false
    mountPath: /config
    existingClaim: code-data

my nfs.yml :


apiVersion: v1
kind: PersistentVolume
metadata:
  name: code-nfs
  namespace: #NAMESPACE#
spec:
  capacity:
    storage: 1Mi
  storageClassName: nfs-k3s
  accessModes:
    - ReadWriteMany
  nfs:
    server: #NFS_SERVER_IP#
    path: /volume1/k3s/vscode
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: code-data
  namespace: #NAMESPACE#
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: nfs-k3s
  resources:
    requests:
      storage: 1Mi

Do you have an idea ?

nicholaswilde commented 3 years ago

Have you tried looking at the read/write permissions, specifically PUID and PGID? I know that the k8s docs don't directly translate, but the concepts are relatively the same since my common chart is based off of theirs. Trying looking at the Permissions, except for using the abc user. Also, take a look at the common storage docs.