Skip to content

Commit

Permalink
add PublicViewer config
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <[email protected]>
  • Loading branch information
filariow committed Mar 22, 2024
1 parent 5ab3840 commit 40a60c7
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
24 changes: 24 additions & 0 deletions api/v1alpha1/toolchainconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,30 @@ type ToolchainConfigSpec struct {
// Contains all member operator configurations for all member clusters
// +optional
Members Members `json:"members,omitempty"`

// Contains all the configuration that applies to both host and member operators
// +optional
Global GlobalConfig `json:"global,omitempty"`
}

// GlobalConfig contains all configuration that applies for both host and member operators
// +k8s:openapi-gen=true
type GlobalConfig struct {
// +optional
PublicViewer PublicViewerConfig `json:"publicViewer,omitempty"`
}

// PublicViewer used to enable public-viewer support
// +k8s:openapi-gen=true
type PublicViewerConfig struct {
// +kubebuilder:default:=false
Enabled bool `json:"enabled"`

// +kubebuilder:default:=public-viewer
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
Username string `json:"username,omitempty"`
}

// HostConfig contains all configuration parameters of the host operator
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/usersignup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const (
UserSignupPendingApprovalReason = "PendingApproval"
UserSignupUserBanningReason = "Banning"
UserSignupUserBannedReason = "Banned"
UserSignupUserReservedReason = "Reserved"
UserSignupFailedToReadBannedUsersReason = "FailedToReadBannedUsers"
UserSignupMissingUserEmailReason = "MissingUserEmail"
UserSignupMissingUserEmailAnnotationReason = "MissingUserEmailAnnotation"
Expand Down
32 changes: 32 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 40a60c7

Please sign in to comment.