Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements presets proposal (#3190).
Preset field
Preset is an optional, enum field that allows the operator to setup a Beat with predefined configuration. That configuration consists of:
Preset can be used together with other CRD fields:
config
is specified, it replaces config from preset entirely (output
is still set though)podTemplate
is specified, the preset podTemplate is merged with itmanage-beat-rbac
flag set tofalse
orspec.ServiceAccountName
is set, the operator won't create service account or bindingsRole management
Each preset might need different API permissions. As we know these upfront, we can precreate correct ClusterRoles during ECK installation and allow ECK to create bindings to these roles only (verb
bind
) which doesn't require us to expand operator permissions dramatically.In addition to that, autodiscover permissions might be needed for a Beat. We detect this by looking for
*.autodiscover
config path.Role management can be disabled:
manage-beat-rbac
flag tofalse
, andServiceAccountName
in thepodTemplate
PSP
Beat e2e testing is improved by separating the permissions given to the operator and permissions given to Beat Pods.
Beat PSP and ClusterRole allowing to use it are created as a part of e2e test setup. RoleBinding to the right ServiceAccount is done during e2e test run.