0

I am trying to do a helm upgrade dry run.

1.

helm upgrade -i $xyz-abc-ms xyz-abc-exe/target/classes/helm/xyz-abc \
--set jobs.helmServiceAccount=jenkins,csbEnabledLocal=false,jacoco.enabled=true,containerinfo.imageTag=${DOCKER_BUILD_NUMBER},pki.sslenabled=false,pki.kafkaEnabled=true,runtimeContainerInfo.image=fnd-base-images/ocp-os-java-msnext,couchbase.serviceName=oc-cb-02 \
--tiller-namespace=$(oc project -q) \
--namespace $(oc project -q) \
--debug \
--dry-run

But I get the error below:

Error: unknown flag: --tiller-namespace helm.go:81: [debug] unknown flag: --tiller-namespace

2. I think tiller-namespace is removed from the Helm 3. So I tried the below:

helm upgrade -i $xyz-abc-ms xyz-abc-exe/target/classes/helm/xyz-abc \
--set jobs.helmServiceAccount=jenkins,csbEnabledLocal=false,jacoco.enabled=true,containerinfo.imageTag=${DOCKER_BUILD_NUMBER},pki.sslenabled=false,pki.kafkaEnabled=true,runtimeContainerInfo.image=fnd-base-images/ocp-os-java-msnext,couchbase.serviceName=oc-cb-02 \
--namespace $(oc project -q) \
--debug \
--dry-run

But now I am getting below error: Error: unknown shorthand flag: 'q' in -q) helm.go:81: [debug] unknown shorthand flag: 'q' in -q)

Can someone help me with the correct command here?

  1. Wihtout -q when I try as below:
helm upgrade -i $xyz-abc-ms xyz-abc-exe/target/classes/helm/xyz-abc \
--set jobs.helmServiceAccount=jenkins,csbEnabledLocal=false,jacoco.enabled=true,containerinfo.imageTag=${DOCKER_BUILD_NUMBER},pki.sslenabled=false,pki.kafkaEnabled=true,runtimeContainerInfo.image=fnd-base-images/ocp-os-java-msnext,couchbase.serviceName=oc-cb-02 ) \
--namespace $(oc project) \
--debug \
--dry-run

It fails with below Error:

Error: "helm upgrade" requires 2 arguments

Usage:  helm upgrade [RELEASE] [CHART] [flags]
helm.go:81: [debug] "helm upgrade" requires 2 arguments

What's the proper command for this?

Peyman
  • 3,059
  • 1
  • 33
  • 68
Anjana Ouseph
  • 31
  • 2
  • 10

2 Answers2

1

Yeah tiller is not even used by Helm 3.

This article talks about why it was needed in Helm 2 and why they eventually removed it but if you want a very short summary, here it is:

Helm takes your yaml and template files and has to add the resulting objects to Kubernetes right? Tiller does that job but in order to be able to do that, it would need to have maximum permission. In Helm 3, they drop tiller and rely on the authorization that comes with Kubernetes.

Now let's go back to your problem. You should drop your tiller-namespace flag as you have already done. With regards to the q flag, you don't even use it with the helm upgrade command, seems like it's the oc project -q is the part that's failing?

Peyman
  • 3,059
  • 1
  • 33
  • 68
  • Hi, how can I write this command? without -q? – Anjana Ouseph Jul 21 '21 at 14:20
  • Ah with helm 3, you have to provide a name for your update. Helm 2 would generate a name for you but now you have to name it or explicitly specify that you want the random name. I'd do `helm upgrade ` – Peyman Jul 21 '21 at 16:01
0

I was able to do with this command:

helm upgrade -i xyz-abc xyz-abc-exe/target/classes/helm/xyz-abc --debug --dry-run
Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
Anjana Ouseph
  • 31
  • 2
  • 10