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

Upgrade to operator-sdk 1.0 #167

Merged
merged 25 commits into from
Oct 5, 2020
Merged

Upgrade to operator-sdk 1.0 #167

merged 25 commits into from
Oct 5, 2020

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Oct 4, 2020

Upgrade according to https://sdk.operatorframework.io/docs/building-operators/golang/project_migration_guide/

Outstanding issues that were solved

  • Effectively it is completely new project structure and engine, the logic was cherry-picked and migrated step by step in multiple places
  • DepResolver introduced some dependency hell, we included env.go from kuberentes utils right in the codebase
  • Invalid memory nil pointer access was solved by adopting of depresolver to new style of GslbReconciler initialization
  • Adapt to new reconciliation related method signatures
  • Adapt to new logging style
  • Upstream/k8gb Makefile merge
  • Unit test fixes - controller runtime fake client changed its behaviour in treating object versions
  • Terratest fixes
  • Github actions changes

Resolves #166

All tests are passing.

@@ -650,7 +651,7 @@ func TestGslbController(t *testing.T) {
t.Fatalf("Can't setup env var: (%v)", err)
}
resolver := depresolver.NewDependencyResolver(context.TODO(), cl)
r.config, err = resolver.ResolveOperatorConfig()
r.Config, err = resolver.ResolveOperatorConfig()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I created an additional issue for that

Copy link
Collaborator

@kuritka kuritka left a comment

Choose a reason for hiding this comment

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

Roughly it is very good.

@@ -3,47 +3,17 @@ module github.com/AbsaOSS/k8gb
go 1.13
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we try to migrate to go1.15? OR in separate issue ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@kuritka I would better not mix it , also go 1.13 spec was created by framework generator so don't really want to override it given complexity of this PR

)

// Pinned to kubernetes-1.16.2
replace (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm so happy we got rid of that! 🥇


# editor and IDE paraphernalia
.idea
*.swp
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we can add .vscode as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kuritka it's actually there https://github.com/AbsaOSS/k8gb/blob/6d05dc68d0c52d70b45e2971e57294b69270bc6f/.gitignore#L100
.gitignore is a bit messy given the merge with upstream, i just sequentially combined them as of now

@ytsarev ytsarev requested a review from kuritka October 5, 2020 09:30
Copy link
Contributor

@somaritane somaritane left a comment

Choose a reason for hiding this comment

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

Great job, lgtm!

@ytsarev ytsarev merged commit d0af222 into master Oct 5, 2020
@ytsarev ytsarev deleted the 1.0 branch October 29, 2020 01:01
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.

Upgrade to operator-sdk 1.0
3 participants