Skip to content

feat: EnvoyPatchPolicy Status#1691

Merged
arkodg merged 12 commits intoenvoyproxy:mainfrom
arkodg:patch-status
Jul 26, 2023
Merged

feat: EnvoyPatchPolicy Status#1691
arkodg merged 12 commits intoenvoyproxy:mainfrom
arkodg:patch-status

Conversation

@arkodg
Copy link
Copy Markdown
Contributor

@arkodg arkodg commented Jul 22, 2023

  • compute the Accepted condition in the gateway-api layer

  • compute the Programmed condition in the xds-translator layer

  • Enhance Xds IR to hold the EnvoyPatchPolicy status

  • Publish the EnvoyPatchPolicy status from the xds-translator layer

  • provider subscribes to the status and writes it into the API server

Relates to #24

@arkodg arkodg requested a review from a team as a code owner July 22, 2023 00:49
@arkodg arkodg marked this pull request as draft July 22, 2023 00:49
@arkodg
Copy link
Copy Markdown
Contributor Author

arkodg commented Jul 22, 2023

hey @Xunzhuo gen-check keeps failing because make testdata is unable to set the LastTransitionTime to null, any idea what is required to get this to work ?

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 24, 2023

Codecov Report

Merging #1691 (82ebfe5) into main (9daf32d) will decrease coverage by 0.14%.
Report is 1 commits behind head on main.
The diff coverage is 33.60%.

@@            Coverage Diff             @@
##             main    #1691      +/-   ##
==========================================
- Coverage   60.45%   60.31%   -0.14%     
==========================================
  Files          86       87       +1     
  Lines       12737    12912     +175     
==========================================
+ Hits         7700     7788      +88     
- Misses       4541     4632      +91     
+ Partials      496      492       -4     
Files Changed Coverage Δ
internal/cmd/server.go 14.60% <0.00%> (-0.60%) ⬇️
internal/ir/xds.go 71.66% <ø> (ø)
internal/ir/zz_generated.deepcopy.go 10.07% <0.00%> (-0.45%) ⬇️
internal/message/types.go 0.00% <0.00%> (ø)
internal/provider/runner/runner.go 21.73% <0.00%> (ø)
internal/status/envoypatchpolicy.go 0.00% <0.00%> (ø)
internal/status/status.go 0.00% <0.00%> (ø)
internal/xds/translator/translator.go 78.44% <0.00%> (+0.43%) ⬆️
internal/xds/types/resourceversiontable.go 81.48% <ø> (ø)
internal/xds/translator/jsonpatch.go 30.00% <26.54%> (+5.89%) ⬆️
... and 10 more

... and 2 files with indirect coverage changes

@arkodg arkodg marked this pull request as ready for review July 25, 2023 22:27
Arko Dasgupta added 10 commits July 25, 2023 15:28
* compute the `Accepted` condition in the `gateway-api` layer

* compute the `Programmed` condition in the `xds-translator` layer

* Enhance Xds IR to hold the EnvoyPatchPolicy status

* Publish the EnvoyPatchPolicy status from the `xds-translator` layer

* `provider` subscribes to the status and writes it into the API server

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
* add status for empty path case

* refactor ir for envoy patch policy status

* test cases for patch policy status in xds-translator layer

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested review from a team, chauhanshubham, qicz and zhaohuabing and removed request for a team July 25, 2023 23:17
Copy link
Copy Markdown
Member

@Alice-Lilith Alice-Lilith left a comment

Choose a reason for hiding this comment

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

Small question but otherwise lgtm


package ptr

func To[T any](in T) *T {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should use this to clean up a bunch of the misc test files at some point that declare a ton of ints just to pass the pointer when declareing xDS in-line.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sg, will raise a issue for this

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Copy link
Copy Markdown
Member

@qicz qicz left a comment

Choose a reason for hiding this comment

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

LGTM

@arkodg arkodg merged commit 74ab06b into envoyproxy:main Jul 26, 2023
@arkodg arkodg deleted the patch-status branch July 26, 2023 00:01
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.

3 participants