Conversation
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
Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
635e6e1 to
16996dd
Compare
Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
16996dd to
2783f0e
Compare
mandre
left a comment
There was a problem hiding this comment.
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.
| // +kubebuilder:default:=true | ||
| // +optional | ||
| Description *string `json:"description,omitempty"` | ||
| Enabled *bool `json:"enabled,omitempty"` |
There was a problem hiding this comment.
It feels like the Enabled field shouldn't be there until your gophercloud PR adding support for it makes it to a gophercloud release we can use in ORC. I see you've dropped Description that has the same issue.
Alternatively, we wait a bit for the next gophercloud release so that we have a clean PR from the start (we can include gophercloud/gophercloud#3581 in it too).
api/v1alpha1/endpoint_types.go
Outdated
| @@ -23,46 +23,43 @@ type EndpointResourceSpec struct { | |||
| // +optional | |||
| Name *OpenStackName `json:"name,omitempty"` | |||
There was a problem hiding this comment.
I'd prefer we do not merge this until we have removed the requirement for Name in gophercloud because this will be a breaking change in the ORC API. This is another argument for waiting for the next gophecloud release where you've had several improvements to the support of endpoint.
There was a problem hiding this comment.
Since we bump for the new gophercloud release, I've removed the requirement for the name. Now, the endpoint controller is a NoNamedResource. I've removed references for this field on tests as well.
api/v1alpha1/endpoint_types.go
Outdated
| // description is a human-readable description for the resource. | ||
| // enabled indicates whether the endpoint is enabled or not. | ||
| // +optional | ||
| Enabled *bool `json:"enabled,omitempty"` |
There was a problem hiding this comment.
We can drop the pointer in the status.
There was a problem hiding this comment.
I need to stop copy pasting field definitions on status 😅. Done!
api/v1alpha1/endpoint_types.go
Outdated
| Enabled *bool `json:"enabled,omitempty"` | ||
|
|
||
| // interface indicates the visibility of the endpoint. | ||
| // +kubebuilder:validation:Enum:=admin;internal;public |
There was a problem hiding this comment.
I think we want to drop the enum validation in the status and instead return whatever OpenStack gives us. We still want to have a MaxLength validation.
There was a problem hiding this comment.
Yeah, it makes sense. Done!
...nal/controllers/endpoint/tests/endpoint-import-dependency/03-delete-import-dependencies.yaml
Show resolved
Hide resolved
|
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. |
Also add redirects for pages we moved to that we don't break bookmarks.
Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
This avoids issues when the resource name conflicts with existing resources and we can't use shortcuts in kubectl commands (e.g. service or role).
Signed-off-by: Winicius Silva <winiciusab12@gmail.com>
|
@mandre I noticed that I missed a pointer on 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 |
|
Failed to assess the semver bump. See logs for details. |
|
Failed to assess the semver bump. See logs for details. |
b59f331 to
8e505db
Compare
8e505db to
50f2218
Compare
|
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. |
|
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 =/. |
|
Hey @winiciusallan, are you still working on this branch? From what I can tell, there are 3 significant commits:
If you rebase on main, you should be able to drop the extra commits and fix the merge conflict on Let me know when this is ready for a final review. |
|
@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. |
This PR introduces the Keystone Endpoint controller.
Fixes: #592
Reviewer notes:
Namefield 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 itenabledfield on creation neither on update, so I have to omit it mainly in the tests. This PR was opened to fix it,