Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the redis.middleware.alauda.io v1 API group +kubebuilder:object:generate=true +groupName=redis.middleware.alauda.io
Copyright 2023 The RedisOperator Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- type AccountType
- type Phase
- type RedisUser
- func (in *RedisUser) DeepCopy() *RedisUser
- func (in *RedisUser) DeepCopyInto(out *RedisUser)
- func (in *RedisUser) DeepCopyObject() runtime.Object
- func (r *RedisUser) Default()
- func (r *RedisUser) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *RedisUser) ValidateCreate() (admission.Warnings, error)
- func (r *RedisUser) ValidateDelete() (admission.Warnings, error)
- func (r *RedisUser) ValidateUpdate(_ runtime.Object) (admission.Warnings, error)
- type RedisUserList
- type RedisUserSpec
- type RedisUserStatus
Constants ¶
const ( RedisUserFinalizer = "redisusers.redis.middleware.alauda.io/finalizer" ACLSupportedVersionAnnotationKey = "middleware.alauda.io/acl-supported-version" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "redis.middleware.alauda.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AccountType ¶
type AccountType string
const ( System AccountType = "system" Custom AccountType = "custom" Default AccountType = "default" )
type RedisUser ¶
type RedisUser struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RedisUserSpec `json:"spec,omitempty"` Status RedisUserStatus `json:"status,omitempty"` }
RedisUser is the Schema for the redisusers API
func (*RedisUser) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisUser.
func (*RedisUser) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisUser) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*RedisUser) SetupWebhookWithManager ¶
func (*RedisUser) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*RedisUser) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type RedisUserList ¶
type RedisUserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []RedisUser `json:"items"` }
RedisUserList contains a list of RedisUser
func (*RedisUserList) DeepCopy ¶
func (in *RedisUserList) DeepCopy() *RedisUserList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisUserList.
func (*RedisUserList) DeepCopyInto ¶
func (in *RedisUserList) DeepCopyInto(out *RedisUserList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RedisUserList) DeepCopyObject ¶
func (in *RedisUserList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RedisUserSpec ¶
type RedisUserSpec struct { // Redis Username (required) Username string `json:"username"` //用户名 // Redis Password secret name, key is password PasswordSecrets []string `json:"passwordSecrets,omitempty"` //密码secret // redis acl rules string AclRules string `json:"aclRules,omitempty"` //acl规则 // Redis instance Name (required) // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:MinLength=1 RedisName string `json:"redisName"` //redisname // redis user account type // +kubebuilder:validation:Enum=system;custom;default AccountType AccountType `json:"accountType,omitempty"` //账户类型 system,custom,default // redis user account type // +kubebuilder:validation:Enum=sentinel;cluster;standalone Arch core.Arch `json:"arch,omitempty"` //架构类型 }
RedisUserSpec defines the desired state of RedisUser
func (*RedisUserSpec) DeepCopy ¶
func (in *RedisUserSpec) DeepCopy() *RedisUserSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisUserSpec.
func (*RedisUserSpec) DeepCopyInto ¶
func (in *RedisUserSpec) DeepCopyInto(out *RedisUserSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RedisUserStatus ¶
type RedisUserStatus struct { LastUpdatedSuccess string `json:"lastUpdateSuccess,omitempty"` //最后更新时间 // +kubebuilder:validation:Enum=Fail;Success;Pending Phase Phase `json:"Phase,omitempty"` //Fail or Success Message string `json:"message,omitempty"` //失败信息 AclRules string `json:"aclRules,omitempty"` //redis中的规则,会去除密码 }
RedisUserStatus defines the observed state of RedisUser
func (*RedisUserStatus) DeepCopy ¶
func (in *RedisUserStatus) DeepCopy() *RedisUserStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisUserStatus.
func (*RedisUserStatus) DeepCopyInto ¶
func (in *RedisUserStatus) DeepCopyInto(out *RedisUserStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.