Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

helm upgrade #55

Open
xpicio opened this issue Oct 16, 2019 · 3 comments
Open

helm upgrade #55

xpicio opened this issue Oct 16, 2019 · 3 comments

Comments

@xpicio
Copy link

xpicio commented Oct 16, 2019

Hello i have an issue upgrading nexus to the latest version. I'm using the following command:

helm upgrade --version 1.19.0 -f values.yaml nexus stable/sonatype-nexus

where values.yaml is:

statefulset:
  enabled: true

nexusBackup:
  enabled: true
  env:
    targetBucket: "gs://scm-nexus-backup"
  persistence:
    storageClass: standard
  nexusAdminPassword: "**********"

nexusProxy:
  env:
    nexusDockerHost: repository-container.domain.com
    nexusHttpHost: repository.domain.com

persistence:
  storageClass: standard
  storageSize: 100Gi

resources:
  requests:
    cpu: 250m
    memory: 4800Mi

but i'm stuck on the following error:

UPGRADE FAILED
Error: StatefulSet.apps "nexus-sonatype-nexus" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
Error: UPGRADE FAILED: StatefulSet.apps "nexus-sonatype-nexus" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden

There is something that i am doing wrong or there is an issue on statefulset deployment ?

@xpicio
Copy link
Author

xpicio commented Oct 16, 2019

At the moment i upgraded to the latest version with the following steps:

helm delete --purge nexus

helm install --name nexus -f nexus/values.yaml stable/sonatype-nexus

@varditn
Copy link
Contributor

varditn commented Nov 18, 2019

Have you tried using helm diff to see what tried to change between the older version and the newer version of the helm chart?

@xpicio
Copy link
Author

xpicio commented Nov 20, 2019

hello i tried helm diff and this is the output

helm diff upgrade nexus stable/sonatype-nexus --values values.yaml

default, nexus-sonatype-nexus, StatefulSet (apps) has changed:
  # Source: sonatype-nexus/templates/deployment-statefulset.yaml
  apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    name: nexus-sonatype-nexus
    labels:
      app: sonatype-nexus
      fullname: nexus-sonatype-nexus
      chart: sonatype-nexus-1.20.0
      release: nexus
      heritage: Tiller
  spec:
    replicas: 1
    serviceName: nexus-sonatype-nexus
    selector:
      matchLabels:
        app: sonatype-nexus
        release: nexus
    template:
      metadata:
        labels:
          app: sonatype-nexus
          release: nexus
      spec:
        containers:
          - name: nexus
-           image: quay.io/travelaudience/docker-nexus:3.17.0
+           image: quay.io/travelaudience/docker-nexus:3.19.1
            imagePullPolicy: IfNotPresent
            env:
              - name: install4jAddVmParams
                value: -Xms1200M -Xmx1200M -XX:MaxDirectMemorySize=2G -XX:+UnlockExperimentalVMOptions
                  -XX:+UseCGroupMemoryLimitForHeap
              
            resources:
              {}
              
            ports:
              - containerPort: 5003
                name: nexus-docker-g
              - containerPort: 8081
                name: nexus-http
            livenessProbe:
              httpGet:
                path: /
                port: 8081
              initialDelaySeconds: 30
              periodSeconds: 30
              failureThreshold: 6
            readinessProbe:
              httpGet:
                path: /
                port: 8081
              initialDelaySeconds: 30
              periodSeconds: 30
              failureThreshold: 6
            volumeMounts:
              - mountPath: /nexus-data
                name: nexus-sonatype-nexus-data
              - mountPath: /nexus-data/backup
                name: nexus-sonatype-nexus-backup
          - name: nexus-proxy
            image: quay.io/travelaudience/docker-nexus-proxy:2.5.0
            resources:
              {}
              
            imagePullPolicy: IfNotPresent
            env:
              - name: ALLOWED_USER_AGENTS_ON_ROOT_REGEX
                value: "GoogleHC"
              - name: CLOUD_IAM_AUTH_ENABLED
                value: "false"
              - name: BIND_PORT
                value: "8080"
              - name: ENFORCE_HTTPS
                value: "false"
              - name: NEXUS_DOCKER_HOST
                value: "registry.scmgroup.com"
              - name: NEXUS_HTTP_HOST
                value: "repository.scmgroup.com"
              - name: UPSTREAM_DOCKER_PORT
                value: "5003"
              - name: UPSTREAM_HTTP_PORT
                value: "8081"
              - name: UPSTREAM_HOST
                value: "localhost"
            ports:
              - containerPort: 8080
                name: nexus-proxy
          - name: nexus-backup
            image: quay.io/travelaudience/docker-nexus-backup:1.5.0
            imagePullPolicy: IfNotPresent
            env:
              - name: NEXUS_AUTHORIZATION
                valueFrom:
                  secretKeyRef:
                    key: nexus.nexusAdminPassword
                    name: nexus-sonatype-nexus
              - name: NEXUS_BACKUP_DIRECTORY
                value: /nexus-data/backup
              - name: NEXUS_DATA_DIRECTORY
                value: /nexus-data
              - name: NEXUS_LOCAL_HOST_PORT
                value: "localhost:8081"
              - name: OFFLINE_REPOS
                value: "maven-central maven-public maven-releases maven-snapshots"
              - name: TARGET_BUCKET
                value: "gs://scm-nexus-backup"
              - name: GRACE_PERIOD
                value: "60"
              - name: TRIGGER_FILE
                value: .backup
            volumeMounts:
              - mountPath: /nexus-data
                name: nexus-sonatype-nexus-data
              - mountPath: /nexus-data/backup
                name: nexus-sonatype-nexus-backup
        volumes:
  
  
  ## create pvc in case of statefulsets
    volumeClaimTemplates:
      - metadata:
          name: nexus-sonatype-nexus-data
          labels:
            app: sonatype-nexus
            fullname: nexus-sonatype-nexus
            chart: sonatype-nexus-1.20.0
            release: nexus
            heritage: Tiller
        spec:
          accessModes:
            - "ReadWriteOnce"
          resources:
            requests:
              storage: "100Gi"
          storageClassName: "standard"
      - metadata:
          name: nexus-sonatype-nexus-backup
          labels:
            app: sonatype-nexus
            fullname: nexus-sonatype-nexus
            chart: sonatype-nexus-1.20.0
            release: nexus
            heritage: Tiller
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: "8Gi"
          storageClassName: "standard"

let me know if you need more information

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

No branches or pull requests

2 participants