-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocust-test-crd.yaml
156 lines (156 loc) · 6.44 KB
/
locust-test-crd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# Name must match the spec fields below, and be in the form: <plural>.<group>
name: locusttests.locust.io
spec:
# group name to use for REST API: /apis/<group>/<version>
group: locust.io
# list of versions supported by this CustomResourceDefinition
versions:
- name: v1
# Each version can be enabled/disabled by Served flag.
served: true
# One and only one version must be marked as the storage version.
storage: true
schema:
openAPIV3Schema:
type: object
properties:
# Fields to validate are the following:
metadata: # 'metadata' should be an object
type: object
properties: # With the following field 'name'
name:
type: string # Of type 'string'
pattern: '^[a-z]+[-a-z0-9]*\.[-a-z0-9]+$' # allows only 'word.word' names. Usage example (<teamName>.<testName>)
spec: # Root field 'spec'
type: object # It is an object
properties: # And has the following fields
labels: # Child field 'labels'
description: Labels attached to deployed pods
type: object
properties:
master:
description: Labels attached to the master pod
type: object
additionalProperties:
type: string
worker:
description: Labels attached to worker pods
type: object
additionalProperties:
type: string
annotations: # Child field 'annotations'
description: Annotations attached to deployed pods
type: object
properties:
master:
description: Annotations attached to the master pod
type: object
additionalProperties:
type: string
worker:
description: Annotations attached to worker pods
type: object
additionalProperties:
type: string
affinity: # Child field 'affinity'
description: Affinity information to be attached to pods
type: object
properties:
nodeAffinity:
description: Kubernetes node affinity to be attached to pods
type: object
properties:
requiredDuringSchedulingIgnoredDuringExecution:
description: Kubernetes node affinity to be attached to pods
type: object
additionalProperties:
type: string
tolerations: # Child field 'tolerations'
description: Taint toleration information to be attached to pods
type: array
items:
type: object
properties:
key:
description: Toleration key
type: string
operator:
description: Toleration evaluation operator
type: string
enum:
- "Exists"
- "Equal"
value:
description: Toleration value
type: string
effect:
description: Toleration effect
type: string
enum:
- "NoSchedule"
- "PreferNoSchedule"
- "NoExecute"
required: [ "key", "operator", "effect" ]
masterCommandSeed: # Child field 'masterCommandSeed'
description: Master pod command seed
type: string
workerCommandSeed: # Child field 'workerCommandSeed'
description: Worker pod command seed
type: string
workerReplicas: # Child field 'workerReplicas'
description: Number of worker pods to spawn
type: integer
minimum: 1
maximum: 500 # Change limit based on infra capabilities
default: 1
image: # Child field 'image'
description: Locust image
type: string
imagePullPolicy:
description: Image pull policy
type: string
enum:
- "Always"
- "IfNotPresent"
- "Never"
imagePullSecrets:
description: Secrets for pulling images from private registries
type: array
items:
type: string
configMap: # Child field 'configMap'
description: Configuration map name containing the test
type: string
required: ["masterCommandSeed", "workerCommandSeed", "workerReplicas", "image"]
# Enables to add new column when listing instances `kubectl get lotest`
additionalPrinterColumns:
- name: master_cmd
type: string
description: Master pod command seed
jsonPath: .spec.masterCommandSeed
- name: worker_replica_count
type: integer
description: Number of requested worker pods
jsonPath: .spec.workerReplicas
- name: Image
type: string
description: Locust image
jsonPath: .spec.image
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
# Either Namespaced or Cluster
scope: Namespaced
names:
# Plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: locusttests
# Singular name to be used as an alias on the CLI and for display
singular: locusttest
# Kind is normally the CamelCased singular type. Your resource manifests use this.
kind: LocustTest
# ShortNames allow shorter string to match your resource on the CLI
shortNames:
- lotest