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

Modular infrastructure providers using Sveltos templates #874

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

s3rj1k
Copy link
Contributor

@s3rj1k s3rj1k commented Jan 9, 2025

Modular infrastructure providers using Sveltos templates

  • Consolidates cloud provider credential managers under a common interface.
  • Adds reconciliation of infrastructure provider resources using Sveltos profile templates.
  • Removes Azure credential propagation logic.
  • Migrates Azure credential propagation logic into Sveltos profile template.

@@ -200,7 +201,7 @@ func (r *ReleaseReconciler) ensureManagement(ctx context.Context) error {
if err != nil {
return err
}
mgmtObj.Spec.Providers = hmc.GetDefaultProviders()
mgmtObj.Spec.Providers = providers.List()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

File internal/providers/azure.go is still needed due to a need of populating this list on first start of manager.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of the approaches that can allow removal of mentioned file is taken in https://github.com/k0rdent/kcm/pull/833/files

Specifically:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or any other way that can populate list with extra values during manager start

Or maybe we could rethink logic behind that list altogether

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -41,3 +41,57 @@ spec:
kind: AzureClusterIdentity
name: azure-cluster-identity
namespace: ${NAMESPACE}
---
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Template render errors are available from ClusterSummary

kubectl -n ${NAMESPACE} get ClusterSummary some-object-name -o yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Preview of worst-case scenario:

image

@s3rj1k s3rj1k force-pushed the provider-modules-sveltos-templates branch from ac61def to e92e0cb Compare January 9, 2025 17:22
@s3rj1k s3rj1k marked this pull request as ready for review January 10, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant