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

operator: Upgrade k8s.io, sigs.k8s.io and openshift deps #11718

Merged
merged 8 commits into from Jan 22, 2024

Conversation

periklis
Copy link
Collaborator

@periklis periklis commented Jan 19, 2024

What this PR does / why we need it:
Upgrade all required dependencies to enable vendoring openshift/api from release-4.15:

  • sigs.k8s.io: v0.15.3 to v0.16.3
  • k8s.io: v1.27.7 to v1.28.6
  • openshift/api: release-4.14 to release-4.15
  • openshift/library-go: release-4.14 to release-4.15

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

  • The replace directive github.com/sercand/kuberesolver is a quick solution to make builds with newer google.golang.org/grpc work again. The module is in the operator's dependency tree because of the direct dependency to Loki.
  • The k8.io/utils bump requires replacing the deprecated pointer pkg with it's generic counterpart ptr.To.
  • The sigs.k8s.io/controller-runtime bump requires to move from our custom profiler registration to the one provided by the module.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@periklis periklis self-assigned this Jan 19, 2024
@periklis periklis requested review from xperimental and a team as code owners January 19, 2024 13:51
Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

In tests we specify the type of the pointer (Replicas: ptr.To[int32](2)) whereas in code we do not (Replicas: ptr.To(opts.Stack.Template.Ingester.Replicas)), is there any reason?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we maintain a different go.mod for this package? And why do we maintain both with different versions?

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 export the APIs for other projects to use like prometheus-operator. Currently known user is https://github.com/rhobs/obsctl-reloader/

@periklis
Copy link
Collaborator Author

periklis commented Jan 22, 2024

In tests we specify the type of the pointer (Replicas: ptr.To[int32](2)) whereas in code we do not (Replicas: ptr.To(opts.Stack.Template.Ingester.Replicas)), is there any reason?

Constant integers in Golang resolve to int and not int32 probably cause of their untyped nature.

Copy link
Contributor

@JoaoBraveCoding JoaoBraveCoding left a comment

Choose a reason for hiding this comment

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

lgtm

@periklis periklis merged commit 71d3ab8 into grafana:main Jan 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants