Skip to content

Commit

Permalink
chore: change api types for group (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariatsji authored Dec 16, 2024
1 parent 376150c commit 48ce43a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 62 deletions.
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

0 comments on commit 48ce43a

Please sign in to comment.