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

feat: support for docker buildx k8s driver #3743

Merged
merged 10 commits into from
Aug 16, 2023
Merged

Conversation

gireesh-naidu
Copy link
Member

@gireesh-naidu gireesh-naidu commented Aug 8, 2023

Description

added support for docker buildx driver
Fixes #3765

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@@ -84,6 +84,9 @@ type CiConfig struct {
ImageRetryInterval int `env:"IMAGE_RETRY_INTERVAL" envDefault:"5"` //image retry interval takes value in seconds
OrchestratorHost string `env:"ORCH_HOST" envDefault:"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats"`
OrchestratorToken string `env:"ORCH_TOKEN" envDefault:""`
BuildXK8sDriverNamespace string `env:"BUILDX_K8S_DRIVER_NAMESPACE" envDefault:"devtron-ci"`
BuildxK8sDriverNodes string `env:"BUILDX_K8S_DRIVER_NODES"`
UseBuildxK8sDriver bool `env:"USE_BUILDX_K8S_DRIVER" envDefault:"false"`
Copy link
Contributor

Choose a reason for hiding this comment

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

can we derive this variable from BuildxK8sDriverNodes ??

DockerBuildOptions map[string]string `json:"dockerBuildOptions,omitempty"`
BuildContext string `json:"buildContext,omitempty"`
UseBuildx bool `json:"useBuildx"`
UseBuildxK8sDriver bool `json:"useBuildxK8sDriver,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

are we using k8s driver when no UseBuildxK8sDriver is passed ??

Copy link
Member Author

Choose a reason for hiding this comment

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

no

BuildxK8sDriverOptions []BuildxK8sDriverOptions `json:"buildxK8SDriverOptions,omitempty"`
}

type BuildxK8sDriverOptions struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make this generic map, so that if anyone wants to pass new Param, can add that ??

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gireesh-naidu gireesh-naidu merged commit 9720161 into main Aug 16, 2023
@gireesh-naidu gireesh-naidu deleted the buildx-k8s-driver branch August 16, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: remote k8s driver support for docker buildx
2 participants