Skip to content

Commit b3372dd

Browse files
authored
Pelorus community operator fixes (#750)
A number of fixes in this revision: - Changed logo - Added descriptions and fields to the openAPIV3Schema - Updated example to include all 3 exporters - added "enabled:" field for the exporter to allow enabling or disabling exporter from the values.yaml or the openAPIV3Schema - Added metadata and categories for the Marketplace Signed-off-by: Michal Pryc <mpryc@redhat.com> Signed-off-by: Michal Pryc <mpryc@redhat.com>
1 parent a9b0103 commit b3372dd

22 files changed

Lines changed: 553 additions & 145 deletions

charts/operators/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ type: application
1414

1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
17-
version: 2.0.3
17+
version: 2.0.4

charts/pelorus/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ type: application
1414

1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
17-
version: 2.0.3
17+
version: 2.0.4
1818

1919
dependencies:
2020
- name: exporters
21-
version: "v2.0.3"
21+
version: "v2.0.4"
2222
repository: file://./subcharts/exporters

charts/pelorus/subcharts/exporters/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ type: application
1414

1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
17-
version: 2.0.3
17+
version: 2.0.4

charts/pelorus/subcharts/exporters/templates/_buildconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
source:
1818
contextDir: {{ .source_context_dir | default "exporters/" }}
1919
git:
20-
ref: {{ .source_ref | default "v2.0.3" }}
20+
ref: {{ .source_ref | default "v2.0.4" }}
2121
uri: {{ .source_url | default "https://github.com/konveyor/pelorus.git"}}
2222
type: Git
2323
strategy:
Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
{{- range $index, $exporter := .Values.instances }}
2-
# https://hackmd.io/@openshift-mig-eng/rkNC3W8dq
3-
{{- if and ($exporter.image_name) (or $exporter.source_ref $exporter.source_url) }}
4-
{{- fail "ERROR: image_name configuration can't be used with source_ref or source_url" }}
5-
{{- end }}
6-
{{- if and ($exporter.image_tag) (or $exporter.source_ref $exporter.source_url) }}
7-
{{- fail "ERROR: image_tag configuration can't be used with source_ref or source_url" }}
8-
{{- end }}
9-
{{- if and $exporter.image_name $exporter.image_tag }}
10-
{{- if contains ":" $exporter.image_name }}
11-
{{- fail "ERROR: image_tag configuration can't be used with image_name that includes tag e.g. generic-exporter:tag-name" }}
2+
{{- if ne ($exporter.enabled | toString) "false" }}
3+
# https://hackmd.io/@openshift-mig-eng/rkNC3W8dq
4+
{{- if and ($exporter.image_name) (or $exporter.source_ref $exporter.source_url) }}
5+
{{- fail "ERROR: image_name configuration can't be used with source_ref or source_url" }}
126
{{- end }}
7+
{{- if and ($exporter.image_tag) (or $exporter.source_ref $exporter.source_url) }}
8+
{{- fail "ERROR: image_tag configuration can't be used with source_ref or source_url" }}
9+
{{- end }}
10+
{{- if and $exporter.image_name $exporter.image_tag }}
11+
{{- if contains ":" $exporter.image_name }}
12+
{{- fail "ERROR: image_tag configuration can't be used with image_name that includes tag e.g. generic-exporter:tag-name" }}
13+
{{- end }}
14+
{{- end }}
15+
{{- if or $exporter.source_ref $exporter.source_url }}
16+
{{ include "exporters.buildconfig" $exporter }}
17+
{{- end }}
18+
{{ include "exporters.deploymentconfig" $exporter }}
19+
{{- if or $exporter.source_ref $exporter.source_url }}
20+
{{ include "exporters.imagestream" $exporter }}
21+
{{- else }}
22+
{{- if not $exporter.exporter_type }}
23+
{{- fail "ERROR: exporter_type must be provided when using podman image installation method" }}
24+
{{- end}}
25+
{{ include "exporters.imagestream_from_image" $exporter }}
26+
{{- end }}
27+
{{ include "exporters.route" $exporter }}
28+
{{ include "exporters.service" $exporter }}
1329
{{- end }}
14-
{{- if or $exporter.source_ref $exporter.source_url }}
15-
{{ include "exporters.buildconfig" $exporter }}
16-
{{- end }}
17-
{{ include "exporters.deploymentconfig" $exporter }}
18-
{{- if or $exporter.source_ref $exporter.source_url }}
19-
{{ include "exporters.imagestream" $exporter }}
20-
{{- else }}
21-
{{- if not $exporter.exporter_type }}
22-
{{- fail "ERROR: exporter_type must be provided when using podman image installation method" }}
23-
{{- end}}
24-
{{ include "exporters.imagestream_from_image" $exporter }}
25-
{{- end }}
26-
{{ include "exporters.route" $exporter }}
27-
{{ include "exporters.service" $exporter }}
2830
{{- end }}

charts/pelorus/values.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ extra_prometheus_hosts:
1919
## Persistent storage for Prometheus Operator
2020
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md
2121

22-
# Uncomment to use PVC for Prometheus
23-
# prometheus_storage: true
22+
# Set to true to use PVC for Prometheus
23+
prometheus_storage: false
2424

2525
# Additional configuration options for Prometheus PVC
26-
# prometheus_storage_pvc_capacity: 2Gi
27-
# prometheus_storage_pvc_storageclass: "gp2"
26+
prometheus_storage_pvc_capacity: 2Gi
27+
prometheus_storage_pvc_storageclass: "gp2"
2828

2929
# Set Prometheus retention time. Older data values are deleted
30-
# prometheus_retention: 1y
30+
prometheus_retention: 1y
3131
# Set Prometheus retention size. If data grows over old values are deleted
3232
# This should be lower of what's defined in the prometheus_storage_pvc_capacity
33-
# prometheus_retention_size: 1GB
33+
prometheus_retention_size: 1GB
3434

3535
exporters:
3636
instances:
@@ -40,16 +40,17 @@ exporters:
4040
# - pelorus-config
4141
# - deploytime-config
4242

43-
# - app_name: failuretime-exporter
44-
# exporter_type: failure
45-
# env_from_configmaps:
46-
# - pelorus-config
47-
# - failuretime-config
48-
# env_from_secrets:
49-
# - jira-secret
43+
- app_name: failuretime-exporter
44+
exporter_type: failure
45+
enabled: false
46+
env_from_configmaps:
47+
- pelorus-config
48+
- failuretime-config
49+
env_from_secrets:
50+
- jira-secret
5051

51-
# - app_name: committime-exporter
52-
# exporter_type: committime
52+
- app_name: committime-exporter
53+
exporter_type: committime
5354
# env_from_configmaps:
5455
# - pelorus-config
5556
# - committime-config

pelorus-operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
6-
VERSION ?= 0.0.9
6+
VERSION ?= 0.0.38
77

88
# CHANNELS define the bundle channels used in the bundle.
99
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")

pelorus-operator/bundle/manifests/charts.pelorus.konveyor.io_pelorus.yaml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,56 @@ spec:
1515
- name: v1alpha1
1616
schema:
1717
openAPIV3Schema:
18-
description: Pelorus is the Schema for the pelorus API
18+
description: Configure a running instance of Pelorus
1919
properties:
2020
apiVersion:
2121
description: 'APIVersion defines the versioned schema of this representation
2222
of an object. Servers should convert recognized schemas to the latest
2323
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2424
type: string
2525
kind:
26-
description: 'Kind is a string value representing the REST resource this
26+
description: |-
27+
Kind is a string value representing the REST resource this
2728
object represents. Servers may infer this from the endpoint the client
28-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
29+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
2930
type: string
3031
metadata:
3132
type: object
3233
spec:
33-
description: Spec defines the desired state of Pelorus
34+
description: 'PelorusSpec defines state of the Pelorus application and
35+
allows to configure for the desired workflow. More information about
36+
Pelorus configuration that can be used in the Spec section is available
37+
at: https://pelorus.readthedocs.io/en/latest/Configuration/'
38+
properties:
39+
exporters:
40+
description: |-
41+
References configuration for the Pelorus exporters. More info about exporters configuration: https://pelorus.readthedocs.io/en/latest/Configuration/#configuring-exporters-details
42+
43+
44+
Example:
45+
instances:
46+
- app_name: < instance_name >
47+
enabled: < won't be created if set to false >
48+
exporter_type: < deploytime, committime, failure >
49+
type: object
50+
x-kubernetes-preserve-unknown-fields: true
51+
prometheus_retention:
52+
description: 'Prometheus Retention time. More information: https://pelorus.readthedocs.io/en/latest/Install/#configure-prometheus-retention'
53+
type: string
54+
prometheus_retention_size:
55+
description: 'Prometheus Retention Size. More information: https://pelorus.readthedocs.io/en/latest/Install/#configure-prometheus-retention'
56+
type: string
57+
prometheus_storage:
58+
description: 'Use Prometheus Persistent Volume. More information:
59+
https://pelorus.readthedocs.io/en/latest/Install/#configure-prometheus-persistent-volume-recommended'
60+
type: boolean
61+
prometheus_storage_pvc_capacity:
62+
description: Prometheus Persistent Volume capacity.
63+
type: string
64+
prometheus_storage_pvc_storageclass:
65+
description: Prometheus Persistent Volume storage class to be used.
66+
type: string
3467
type: object
35-
x-kubernetes-preserve-unknown-fields: true
3668
status:
3769
description: Status defines the observed state of Pelorus
3870
type: object

0 commit comments

Comments
 (0)