This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Conversation
Extract the generation of pod templates out into its own function: the implementation of generating the DaemonSetSpec (for logs) and StatefulSetSpec (for metrics) was incredibly similar, and this will be doubly true for integrations. A shared function for generating the template will help remove duplication and avoid bugs where template generation becomes out of sync for the various generated resources.
rfratto
commented
Apr 4, 2022
rfratto
marked this pull request as ready for review
April 4, 2022 18:30
rlankfo
reviewed
Apr 12, 2022
rlankfo
reviewed
Apr 12, 2022
rfratto
added a commit
to rfratto/agent
that referenced
this pull request
Apr 12, 2022
…cold-storage#1556) * pkg/operator: refactor pod template generation into its own function Extract the generation of pod templates out into its own function: the implementation of generating the DaemonSetSpec (for logs) and StatefulSetSpec (for metrics) was incredibly similar, and this will be doubly true for integrations. A shared function for generating the template will help remove duplication and avoid bugs where template generation becomes out of sync for the various generated resources. * pkg/operator: move more common logic to generatePodTemplate * pkg/operator: make generating pod templates its own function * pkg/operator: share generated ObjectMeta between pod controllers * pkg/operator: reconcile integrations * pkg/operator: resolve lint errors * pkg/operator: e2e test deployment of integrations * docs: update docs for RBAC additions * pkg/operator: fix lint errors * pkg/operator/apis: fix "order resources" typo (other resources) * pkg/operator: elaborate why deleteManagedResource gets called
3 tasks
rfratto
added a commit
that referenced
this pull request
Apr 12, 2022
* [dev.operator-integrations] Add Integration into operator resource hierarchy (#1417) * add CRDs for integrations * move pkg/operator/config.Deployment to pkg/operator/apis/monitoring/v1alpha1 This allows us to easily generate the DeepCopy implementation for the struct instead of manually creating it. This commit also makes gragent the consistent name to refer to pkg/operator/apis/monitoring/v1alpha1, which is short and understandable. * Mark CRDs as generated to hide their diffs from GitHub PR reviews * test Integrations in resource hierarchy * go mod tidy * fix doc error for ConfigMaps * [dev.operator-integrations] pkg/operator/config: Generate config for integrations (#1503) * pkg/operator/config: Support integration-specific configs * document why we want to skip adding a __replica__ label for integration metrics * [dev.operator-integrations] Reconcile operator integrations (#1556) * pkg/operator: refactor pod template generation into its own function Extract the generation of pod templates out into its own function: the implementation of generating the DaemonSetSpec (for logs) and StatefulSetSpec (for metrics) was incredibly similar, and this will be doubly true for integrations. A shared function for generating the template will help remove duplication and avoid bugs where template generation becomes out of sync for the various generated resources. * pkg/operator: move more common logic to generatePodTemplate * pkg/operator: make generating pod templates its own function * pkg/operator: share generated ObjectMeta between pod controllers * pkg/operator: reconcile integrations * pkg/operator: resolve lint errors * pkg/operator: e2e test deployment of integrations * docs: update docs for RBAC additions * pkg/operator: fix lint errors * pkg/operator/apis: fix "order resources" typo (other resources) * pkg/operator: elaborate why deleteManagedResource gets called * update changelog
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Related to #1414
Implements the reconcile loop and produces a working end-to-end example.
This is a massive PR; a lot of work has been done around refactoring and sharing as much code as possible to reduce bloating up the operator codebase even further.
I have done a somewhat-decent job and breaking up the changes across commits to make them more easily reviewable; you may find reviewing the PR commit-by-commit easier than reviewing the final diffs.
Example deployment of CRDs