charts
charts copied to clipboard
Chart not working on package request
After deploying the chart correctly, when I try to fetch some package, log shows this error. It cannot retrieve the requested package.
error--- unexpected error: EROFS: read-only file system, mkdir '/verdaccio/conf/storage'
I think the error is here. It is making the entire folder read-only, when it should be only the config.yaml
file.
https://github.com/verdaccio/charts/blob/24d1a2a20e0768f7f8e0732af3bc8f87a59dffda/charts/verdaccio/templates/deployment.yaml#L76-L78
This is the entire deployment yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "2"
field.cattle.io/publicEndpoints: '[{"addresses":["116.203.86.132"],"port":443,"protocol":"HTTPS","serviceName":"dev:verdaccio-registry","ingressName":"dev:verdaccio-registry","hostname":"registry.dev.zondax.net","path":"/","allNodes":true}]'
meta.helm.sh/release-name: verdaccio-registry
meta.helm.sh/release-namespace: dev
objectset.rio.cattle.io/id: default-test-verdaccio
creationTimestamp: "2021-12-22T17:26:43Z"
generation: 3
labels:
app: verdaccio-registry
app.kubernetes.io/instance: verdaccio-registry
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: verdaccio
app.kubernetes.io/version: 5.2.0
helm.sh/chart: verdaccio-4.5.0
objectset.rio.cattle.io/hash: 970e3431e667bac14c309fdcb87456611ae44404
name: verdaccio-registry
namespace: dev
resourceVersion: "152387111"
uid: 0e73554c-3f24-4467-b978-31e17f89c053
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: verdaccio-registry
app.kubernetes.io/name: verdaccio
strategy:
type: Recreate
template:
metadata:
annotations:
checksum/config: b05384757319d631c331eca55bdf9e233239199683fff781ac9f35ddc334edd0
checksum/htpasswd-secret: 4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
creationTimestamp: null
labels:
app: verdaccio-registry
app.kubernetes.io/instance: verdaccio-registry
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: verdaccio
app.kubernetes.io/version: 5.2.0
helm.sh/chart: verdaccio-4.5.0
spec:
containers:
- image: verdaccio/verdaccio:5.3.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /-/ping
port: http
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: verdaccio
ports:
- containerPort: 4873
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /-/ping
port: http
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
securityContext:
runAsUser: 10001
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /verdaccio/storage
name: storage
- mountPath: /verdaccio/conf
name: config
readOnly: true
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 101
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: verdaccio-registry
name: config
- name: storage
persistentVolumeClaim:
claimName: verdaccio-registry
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2021-12-22T17:38:46Z"
lastUpdateTime: "2021-12-22T17:38:46Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: "2021-12-22T17:26:43Z"
lastUpdateTime: "2021-12-22T17:38:46Z"
message: ReplicaSet "verdaccio-registry-5f8cb496dd" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 3
readyReplicas: 1
replicas: 1
updatedReplicas: 1
UPDATE
The issue is generated by relative paths configured on config.yaml
. As helm chart changes the root dir, relative paths get changed too. If you set absolute paths, it works great!
# path to a directory with all packages
storage: /verdaccio/storage
# path to a directory with plugins to include
plugins: /verdaccio/plugins