Pre-render Helm Kloudlite-agent and optimize Wireguard setup#380
Conversation
It will ensure superfast installation of kloudlite-agent, at least on local clusters updates NIX flakes to latest Bumps go to v1.23
Reviewer's Guide by SourceryThis pull request introduces several significant changes to the Kloudlite API project, including updates to Go dependencies, refactoring of code related to AWS and GCP services, improvements to the Helm chart rendering process, and various other enhancements and bug fixes. Updated class diagram for AWS and GCP servicesclassDiagram
class CheckAWSAccessOutput {
bool Result
string InstallationURL
}
class GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams {
string AWSAccountID
string CfParamTrustedArn
string ExternalID
string RoleArn
}
class GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials {
GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams AssumeRoleParams
GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism AuthMechanism
GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAuthSecretKeys AuthSecretKeys
string CfParamInstanceProfileName
string CfParamRoleName
}
class GithubComKloudliteOperatorApisClustersV1AWSClusterConfig {
GithubComKloudliteOperatorApisClustersV1AWSCredentials Credentials
GithubComKloudliteOperatorApisClustersV1AWSK3sMastersConfig K3sMasters
map NodePools
string Region
map SpotNodePools
GithubComKloudliteOperatorApisClustersV1AWSVPCParams Vpc
}
class GithubComKloudliteOperatorApisClustersV1GCPClusterConfig {
GithubComKloudliteOperatorApisCommonTypesSecretRef CredentialsRef
string GCPProjectID
GithubComKloudliteOperatorApisClustersV1GCPMasterNodesConfig MasterNodes
string Region
GithubComKloudliteOperatorApisClustersV1GCPServiceAccount ServiceAccount
GithubComKloudliteOperatorApisClustersV1GCPVPCParams Vpc
}
class GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism {
<<enumeration>>
assume_role
secret_keys
}
class GithubComKloudliteOperatorApisCommonTypesCloudProvider {
<<enumeration>>
AWS
Azure
Digitalocean
GCP
}
GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials --> GithubComKloudliteAPIAppsInfraInternalEntitiesAWSAssumeRoleParams
GithubComKloudliteOperatorApisClustersV1AWSClusterConfig --> GithubComKloudliteOperatorApisClustersV1AWSCredentials
GithubComKloudliteOperatorApisClustersV1GCPClusterConfig --> GithubComKloudliteOperatorApisCommonTypesSecretRef
GithubComKloudliteOperatorApisClustersV1AWSClusterConfig --> GithubComKloudliteOperatorApisClustersV1AWSVPCParams
GithubComKloudliteOperatorApisClustersV1GCPClusterConfig --> GithubComKloudliteOperatorApisClustersV1GCPVPCParams
GithubComKloudliteOperatorApisClustersV1AWSAuthMechanism <|-- GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials
GithubComKloudliteOperatorApisCommonTypesCloudProvider <|-- GithubComKloudliteOperatorApisClustersV1AWSClusterConfig
GithubComKloudliteOperatorApisCommonTypesCloudProvider <|-- GithubComKloudliteOperatorApisClustersV1GCPClusterConfig
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @nxtcoder17 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| return fn.JsonConvertP[model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials](obj.AWS) | ||
| // AWS is the resolver for the aws field. | ||
| func (r *cloudProviderSecretResolver) AWS(ctx context.Context, obj *entities.CloudProviderSecret) (*model.GithubComKloudliteAPIAppsInfraInternalEntitiesAWSSecretCredentials, error) { | ||
| panic(fmt.Errorf("not implemented: AWS - aws")) |
There was a problem hiding this comment.
issue (bug_risk): Replace panic calls with proper error handling in resolver functions
Using panic in these resolver functions can lead to runtime crashes if these functions are called. Instead, implement proper error handling and return appropriate errors. This will make the code more robust and easier to debug.
Pre-render Helm Kloudlite-agent and optimize Wireguard setup
feat:
updates:
Summary by Sourcery
Enhance the installation process by pre-rendering Helm charts for faster deployment and optimize global VPN connections by pre-creating WireGuard secrets. Update Go dependencies and refactor AWS-related code for consistency. Upgrade the Go version in the build configuration.
New Features:
Enhancements:
Build: