Skip to content

Commit 21e4081

Browse files
authored
Merge pull request #657 from dlaw4608/keystone_user
Keystone: User Controller
2 parents 56313e4 + ae115bc commit 21e4081

110 files changed

Lines changed: 4620 additions & 0 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
@@ -160,6 +160,14 @@ resources:
160160
kind: Trunk
161161
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
162162
version: v1alpha1
163+
- api:
164+
crdVersion: v1
165+
namespaced: true
166+
domain: k-orc.cloud
167+
group: openstack
168+
kind: User
169+
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
170+
version: v1alpha1
163171
- api:
164172
crdVersion: v1
165173
namespaced: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ kubectl delete -f $ORC_RELEASE
8888
| service | |||
8989
| subnet | |||
9090
| trunk | |||
91+
| user | |||
9192
| volume | |||
9293
| volume type | |||
9394

api/v1alpha1/user_types.go

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
// UserResourceSpec contains the desired state of the resource.
20+
type UserResourceSpec struct {
21+
// name will be the name of the created resource. If not specified, the
22+
// name of the ORC object will be used.
23+
// +optional
24+
Name *OpenStackName `json:"name,omitempty"`
25+
26+
// description is a human-readable description for the resource.
27+
// +kubebuilder:validation:MinLength:=1
28+
// +kubebuilder:validation:MaxLength:=255
29+
// +optional
30+
Description *string `json:"description,omitempty"`
31+
32+
// domainRef is a reference to the ORC Domain which this resource is associated with.
33+
// +optional
34+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="domainRef is immutable"
35+
DomainRef *KubernetesNameRef `json:"domainRef,omitempty"`
36+
37+
// defaultProjectRef is a reference to the Default Project which this resource is associated with.
38+
// +optional
39+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="defaultProjectRef is immutable"
40+
DefaultProjectRef *KubernetesNameRef `json:"defaultProjectRef,omitempty"`
41+
42+
// enabled defines whether a user is enabled or disabled
43+
// +optional
44+
Enabled *bool `json:"enabled,omitempty"`
45+
}
46+
47+
// UserFilter defines an existing resource by its properties
48+
// +kubebuilder:validation:MinProperties:=1
49+
type UserFilter struct {
50+
// name of the existing resource
51+
// +optional
52+
Name *OpenStackName `json:"name,omitempty"`
53+
54+
// domainRef is a reference to the ORC Domain which this resource is associated with.
55+
// +optional
56+
DomainRef *KubernetesNameRef `json:"domainRef,omitempty"`
57+
}
58+
59+
// UserResourceStatus represents the observed state of the resource.
60+
type UserResourceStatus struct {
61+
// name is a Human-readable name for the resource. Might not be unique.
62+
// +kubebuilder:validation:MaxLength=1024
63+
// +optional
64+
Name string `json:"name,omitempty"`
65+
66+
// description is a human-readable description for the resource.
67+
// +kubebuilder:validation:MaxLength=1024
68+
// +optional
69+
Description string `json:"description,omitempty"`
70+
71+
// domainID is the ID of the Domain to which the resource is associated.
72+
// +kubebuilder:validation:MaxLength=1024
73+
// +optional
74+
DomainID string `json:"domainID,omitempty"`
75+
76+
// defaultProjectID is the ID of the Default Project to which the user is associated with.
77+
// +kubebuilder:validation:MaxLength=1024
78+
// +optional
79+
DefaultProjectID string `json:"defaultProjectID,omitempty"`
80+
81+
// enabled defines whether a user is enabled or disabled
82+
// +optional
83+
Enabled bool `json:"enabled,omitempty"`
84+
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 227 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)