Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm install verdaccio bug #129

Open
1 task
lingdie opened this issue Jul 12, 2023 · 2 comments
Open
1 task

Helm install verdaccio bug #129

lingdie opened this issue Jul 12, 2023 · 2 comments

Comments

@lingdie
Copy link

lingdie commented Jul 12, 2023

Your Environment

  • verdaccio version: 5.21.1
  • node version [12.x.x, 14.x.x]: none
  • package manager: [npm@7, pnpm@6, yarn@2]
  • os: linux, k8s 1.25.6
  • platform: helm

Describe the bug

image

To Reproduce

Expected behavior

Screenshots, server logs, package manager log

Configuration File (cat ~/.config/verdaccio/config.yaml)

Environment information

Debugging output

  • $ NODE_DEBUG=request verdaccio display request calls (verdaccio <--> uplinks)
  • $ DEBUG=verdaccio* verdaccio enable extreme verdaccio debug mode (verdaccio api)
  • $ npm -ddd prints:
  • $ npm config get registry prints:

Contribute to Verdaccio

  • I'm willing to fix this bug 🥇
@jsaalfeld
Copy link

jsaalfeld commented Jul 12, 2023

I just tried to deploy verdaccio the first time using helm and have the same issue.

To reproduce, you just need to install verdaccio via helm in the current latest version:

helm --namespace verdaccio upgrade --install verdaccio verdaccio/verdaccio --version 4.12.0 -f values.yaml

As stated in the documentation - Overwriting the listen part in the config won't work. I tried to wordaround by change the image tag in the values.yml to something other than what is tagged with the version of the helm-chart. But the resulting Pod was still in Version 5.21.1
Downgrading the helm chart to 4.11.0 the resulted in running the pod in same image tag as helm chart 4.12.0.

This is my values.yaml:

replicaCount: 1

## Define Probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
livenessProbe:
  initialDelaySeconds: 0
  periodSeconds: 10
  timeoutSeconds: 1
  successThreshold: 1
  failureThreshold: 3
readinessProbe:
  initialDelaySeconds: 0
  periodSeconds: 10
  timeoutSeconds: 1
  successThreshold: 1
  failureThreshold: 3

resources:
  requests:
    cpu: 100m
    memory: 512Mi
  limits:
    cpu: 1
    memory: 2Gi

ingress:
  enabled: true
  className: "nginx"
  paths:
    - /
  # Use this to define, ALB ingress's actions annotation based routing. Ex: for ssl-redirect
  # Ref: https://kubernetes-sigs.github.io/aws-load-balancer-controller/latest/guide/tasks/ssl_redirect/
  extraPaths: []
hosts:
  - npm.company.team
annotations:
  kubernetes.io/ingress.class: nginx
tls:
  - secretName: npm-company-team-tls
    hosts:
      - npm.company.team

# Extra Environment Values - allows yaml definitions
extraEnvVars:
#  - name: VALUE_FROM_SECRET
#    valueFrom:
#      secretKeyRef:
#        name: secret_name
#        key: secret_key
#  - name: REGULAR_VAR
#    value: ABC

## Secret Environment Variables
## Use this to pass sensitive key:values to the container via k8s secret
secretEnvVars: {}
  # SECRET_ENV_VAR: secretValue
  # corp_artifactory: foo
  # npmjs: bar

## Existing Secret
## Existing secret containing environment variables to be passed to the container
existingSecret: ""

# Extra Init Containers - allows yaml definitions
extraInitContainers: []

configMap: |
  # This is the config file used for the docker images
  # It allows all users to do anything, so don't use it on production systems.
  #
  # Do not configure host and port under `listen` in this file
  # as it will be ignored when using docker.
  # see https://github.com/verdaccio/verdaccio/blob/master/docs/docker.md#docker-and-custom-port-configuration
  #
  # Look here for more config file examples:
  # https://github.com/verdaccio/verdaccio/tree/master/conf
  #

  # path to a directory with all packages
  storage: /verdaccio/storage/data

  web:
    # WebUI is enabled as default, if you want disable it, just uncomment this line
    #enable: false
    title: NPM Repository - Verdaccio

  auth:
    htpasswd:
      # Do not change this path if secrets htpasswd is used.
      file: /verdaccio/storage/htpasswd
      # Maximum amount of users allowed to register, defaults to "+infinity".
      # You can set this to -1 to disable registration.
      #max_users: 1000

  # a list of other known repositories we can talk to
  uplinks:
    npmjs:
      url: https://registry.npmjs.org/
      agent_options:
        keepAlive: true
        maxSockets: 40
        maxFreeSockets: 10

  packages:
    '@*/*':
      # scoped packages
      access: $all
      publish: $authenticated
      proxy: npmjs

    '**':
      # allow all users (including non-authenticated users) to read and
      # publish all packages
      #
      # you can specify usernames/groupnames (depending on your auth plugin)
      # and three keywords: "$all", "$anonymous", "$authenticated"
      access: $all

      # allow all known users to publish packages
      # (anyone can register by default, remember?)
      publish: $authenticated

      # if package is not available locally, proxy requests to 'npmjs' registry
      proxy: npmjs

  # To use `npm audit` uncomment the following section
  middlewares:
    audit:
      enabled: true

  # log settings
  log: {type: stdout, format: pretty, level: http}
  # log: {type: file, path: verdaccio.log, level: info}

persistence:
  enabled: true
  ## A manually managed Persistent Volume and Claim
  ## Requires Persistence.Enabled: true
  ## If defined, PVC must be created manually before volume will be bound
  # existingClaim:

  ## Verdaccio data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  storageClass: "csi-rbd-sc"

  accessMode: ReadWriteOnce
  size: 8Gi

# Secrets
secrets:
  # list of users and password for htpasswd plugin
  # This this is mounted as /verdaccio/auth/htpasswd on pods
  htpasswd:
  - username: "test"
    password: "test"
  - username: "blah"
    password: "blah"

The namespace and certificate are created seperately.

@juanpicado juanpicado transferred this issue from verdaccio/verdaccio Jul 21, 2023
@justincbeard
Copy link

I ran into this as well.

I was able to workaround it by specifying the VERDACCIO_PORT and VERDACCIO_PROTOCOL environment variables in the extraEnvVars in my values.yaml

extraEnvVars:
  - name: VERDACCIO_PORT
    value: "4873"
  - name: VERDACCIO_PROTOCOL
    value: http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants