fix: use inventory-file for node scanner#1530
Open
MaxRink wants to merge 1 commit into
Open
Conversation
Contributor
fceaf8c to
adc0539
Compare
adc0539 to
3c2d973
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/tmpinventory file in a lightweightrender-node-inventoryinit containercnspec ... --inventory-file, so custom scanner images only needcnspecand no longer need/bin/shorsedimageRegistry,registryMirrors,imagePullSecrets, andskipContainerResolutionapply to the helper image tooReview fixes
Validation
git diff --checkgo test ./controllers/nodes ./pkg/utils/mondoo ./pkg/utils/k8s ./controllers/statusgo build -o /tmp/mondoo-operator-node ./cmd/mondoo-operator/main.gomake lint/actionsmake lintkubectl --context kind-mondoo-oidc-kind apply -k config/crdkubectl --context kind-mondoo-oidc-kind apply --server-side --dry-run=server -k config/rbackubectl --context kind-mondoo-oidc-kind apply --server-side --dry-run=server -f config/samples/k8s_v1alpha2_mondooauditconfig.yamlkubectl --context kind-mondoo-oidc-kind apply --server-side --dry-run=server -f config/samples/k8s_v1alpha2_mondoooperatorconfig.yamlkind-mondoo-oidc-kindserver-side dry-run for a node-scanningMondooAuditConfigplus registry-mirroredMondooOperatorConfigNotes
The init helper uses the existing lightweight BusyBox helper image pattern. Pod-level
imagePullSecretsstill apply to both the helper and scanner containers.go test ./pkg/utils/mondoo -run 'TestContainerImageResolverSuite/Test(ContainerImageUsesRegistryMirror|BusyBoxImageUsesRegistryMirror|ApplyImageRegistry)'go test ./controllers/nodes -run 'TestResources|TestCronJob_UsesInventoryFileFlag|TestDaemonSet_UsesInventoryFileFlag|TestDeploymentHandlerSuite/TestReconcile_(CreateCronJobs|CronJobUsesResolvedRenderImage|CreateDaemonSet)'go test ./controllers/nodes ./pkg/utils/mondoo ./pkg/utils/k8s ./controllers/statusmake lint/actionsmake lint