-
Notifications
You must be signed in to change notification settings - Fork 2.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
prefer-bundled-bin
flag cannot be set via config.yaml.d
#7316
Comments
cc @dereknola |
Note that this should be validated by looking at the actual PATH env var for the k3s process. The issue is specifically in the function that sets up the order of that var; the function that sets the node-args annotation works properly. # replace PID with the k3s process ID
cat /proc/PID/environ | xargs -n1 -0 echo | grep PATH |
$ cat validation_template.md ##Environment Details Infrastructure
Node(s) CPU architecture, OS, and version:
Cluster Configuration:
Config.yaml: $ get_figs
$ sudo cat /etc/rancher/k3s/config.yaml.d/test.yaml
Reproduction
Results: Observe the ordering of the path elements with the /usr/sbin/:/usr/bin:/usr/local/bin etc listed earlier and therefore higher priority than the /bin/aux
ValidationValidation Steps
Results: $ sudo cat /proc/${ID}/environ | xargs -n1 -0 echo | grep PATH
Additional context / logs: |
Via @Oats87 on Slack
The
--prefer-bundled-bin
flag can only be set via the CLI or config.yaml. If placed in a yaml file in config.yaml.d it is not found.This appears to be because the FindString code only processes the main config file, it does not iterate over files in config.yaml.d:
k3s/cmd/k3s/main.go
Line 121 in a92f163
k3s/pkg/configfilearg/parser.go
Lines 99 to 102 in a92f163
Compare this to the Parse code, which iterates over both the main config file, and the files in the .d directory:
k3s/pkg/configfilearg/parser.go
Lines 220 to 224 in a92f163
The text was updated successfully, but these errors were encountered: