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

Update gateway-api module to v0.6.2 #153

Merged
merged 2 commits into from
Jun 10, 2023
Merged

Update gateway-api module to v0.6.2 #153

merged 2 commits into from
Jun 10, 2023

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented Mar 23, 2023

Update gateway-api module to v0.6.2

Update controller runtime
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).
Set go version 1.19

@mikenairn mikenairn requested a review from a team as a code owner March 23, 2023 10:08
@mikenairn
Copy link
Member Author

We are currently adding the rate limiting policy into the control plane for the multi cluster traffic gateway controller Kuadrant/multicluster-gateway-controller#116, but hit an issue with a dependency version mismatch for sigs.k8s.io/gateway-api when trying to add the kuadrant operator as a dependency (This defines the rate limit policy so easiest for us to add this as a dependency and add the scheme from here). We are currently using 0.6.0 and the kuadrant-operator is on 0.5.1. We could downgrade if needs be, but preferably we would just update everything to the latest version which is currently 0.6.2.

Any issues with doing this here? What level of testing needs to be done here to ensure this is all still working as expected, or are the integration tests enough?

/cc @eguzki @guicassolato @maleck13

@mikenairn mikenairn force-pushed the gateway-api-v0.6.2 branch from d520b36 to 63f97b2 Compare March 23, 2023 10:33
mikenairn pushed a commit to mikenairn/kuadrant-operator that referenced this pull request Mar 23, 2023
@eguzki
Copy link
Contributor

eguzki commented Mar 23, 2023

until we reach v1 and become more conservative, it is safe to upgrade whenever we need.

@eguzki
Copy link
Contributor

eguzki commented Mar 23, 2023

changes look good. But there is an issue with the e2e tests.

@mikenairn mikenairn force-pushed the gateway-api-v0.6.2 branch from 63f97b2 to 443277d Compare March 23, 2023 11:56
@mikenairn
Copy link
Member Author

Thanks @eguzki. Some of the constants we are using in our code seem to only be available in v1beta1 now. I missed one of them in the integration test, should hopefully pass now.

@mikenairn mikenairn force-pushed the gateway-api-v0.6.2 branch from 443277d to b1bd50c Compare March 23, 2023 12:46
@@ -10,6 +10,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
gatewayapiv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
Copy link
Contributor

Choose a reason for hiding this comment

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

why keep using v1alpha2?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not everything seems to have moved to v1beta1, so i just stuck with the minimal changes to make it work with the latest version.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, maybe to do this properly we need to update any references to GatewayClass, Gateway, and HTTPRoute to use v1beta1 and leave everything else as v1alpha2 https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md#deprecations

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like PolicyTargetReference is now the only type we use that still requires v1alpha2.

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 believe so yes

@david-martin
Copy link
Member

This PR came up on the Kuadrant call today.
There's an outstanding action to do a release from main with the current version of gateway-api first(@pehala and @didierofrivia have taken an action there).

After that, upgrading beyond that version may lose compatibility with Openshift Service Mesh. But I think that's OK as we need to move forward, and OSSM will catch up in time.
Plus people can use the older version of kuadrant for targetting OSSM if needed.

There's a separate action from @alexsnaps to try out the latest rc of 0.7.0 and eventually update to that version.
So the order of play is:

  • release from main with 0.5.1 of gateway api
  • merge this bump to 0.6.2 (and optionally release that too)
  • merge a future PR to bump to 0.7.x

mikenairn added 2 commits June 7, 2023 11:06
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).
Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.
@mikenairn
Copy link
Member Author

This lgtm. If you are merging, can you hold off deleting the branch as it will break the MGC local-setup https://github.com/Kuadrant/multicluster-gateway-controller/blob/main/config/kuadrant/kustomization.yaml#L2. I'll update that after merge and delete this branch then.

@guicassolato guicassolato requested a review from a team June 7, 2023 11:40
Copy link
Contributor

@eguzki eguzki left a comment

Choose a reason for hiding this comment

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

moving forward!

@mikenairn mikenairn merged commit 4128163 into main Jun 10, 2023
guicassolato added a commit that referenced this pull request Jun 21, 2023
* Build images with replaces image (#193)

* [makefile] Updating the `replaces` directive in CSV

* [gh workflow] Adding `replacesVersion` as input for workflow_dispatch

* [config] Adding default replaces operator value

* [bundle] Updated bundle

* Building the catalog with the replaces directive (#194)

* [catalog] Building the catalog with the replaces directive

* [catalog] Setting default replaces version to `0.0.0-alpha`

* [bundle] Updating config and bundle with new default release version

* upgrade operator-sdk v1.28.1

* fix verify-bundle task

* Create a ServiceMeshMember, rather than mutating the ServiceMeshMemberRoll

* Fixed access to servicemeshmember

* [test] Unit-tests for common/k8s_utils.go (part 2 of 3) (#191)

* test: Add unit-tests to StatusConditionsMarshalJSON (#167)

* test: Add unit-tests to IsOwnedBy (#167)

* refactor: Add comment to IsOwnedBy (#167)

* test: Add unit-test to GetServicePortNumber (#167)

* Update gateway-api module to v0.6.2 (#153)

* Update gateway api dep to v0.6.2
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).

* Update GatewayClass, Gateway and HTTPRoute to v1beta1

Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.

* [test] Unit-tests for common/k8s_utils.go (part 3 of 3) & Unit-tests and improvements for common/yaml_decoder.go (#195)

* test: Add test-case to TestObjectKeyListDifference (#167)

- when inputA and inputB have no common elements then return inputA as the result

* refactor: Rename tests for ObjectKeyListDifference (#167)

* test: Add unit-tests to ContainsObjectKey (#167)

* test: Add unit-tests to FindObjectKey (#167)

* test: Add unit-tests to FindDeploymentStatusCondition (#167)

* refactor: Clarify test name in TestStatusConditionsMarshalJSON (#167)

* test: Add unit-tests to DecodeFile (#167)

* refactor, improvements: DecodeFile YAML decoder (#167)

- Refactor logger initialisation and document decoding to fail fast and return errors immediately
- Enhanced empty doc check
- Add comment to the function

---------

Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Alex Snaps <[email protected]>
Co-authored-by: artem_tiupin <[email protected]>
Co-authored-by: Michael Nairn <[email protected]>
guicassolato added a commit that referenced this pull request Jul 14, 2023
* Build images with replaces image (#193)

* [makefile] Updating the `replaces` directive in CSV

* [gh workflow] Adding `replacesVersion` as input for workflow_dispatch

* [config] Adding default replaces operator value

* [bundle] Updated bundle

* Building the catalog with the replaces directive (#194)

* [catalog] Building the catalog with the replaces directive

* [catalog] Setting default replaces version to `0.0.0-alpha`

* [bundle] Updating config and bundle with new default release version

* upgrade operator-sdk v1.28.1

* fix verify-bundle task

* Create a ServiceMeshMember, rather than mutating the ServiceMeshMemberRoll

* Fixed access to servicemeshmember

* [test] Unit-tests for common/k8s_utils.go (part 2 of 3) (#191)

* test: Add unit-tests to StatusConditionsMarshalJSON (#167)

* test: Add unit-tests to IsOwnedBy (#167)

* refactor: Add comment to IsOwnedBy (#167)

* test: Add unit-test to GetServicePortNumber (#167)

* Update gateway-api module to v0.6.2 (#153)

* Update gateway api dep to v0.6.2
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).

* Update GatewayClass, Gateway and HTTPRoute to v1beta1

Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.

* [test] Unit-tests for common/k8s_utils.go (part 3 of 3) & Unit-tests and improvements for common/yaml_decoder.go (#195)

* test: Add test-case to TestObjectKeyListDifference (#167)

- when inputA and inputB have no common elements then return inputA as the result

* refactor: Rename tests for ObjectKeyListDifference (#167)

* test: Add unit-tests to ContainsObjectKey (#167)

* test: Add unit-tests to FindObjectKey (#167)

* test: Add unit-tests to FindDeploymentStatusCondition (#167)

* refactor: Clarify test name in TestStatusConditionsMarshalJSON (#167)

* test: Add unit-tests to DecodeFile (#167)

* refactor, improvements: DecodeFile YAML decoder (#167)

- Refactor logger initialisation and document decoding to fail fast and return errors immediately
- Enhanced empty doc check
- Add comment to the function

* [istio] Updating registerIstioExternalAuthorizer

* Reconciles also the Istio ConfigMap with the external authorizers
* If the IstioOperator CR returns an error, it continues reconciling CM

* [istio] Updating the unregisterExternalAuthorizerIstio

* With the new functionality

* [mesh config] Refactoring and testing mesh config functionality

* [makefile] Splitting local deploy in different target

* [istio] Refactoring using wrapper structs

* [go] Fixing dependencies

* [mesh config] Refactoring mesh config objects and fns

* [controller] Fixing registering logic

* Still relying on the istio CRD being installed. If not, means no istio
* If it's 404, means it's installed other way than it's operator
* If any other error happens, istio is installed, but an error occurred

* [controller] Refactoring istio installation process

* Added ENV for CM name

* [refactor] Using apierrors.IsNotFound instead of crafting the error msg

* kind: bump to 0.20.0 and pin image to kindest/node:v1.27.3 (#209)

* Upgrade Authorino and Authorino Operator to latest (#211)

* Authorino v0.14.0
* Authorino Operator v0.8.0

* workflow: use go1.19 to align with go.mod go version used (#213)

* workflow: use go1.19 to align with go.mod go version used

* doc: fix operator-sdk & kind versions used for development

---------

Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Alex Snaps <[email protected]>
Co-authored-by: artem_tiupin <[email protected]>
Co-authored-by: Michael Nairn <[email protected]>
Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Kevin Fan <[email protected]>
KevFan pushed a commit to KevFan/kuadrant-operator that referenced this pull request Aug 10, 2023
* Build images with replaces image (Kuadrant#193)

* [makefile] Updating the `replaces` directive in CSV

* [gh workflow] Adding `replacesVersion` as input for workflow_dispatch

* [config] Adding default replaces operator value

* [bundle] Updated bundle

* Building the catalog with the replaces directive (Kuadrant#194)

* [catalog] Building the catalog with the replaces directive

* [catalog] Setting default replaces version to `0.0.0-alpha`

* [bundle] Updating config and bundle with new default release version

* upgrade operator-sdk v1.28.1

* fix verify-bundle task

* Create a ServiceMeshMember, rather than mutating the ServiceMeshMemberRoll

* Fixed access to servicemeshmember

* [test] Unit-tests for common/k8s_utils.go (part 2 of 3) (Kuadrant#191)

* test: Add unit-tests to StatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to IsOwnedBy (Kuadrant#167)

* refactor: Add comment to IsOwnedBy (Kuadrant#167)

* test: Add unit-test to GetServicePortNumber (Kuadrant#167)

* Update gateway-api module to v0.6.2 (Kuadrant#153)

* Update gateway api dep to v0.6.2
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).

* Update GatewayClass, Gateway and HTTPRoute to v1beta1

Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.

* [test] Unit-tests for common/k8s_utils.go (part 3 of 3) & Unit-tests and improvements for common/yaml_decoder.go (Kuadrant#195)

* test: Add test-case to TestObjectKeyListDifference (Kuadrant#167)

- when inputA and inputB have no common elements then return inputA as the result

* refactor: Rename tests for ObjectKeyListDifference (Kuadrant#167)

* test: Add unit-tests to ContainsObjectKey (Kuadrant#167)

* test: Add unit-tests to FindObjectKey (Kuadrant#167)

* test: Add unit-tests to FindDeploymentStatusCondition (Kuadrant#167)

* refactor: Clarify test name in TestStatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to DecodeFile (Kuadrant#167)

* refactor, improvements: DecodeFile YAML decoder (Kuadrant#167)

- Refactor logger initialisation and document decoding to fail fast and return errors immediately
- Enhanced empty doc check
- Add comment to the function

---------

Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Alex Snaps <[email protected]>
Co-authored-by: artem_tiupin <[email protected]>
Co-authored-by: Michael Nairn <[email protected]>
KevFan pushed a commit to KevFan/kuadrant-operator that referenced this pull request Aug 14, 2023
* Build images with replaces image (Kuadrant#193)

* [makefile] Updating the `replaces` directive in CSV

* [gh workflow] Adding `replacesVersion` as input for workflow_dispatch

* [config] Adding default replaces operator value

* [bundle] Updated bundle

* Building the catalog with the replaces directive (Kuadrant#194)

* [catalog] Building the catalog with the replaces directive

* [catalog] Setting default replaces version to `0.0.0-alpha`

* [bundle] Updating config and bundle with new default release version

* upgrade operator-sdk v1.28.1

* fix verify-bundle task

* Create a ServiceMeshMember, rather than mutating the ServiceMeshMemberRoll

* Fixed access to servicemeshmember

* [test] Unit-tests for common/k8s_utils.go (part 2 of 3) (Kuadrant#191)

* test: Add unit-tests to StatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to IsOwnedBy (Kuadrant#167)

* refactor: Add comment to IsOwnedBy (Kuadrant#167)

* test: Add unit-test to GetServicePortNumber (Kuadrant#167)

* Update gateway-api module to v0.6.2 (Kuadrant#153)

* Update gateway api dep to v0.6.2
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).

* Update GatewayClass, Gateway and HTTPRoute to v1beta1

Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.

* [test] Unit-tests for common/k8s_utils.go (part 3 of 3) & Unit-tests and improvements for common/yaml_decoder.go (Kuadrant#195)

* test: Add test-case to TestObjectKeyListDifference (Kuadrant#167)

- when inputA and inputB have no common elements then return inputA as the result

* refactor: Rename tests for ObjectKeyListDifference (Kuadrant#167)

* test: Add unit-tests to ContainsObjectKey (Kuadrant#167)

* test: Add unit-tests to FindObjectKey (Kuadrant#167)

* test: Add unit-tests to FindDeploymentStatusCondition (Kuadrant#167)

* refactor: Clarify test name in TestStatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to DecodeFile (Kuadrant#167)

* refactor, improvements: DecodeFile YAML decoder (Kuadrant#167)

- Refactor logger initialisation and document decoding to fail fast and return errors immediately
- Enhanced empty doc check
- Add comment to the function

---------

Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Alex Snaps <[email protected]>
Co-authored-by: artem_tiupin <[email protected]>
Co-authored-by: Michael Nairn <[email protected]>
KevFan pushed a commit to KevFan/kuadrant-operator that referenced this pull request Aug 14, 2023
* Build images with replaces image (Kuadrant#193)

* [makefile] Updating the `replaces` directive in CSV

* [gh workflow] Adding `replacesVersion` as input for workflow_dispatch

* [config] Adding default replaces operator value

* [bundle] Updated bundle

* Building the catalog with the replaces directive (Kuadrant#194)

* [catalog] Building the catalog with the replaces directive

* [catalog] Setting default replaces version to `0.0.0-alpha`

* [bundle] Updating config and bundle with new default release version

* upgrade operator-sdk v1.28.1

* fix verify-bundle task

* Create a ServiceMeshMember, rather than mutating the ServiceMeshMemberRoll

* Fixed access to servicemeshmember

* [test] Unit-tests for common/k8s_utils.go (part 2 of 3) (Kuadrant#191)

* test: Add unit-tests to StatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to IsOwnedBy (Kuadrant#167)

* refactor: Add comment to IsOwnedBy (Kuadrant#167)

* test: Add unit-test to GetServicePortNumber (Kuadrant#167)

* Update gateway-api module to v0.6.2 (Kuadrant#153)

* Update gateway api dep to v0.6.2
Update controller runtime
Set go version 1.19
Use github.com/onsi/ginkgo/v2 which is used by the latest version if controller-runtime (envtest).

* Update GatewayClass, Gateway and HTTPRoute to v1beta1

Since v0.6.0 GatewayClass, Gateway and HTTPRoute have moved to the
v1beta1 version of the API and support in v1alpha2 will be removed
eventually. All references to these APIS are now updated to use v1beta1.

PolicyTargetReference are still v1alpha2.

* [test] Unit-tests for common/k8s_utils.go (part 3 of 3) & Unit-tests and improvements for common/yaml_decoder.go (Kuadrant#195)

* test: Add test-case to TestObjectKeyListDifference (Kuadrant#167)

- when inputA and inputB have no common elements then return inputA as the result

* refactor: Rename tests for ObjectKeyListDifference (Kuadrant#167)

* test: Add unit-tests to ContainsObjectKey (Kuadrant#167)

* test: Add unit-tests to FindObjectKey (Kuadrant#167)

* test: Add unit-tests to FindDeploymentStatusCondition (Kuadrant#167)

* refactor: Clarify test name in TestStatusConditionsMarshalJSON (Kuadrant#167)

* test: Add unit-tests to DecodeFile (Kuadrant#167)

* refactor, improvements: DecodeFile YAML decoder (Kuadrant#167)

- Refactor logger initialisation and document decoding to fail fast and return errors immediately
- Enhanced empty doc check
- Add comment to the function

---------

Co-authored-by: dd di cesare <[email protected]>
Co-authored-by: Eguzki Astiz Lezaun <[email protected]>
Co-authored-by: Alex Snaps <[email protected]>
Co-authored-by: artem_tiupin <[email protected]>
Co-authored-by: Michael Nairn <[email protected]>
@eguzki eguzki deleted the gateway-api-v0.6.2 branch August 21, 2023 16:02
@eguzki eguzki restored the gateway-api-v0.6.2 branch August 21, 2023 16:02
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.

4 participants