diff --git a/apply.sh b/apply.sh index f579557..61cef04 100755 --- a/apply.sh +++ b/apply.sh @@ -172,3 +172,10 @@ k apply -f es.yaml # fluent bit helm repo add fluent https://fluent.github.io/helm-charts helm upgrade --install fluent-bit fluent/fluent-bit -f fluentbit-values.yaml + +# code server https://code.junv.me + + +k apply -f nfs-code-server.yaml -n apps + +k apply -f code-server.yaml diff --git a/code-server.yaml b/code-server.yaml index 1309905..04701d9 100644 --- a/code-server.yaml +++ b/code-server.yaml @@ -20,16 +20,36 @@ spec: - name: code-server image: bencdr/code-server-deploy-container imagePullPolicy: Always + securityContext: + runAsUser: 1000 ports: - containerPort: 8080 name: web protocol: TCP env: - name: START_DIR - value: "/app" + value: "/home/coder/code" volumeMounts: - name: data - mountPath: "/app" + mountPath: "/home/coder" + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 5 + failureThreshold: 4 + exec: + command: + - sh + - -c + - curl -s http://localhost:8080 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 5 + failureThreshold: 4 + exec: + command: + - sh + - -c + - curl -s http://localhost:8080 resources: requests: cpu: 200m @@ -77,7 +97,7 @@ metadata: spec: tls: - hosts: - - code-server.junv.me + - code.junv.me secretName: code-server-tls rules: - host: code.junv.me diff --git a/nfs-code-server.yaml b/nfs-code-server.yaml index 4a93784..c2fef5e 100644 --- a/nfs-code-server.yaml +++ b/nfs-code-server.yaml @@ -4,7 +4,7 @@ metadata: name: nfs-code-server spec: capacity: - storage: 5Gi + storage: 50Gi accessModes: - ReadWriteMany nfs: