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

check enablement from values pass through #20244

Merged
merged 7 commits into from
Jan 27, 2020

Conversation

richardwxn
Copy link
Contributor

  1. mirror of old PR: Check enablement from values part as well operator#727
  2. fix default profile to add istio-egressgateway definition

@richardwxn richardwxn requested a review from a team as a code owner January 16, 2020 20:16
@istio-policy-bot
Copy link

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@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 Jan 16, 2020
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 16, 2020
@howardjohn
Copy link
Member

howardjohn commented Jan 16, 2020 via email

@richardwxn
Copy link
Contributor Author

@howardjohn what hack did you refer to in test/integration

@howardjohn
Copy link
Member

and others that reference that issue (may just be 1 other?)


- name: istio-egressgateway
enabled: false
k8s:
Copy link
Member

Choose a reason for hiding this comment

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

-1 to this. Why do we need to copy everything over? its already defined in the templates. Its so hard to figure out what I am going to get when I install with istioctl now because there are so many different configs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would update this part to keep only the settings we expose as params in the template

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually only the scaleTargetRef is hardcoded in the template, however we can not drop this part from the profile because of existing issue: #20143

IngressComponentName: "gateways.istio-ingressgateway",
EgressComponentName: "gateways.istio-egressgateway",
CNIComponentName: "cni",
}
Copy link
Member

Choose a reason for hiding this comment

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

We need prometheus, grafana, etc as well.

Copy link
Member

Choose a reason for hiding this comment

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

Any update on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm adding those in my PR: #20352

@@ -101,6 +117,18 @@ func (cn ComponentName) IsAddon() bool {
// IsComponentEnabledInSpec reports whether the given component is enabled in the given spec.
// IsComponentEnabledInSpec assumes that controlPlaneSpec has been validated.
func IsComponentEnabledInSpec(componentName ComponentName, controlPlaneSpec *v1alpha1.IstioOperatorSpec) (bool, error) {
// for addon components, enablement is defined in values part.
Copy link
Member

Choose a reason for hiding this comment

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

This seems to try to turn off addons but something must be wrong. --set values.prometheus.enabled=false does not do anything

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 PR can only address the enablement issue of istio components now, for addons, I added a TODO to address that after #20316 is resolved

@richardwxn
Copy link
Contributor Author

/test integ-security-k8s-tests_istio

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 25, 2020
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Jan 25, 2020
@richardwxn
Copy link
Contributor Author

It should work now for both Istio components and addons. Please check again: @ostromart @howardjohn

CoreDNSComponentName,
}
allComponentNamesMap = make(map[ComponentName]bool)
deprecatedComponentNamesMap = make(map[ComponentName]bool)
Copy link
Member

Choose a reason for hiding this comment

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

nit: using a struct{} instead of a bool is slightly nicer for a Set because that's is only 2 states (present or not present) instead of 3 (not present, true, false) - what does it mean to be false? It's also (trivially) more perfomant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean using an empty struct to replace bool? that's actually better in terms of memory(trivial) but here I just try to align with other implementation for set in this package.

@richardwxn
Copy link
Contributor Author

/test integ-pilot-k8s-tests_istio

@richardwxn
Copy link
Contributor Author

/test integ-security-k8s-tests_istio

@richardwxn
Copy link
Contributor Author

/test pilot-multicluster-e2e_istio

@richardwxn
Copy link
Contributor Author

/test integ-security-k8s-tests_istio

@richardwxn
Copy link
Contributor Author

/retest

1 similar comment
@richardwxn
Copy link
Contributor Author

/retest

@richardwxn
Copy link
Contributor Author

/test integ-security-k8s-tests_istio

@howardjohn
Copy link
Member

a test failing 6 times in a row suggests an issue with the pr, our tests don't flake often anymore

@howardjohn
Copy link
Member

@richardwxn another solution which may make more sense is to disable egress in ./install/kubernetes/helm/istio/test-values/values-integ.yaml. Then instead of skipping the test it will pass, and the follow up here is to re-enable egress just for that test once we have egress working (really we don't need to install it for every single test since we never use it).

@richardwxn
Copy link
Contributor Author

@howardjohn Can we just add override in this failing test to disable egress? I am not sure whether changing that in the shared values-integ.yaml would impact other tests.

@howardjohn
Copy link
Member

howardjohn commented Jan 27, 2020 via email

@richardwxn
Copy link
Contributor Author

@howardjohn ok, if no test is using egress, then the default should be turning that off?

@howardjohn
Copy link
Member

howardjohn commented Jan 27, 2020 via email

for idx, c := range installSpec.Components.IngressGateways {
if c.Name == istioIngressGatewayName {
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be removed per our discussion.

@@ -57,6 +73,16 @@ func NewIstioOperator(installSpec *v1alpha1.IstioOperatorSpec, translator *trans
out.components = append(out.components, component.NewIngressComponent(c.Name, idx, &o))
}
for idx, c := range installSpec.Components.EgressGateways {
if c.Name == istioEgressGatewayName {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

KialiComponentName ComponentName = "Kiali"
GrafanaComponentName ComponentName = "Grafana"
TracingComponentName ComponentName = "Tracing"
CoreDNSComponentName ComponentName = "Istiocoredns"
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these per discussion.

Copy link
Member

Choose a reason for hiding this comment

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

Will we be able to enable them in some other way?

@richardwxn richardwxn force-pushed the check-enablement-values branch 2 times, most recently from ca3d622 to 40cf7fa Compare January 27, 2020 20:16
@howardjohn
Copy link
Member

/retest

cluster failed creation

@istio-testing
Copy link
Collaborator

In response to a cherrypick label: new pull request created: #20580

richardwxn added a commit to richardwxn/istio that referenced this pull request Jan 30, 2020
* check enablement from values pass through as well

* check enablement from values pass through as well

* fix bug

* fix gen

* fix tpath for merging

* resolve conflict

* turn off egress by default for integ test
istio-testing pushed a commit that referenced this pull request Jan 31, 2020
…tput (#20651)

* check enablement from values pass through (#20244)

* check enablement from values pass through as well

* check enablement from values pass through as well

* fix bug

* fix gen

* fix tpath for merging

* resolve conflict

* turn off egress by default for integ test

* move naming logics to translate (#20618)

* move naming logics to translate

* fix gen

* update file name

* rename file

* add select and ignore to manifest generate test output (#20622)

* add select and ignore to manifest generate output

* fix the output order

* fix lint

* resolve conflict

* fix lint

* fix lint

* resolve conflict

* resolve conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants