Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the criticalstack v1alpha1 API group +kubebuilder:object:generate=true +groupName=criticalstack.com
Index ¶
- Constants
- Variables
- func EncodePassword(pw, salt string) string
- func HashResourceName(s string) string
- type InitialPasswordSpec
- type PasswordData
- type SecretReference
- type User
- type UserList
- type UserRequest
- type UserRequestCondition
- type UserRequestConditionType
- type UserRequestList
- type UserRequestSpec
- type UserRequestStatus
- type UserTemplate
- type UserType
Constants ¶
const (
UserSaltLengthBytes = 10
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "criticalstack.com", Version: "v1alpha1"} // 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 ¶
func EncodePassword ¶
EncodePassword encodes password to safe format.
func HashResourceName ¶
HashResourceName hashes the input string and returns a valid Kubernetes resource name - RFC1123 DNS Label compliant. The returned string must: - be comprised only of alphanumeric and the "-" character - begin and end with an alphanumeric character - be entirely lowercase - be <= 63 characters in length This is currently accomplished by computing the SHA512, encoding to lowercase alphanumeric b32, and truncating to 63 bytes (the SHA512 output is always >63 bytes).
Types ¶
type InitialPasswordSpec ¶
type InitialPasswordSpec struct { // SecretRef points to a secret that should contains the initial password SecretRef *SecretReference `json:"secretRef,omitempty"` // Value is the string value to be used as a password Value string `json:"value,omitempty"` }
func (*InitialPasswordSpec) DeepCopy ¶
func (in *InitialPasswordSpec) DeepCopy() *InitialPasswordSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InitialPasswordSpec.
func (*InitialPasswordSpec) DeepCopyInto ¶
func (in *InitialPasswordSpec) DeepCopyInto(out *InitialPasswordSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PasswordData ¶
func NewPasswordData ¶
func NewPasswordData(password string) PasswordData
func NewPasswordDataFromMap ¶
func NewPasswordDataFromMap(in map[string][]byte) *PasswordData
func (*PasswordData) DeepCopy ¶
func (in *PasswordData) DeepCopy() *PasswordData
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PasswordData.
func (*PasswordData) DeepCopyInto ¶
func (in *PasswordData) DeepCopyInto(out *PasswordData)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PasswordData) ToMap ¶
func (pw PasswordData) ToMap() map[string][]byte
func (PasswordData) Validate ¶
func (pw PasswordData) Validate(password string) bool
type SecretReference ¶
type SecretReference struct { // Name of the secret Name string `json:"name"` // Namespace of the secret Namespace string `json:"namespace"` // Key represents the key in the secret to be referenced - if empty, the first field found is used Key string `json:"key,omitempty"` // Consume indicates that the secret should be deleted Consume bool `json:"consume,omitempty"` }
func (*SecretReference) DeepCopy ¶
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SecretReference) Object ¶
func (s SecretReference) Object() corev1.Secret
func (SecretReference) ObjectKey ¶
func (s SecretReference) ObjectKey() client.ObjectKey
type User ¶
type User struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` UserTemplate `json:",inline"` }
func (*User) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
func (*User) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*User) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserList ¶
type UserList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []User `json:"items"` }
UserList contains a list of User
func (*UserList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList.
func (*UserList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserRequest ¶
type UserRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec UserRequestSpec `json:"spec"` Status UserRequestStatus `json:"status,omitempty"` }
func (*UserRequest) DeepCopy ¶
func (in *UserRequest) DeepCopy() *UserRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRequest.
func (*UserRequest) DeepCopyInto ¶
func (in *UserRequest) DeepCopyInto(out *UserRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserRequest) DeepCopyObject ¶
func (in *UserRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserRequestCondition ¶
type UserRequestCondition struct { Type UserRequestConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` }
func (*UserRequestCondition) DeepCopy ¶
func (in *UserRequestCondition) DeepCopy() *UserRequestCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRequestCondition.
func (*UserRequestCondition) DeepCopyInto ¶
func (in *UserRequestCondition) DeepCopyInto(out *UserRequestCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserRequestConditionType ¶
type UserRequestConditionType string
const (
UserRequestReady UserRequestConditionType = "Ready"
)
type UserRequestList ¶
type UserRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []UserRequest `json:"items"` }
UserRequestList contains a list of UserRequest
func (*UserRequestList) DeepCopy ¶
func (in *UserRequestList) DeepCopy() *UserRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRequestList.
func (*UserRequestList) DeepCopyInto ¶
func (in *UserRequestList) DeepCopyInto(out *UserRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UserRequestList) DeepCopyObject ¶
func (in *UserRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UserRequestSpec ¶
type UserRequestSpec struct { UserTemplate `json:"template"` InitialPassword *InitialPasswordSpec `json:"initialPassword,omitempty"` SkipUserBindings bool `json:"skipUserBindings,omitempty"` SkipKeyCreation bool `json:"skipKeyCreation,omitempty"` }
func (*UserRequestSpec) DeepCopy ¶
func (in *UserRequestSpec) DeepCopy() *UserRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRequestSpec.
func (*UserRequestSpec) DeepCopyInto ¶
func (in *UserRequestSpec) DeepCopyInto(out *UserRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserRequestStatus ¶
type UserRequestStatus struct { Conditions []UserRequestCondition `json:"conditions"` User string `json:"user,omitempty"` }
func (*UserRequestStatus) DeepCopy ¶
func (in *UserRequestStatus) DeepCopy() *UserRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRequestStatus.
func (*UserRequestStatus) DeepCopyInto ¶
func (in *UserRequestStatus) DeepCopyInto(out *UserRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UserTemplate ¶
type UserTemplate struct { Active bool `json:"active"` CustomAvatar string `json:"customAvatar,omitempty"` DefaultNamespace string `json:"defaultNamespace,omitempty"` Email string `json:"email"` Groups []string `json:"groups,omitempty"` Type UserType `json:"type"` Username string `json:"username"` }
func (*UserTemplate) DeepCopy ¶
func (in *UserTemplate) DeepCopy() *UserTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserTemplate.
func (*UserTemplate) DeepCopyInto ¶
func (in *UserTemplate) DeepCopyInto(out *UserTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (UserTemplate) ResourceName ¶
func (t UserTemplate) ResourceName() string