Skip to content

Commit

Permalink
add public-viewer config (#430)
Browse files Browse the repository at this point in the history
* add public-viewer config

This commit adds the notion of Public-Viewer as described
in [JIRA ASC-532](https://issues.redhat.com/browse/ASC-532).

Signed-off-by: Francesco Ilario <filario@redhat.com>

* move PublicViewerConfig into Host

Signed-off-by: Francesco Ilario <filario@redhat.com>

* refactor

Signed-off-by: Francesco Ilario <filario@redhat.com>

* update apiref.doc

Signed-off-by: Francesco Ilario <filario@redhat.com>

---------

Signed-off-by: Francesco Ilario <filario@redhat.com>
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
  • Loading branch information
filariow and mfrancisc authored Jul 2, 2024
1 parent f4a7654 commit 4301ce9
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 1 deletion.
25 changes: 25 additions & 0 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ HostConfig contains all configuration parameters of the host operator
| *`toolchainStatus`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-toolchainstatusconfig[$$ToolchainStatusConfig$$]__ | Keeps parameters concerned with the toolchainstatus + | |
| *`users`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-usersconfig[$$UsersConfig$$]__ | Keeps parameters concerned with user management + | |
| *`spaceConfig`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-spaceconfig[$$SpaceConfig$$]__ | Keeps parameters necessary for configuring Space provisioning functionality + | |
| *`publicViewerConfig`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-publicviewerconfiguration[$$PublicViewerConfiguration$$]__ | Contains the PublicViewer configuration. +
IMPORTANT: To provide a consistent User-Experience, each user +
the space has been directly shared with should have at least +
the same permissions the kubesaw-authenticated user has. + | |
|===


Expand Down Expand Up @@ -1986,6 +1990,27 @@ Supported condition types: ConditionReady + | |
|===


[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-publicviewerconfiguration"]
==== PublicViewerConfiguration



Configuration to enable the PublicViewer support



.Appears In:
****
- xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-hostconfig[$$HostConfig$$]
****

[cols="20a,50a,15a,15a", options="header"]
|===
| Field | Description | Default | Validation
| *`enabled`* __boolean__ | Defines whether the PublicViewer support should be enabled or not + | false |
|===


[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-registrationserviceanalyticsconfig"]
==== RegistrationServiceAnalyticsConfig

Expand Down
16 changes: 16 additions & 0 deletions api/v1alpha1/toolchainconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ type HostConfig struct {
// Keeps parameters necessary for configuring Space provisioning functionality
// +optional
SpaceConfig SpaceConfig `json:"spaceConfig,omitempty"`

// Contains the PublicViewer configuration.
// IMPORTANT: To provide a consistent User-Experience, each user
// the space has been directly shared with should have at least
// the same permissions the kubesaw-authenticated user has.
//+optional
PublicViewerConfig *PublicViewerConfiguration `json:"publicViewerConfig,omitempty"`
}

// Members contains all configuration for member operators
Expand Down Expand Up @@ -563,6 +570,15 @@ type SpaceConfig struct {
SpaceBindingRequestEnabled *bool `json:"spaceBindingRequestEnabled,omitempty"`
}

// Configuration to enable the PublicViewer support
// +k8s:openapi-gen=true
type PublicViewerConfiguration struct {
// Defines whether the PublicViewer support should be enabled or not
//+required
//+kubebuilder:default:=false
Enabled bool `json:"enabled"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand Down
20 changes: 20 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.

31 changes: 30 additions & 1 deletion api/v1alpha1/zz_generated.openapi.go

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

0 comments on commit 4301ce9

Please sign in to comment.