Skip to content

Fix Gateway helm chart for helm 3#22295

Merged
istio-testing merged 2 commits intoistio:release-1.5from
alexnederlof:patch-1
Mar 19, 2020
Merged

Fix Gateway helm chart for helm 3#22295
istio-testing merged 2 commits intoistio:release-1.5from
alexnederlof:patch-1

Conversation

@alexnederlof
Copy link
Copy Markdown

@alexnederlof alexnederlof commented Mar 18, 2020

Helm 3 threw an error that $spec.sds is not a function. Removing the parentheses led to the next problem: the and evaluates all expressions so spec.sds.enabled resulted in a nil exception.

By nesting the if, the problem is resolved

Tested with helm v3.1.2. Encountered the problem while trying to install Istio for Knative, which wants you to run this command:

# Add the extra gateway.
helm template --namespace=istio-system \
  --set gateways.custom-gateway.autoscaleMin=1 \
  --set gateways.custom-gateway.autoscaleMax=2 \
  --set gateways.custom-gateway.cpu.targetAverageUtilization=60 \
  --set gateways.custom-gateway.labels.app='cluster-local-gateway' \
  --set gateways.custom-gateway.labels.istio='cluster-local-gateway' \
  --set gateways.custom-gateway.type='ClusterIP' \
  --set gateways.istio-ingressgateway.enabled=false \
  --set gateways.istio-egressgateway.enabled=false \
  --set gateways.istio-ilbgateway.enabled=false \
  --set global.mtls.auto=false \
  install/kubernetes/helm/istio \
  -f install/kubernetes/helm/istio/example-values/values-istio-gateways.yaml \
  | sed -e "s/custom-gateway/cluster-local-gateway/g" -e "s/customgateway/clusterlocalgateway/g" \
  > ./istio-local-gateway.yaml

kubectl apply -f istio-local-gateway.yaml

[ ] Configuration Infrastructure
[ ] Docs
[x] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

Helm 3 threw an error that `$spec.sds` is not a function. Removing the parentheses led to the next problem: the and evaluates eager so `spec.sds.enabled` resulted in a `nil` exception. 

By nesting the if, the problem is resolved
@alexnederlof alexnederlof requested a review from a team March 18, 2020 19:37
@googlebot googlebot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Mar 18, 2020
@istio-policy-bot
Copy link
Copy Markdown

😊 Welcome @alexnederlof! This is either your first contribution to the Istio istio repo, or it's been
awhile since you've been here.

You can learn more about the Istio working groups, code of conduct, and contributing guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test labels Mar 18, 2020
@istio-testing
Copy link
Copy Markdown
Collaborator

Hi @alexnederlof. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@fpesce fpesce added ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. and removed needs-ok-to-test labels Mar 18, 2020
@alexnederlof
Copy link
Copy Markdown
Author

BTW am I merging this into the right branch here?

@howardjohn
Copy link
Copy Markdown
Member

BTW am I merging this into the right branch here?

Normally no, we go to master and then cherrypick: https://github.com/istio/istio/wiki/Istio-Release-1.5#how-do-i-get-my-changes-into-the-release. In this case, the code has changed on master, so going directly to release-1.5, as you have done, is correct. Thanks!

@istio-testing istio-testing merged commit af7a1d5 into istio:release-1.5 Mar 19, 2020
@ericvn
Copy link
Copy Markdown
Contributor

ericvn commented Apr 20, 2020

/cherry-pick release-1.4

@istio-testing
Copy link
Copy Markdown
Collaborator

@ericvn: new pull request created: #23077

Details

In response to this:

/cherry-pick release-1.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/environments cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants