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

chore: massive redo of Operator #295

Merged
merged 6 commits into from
Dec 12, 2023

Conversation

dejanzele
Copy link
Member

@dejanzele dejanzele commented Dec 12, 2023

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 35 lines in your changes are missing coverage. Please review.

Comparison is base (bda0e29) 84.19% compared to head (cce34f8) 84.19%.

Files Patch % Lines
...ternal/controller/install/binoculars_controller.go 78.08% 10 Missing and 6 partials ⚠️
internal/controller/install/executor_controller.go 59.25% 6 Missing and 5 partials ⚠️
...rnal/controller/install/armadaserver_controller.go 57.89% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #295   +/-   ##
=======================================
  Coverage   84.19%   84.19%           
=======================================
  Files          15       15           
  Lines        3441     3461   +20     
=======================================
+ Hits         2897     2914   +17     
- Misses        381      383    +2     
- Partials      163      164    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@richscott richscott left a comment

Choose a reason for hiding this comment

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

Good work!

go-version:
description: "Version of Go. Default 1.21"
required: false
default: "1.21"
Copy link
Member

Choose a reason for hiding this comment

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

We should ask the GR guys some time if they have any interest in updating the armada repo to Go 1.21. (I've been building Armada with 1.21.1 and it seems to work fine).

@@ -56,7 +56,7 @@ you should have a fully functional install of Armada running.

To stop the development cluster:
```bash
make dev-teardown
make delete-dev-cluster
Copy link
Member

Choose a reason for hiding this comment

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

👏🏼

@@ -44,10 +46,36 @@ var _ webhook.Defaulter = &EventIngester{}
func (r *EventIngester) Default() {
eventingesterlog.Info("default", "name", r.Name)

// TODO(user): fill in your defaulting logic.
// image
Copy link
Member

Choose a reason for hiding this comment

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

Now is probably not the time for it, but a number of these defaulting-logic chunks are so similar, maybe it would be worthwhile to some day make a SetSpecDefaults(spec *XXXSpec) - but we'd have to define a generic meta-spec type, or make all those XXXSpec types interfaces?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess I can do it in the next pass

oldComponents.Deployment.Spec = newComponents.Deployment.Spec
oldComponents.Deployment.Labels = newComponents.Deployment.Labels
oldComponents.Deployment.Annotations = newComponents.Deployment.Annotations
func (cc *CommonComponents) ReconcileComponents(newComponents *CommonComponents) {
Copy link
Member

Choose a reason for hiding this comment

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

oldComponents -> cc rename 💯

Copy link
Member Author

Choose a reason for hiding this comment

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

I always preferr to have the same name for the receiver

@dejanzele dejanzele merged commit 4e1b2a6 into armadaproject:main Dec 12, 2023
12 of 13 checks passed
@dejanzele dejanzele deleted the chore/cleanup-operator branch December 12, 2023 19:05
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.

2 participants