feat: defender-ready optional deployment
General MR
Summary
This MR adds the capability to configure deployment, with a boolean, to either deploy the existing chart with console (default), or to only deploy the essentials for a defender daemonset. This MR is functionally similar to !320 (closed) but without the upstream dependency. This MR will be followed with an additional MR once additional values for secrets, keys, and/or configmaps are identified to be specified.
If a user were to hypothetically use this option in their twistlock deployment, they would still have to manually deploy the defender daemonset, but would only require twistlock-secrets and twistlock-defender-ds to apply manually, both which can be feteched from the API or UI.
Review
To verify this MR, simply pull the branch (and latest main).
- Render the contents of main with
helm template twistlock . > main.yaml - Render the contents of this branch with
git switch feat/optional-deploymentand thenhelm template twistlock . > branch.yaml - Compare the two files and confirm they have no differences.
- Render the contents of this branch after setting
defenderOnly: trueinvalues.yamland thenhelm template twistlock . > defender.yaml - Obtain a copy of the defender-only deployment, either through the Twistlock UI, or contrib/defenders.sh and connecting to a viable websocket.
- Compare the
defender.yamlto a valid defender-only deployment. Confirm that the following are properly rendered:
- Service
- ServiceAccount
- ClusterRole
- ClusterRoleBinding
Linked Issue
Upgrade Notices
N/A