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

chore(kuma-cp) refactor to get rid of explicit V2 and parametrize api version #1379

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

jakubdyszkiewicz
Copy link
Contributor

Part of V2->V3 work. This PR introduces some refactoring to get rid of V2 dependencies across code to plug V3 components.

  • Introduce the default API Version parameter in Kuma CP config which is then used across codebase
  • Prepare Bootstrap for V3 template
  • Kuma DP now relies on the response from CP. It does not try to parse Bootstrap config. Envoy is responsible for validating the config anyways.
  • I had to do a little bit of shuffling on metrics. We cannot register same metric twice therefore for XDS and SDS there is common metrics object.

If any of this change may seem unnecessary, please look at the next PR with V3 code.

… version

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz marked this pull request as ready for review January 5, 2021 17:43
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner January 5, 2021 17:43
Copy link
Contributor

@nickolaev nickolaev left a comment

Choose a reason for hiding this comment

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

I did not get the metrics reshuffle part, but everything else looks great.
We should merge to master as son as the conflict is resolved.

pkg/sds/provider/ca_provider.go Outdated Show resolved Hide resolved
pkg/sds/server/metrics/metrics.go Outdated Show resolved Hide resolved
var _ sds_provider.Secret = &MeshCaSecret{}

func (s *MeshCaSecret) ToResource(name string) *envoy_auth.Secret {
func CreateCaSecret(secret *core_xds.CaSecret) *envoy_auth.Secret {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is under xds directory? It's used once and from sds package

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Talked offline. sds will be moved to xds eventually. pkg/xds/envoy is a place when we try to abstract away envoy configs.

pkg/xds/sync/metrics.go Outdated Show resolved Hide resolved
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@jakubdyszkiewicz jakubdyszkiewicz merged commit e509fbf into master Jan 11, 2021
@jakubdyszkiewicz jakubdyszkiewicz deleted the chore/refactor-for-v3 branch January 11, 2021 09:06
mergify bot pushed a commit that referenced this pull request Jan 11, 2021
… version (#1379)

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
(cherry picked from commit e509fbf)
jakubdyszkiewicz pushed a commit that referenced this pull request Jan 11, 2021
… version (#1379)

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
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.

None yet

3 participants