Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions api/v1alpha1/environmentrequest_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@ type Splitter struct {
Tests []Test `json:"tests"`
}

// EnvironmentProviderJobConfig defines parameters required by environment provider job
type EnvironmentProviderJobConfig struct {
EiffelMessageBus RabbitMQ `json:"eiffelMessageBus"`
EtosMessageBus RabbitMQ `json:"etosMessageBus"`
EtosApi string `json:"etosApi"`
EncryptionKey Var `json:"encryptionKeySecretRef"`
EtcdHost string `json:"etcdHost"`
EtcdPort string `json:"etcdPort"`
EventDataTimeout string `json:"eventDataTimeout"`
GraphQlServer string `json:"graphQlServer"`
RoutingKeyTag string `json:"routingKeyTag"`
WaitForTimeout string `json:"waitForTimeout"`
TestRunnerVersion string `json:"testRunnerVersion"`

EnvironmentProviderEventDataTimeout string `json:"environmentProviderEventDataTimeout"`
EnvironmentProviderImage string `json:"environmentProviderImage"`
EnvironmentProviderImagePullPolicy corev1.PullPolicy `json:"environmentProviderImagePullPolicy"`
EnvironmentProviderServiceAccount string `json:"environmentProviderServiceAccount"`
EnvironmentProviderTestSuiteTimeout string `json:"environmentProviderTestSuiteTimeout"`
}

// EnvironmentRequestSpec defines the desired state of EnvironmentRequest
type EnvironmentRequestSpec struct {
// ID is the ID for the environments generated. Will be generated if nil. The ID is a UUID, any version, and regex matches that.
Expand All @@ -61,8 +82,10 @@ type EnvironmentRequestSpec struct {
// TODO: Dataset per provider?
Dataset *apiextensionsv1.JSON `json:"dataset,omitempty"`

Providers EnvironmentProviders `json:"providers"`
Splitter Splitter `json:"splitter"`
Providers EnvironmentProviders `json:"providers"`
Splitter Splitter `json:"splitter"`
ServiceAccountName string `json:"serviceaccountname,omitempty"`
Config EnvironmentProviderJobConfig `json:"Config,omitempty"`
}

// EnvironmentRequestStatus defines the observed state of EnvironmentRequest
Expand Down
19 changes: 19 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.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,301 @@ spec:
spec:
description: EnvironmentRequestSpec defines the desired state of EnvironmentRequest
properties:
Config:
description: EnvironmentProviderJobConfig defines parameters required
by environment provider job
properties:
eiffelMessageBus:
description: RabbitMQ configuration.
properties:
deploy:
default: false
type: boolean
exchange:
default: amq.topic
type: string
host:
default: rabbitmq
type: string
password:
default:
value: guest
description: Var describes either a string value or a value
from a VarSource.
properties:
value:
type: string
valueFrom:
description: VarSource describes a value from either a
secretmap or configmap.
properties:
configMapKeyRef:
description: Selects a key from a ConfigMap.
properties:
key:
description: The key to select.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the ConfigMap or
its key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: SecretKeySelector selects a key of a
Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
port:
default: "5672"
type: string
ssl:
default: "false"
type: string
username:
default: guest
type: string
vhost:
default: /
type: string
type: object
encryptionKeySecretRef:
description: Var describes either a string value or a value from
a VarSource.
properties:
value:
type: string
valueFrom:
description: VarSource describes a value from either a secretmap
or configmap.
properties:
configMapKeyRef:
description: Selects a key from a ConfigMap.
properties:
key:
description: The key to select.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the ConfigMap or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the Secret or its key
must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
environmentProviderEventDataTimeout:
type: string
environmentProviderImage:
type: string
environmentProviderImagePullPolicy:
description: PullPolicy describes a policy for if/when to pull
a container image
type: string
environmentProviderServiceAccount:
type: string
environmentProviderTestSuiteTimeout:
type: string
etcdHost:
type: string
etcdPort:
type: string
etosApi:
type: string
etosMessageBus:
description: RabbitMQ configuration.
properties:
deploy:
default: false
type: boolean
exchange:
default: amq.topic
type: string
host:
default: rabbitmq
type: string
password:
default:
value: guest
description: Var describes either a string value or a value
from a VarSource.
properties:
value:
type: string
valueFrom:
description: VarSource describes a value from either a
secretmap or configmap.
properties:
configMapKeyRef:
description: Selects a key from a ConfigMap.
properties:
key:
description: The key to select.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the ConfigMap or
its key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
secretKeyRef:
description: SecretKeySelector selects a key of a
Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
TODO: Add other useful fields. apiVersion, kind, uid?
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Drop `kubebuilder:default` when controller-gen doesn't need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
type: string
optional:
description: Specify whether the Secret or its
key must be defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
type: object
type: object
port:
default: "5672"
type: string
ssl:
default: "false"
type: string
username:
default: guest
type: string
vhost:
default: /
type: string
type: object
eventDataTimeout:
type: string
graphQlServer:
type: string
routingKeyTag:
type: string
testRunnerVersion:
type: string
waitForTimeout:
type: string
required:
- eiffelMessageBus
- encryptionKeySecretRef
- environmentProviderEventDataTimeout
- environmentProviderImage
- environmentProviderImagePullPolicy
- environmentProviderServiceAccount
- environmentProviderTestSuiteTimeout
- etcdHost
- etcdPort
- etosApi
- etosMessageBus
- eventDataTimeout
- graphQlServer
- routingKeyTag
- testRunnerVersion
- waitForTimeout
type: object
artifact:
type: string
dataset:
Expand Down Expand Up @@ -105,6 +400,8 @@ spec:
- id
type: object
type: object
serviceaccountname:
type: string
splitter:
properties:
tests:
Expand Down
Loading