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

Use double quotes instead of single quotes for INSTALL_K3S_EXEC #235

Open
ThomasK33 opened this issue Apr 27, 2020 · 1 comment
Open

Use double quotes instead of single quotes for INSTALL_K3S_EXEC #235

ThomasK33 opened this issue Apr 27, 2020 · 1 comment

Comments

@ThomasK33
Copy link

ThomasK33 commented Apr 27, 2020

Expected Behaviour

When installing k3s via k3sup the k3s extra args passed via --k3s-extra-args should be interpolated on the remote machine.

Current Behaviour

Currently the k3s extra args are not interpolated on the remote machine.

Possible Solution

Change single quotes to escaped double quotes in install.go

Steps to Reproduce (for bugs)

k3sup install \
	--ip $IP \
	--user $USER \
	--ssh-key $SSH_KEY \
	--k3s-version $K3S_VERSION \
	--k3s-extra-args "--disable-cloud-controller --no-deploy servicelb --no-deploy traefik --no-deploy local-storage --kubelet-arg='cloud-provider=external' --kubelet-arg=\"provider-id=\"aws:///$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)/$(curl -s http://169.254.169.254/latest/meta-data/instance-id)\"\" --kubelet-arg='feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true' --kube-apiserver-arg='allow-privileged=true' --kube-apiserver-arg='feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true,VolumeSnapshotDataSource=true' "

Context

When running k3s on an ec2 instance with the aws cloud controller manager, a provider ID has to be set on the k3s instance.

This provider id is determined dynamically on the remote host and consists of the availability zone and instance id.

Your Environment

  • What Kubernetes distribution are you using (for k3sup app)?
kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T23:34:25Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"darwin/amd64"}
@mysticaltech
Copy link

+1 for this. If it is useful for local-exec, it should be also implemented in remote-exec, there is absolutely no reason why both are not treated the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants