-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Replace custom k3s etcd script checks with vanilla grep checks #1601
Conversation
Signed-off-by: Derek Nola <derek.nola@suse.com>
Test case 1: auto-tls and peer-auto-tls set to false
Results:
Test case 2: auto-tls and peer-auto-tls set to trueSet configuration in /etc/rancher/k3s/config.yaml.d/50-rancher.yaml and restart k3s unit.
Results:
Test case 3: auto-tls and peer-auto-tls not set (default value is false)Set configuration in /etc/rancher/k3s/config.yaml.d/50-rancher.yaml and restart k3s unit.
Results:
|
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.
@dereknola feel free to apply the changes. Regarding the $etcddatadir
, we need to incorporate it in all k3s-cis-* configmap, and append it in the kube-bench's global configmap.
With regards to the env:
test_items we could get rid of them since k8s environment variables are not usable with k3s (configuration are passed through etcd-arg etc).
…ddatadir Signed-off-by: Derek Nola <derek.nola@suse.com>
149f3bd
to
df52f48
Compare
Lint appears to be failing for unrelated reasons to this PR:
@chen-keinan Should I attempt to include fixes for this lint in this PR? |
could be related to linter version or go version change |
Signed-off-by: chenk <hen.keinan@gmail.com>
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.
Thanks for your contribution! I've added some comments. Please check them when you get a chance. Thanks!
Signed-off-by: Derek Nola <derek.nola@suse.com>
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, Thanks for your contribution!
lgtm 🚀 thanks for the contributions |
Background:
When #1523 was merged, it pulled the cfg checks directly from https://github.com/rancher/security-scan/tree/master/package/cfg.
Problem:
Solution:
Note: This means that running these benchmarks will only pass these checks is K3s is utilizing etcd (via the
--cluster-init
embedded etcd flag). It does not solve the original problem the custom scripts rancher implemented do.Validation:
main:
this PR: