-
Notifications
You must be signed in to change notification settings - Fork 2
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
Improve UX around setting Proxy configurations in the spec #69
Conversation
28aa139
to
a0b9e29
Compare
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.
LGTM overall, I have one nit/question.
@bschimke95 Should we follow the k8s-operator approach of adding these variables to /etc/environment
instead? If not we should make the variables reflect this is only for containerd.
214cc8f
to
a7db9a6
Compare
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.
Looking good. Please apply my comments to the tests we added. We don't need to duplicate all the lines that are already tested by other tests, instead let's only check for the fields we know are relevant to containerd proxy configuration
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.
Thank you, we're almost there some final comments
review fixes
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.
LGTM overall, one small nit before merging.
pkg/cloudinit/common.go
Outdated
}) | ||
} | ||
|
||
if len(files) == 0 { |
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 think this is unnecessary, zero value of a slice is nil already.
https://go.dev/tour/moretypes/12
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.
LGTM
|
||
|
||
|
||
if [ -f ${HTTP_PROXY_FILE} ]; then | ||
HTTP_PROXY=$(cat ${HTTP_PROXY_FILE}) | ||
echo "http_proxy=${HTTP_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
echo "HTTP_PROXY=${HTTP_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
fi | ||
|
||
|
||
if [ -f ${HTTPS_PROXY_FILE} ]; then | ||
HTTPS_PROXY=$(cat ${HTTPS_PROXY_FILE}) | ||
echo "https_proxy=${HTTPS_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
echo "HTTPS_PROXY=${HTTPS_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
fi | ||
|
||
|
||
if [ -f ${NO_PROXY_FILE} ]; then | ||
NO_PROXY=$(cat ${NO_PROXY_FILE}) | ||
echo "no_proxy=${NO_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
echo "NO_PROXY=${NO_PROXY}" >> "${ENVIRONMENT_FILE}" | ||
fi |
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.
Can you make it so there are only 1 line between the if's? Same thing between lines 9 and 13.
This PR introduces
httpProxy
,httpsProxy
,noProxy
parameters that adds support for proxy settings for contained in k8s. Provides functionality mentioned in k8s docs.KU-1801