Clean up design proposal
* Author(s): Prashant Arya
* Design Shepherd: Tejal Desai
* Date: 3rd April 2018
-* Status:
+* Status: Approved/
## Background
-At present if you run skaffold in seperate lab environment which doesn't have direct internet access
-and need proxy setting then skaffold can directly access the envrionment variable of the lab and can
-access the artifactory or registry but on the other hand builder like kaniko which spins up a seperate
-pod fails to build and push the built image to registry as it doesn't have proxy environment set.
-Hence skaffold run fails.
+At present if you run skaffold in seperate lab environment without direct internet access, skaffold command with kaniko builds fail. This is because, kaniko spins up a seperate pod which do not have the proxy information set.
-To overcome this problem we can set proxy in environment variable of kaniko pod defination and get the
-skaffold running. We can take proxy variable in kaniko config section.
+To overcome this problem we can add proxy environment setting to kaniko config section to plumb it through to kaniko pod config.
-
-Please provide a brief explanation for the following questions:
-
-1. Why is this required? So that skaffold can run in lab environment where access to internet is via proxy
-2. If this is a redesign, what are the drawbacks of the current implementation? I don't have idea about the other builder,
-3. Is there any another workaround, and if so, what are its drawbacks? I can't think of drawback
-4. Mention related issues, if there are any. NA
-
-Here is an example snippet for a new feature:
+Here is an example of new kaniko Pod config will look like with http proxy information.
___
Setting proxy variable in pod definition
@@ -55,26 +42,20 @@ Setting the proxy would give kaniko pod internet access. Where it can contact gc
___
## Design
-
-Please describe your solution. Please list any:
-
-* new config changes
-* interface changes
-* design assumptions
-
+We will be adding 2 new config variables in `ClusterDetails` config section.
For a new config change, please mention:
-* Is it backwards compatible? If not, what is the deprecation policy? No idea
```yaml
// ClusterDetails *beta* describes how to do an on-cluster build.
type ClusterDetails struct {
- // http_proxy
- http_proxy string `yaml:"http_proxy,omitempty"`
+ // HTTP_PROXY sets the "http_proxy" environment varaible to the pod running cluster build.
+ HTTP_PROXY string `yaml:"httpProxy,omitempty"`
+
+ // HTTPS_PROXY sets the "https_proxy" environment varaible to the pod running cluster build.
+ HTTPS_PROXY string `yaml:"httpsProxy,omitempty"`
- // https_proxy
- https_proxy string `yaml:"http_proxys,omitempty"`
// PullSecret is the path to the secret key file.
PullSecret string `yaml:"pullSecret,omitempty"`
@@ -102,18 +83,13 @@ type ClusterDetails struct {
### Open Issues/Question
#2163
-Please list any open questions here in the format.
+
**\<Question\>**
-Do we need to set proxy for other builders as well.
+Do we need to set proxy for other builders as well?
+Right now we don't have anyother cluster builder.
## Implementation plan
-As a team, we've noticed that larger PRs can go unreviewed for long periods of
-time. Small incremental changes get reviewed faster and are also easier for
-reviewers.
-
-For a design feature, list a summary of tasks breakdown for e.g.:
-For the example artifact sync proposal, some of the smaller tasks could be:
___
1. Add new field to cluster struct
