Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mfrancisc/api
Browse files Browse the repository at this point in the history
  • Loading branch information
Devtools committed Aug 29, 2024
2 parents 58d5d6a + de5ee82 commit 3e13298
Show file tree
Hide file tree
Showing 14 changed files with 4,243 additions and 76 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
name: GolangCI Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4
go-version-file: go.mod

- name: Lint
uses: golangci/golangci-lint-action@v6
Expand Down
4 changes: 3 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
= ToolChain API

image:https://goreportcard.com/badge/github.com/codeready-toolchain/api[Go Report Card, link="https://goreportcard.com/report/github.com/codeready-toolchain/api"]
image:https://codecov.io/gh/codeready-toolchain/api/branch/master/graph/badge.svg[Codecov.io,link="https://codecov.io/gh/codeready-toolchain/api"]
image:https://godoc.org/github.com/codeready-toolchain/api?status.png[GoDoc,link="https://godoc.org/github.com/codeready-toolchain/api"]

For the API reference docs go xref:api/v1alpha1/docs/apiref.adoc[here]

== Building
Requires:
Expand Down
5 changes: 4 additions & 1 deletion api/v1alpha1/banneduser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ const (
// BannedUserEmailHashLabelKey is used for the banneduser email hash label key
BannedUserEmailHashLabelKey = LabelKeyPrefix + "email-hash"

// BannedUserPhoneNumberHashLabelKey is used a label key for the hash of a phone of the banned user
// BannedUserPhoneNumberHashLabelKey is used for the banneduser phone number hash label key
BannedUserPhoneNumberHashLabelKey = LabelKeyPrefix + "phone-hash"

// BannedByLabelKey is used for the banned by label key (to point out who banned the user)
BannedByLabelKey = LabelKeyPrefix + "banned-by"
)

// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
Expand Down
4,032 changes: 4,032 additions & 0 deletions api/v1alpha1/docs/apiref.adoc

Large diffs are not rendered by default.

22 changes: 4 additions & 18 deletions api/v1alpha1/memberoperatorconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ type MemberOperatorConfigSpec struct {
// Keeps parameters concerned with the webhook
// +optional
Webhook WebhookConfig `json:"webhook,omitempty"`

// WebConsolePlugin is used to configure the Web Console Plugin parameters
// +optional
WebConsolePlugin WebConsolePlugin `json:"webConsolePlugin,omitempty"`
}

// Defines all parameters concerned with the autoscaler
Expand All @@ -67,6 +63,10 @@ type AutoscalerConfig struct {
// +optional
BufferMemory *string `json:"bufferMemory,omitempty"`

// Represents how much CPU should be required by the autoscaler buffer
// +optional
BufferCPU *string `json:"bufferCPU,omitempty"`

// Represents the number of autoscaler buffer replicas to request
// +optional
BufferReplicas *int `json:"bufferReplicas,omitempty"`
Expand Down Expand Up @@ -177,20 +177,6 @@ type WebhookSecret struct {
VirtualMachineAccessKey *string `json:"virtualMachineAccessKey,omitempty"`
}

// WebConsolePlugin defines the configuration parameters relating to the Web Console Plugin
type WebConsolePlugin struct {
// Deploy determines whether the plugin will be deployed or not
Deploy *bool `json:"deploy,omitempty"`

// PendoKey is the key value used to interact with the Pendo API
// +optional
PendoKey *string `json:"pendoKey,omitempty"`

// PendoHost allows a host URL to be configured instead of communicating directly with the Pendo domain
// +optional
PendoHost *string `json:"pendoHost,omitempty"`
}

// Defines all parameters concerned with member status
// +k8s:openapi-gen=true
type MemberStatusConfig struct {
Expand Down
5 changes: 3 additions & 2 deletions api/v1alpha1/socialevent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ type SocialEventSpec struct {
// This must be the valid name of an nstemplatetier resource.
SpaceTier string `json:"spaceTier"`

// If true, best effort is made to provision all attendees of the event on the same cluster
// The cluster in which the user/space should be provisioned in
// If not set then the target cluster will be picked automatically
// +optional
PreferSameCluster bool `json:"preferSameCluster,omitempty"`
TargetCluster string `json:"targetCluster,omitempty"`

// If true, the user will also be required to complete standard phone verification
// +optional
Expand Down
22 changes: 22 additions & 0 deletions api/v1alpha1/toolchaincluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,33 @@ const (
type ToolchainClusterSpec struct {
// The API endpoint of the member cluster. This can be a hostname,
// hostname:port, IP or IP:port.
//
// Be aware that this field is going to be replaced with
// the Status.APIEndpoint in the future.
APIEndpoint string `json:"apiEndpoint"`

// CABundle contains the certificate authority information.
// +optional
//
// Note that this is going to be deprecated and removed. It will be replaced by a field in
// the kubecondig of the connection secret
CABundle string `json:"caBundle,omitempty"`

// Name of the secret containing the token required to access the
// member cluster. The secret needs to exist in the same namespace
// as the control plane and should have a "token" key.
//
// In the near future, the secret will contain the whole kubeconfig required to connect
// to the cluster.
SecretRef LocalSecretReference `json:"secretRef"`

// DisabledTLSValidations defines a list of checks to ignore when validating
// the TLS connection to the member cluster. This can be any of *, SubjectName, or ValidityPeriod.
// If * is specified, it is expected to be the only option in list.
//
// Note that this is going to be deprecated and removed. It will be replaced by
// the kubeconfig stored in the connection secret.
//
// +optional
// +listType=set
DisabledTLSValidations []TLSValidation `json:"disabledTLSValidations,omitempty"`
Expand All @@ -66,6 +79,15 @@ type LocalSecretReference struct {
// cluster updated periodically by cluster controller.
// +k8s:openapi-gen=true
type ToolchainClusterStatus struct {
// APIEndpoint is the API endpoint of the remote cluster. This can be a hostname,
// hostname:port, IP or IP:port.
// +optional
APIEndpoint string `json:"apiEndpoint"`

// OperatorNamespace is the namespace in which the operator runs in the remote cluster
// +optional
OperatorNamespace string `json:"operatorNamespace"`

// Conditions is an array of current cluster conditions.
// +listType=atomic
Conditions []Condition `json:"conditions"`
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
56 changes: 25 additions & 31 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Loading

0 comments on commit 3e13298

Please sign in to comment.