-
Notifications
You must be signed in to change notification settings - Fork 60
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
new(cmd/driver): driver config namespace from env variable #560
Conversation
Signed-off-by: Federico Di Pierro <[email protected]>
…nfigmap. Moreover fixes some issues with the k8s config map updater. Signed-off-by: Federico Di Pierro <[email protected]>
Signed-off-by: Federico Di Pierro <[email protected]>
/cc @alacuku |
/milestone v0.8.0 |
df0175c
to
72dc74f
Compare
@@ -108,12 +128,6 @@ func checkFalcoRunsWithDrivers(engineKind string) error { | |||
|
|||
func (o *driverConfigOptions) replaceDriverTypeInFalcoConfig(driverType drivertype.DriverType) error { | |||
falcoCfgFile := filepath.Clean(filepath.Join(string(os.PathSeparator), "etc", "falco", "falco.yaml")) | |||
type engineCfg struct { |
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.
Now used from both replaceDriverTypeInFalcoConfig
and replaceDriverTypeInK8SConfigMap
.
configMap := configMapList.Items[i] | ||
currEngineKind := configMap.Data[configMapEngineKindKey] | ||
if err = checkFalcoRunsWithDrivers(currEngineKind); err != nil { | ||
updated := false |
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.
Check that at least a configMap was updated, otherwise return error.
Signed-off-by: Federico Di Pierro <[email protected]>
72dc74f
to
ee4d280
Compare
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.
That's nice!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alacuku, FedeDP The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind cleanup
Any specific area of the project related to this PR?
/area cli
What this PR does / why we need it:
This PR enables the
namespace
parameter ofdriver config
command to be passed asFALCOCTL_DRIVER_CONFIG_NAMESPACE
env variable.Also, it fixes k8s configMap commit code, switching from
Patch
toUpdate
command.Finally, logs are a little improved.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: