Skip to content

Conversation

kyessenov
Copy link
Contributor

@kyessenov kyessenov commented May 11, 2018

Copied 10k max requests setting (increase from 1024) for mixer clusters.

Fixes #5546

kyessenov added 2 commits May 11, 2018 14:08
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov force-pushed the mixer_cluster_tuning branch from 4597a8b to c92248d Compare May 11, 2018 21:09
@kyessenov kyessenov requested review from mandarjog and hklai May 11, 2018 21:10
name: istio-policy
namespace: {{ .Release.Namespace }}
spec:
name: istio-policy.{{ .Release.Namespace }}.svc.cluster.local
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rshriram is this how it is supposed to work? how do we verify this takes effect without stressing the system?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the maxRequests and maxReq/conn values to absurdly low numbers so that even moderate stress will cause the same issue.

Since this is simply restoring the config that has always existed, I don't think we need to do the above test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, once @rshriram or @costinm confirm the semantics of this API, we should be OK to merge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mandar says. Also you can dump proxy config (/debug/adsz) to see it it shows up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also set mTLS here if using control plane auth.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping. Does CDS respect the override relative to data plane auth flag?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it does

@kyessenov kyessenov requested a review from rshriram May 11, 2018 22:06
@kyessenov
Copy link
Contributor Author

kyessenov commented May 12, 2018 via email

@hklai hklai requested review from costinm and diemtvu May 14, 2018 20:09
@@ -0,0 +1,28 @@
{{ define "config.yaml.tpl" }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go in the mixer chart ( it's not specific to pilot )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, mixer does not define these CRDs so it is inappropriate to submit pilot CRs in mixer helm chart. How would isolated mixer install work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 'pilot.enabled' to exclude - if mixer can run without pilot.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not about enablement, but the fact that CRDs are defined in pilot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@costinm if pilot.enabled=false the CRD job would not be rendered.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If pilot.enabled is false istio won't work.

We can move the CRDs to the top - but that's not really a priority, in 0.8 we don't support istio without pilot.

@@ -0,0 +1,14 @@
apiVersion: v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this ? Why in pilot ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the standard way to install CRs. Helm applies YAMLs in an arbitrary order, so you have to do round-about way to force ordering with hooks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test with helm template as well ( i.e. no helm ) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't have a way to run locally. CI/CD passed the tests.

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to mixer - I think it already has some script to create resources. Pilot template is not intended as holder for all component 's configs

@kyessenov
Copy link
Contributor Author

I repeat that we cannot move pilot config to mixer. If mixer is installed prior to pilot by helm, then it will fail.

@costinm
Copy link
Contributor

costinm commented May 14, 2018

Order is not guaranteed - moving all crds in pilot template doesn't guarantee they'll be run before pilot is ready.

@costinm
Copy link
Contributor

costinm commented May 14, 2018

And those are not 'pilot configs' - but istio configs. Pilot may not run at all, or some other implementation may be used - but configs should still be installed

@kyessenov
Copy link
Contributor Author

I'm not sure I understand what you're saying. Please take over this PR and submit at your will.

@costinm
Copy link
Contributor

costinm commented May 14, 2018

Just move the configs to mixer.

Copy link
Member

@sdake sdake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyessenov when we originally did this work, we put all of the pilot CRDs in mixer. I'm not really sure why they ended up there rather than pilot (which is what creates the CRDs which is what I think your arguing related to configmaps). The technique of just adding the configmaps to mixer should be fine for now, as the hacky workaround we have for this problem until Helm solves it properly.

@@ -0,0 +1,28 @@
{{ define "config.yaml.tpl" }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@costinm if pilot.enabled=false the CRD job would not be rendered.

@sdake
Copy link
Member

sdake commented May 15, 2018

Also the filename is install/kubernetes/helm/istio/charts/pilot/templates/create-custom-resources-job.yaml but its more like create-configmaps-job.yaml.

  • ignore.

@codecov
Copy link

codecov bot commented May 15, 2018

Codecov Report

Merging #5568 into release-0.8 will increase coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release-0.8   #5568    +/-   ##
============================================
+ Coverage           73%     74%    +1%     
============================================
  Files              322     324     +2     
  Lines            27609   27479   -130     
============================================
- Hits             20140   20074    -66     
+ Misses            6681    6609    -72     
- Partials           788     796     +8
Impacted Files Coverage Δ
mixer/adapter/rbac/controller.go 39% <0%> (-15%) ⬇️
pilot/pkg/proxy/envoy/v2/cds.go 71% <0%> (-14%) ⬇️
pilot/pkg/proxy/envoy/v2/discovery.go 68% <0%> (-8%) ⬇️
pilot/pkg/serviceregistry/kube/queue.go 86% <0%> (-3%) ⬇️
pilot/pkg/proxy/envoy/v2/ads.go 73% <0%> (-3%) ⬇️
mixer/adapter/redisquota/redisquota.go 88% <0%> (-2%) ⬇️
pilot/pkg/proxy/envoy/v2/debug.go 29% <0%> (-2%) ⬇️
mixer/adapter/servicecontrol/testhelper.go 72% <0%> (-2%) ⬇️
mixer/adapter/kubernetesenv/kubernetesenv.go 69% <0%> (-1%) ⬇️
broker/pkg/platform/kube/crd/client.go 71% <0%> (-1%) ⬇️
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ade289...00befba. Read the comment docs.

@kyessenov
Copy link
Contributor Author

@sdake Are you sure that pilot's CRDs are defined in mixer helm chart? https://github.com/istio/istio/blob/master/install/kubernetes/helm/istio/charts/pilot/templates/crds.yaml#L52

@kyessenov
Copy link
Contributor Author

@sdake Regarding the naming: I have followed what mixer does about the same problem (submitting CRs after CRDs), so the name is like this for consistency mostly.

@mandarjog
Copy link
Contributor

@sdake Mixer job only defines Mixer CRs. It is best to keep CRs with the component that defines CRDs for it. Since DestinationRule is a Pilot CRD, the related CR should be defined with Pilot.
I think we should get this in quickly.

Copy link
Member

@sdake sdake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sdake

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again: please move them to mixer template.

Pilot is not the place to include configs for other components - for example it is possible for users to disable pilot and use a different implementation.

@kyessenov
Copy link
Contributor Author

kyessenov commented May 15, 2018

This is not an issue for an alternative implementation of pilot. Using mixer standalone with direct API does not need any pilot configs.

@istio-testing
Copy link
Collaborator

istio-testing commented May 15, 2018

@kyessenov: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-pilot-e2e-envoyv2-v1alpha3.sh 00befba link /test istio-pilot-e2e-envoyv2-v1alpha3
prow/istio-pilot-e2e.sh 00befba link /test istio-pilot-e2e
prow/e2e-bookInfoTests-v1alpha3.sh 00befba link /test e2e-bookInfo-envoyv2-v1alpha3

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. I understand the commands that are listed here.

@sdake
Copy link
Member

sdake commented May 16, 2018

Fixing #5635 - I noticed you may need a patch verb addition.

@kyessenov
Copy link
Contributor Author

@sdake Yeah, "patch" would be useful. Don't think it's going to break anything now, since this is the first config that comes with pilot by default.

@sdake
Copy link
Member

sdake commented Jun 1, 2018

@kyessenov re patch, your right not needed for this particular patch, however, it appears with Kubernetes 1.10+ a security vulnerability was repaired which permitted patching a CRD without proper RBAC rules. This will need to go into a follow-on patch if you don't mind so upgrade from 0.8 to 1.0 works properly.

Cheers
-steve

@kyessenov
Copy link
Contributor Author

I abandoned this PR.

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

Successfully merging this pull request may close these issues.

7 participants