Skip to content
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

chore: change api types for group #55

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions apis/user/v1alpha1/group_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ import (

// GroupParameters are the configurable fields of a Group.
type GroupParameters struct {
// Active determines whether the group is enabled ("true") or disabled ("false") in the system.
// Active determines whether the group is enabled (true) or disabled (false) in the system.
//+optional
//+kubebuilder:default="true"
//+kubebuilder:validation:Pattern=`^(true|false)$`
Active *string `json:"active,omitempty"`
//+kubebuilder:default=true
Active bool `json:"active"`
// GroupID is the group ID (known as Name in the GUI).
//+kubebuilder:validation:MinLength=1
//+kubebuilder:validation:MaxLength=64
//+kubebuilder:validation:Pattern=`^[A-Za-z0-9_-]*$`
GroupID string `json:"groupId"`
// GroupName is the group name (known as Description in the GUI).
//+optional
//+kubebuilder:validation:MinLength=1
//+kubebuilder:validation:MaxLength=64
GroupName *string `json:"groupName,omitempty"`
GroupName string `json:"groupName,omitempty"`
// LDAPEnabled determines whether LDAP authentication is enabled for members of this group.
//+optional
//+kubebuilder:default=false
Expand All @@ -61,15 +61,6 @@ type GroupParameters struct {
// LDAPUserDNTemplate specifies how users within this group will be authenticated against the LDAP system when they log into the CMC.
//+optional
LDAPUserDNTemplate *string `json:"ldapUserDNTemplate,omitempty"`
//+optional
//+kubebuilder:default={ALL}
S3EndpointsHTTPS []string `json:"s3endpointshttp,omitempty"`
//+optional
//+kubebuilder:default={ALL}
S3EndpointsHTTP []string `json:"s3endpointshttps,omitempty"`
//+optional
//+kubebuilder:default={ALL}
S3WebsiteEndpoints []string `json:"s3websiteendpoints,omitempty"`
}

// GroupObservation are the observable fields of a Group.
Expand Down
25 changes: 0 additions & 25 deletions apis/user/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 5 additions & 23 deletions package/crds/user.cloudian.crossplane.io_groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ spec:
description: GroupParameters are the configurable fields of a Group.
properties:
active:
default: "true"
description: Active determines whether the group is enabled ("true")
or disabled ("false") in the system.
pattern: ^(true|false)$
type: string
default: true
description: Active determines whether the group is enabled (true)
or disabled (false) in the system.
type: boolean
groupId:
description: GroupID is the group ID (known as Name in the GUI).
maxLength: 64
Expand All @@ -89,6 +88,7 @@ spec:
description: GroupName is the group name (known as Description
in the GUI).
maxLength: 64
minLength: 1
type: string
ldapEnabled:
default: false
Expand Down Expand Up @@ -117,24 +117,6 @@ spec:
group will be authenticated against the LDAP system when they
log into the CMC.
type: string
s3endpointshttp:
default:
- ALL
items:
type: string
type: array
s3endpointshttps:
default:
- ALL
items:
type: string
type: array
s3websiteendpoints:
default:
- ALL
items:
type: string
type: array
required:
- groupId
type: object
Expand Down
Loading