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: allow kurtosis cli to be used behind proxy #1496
base: main
Are you sure you want to change the base?
feat: allow kurtosis cli to be used behind proxy #1496
Conversation
@@ -362,6 +373,16 @@ func (provider *GitPackageContentProvider) atomicClone(parsedURL *ParsedGitURL) | |||
return nil | |||
} | |||
|
|||
func getKurtosisConfig() (*resolved_config.KurtosisConfig, error) { | |||
configStore := kurtosis_config.GetKurtosisConfigStore() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah so unfortunately we can't use kurtosis_config.GetKurtosisConfigStore()
to retrieve the config because it pulls the config from a file on the filesystem. The git_package_content_provider.go
logic lives and is executed in our APIC
/ core
server, a container for managing each individual enclave - whereas the kurtosis config lives on the machine where the CLI is running. Bc of this we'll need to try another way of getting the proxy options into the APIC
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The best way to do this is to pass the proxy config option from the CLI
into the engine
and then from the engine
into the APIC
when the enclave starts a new enclave. Going to look for links + reference implementations of this pattern to guide you here and will send via discord.
// ^^^^^^^^^ Every new Kurtosis config version must have this key ^^^^^^^^ | ||
|
||
ShouldSendMetrics *bool `yaml:"should-send-metrics,omitempty"` | ||
GitProxy *string `yaml:"git-proxy,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another note, let's move GitProxy
from the root level config to cluster config level (so it can be configured per cluster) so in KurtosisClusterConfigV3
. Clusters can live at different locations - the default one is the docker cluster on the user machine, but the same proxy may not apply to every cluster so proxy should be configured depending on each cluster.
3c7a0a0
to
1d570c3
Compare
Description:
This update introduces the ability to specify a proxy URL for git operations, facilitating the cloning of repositories when behind a (corporate) proxy. Initially, this draft PR allows setting just the proxy URL, but the plan is to expand this by including a full proxy options struct that go-git utilizes, encompassing not just the URL but also the username and password for proxy authentication. The struct is outlined as follows:
git_package_content_provider.go
Is this change user facing?
YES
References (if applicable):
#1434