Skip to content

Commit

Permalink
feat: Add allowedSource property (#1893)
Browse files Browse the repository at this point in the history
* feat: Add `allowedSource` property

Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Sep 11, 2024
1 parent 87f29e2 commit 4b62b54
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 2 deletions.
10 changes: 10 additions & 0 deletions api/v2/checluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ type CheClusterDevEnvironments struct {
// here will not trigger workspace failures.
// +optional
IgnoredUnrecoverableEvents []string `json:"ignoredUnrecoverableEvents,omitempty"`
// AllowedSource defines the allowed sources on which workspaces can be started.
// +optional
AllowedSource AllowedSources `json:"allowedSource,omitempty"`
}

// Che components configuration.
Expand Down Expand Up @@ -825,6 +828,13 @@ type KubeRbacProxy struct {
LogLevel *int32 `json:"logLevel,omitempty"`
}

type AllowedSources struct {
// The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
// initiated from these URLs.
// +optional
Urls []string `json:"urls,omitempty"`
}

// GatewayPhase describes the different phases of the Che gateway lifecycle.
type GatewayPhase string

Expand Down
21 changes: 21 additions & 0 deletions api/v2/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che.v7.92.0-883.next
name: eclipse-che.v7.92.0-884.next
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1035,7 +1035,7 @@ spec:
minKubeVersion: 1.19.0
provider:
name: Eclipse Foundation
version: 7.92.0-883.next
version: 7.92.0-884.next
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
12 changes: 12 additions & 0 deletions bundle/next/eclipse-che/manifests/org.eclipse.che_checlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5190,6 +5190,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
12 changes: 12 additions & 0 deletions config/crd/bases/org.eclipse.che_checlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5148,6 +5148,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
12 changes: 12 additions & 0 deletions deploy/deployment/kubernetes/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5169,6 +5169,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5164,6 +5164,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
12 changes: 12 additions & 0 deletions deploy/deployment/openshift/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5169,6 +5169,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5164,6 +5164,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5164,6 +5164,18 @@ spec:
pvcStrategy: per-user
description: Development environment default configuration options.
properties:
allowedSource:
description: AllowedSource defines the allowed sources on which
workspaces can be started.
properties:
urls:
description: |-
The list of approved URLs for starting Cloud Development Environments (CDEs). CDEs can only be
initiated from these URLs.
items:
type: string
type: array
type: object
containerBuildConfiguration:
description: Container build configuration.
properties:
Expand Down

0 comments on commit 4b62b54

Please sign in to comment.