-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
We are currently adding the rate limiting policy into the control plane for the multi cluster 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? |
d520b36
to
63f97b2
Compare
until we reach v1 and become more conservative, it is safe to upgrade whenever we need. |
changes look good. But there is an issue with the e2e tests. |
63f97b2
to
443277d
Compare
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. |
443277d
to
b1bd50c
Compare
pkg/common/gatewayapi_utils.go
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why keep using v1alpha2?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe so yes
0334b7f
to
58593d0
Compare
This PR came up on the Kuadrant call today. 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. There's a separate action from @alexsnaps to try out the latest rc of 0.7.0 and eventually update to that version.
|
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.
58593d0
to
28d8a14
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving forward!
* 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]>
* 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]>
* 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]>
* 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]>
* 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]>
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