Skip to content

pilot: switch to incremental Service Account building #39133

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

Merged
merged 11 commits into from
Jun 29, 2022

Conversation

howardjohn
Copy link
Member

@howardjohn howardjohn commented May 25, 2022

This is both a bug fix and a long standing optimization.

Fixes #38709 - I recommend reading the last few notes their to understand why its broken today. But basically we don't update Service Accounts when they change, only when we happen to trigger a full push at a later time. In some circumstances this delta causes critical issues.

@howardjohn howardjohn added the release-notes-none Indicates a PR that does not require release notes. label May 25, 2022
@istio-testing
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@istio-testing istio-testing added do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 25, 2022
@howardjohn
Copy link
Member Author

Attempt to fix #38709

/test all

@istio-policy-bot istio-policy-bot added the lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while label Jun 25, 2022
@howardjohn howardjohn changed the title Pilot/use consistent sa view pilot: switch to incremental Service Account building Jun 28, 2022
@howardjohn howardjohn marked this pull request as ready for review June 28, 2022 22:40
@howardjohn howardjohn requested review from a team as code owners June 28, 2022 22:40
@istio-testing istio-testing removed the do-not-merge/work-in-progress Block merging of a PR because it isn't ready yet. label Jun 28, 2022
@howardjohn howardjohn force-pushed the pilot/use-consistent-sa-view branch from 9c8df7e to 58ebf9b Compare June 28, 2022 22:48
@howardjohn howardjohn requested a review from a team as a code owner June 28, 2022 22:48
@ramaraochavali
Copy link
Contributor

Changes LGTM. UT failure seems related. And do we have a test that validates this behaviour ?

@istio-policy-bot istio-policy-bot removed the lifecycle/stale Indicates a PR or issue hasn't been manipulated by an Istio team member for a while label Jun 29, 2022
@howardjohn
Copy link
Member Author

Yeah we have a few existing tests that validate the SAN matching (I know since most of them failed previously when I missed some parts ) and I added a test to validate it is incremental

@istio-testing istio-testing removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 29, 2022
@istio-testing istio-testing added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 29, 2022
@istio-testing istio-testing merged commit dd8baaa into istio:master Jun 29, 2022
howardjohn added a commit to howardjohn/istio that referenced this pull request Jul 1, 2022
This impacts tests only.
In istio#39133 we changed to notify on
writes; this ended up triggering a ton of test flake. Instead, just add
explicit functions to notify (new test needs them) and revert the other changes
howardjohn added a commit that referenced this pull request Jul 1, 2022
* Revert changes to always notify XdsUpdater in mem discovery

This impacts tests only.
In #39133 we changed to notify on
writes; this ended up triggering a ton of test flake. Instead, just add
explicit functions to notify (new test needs them) and revert the other changes

* conflict
howardjohn added a commit to howardjohn/istio that referenced this pull request Sep 8, 2022
Fixes istio#39652

This reverts istio#36882. At the time,
that PR was needed because EDS ServiceAccounts and CDS ServiceAccounts
were decoupled; Since istio#39133, this is
no longer true, and the fix in 36882 is not needed any longer.

This PR *removes* the test added in 36882 (since it tests low level
details that are not relevant anymore). It improves the existing
TestEndpointFlipFlops test -- while that test *would* have caught the
regression, it didn't actually set any service accounts so it was
missed. The update changes it to correctly detect the behavior (it now
fails without this PR, passes with it).
istio-testing pushed a commit that referenced this pull request Sep 12, 2022
* Disable full push on scale from 1->0->1

Fixes #39652

This reverts #36882. At the time,
that PR was needed because EDS ServiceAccounts and CDS ServiceAccounts
were decoupled; Since #39133, this is
no longer true, and the fix in 36882 is not needed any longer.

This PR *removes* the test added in 36882 (since it tests low level
details that are not relevant anymore). It improves the existing
TestEndpointFlipFlops test -- while that test *would* have caught the
regression, it didn't actually set any service accounts so it was
missed. The update changes it to correctly detect the behavior (it now
fails without this PR, passes with it).

* add note

* fix note

* Add new SA case
howardjohn added a commit to howardjohn/istio that referenced this pull request Sep 12, 2022
* Disable full push on scale from 1->0->1

Fixes istio#39652

This reverts istio#36882. At the time,
that PR was needed because EDS ServiceAccounts and CDS ServiceAccounts
were decoupled; Since istio#39133, this is
no longer true, and the fix in 36882 is not needed any longer.

This PR *removes* the test added in 36882 (since it tests low level
details that are not relevant anymore). It improves the existing
TestEndpointFlipFlops test -- while that test *would* have caught the
regression, it didn't actually set any service accounts so it was
missed. The update changes it to correctly detect the behavior (it now
fails without this PR, passes with it).

* add note

* fix note

* Add new SA case

(cherry picked from commit 9f1cbfb)
istio-testing pushed a commit that referenced this pull request Sep 13, 2022
* SAN improvements (#40863)

* wip

* wip

* Add tests

* drop logs

* revert changes

* Add one more case

* Add namespace into SA key as well

* Add back svc.ServiceAccounts

* add note

* lint

(cherry picked from commit 0abe39d)

* Disable full push on scale from 1->0->1 (#40866)

* Disable full push on scale from 1->0->1

Fixes #39652

This reverts #36882. At the time,
that PR was needed because EDS ServiceAccounts and CDS ServiceAccounts
were decoupled; Since #39133, this is
no longer true, and the fix in 36882 is not needed any longer.

This PR *removes* the test added in 36882 (since it tests low level
details that are not relevant anymore). It improves the existing
TestEndpointFlipFlops test -- while that test *would* have caught the
regression, it didn't actually set any service accounts so it was
missed. The update changes it to correctly detect the behavior (it now
fails without this PR, passes with it).

* add note

* fix note

* Add new SA case

(cherry picked from commit 9f1cbfb)
yxun pushed a commit to yxun/maistra-istio that referenced this pull request Sep 28, 2023
* Disable full push on scale from 1->0->1

Fixes istio/istio#39652

This reverts istio/istio#36882. At the time,
that PR was needed because EDS ServiceAccounts and CDS ServiceAccounts
were decoupled; Since istio/istio#39133, this is
no longer true, and the fix in 36882 is not needed any longer.

This PR *removes* the test added in 36882 (since it tests low level
details that are not relevant anymore). It improves the existing
TestEndpointFlipFlops test -- while that test *would* have caught the
regression, it didn't actually set any service accounts so it was
missed. The update changes it to correctly detect the behavior (it now
fails without this PR, passes with it).

* add note

* fix note

* Add new SA case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxy startup stalled by warming EDS clusters
5 participants