Skip to content
Snippets Groups Projects
Commit 4c65f56b authored by Sören Henning's avatar Sören Henning
Browse files

Merge branch '244-update-handling-of-crds-in-helm' into 'master'

Enhance handling of custom resource definitions within helm

Closes #244

See merge request !186
parents e3cbe678 0c38e459
Branches
Tags
1 merge request!186Enhance handling of custom resource definitions within helm
Pipeline #4909 failed
......@@ -44,7 +44,7 @@ helm install theodolite . -f preconfigs/one-broker-values.yaml
## Uninstall this Chart
To uninstall/delete the `theodolite` deployment:
To uninstall/delete the `theodolite` deployment (by default Helm will be install all CRDs (`exection` and `benchmark`) automatically. If Helm should not install these CRDs, use the flag `--skip-crds`)
```sh
helm uninstall theodolite
......
./../../theodolite/crd/crd-benchmark.yaml
\ No newline at end of file
./../../theodolite/crd/crd-execution.yaml
\ No newline at end of file
{{- if .Values.operator.benchmarkCRD.create -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: benchmarks.theodolite.com
spec:
group: theodolite.com
names:
kind: benchmark
plural: benchmarks
shortNames:
- bench
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
type: object
required: []
properties:
name:
type: string
appResource:
type: array
minItems: 1
items:
type: string
loadGenResource:
type: array
minItems: 1
items:
type: string
resourceTypes:
type: array
minItems: 1
items:
type: object
properties:
typeName:
type: string
patchers:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
properties:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default: {}
loadTypes:
type: array
minItems: 1
items:
type: object
properties:
typeName:
type: string
patchers:
type: array
minItems: 1
items:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
properties:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default: {}
kafkaConfig:
type: object
properties:
bootstrapServer:
type: string
topics:
type: array
minItems: 1
items:
type: object
required: []
properties:
name:
type: string
default: ""
numPartitions:
type: integer
default: 0
replicationFactor:
type: integer
default: 0
removeOnly:
type: boolean
default: false
additionalPrinterColumns:
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
scope: Namespaced
{{- end }}
{{- if .Values.operator.executionCRD.create -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: executions.theodolite.com
spec:
group: theodolite.com
names:
kind: execution
plural: executions
shortNames:
- exec
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required: ["spec"]
properties:
spec:
type: object
required: ["benchmark", "load", "resources", "slos", "execution", "configOverrides"]
properties:
name:
type: string
default: ""
benchmark:
type: string
load: # definition of the load dimension
type: object
required: ["loadType", "loadValues"]
properties:
loadType:
type: string
loadValues:
type: array
items:
type: integer
resources: # definition of the resource dimension
type: object
required: ["resourceType", "resourceValues"]
properties:
resourceType:
type: string
resourceValues:
type: array
items:
type: integer
slos: # def of service level objectives
type: array
items:
type: object
required: ["sloType", "prometheusUrl", "offset"]
properties:
sloType:
description: The type of the SLO. It must match 'lag trend'.
type: string
prometheusUrl:
description: Connection string for Promehteus.
type: string
offset:
description: Hours by which the start and end timestamp will be shifted (for different timezones).
type: integer
properties:
description: (Optional) SLO specific additional arguments.
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default: {}
execution: # def execution config
type: object
required: ["strategy", "duration", "repetitions", "restrictions"]
properties:
strategy:
type: string
duration:
type: integer
repetitions:
type: integer
loadGenerationDelay:
type: integer
restrictions:
type: array
items:
type: string
configOverrides:
type: array
items:
type: object
properties:
patcher:
type: object
properties:
type:
type: string
default: ""
resource:
type: string
default: ""
properties:
type: object
additionalProperties: true
x-kubernetes-map-type: "granular"
default: {}
value:
type: string
status:
type: object
properties:
executionState:
description: ""
type: string
executionDuration:
description: "Duration of the execution in seconds"
type: string
additionalPrinterColumns:
- name: STATUS
type: string
description: State of the execution
jsonPath: .status.executionState
- name: Duration
type: string
description: Duration of the execution
jsonPath: .status.executionDuration
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
subresources:
status: {}
scope: Namespaced
{{- end }}
......@@ -250,11 +250,6 @@ operator:
imageTag: latest
imagePullPolicy: Always
executionCRD:
create: true
benchmarkCRD:
create: true
sloChecker:
lagTrend:
enabled: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment