feat: Add NodeExporter CRD controller for operator-managed node-exporter#363
Open
miconeilaws wants to merge 2 commits intomainfrom
Open
feat: Add NodeExporter CRD controller for operator-managed node-exporter#363miconeilaws wants to merge 2 commits intomainfrom
miconeilaws wants to merge 2 commits intomainfrom
Conversation
Add a NodeExporter custom resource to the CloudWatch Agent Operator, following the exact DCGM/Neuron pattern. The operator reconciles NodeExporter CR instances into DaemonSet, ServiceAccount, ConfigMap, and Service Kubernetes objects. Changes: - New CRD type: apis/v1alpha1/nodeexporter_types.go - New controller: controllers/nodeexporter_controller.go - New manifest builders: internal/manifests/nodeexporter/ (8 files) - New status handler: internal/status/nodeexporter/ (2 files) - Config/Version/Params integration for node-exporter image - Conditional controller registration (CRD existence check) for backwards compatibility with old Helm charts - Unit tests for all manifest builders (6 test files) The controller registration is gated by a CRD existence check at startup, so the operator works correctly with older Helm charts that don't ship the NodeExporter CRD.
- Fix in-place mutation of NodeExporter.Spec.Args map in container.go - Remove broken scale subresource marker (.spec.replicas does not exist) - Remove managementState printcolumn (.spec.managementState does not exist) - Reuse rest config instead of calling GetConfigOrDie twice in main.go - Remove stale 'daemonset, statefulset, and deployment mode' comments - Simplify container args: remove redundant intermediate variable - Fix Yoda condition in annotations.go - Fix incorrect TypeMeta in configmap_test.go
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.
Add a NodeExporter custom resource to the CloudWatch Agent Operator, following the exact DCGM/Neuron pattern. The operator reconciles NodeExporter CR instances into DaemonSet, ServiceAccount, ConfigMap, and Service Kubernetes objects.
Changes:
The controller registration is gated by a CRD existence check at startup, so the operator works correctly with older Helm charts that don't ship the NodeExporter CRD.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.