-
Notifications
You must be signed in to change notification settings - Fork 90
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
use latest Operator SDK (0.15.2) #282
Merged
Merged
Conversation
This file contains 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
Compiles/lints/builds. Untested. Still need to test and also update docs of course... committing at this point for safekeeping. Lots of go source files got touched in the "imports" section because of the directory name change from "pkg/apis/kubedirector.hpe.com" to "pkg/apis/kubedirector". Other changes listed below. #### .gitignore Removing "dep"-related stuff. Some formatting changes in the autogenerated part. #### .travis.yml New golang version requirement. First cut at changes for switching from dep to go modules. #### Gopkg.{lock,toml} and go.{mod,sum} Switching from dep to go modules. #### Makefile New golang version requirement. Removing "dep"-related stuff. Directory name change pkg/apis/kubedirector.hpe.com -> pkg/apis/kubedirector. Make clean should also remove configcli.tgz. Fixes for .PHONY. #### build/* Slightly different skeleton generated by current SDK -- user setup is done at image build time. Not 100% sure this will still be fine under OpenShift strictness but it is what the SDK now recommends. #### main.go Uncommenting leader election as it should work now, knock on wood. New Prometheus metrics stuff. Commented out for now until we can actually test this. #### deployment-prebuilt.yaml and operator.yaml No predefined metrics port anymore. WATCH_NAMESPACE really should be empty (since we're cluster scope), even though we don't use this. #### rbac-default.yaml Adding privs for services/finalizers since the new generated role includes that. Not sure we need it but eh. Also adding get/watch/list privs for daemonsets (again, probably don't need). Adding privs for deployments/finalizers on our own deployment. Adding Prometheus-related privs (monitoring.coreos.com). #### cert.go Had to pull in these functions we use that have been removed from latest client-go. We could/should move to using the tls module now provided by the SDK... however, its interface requires storing the various certs/keys in two secrets and a configmap, while our current method uses one secret. Since there are now some existing deployments of KD, we would need a migration strategy. #### shared/client.go Handling changes in the signatures for List and Delete. #### validator/util.go For the Webhooks list element inside our MutatingWebhookConfiguration: instead of a Webhookobject we now are required to use MutatingWebhook. Even though the API version of MutatingWebhookConfiguration has not changed. I think this is a compatible change i.e. MutatingWebhook is a superset of the old Webhook.
I think it used to just return 404 in this case, now it's a special error.
KD can come up successfully now and create a simple kdcluster.
Helps finding detritus when paths change.
Note that this change does not take advantage of any new capabilities of the new SDK yet. Some things to investigate: using markup to help generate validation schema, secondary resources, CR status conditions, and the metrics stuff mentioned above. Also of course we can now use PATCH, and we have access to more recent K8s API versions. |
swamibluedata
approved these changes
Mar 10, 2020
This was referenced Mar 11, 2020
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.
Putting this PR here to air out a bit while we test it more.
Lots of go source files got touched in the "imports" section because of the directory name change from "pkg/apis/kubedirector.hpe.com" to "pkg/apis/kubedirector". Other changes listed below.
.gitignore
Removing "dep"-related stuff.
Some formatting changes in the autogenerated part.
.travis.yml
New golang version requirement.
Switching from dep to go modules.
Gopkg.{lock,toml} and go.{mod,sum}
Switching from dep to go modules.
Makefile
Updating the golang version requirement & adding an operator-sdk version requirement.
Removing "dep"-related stuff.
Directory name change pkg/apis/kubedirector.hpe.com -> pkg/apis/kubedirector.
Make clean should also remove configcli.tgz.
Fixes for .PHONY.
build/*
Slightly different skeleton generated by current SDK -- user setup is done at image build time. Not 100% sure this will still be fine under OpenShift strictness but it is what the SDK now recommends.
doc/*
Updating docs for changes to supported/suggested K8s platforms and changes in build process.
Adding upgrade.md to contain notes about moving to the new version.
main.go
Re-enabling leader election, but "with lease" rather than "for life"; cf. issue #265.
New Prometheus metrics stuff. Commented out for now until we can actually test this.
deployment-prebuilt.yaml and operator.yaml
No predefined metrics port anymore.
WATCH_NAMESPACE really should be empty (since we're cluster scope), even though we don't use this.
rbac-default.yaml
Adding privs for services/finalizers since the new generated role includes that.
Also adding get/watch/list privs for daemonsets.
Adding privs for deployments/finalizers on our own deployment.
Adding Prometheus-related privs (monitoring.coreos.com).
cert.go
Had to pull in these functions we use that have been removed from latest client-go. We could/should move to using the tls module now provided by the SDK... however, its interface requires storing the various certs/keys in two secrets and a configmap, while our current method uses one secret. Since there are now some existing deployments of KD, we would need a migration strategy.
shared/client.go
Handling changes in the signatures for List and Delete.
Handling cases where the split client now can return ErrCacheNotStarted.
validator/util.go
For the Webhooks list element inside our MutatingWebhookConfiguration: instead of a Webhookobject we now are required to use MutatingWebhook. Even though the API version of MutatingWebhookConfiguration has not changed. This is a compatible change i.e. MutatingWebhook is a superset of the old Webhook.