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

[k8s_0.29] Update k8s.io API to version 0.29 #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rtkypoeluev
Copy link

@rtkypoeluev rtkypoeluev commented Jan 3, 2024

Updating the statefulset scaledown controller code to use newer k8s.io API, version 0.29

Changes:

  • updated k8s.io API calls, params
  • removed vendors dir
  • using local pkg/controller and pkg/signals (instead of github.com/jboss-openshift/statefulset-scaledown-controller)
  • updated unit tests

Testing:

  • running make build
  • running make image
  • running go build ./...
  • running go test ./...

@rtkypoeluev
Copy link
Author

not ready for review yet, work in progress

@rtkypoeluev
Copy link
Author

It's ready for review now

@rtkypoeluev
Copy link
Author

@luksa, it would be great if you could review and approve, so that other people can take use of this PR, thanks!

"The type of resource object that is used for locking during "+
"leader election. Supported options are `configmaps` (default) and `endpoints`.")
"leader election. Supported option is `leases`.")
Copy link
Author

Choose a reason for hiding this comment

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

ConfigMaps was replaced by Leases

@@ -99,7 +101,7 @@ func main() {
var kubeInformerFactory kubeinformers.SharedInformerFactory
if config.localOnly {
if config.namespace == "" {
bytes, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
bytes, err := os.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
Copy link
Author

Choose a reason for hiding this comment

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

ioutil.ReadFile was replaced with os.ReadFile

"os"

"statefulset-scaledown-controller/pkg/controller"
"statefulset-scaledown-controller/pkg/signals"
Copy link
Author

Choose a reason for hiding this comment

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

using local controller/signals packages instead of github.com/jboss-openshift

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.

1 participant