Skip to content

Keystone: Endpoint controller#614

Merged
mandre merged 2 commits intok-orc:mainfrom
winiciusallan:endpoint-controller
Feb 13, 2026
Merged

Keystone: Endpoint controller#614
mandre merged 2 commits intok-orc:mainfrom
winiciusallan:endpoint-controller

Conversation

@winiciusallan
Copy link
Contributor

@winiciusallan winiciusallan commented Dec 17, 2025

This PR introduces the Keystone Endpoint controller.

Fixes: #592

Reviewer notes:

  • At this time, Gophercloud requires the Name field on creation, and name is deprecated according to the docs, so since I can't omit it for now, I have decided to implement the controller with this field. I opened a PR to address it
  • Also, we couldn't set a value for the enabled field on creation neither on update, so I have to omit it mainly in the tests. This PR was opened to fix it,

@github-actions github-actions bot added the semver:major Breaking change label Dec 17, 2025
@winiciusallan winiciusallan force-pushed the endpoint-controller branch 2 times, most recently from 16996dd to 2783f0e Compare December 17, 2025 17:14
Copy link
Collaborator

@mandre mandre left a comment

Choose a reason for hiding this comment

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

I wasn't sure at first, but I now believe we should wait for the next gophercloud release to avoid the introduction of a backward incompatible change in the API when we drop the Name field.

// description is a human-readable description for the resource.
// enabled indicates whether the endpoint is enabled or not.
// +optional
Enabled *bool `json:"enabled,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can drop the pointer in the status.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to stop copy pasting field definitions on status 😅. Done!

Copy link
Collaborator

Choose a reason for hiding this comment

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

My bad, this was bad advice. We actually want the pointer to differentiate between false and unset, like we do for other resources.

| **controller** | **1.x** | **2.x** | **main** |
|:---------------------------:|:-------:|:-------:|:--------:|
| domain | | ✔ | ✔ |
| endpoint | | ◐ | ◐ |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we can make it a ✔ when we're based on a newer gophercloud.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was probably lost in a rebase. From my point of view, we've implemented the resource fully and should use ✔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding the fields, all are implemented, but I've avoided putting the ✔ because the description remains immutable. Do you think I should replace it anyway?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's what I figured afterward. It's fine to leave it like that, but I wouldn't be shocked if we moved it to ✔ either (since the legend says "mostly implemented").

@winiciusallan
Copy link
Contributor Author

Hey, sorry for the delay. Now that we have a new gophercloud release, can we get this one #628?

Once merged, I'll focus on addressing your comments and taking it further.

@winiciusallan
Copy link
Contributor Author

@mandre I noticed that I missed a pointer on Description in endpoint.UpdateOpts 😅, so we are not able to unset that field; tests has been falling on endpoint-update. When we pass the zero-value, it omits the field and does not update it =/. I opened a PR for it.

Is it okay if we ignore it for now and implement it later (considering that a gophercloud release was launched recently)?

https://github.com/gophercloud/gophercloud/blob/main/openstack/identity/v3/endpoints/requests.go#L137

@mandre
Copy link
Collaborator

mandre commented Jan 8, 2026

@mandre I noticed that I missed a pointer on Description in endpoint.UpdateOpts 😅, so we are not able to unset that field; tests has been falling on endpoint-update. When we pass the zero-value, it omits the field and does not update it =/. I opened a PR for it.

Is it okay if we ignore it for now and implement it later (considering that a gophercloud release was launched recently)?

Absolutely, let's make Description immutable for now. While your gophercloud patch is good, it's going to take time before we can consume your fix as we won't be able to backport to v2.

@github-actions github-actions bot removed the semver:major Breaking change label Jan 10, 2026
@github-actions
Copy link

Failed to assess the semver bump. See logs for details.

@github-actions
Copy link

Failed to assess the semver bump. See logs for details.

@github-actions github-actions bot added the semver:major Breaking change label Jan 10, 2026
@winiciusallan
Copy link
Contributor Author

I made a bit of mess with the commits here, sorry about that. I made a rebase instead of merging with the main branch. I think now it is good.

@winiciusallan
Copy link
Contributor Author

I have amended the merge with the main branch in the last commit, it could be hard to review. I can revert and separate them if you prefer, sorry about that too =/.

@mandre
Copy link
Collaborator

mandre commented Feb 5, 2026

Hey @winiciusallan, are you still working on this branch? From what I can tell, there are 3 significant commits:

  • e367bc0 (endpoint: generate code with scaffolding tool)
  • 2783f0e (keystone: endpoint controller implementation)
  • 50f2218 (change: drop name field, add description and enabled)

If you rebase on main, you should be able to drop the extra commits and fix the merge conflict on internal/controllers/port/actuator.go. If you feel this PR is ready to go, you might want to squash the last 2 commits together as well.

Let me know when this is ready for a final review.

@winiciusallan
Copy link
Contributor Author

@mandre Hey, I'll work on the final adjustments today or tomorrow at the latest. I'll let you know when it'll be ready.

@winiciusallan winiciusallan force-pushed the endpoint-controller branch 3 times, most recently from 634dbf1 to 4d3e5db Compare February 7, 2026 02:18
@winiciusallan
Copy link
Contributor Author

@mandre Okay, now it is ready for a final review.

| **controller** | **1.x** | **2.x** | **main** |
|:---------------------------:|:-------:|:-------:|:--------:|
| domain | | ✔ | ✔ |
| endpoint | | ◐ | ◐ |
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was probably lost in a rebase. From my point of view, we've implemented the resource fully and should use ✔

go run ./cmd/scaffold-controller \
    -interactive=false \
    -kind Endpoint \
    -gophercloud-client NewIdentityV3 \
    -gophercloud-module github.com/gophercloud/gophercloud/v2/openstack/identity/v3/endpoints \
    -required-create-dependency Service \
    -import-dependency Service

Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
@winiciusallan winiciusallan force-pushed the endpoint-controller branch 2 times, most recently from ad77fb6 to e932efb Compare February 12, 2026 17:07
@mandre mandre added this pull request to the merge queue Feb 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 13, 2026
@mandre mandre added this pull request to the merge queue Feb 13, 2026
Merged via the queue into k-orc:main with commit 5a940ed Feb 13, 2026
9 checks passed
@winiciusallan winiciusallan deleted the endpoint-controller branch February 13, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keystone Endpoint Controller

2 participants