Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploy configuration daemon via reconcilation of the NicConfigurationTemplate #55

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

almaslennikov
Copy link
Collaborator

This change is required for OCP support.
OCP bundle cannot deploy multiple entities, thus we need to make config daemon deployment manageable from the operator itself. The daemon related helm chart parameters are propagated as env variables to the operator container, the manifest is injected into the docker image.
When NicConfigurationTemplate is being reconciled, the same controller will also synchronize the config daemon ds.

This PR only introduces changes to code and helm chart. kustomize and OCP bundle changes will come in a separate PR.

Questions for reviewers:

  • Currently the OwnerReference for the ds is set to the operator pod. Do we want to introduce a new entity (e.g. configMap with params or another CRD with ds config)?
  • Do we want a separate controller for reconciling the daemon set? (We can introduce it in the future to decouple the logic from NicConfigurationTemplate, e.g. when NicFirmwareTemplate is added)

@coveralls
Copy link

coveralls commented Dec 16, 2024

Pull Request Test Coverage Report for Build 12428414078

Details

  • 91 of 142 (64.08%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 59.057%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/render/render.go 56 70 80.0%
pkg/syncdaemon/syncdaemon.go 30 67 44.78%
Files with Coverage Reduction New Missed Lines %
internal/controller/nicconfigurationtemplate_controller.go 1 86.89%
Totals Coverage Status
Change from base Build 12353057348: 0.2%
Covered Lines: 1878
Relevant Lines: 3180

💛 - Coveralls

@almaslennikov almaslennikov force-pushed the daemon-deployment branch 3 times, most recently from e7ba78e to 134800f Compare December 18, 2024 09:44
labels:
app.kubernetes.io/name: nic-configuration-daemon
app.kubernetes.io/created-by: nic-configuration-operator
app.kubernetes.io/part-of: nic-configuration-operator
{{- include "nic-configuration-operator.labels" . | nindent 4 }}
annotations:
release.openshift.io/version: "{{.ReleaseVersion}}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to apply openshift-specific annotation always?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't but it doesn't affect the vanilla deployments by having those annotations. Let's address it when introducing a NicConfigurationOperatorConfig CRD in the future. I've added a note to the #56 not to forget it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm the previous comment, added the "clusterType" parameter to config and now the openshift annotations are added conditionally

bindata/manifests/daemon/config-daemon.yaml Show resolved Hide resolved
bindata/manifests/daemon/config-daemon.yaml Show resolved Hide resolved
pkg/render/render.go Show resolved Hide resolved
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com>
@almaslennikov almaslennikov merged commit e336ed9 into Mellanox:main Dec 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants