Skip to content

Use double quotes instead of single quotes for INSTALL_K3S_EXEC #235

@ThomasK33

Description

@ThomasK33

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"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions