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

Fix propagation of proxy settings from kubeone.yaml to apiserver env #1749

Closed
michalvanco opened this issue Jan 21, 2022 · 0 comments · Fixed by #1746
Closed

Fix propagation of proxy settings from kubeone.yaml to apiserver env #1749

michalvanco opened this issue Jan 21, 2022 · 0 comments · Fixed by #1746
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/normal Not that urgent, but is important sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.
Milestone

Comments

@michalvanco
Copy link

What happened:
if you are having a definition of proxy and no_proxy settings in kubeone, these are propagated on first run to the apiserver manifest on control plane hosts.

Anyway if you update these proxy values, these are not refreshed after running kubeone apply or kubeone apply --force-upgrade. Only option to trigger that is to change for example the kubernetes version.

Example files:

# file: kubeone.yaml
apiVersion: kubeone.io/v1beta1
kind: KubeOneCluster
name: test
versions:
  kubernetes: '1.21.9'
proxy:
  http: 'http://xxx:8080'
  https: 'http://xxx:8080'
  noProxy: 'xxx,yyy,zzz'
# file: kube-apiserver.yaml
env:                                                                                                                                                                                                                                                                    
    - name: HTTP_PROXY                                                                                                                                                                                                                                                      
      value: http://xxx:8080                                                                                                                                                                                                                       
    - name: http_proxy                                                                                                                                                                                                                                                      
      value: http://xxx:8080                                                                                                                                                                                                                       
    - name: HTTPS_PROXY                                                                                                                                                                                                                                                     
      value: http://xxx:8080                                                                                                                                                                                                                       
    - name: https_proxy                                                                                                                                                                                                                                                     
      value: http://xxx:8080                                                                                                                                                                                                                       
    - name: NO_PROXY                                                                                                                                                                                                                                                        
      value: xxx,yyy,zzz                                                                                                                                                                  
    - name: no_proxy                                                                                                                                                                                                                                                        
      value: xxx,yyy,zzz

Login is happening here - https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/util/env.go#L27

There is also a related cause from k8s - kubernetes/kubernetes@1eeb3f1

What is the expected behavior:
Proxy setting is updated at least when --force-upgrade is used.

How to reproduce the issue:
Follow the kubeone deployment with proxy settings, then add some new value and run kubeone apply (--force-upgrade) and check that values were not updated on control-plane.

Anything else we need to know?

Information about the environment:
KubeOne version (kubeone version): 1.3.3
Operating system: CentOS
Provider you're deploying cluster on: bare-metal (static kubeone setup)
Operating system you're deploying on:

@michalvanco michalvanco added kind/bug Categorizes issue or PR as related to a bug. sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management. labels Jan 21, 2022
@xmudrii xmudrii added the priority/normal Not that urgent, but is important label Jan 21, 2022
@xmudrii xmudrii added this to the KubeOne 1.4 milestone Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/normal Not that urgent, but is important sig/cluster-management Denotes a PR or issue as being assigned to SIG Cluster Management.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants