Skip to content

Commit 5a940ed

Browse files
authored
Merge pull request #614 from winiciusallan/endpoint-controller
Keystone: Endpoint controller
2 parents b390ed4 + c1a0b5f commit 5a940ed

103 files changed

Lines changed: 4522 additions & 12 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PROJECT

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ resources:
1616
kind: Domain
1717
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
1818
version: v1alpha1
19+
- api:
20+
crdVersion: v1
21+
namespaced: true
22+
domain: k-orc.cloud
23+
group: openstack
24+
kind: Endpoint
25+
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
26+
version: v1alpha1
1927
- api:
2028
crdVersion: v1
2129
namespaced: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ kubectl delete -f $ORC_RELEASE
7171
| **controller** | **1.x** | **2.x** | **main** |
7272
|:---------------------------:|:-------:|:-------:|:--------:|
7373
| domain | |||
74+
| endpoint | |||
7475
| flavor | |||
7576
| floating ip | |||
7677
| group | |||
@@ -91,7 +92,6 @@ kubectl delete -f $ORC_RELEASE
9192
| volume type | |||
9293

9394

94-
9595
✔: mostly implemented
9696

9797
◐: partially implemented

api/v1alpha1/endpoint_types.go

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
Copyright The ORC Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1alpha1
18+
19+
// EndpointResourceSpec contains the desired state of the resource.
20+
type EndpointResourceSpec struct {
21+
// description is a human-readable description for the resource.
22+
// +kubebuilder:validation:MinLength:=1
23+
// +kubebuilder:validation:MaxLength:=255
24+
// +optional
25+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="description is immutable"
26+
Description *string `json:"description,omitempty"`
27+
28+
// enabled indicates whether the endpoint is enabled or not.
29+
// +optional
30+
Enabled *bool `json:"enabled,omitempty"`
31+
32+
// interface indicates the visibility of the endpoint.
33+
// +kubebuilder:validation:Enum:=admin;internal;public
34+
// +required
35+
Interface string `json:"interface,omitempty"`
36+
37+
// url is the endpoint URL.
38+
// +kubebuilder:validation:MaxLength=1024
39+
// +required
40+
URL string `json:"url"`
41+
42+
// serviceRef is a reference to the ORC Service which this resource is associated with.
43+
// +required
44+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serviceRef is immutable"
45+
ServiceRef KubernetesNameRef `json:"serviceRef,omitempty"`
46+
}
47+
48+
// EndpointFilter defines an existing resource by its properties
49+
// +kubebuilder:validation:MinProperties:=1
50+
type EndpointFilter struct {
51+
// interface of the existing endpoint.
52+
// +kubebuilder:validation:Enum:=admin;internal;public
53+
// +optional
54+
Interface string `json:"interface,omitempty"`
55+
56+
// serviceRef is a reference to the ORC Service which this resource is associated with.
57+
// +optional
58+
ServiceRef *KubernetesNameRef `json:"serviceRef,omitempty"`
59+
60+
// url is the URL of the existing endpoint.
61+
// +kubebuilder:validation:MaxLength=1024
62+
// +optional
63+
URL string `json:"url,omitempty"`
64+
}
65+
66+
// EndpointResourceStatus represents the observed state of the resource.
67+
type EndpointResourceStatus struct {
68+
// description is a human-readable description for the resource.
69+
// +kubebuilder:validation:MinLength:=1
70+
// +kubebuilder:validation:MaxLength:=255
71+
// +optional
72+
Description string `json:"description,omitempty"`
73+
74+
// enabled indicates whether the endpoint is enabled or not.
75+
// +optional
76+
Enabled *bool `json:"enabled,omitempty"`
77+
78+
// interface indicates the visibility of the endpoint.
79+
// +kubebuilder:validation:MaxLength=128
80+
// +optional
81+
Interface string `json:"interface,omitempty"`
82+
83+
// url is the endpoint URL.
84+
// +kubebuilder:validation:MaxLength=1024
85+
// +optional
86+
URL string `json:"url,omitempty"`
87+
88+
// serviceID is the ID of the Service to which the resource is associated.
89+
// +kubebuilder:validation:MaxLength=1024
90+
// +optional
91+
ServiceID string `json:"serviceID,omitempty"`
92+
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 212 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)