Skip to content

Adds Initial Infra Manager#178

Merged
danehans merged 2 commits intoenvoyproxy:mainfrom
danehans:infra_mgr
Aug 3, 2022
Merged

Adds Initial Infra Manager#178
danehans merged 2 commits intoenvoyproxy:mainfrom
danehans:infra_mgr

Conversation

@danehans
Copy link
Copy Markdown
Contributor

@danehans danehans commented Jul 28, 2022

Adds initial Infra Manager implementation.

Requires: #183

xref: #41

Signed-off-by: danehans daneyonhansen@gmail.com

@danehans danehans requested a review from a team as a code owner July 28, 2022 16:04
@danehans danehans added the area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet. label Jul 28, 2022
@danehans danehans added this to the 0.2.0-rc1 milestone Jul 28, 2022
Copy link
Copy Markdown
Contributor

@arkodg arkodg Jul 28, 2022

Choose a reason for hiding this comment

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

imho the metadata should only be used for informational features such as labelling and status and not for CRUD of k8s resources.
one way to handle deletes could be for the infra manager to reconcile all k8s resources owned by this infra manager (tied to a single GW Class), and delete those resources that are not part of the Translate o/p

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.

IMO infra IR metadata should include a deletionTimestamp that is set by the Resource Translator when the associated Gateway is deleted. An infra IR with deletionTimestamp tells the Infra Manager to delete the associated infra.

xref kube meta: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata

one way to handle deletes could be for the infra manager to reconcile all k8s resources owned by this infra manager (tied to a single GW Class), and delete those resources that are not part of the Translate o/p

Yes, this is a possible solution but IMO not as efficient as it requires a List() and then Delete().

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we expect there to multiple things here? Before I got to this file, I was assuming Manager was going to be an interface that kubernetes.Infra implements.

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.

Yes, the struct will contain a field for every supported provider. I created #182 to track the need to move this to an interface.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #178 (cea006f) into main (a1ff4f9) will decrease coverage by 1.58%.
The diff coverage is 44.13%.

@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
- Coverage   61.74%   60.16%   -1.59%     
==========================================
  Files          20       23       +3     
  Lines        1814     1993     +179     
==========================================
+ Hits         1120     1199      +79     
- Misses        632      722      +90     
- Partials       62       72      +10     
Impacted Files Coverage Δ
internal/cmd/server.go 24.32% <ø> (ø)
...ternal/infrastructure/kubernetes/serviceaccount.go 21.42% <21.42%> (ø)
internal/infrastructure/kubernetes/infra.go 35.13% <35.13%> (ø)
internal/ir/infra.go 62.79% <62.79%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

arkodg
arkodg previously approved these changes Aug 1, 2022
Copy link
Copy Markdown
Contributor

@LukeShu LukeShu Aug 3, 2022

Choose a reason for hiding this comment

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

nit: this line is unnecessary

LukeShu
LukeShu previously approved these changes Aug 3, 2022
Copy link
Copy Markdown
Contributor

@LukeShu LukeShu left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: danehans <daneyonhansen@gmail.com>
Signed-off-by: danehans <daneyonhansen@gmail.com>
Copy link
Copy Markdown
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

👍

@danehans danehans merged commit a603060 into envoyproxy:main Aug 3, 2022
@danehans danehans deleted the infra_mgr branch August 3, 2022 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra-mgr Issues related to the provisioner used for provisioning the managed Envoy Proxy fleet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants