-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add proxy configuration to bootstrap node #1832
Conversation
Tested with squid using basic auth.
Proxy for podman: This needs @patrickdillon PR: #1827 |
}, nil | ||
} | ||
|
||
func (a *Bootstrap) addStorageFiles(base string, uri string, templateData *bootstrapTemplateData) (err error) { | ||
proxy := map[string]struct{}{ |
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.
is it possible to move this to the call-site for this function ie in the Generate for bootstrap ignition asset...?
@@ -218,6 +225,11 @@ func (a *Bootstrap) addStorageFiles(base string, uri string, templateData *boots | |||
} | |||
|
|||
name := info.Name() | |||
if _, ok := proxy[name]; ok { |
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.
If you make proxy
a map[string]bool
and populate it with true
values, then you can right this expression as the more simple if proxy[name] {
.
@@ -0,0 +1,5 @@ | |||
{{if .Proxy}} |
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.
I don't know that we care, but this will result in empty lines in the file.
To do it without empty lines,
{{ if .Proxy -}}
{{ if .Proxy.HTTPProxy -}}
export HTTP_PROXY="{{ .Proxy.HTTPProxy }}"
{{ end -}}
...
{{ end -}}
/retest |
1 similar comment
/retest |
/test e2e-openstack |
/test e2e-aws-scaleup-rhel7 |
@@ -183,10 +185,15 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig) (*bootst | |||
PullSecret: installConfig.PullSecret, | |||
ReleaseImage: releaseImage, | |||
EtcdCluster: strings.Join(etcdEndpoints, ","), | |||
Proxy: installConfig.Proxy, |
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.
This should not be the install-config, but the status from object from #1866
}, nil | ||
} | ||
|
||
func (a *Bootstrap) addStorageFiles(base string, uri string, templateData *bootstrapTemplateData) (err error) { | ||
proxy := map[string]bool{ |
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 files will automatically be empty if proxy is not set, right?
Is it a problem if we write empty file to disk? If is not a problem, I think it will be cleaner to always write those file, even though they might be empty..?
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.
No issues were caused by having the files empty. The cluster installed normally. Updated the PR to remove this section.
Modification of `bootstrapTemplateData` struct to include proxy requirements. Modification of `getTemplateData` and `addStorageFiles` to support proxy Modification of proxy manifests Added: - /etc/profile.d/proxy.sh.template - /etc/systemd/system.conf.d/10-default-env.conf.template
```yaml | ||
--- | ||
apiVersion: v1 | ||
baseDomain: devcluster.openshift.com |
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.
include ...
so that people know there's more that's required.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, jcpowermac The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
@jcpowermac: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. OpenStack computeFlavor precedence is based on [2]. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19 [2]: openshift#2162 (comment)
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. OpenStack computeFlavor precedence is based on [2]. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19 [2]: openshift#2162 (comment)
This is a bit more accessible than pointing folks at Godocs, since it allows us to focus on the YAML property names (while Godocs understandably focus on Go property names) and YAML renderings. Also break up our old "one big example" install-config.yaml into a minimal per-platform example and a series of small extentions excercising groups of properties. The vSphere docs are based heavily on [1]. Also drop proxy.md. It was added in e7edbf7 (Add proxy configuration to bootstrap node, 2019-06-24, openshift#1832), but: * Proxy testing and Squid configuration information belongs in openshift/release, not in the installer repository. * docs/user/customization.md now contains a more complete proxy-config fragment. OpenStack computeFlavor precedence is based on [2]. [1]: https://github.com/openshift/openshift-docs/blob/enterprise-4.2/modules/installation-vsphere-config-yaml.adoc Last touched by commit openshift/openshift-docs@25afc76 , 2019-08-19 [2]: openshift#2162 (comment)
Modification of
bootstrapTemplateData
struct to include proxy requirements.Modification of
getTemplateData
andaddStorageFiles
to support proxyAdded: