Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/operator form options #869

4 changes: 2 additions & 2 deletions charts/pelorus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.0.8-rc.1
version: 2.0.8-rc.2

dependencies:
- name: exporters
version: "v2.0.8-rc.1"
version: "v2.0.8-rc.2"
repository: file://./subcharts/exporters
2 changes: 1 addition & 1 deletion charts/pelorus/subcharts/exporters/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.0.8-rc.1
version: 2.0.8-rc.2
48 changes: 17 additions & 31 deletions charts/pelorus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# to reset password: htpasswd -s -b -n internal changeme
openshift_prometheus_htpasswd_auth: internal:{SHA}+pvrmeQCmtWmYVOZ57uuITVghrM=
openshift_prometheus_basic_auth_pass: changeme
federated_prometheus_hosts:
external_prometheus_hosts:
# federated_prometheus_hosts:
# external_prometheus_hosts:

# Uncomment this if your cluster serves privately signed certificates
# custom_ca: true
Expand Down Expand Up @@ -35,36 +35,22 @@ prometheus_retention_size: 1GB

exporters:
instances:
- app_name: deploytime-exporter
exporter_type: deploytime
# env_from_configmaps:
# - pelorus-config
# - deploytime-config
- app_name: deploytime-exporter
exporter_type: deploytime

- app_name: failuretime-exporter
exporter_type: failure
enabled: false
env_from_configmaps:
- pelorus-config
- failuretime-config
env_from_secrets:
- jira-secret
- app_name: failuretime-exporter
exporter_type: failure

- app_name: committime-exporter
exporter_type: committime
# env_from_configmaps:
# - pelorus-config
# - committime-config
# env_from_secrets:
# - github-secret
- app_name: committime-exporter
exporter_type: committime

# Experimental GitHub releasetime exporter
# - app_name: releasetime-exporter
# env_from_configmaps:
# - pelorus-config
# - releasetime-config
# env_from_secrets:
# - github-secret
# extraEnv:
# - name: APP_FILE
# value: extra/releasetime/app.py
# - app_name: releasetime-exporter
# env_from_configmaps:
# - pelorus-config
# - releasetime-config
# env_from_secrets:
# - github-secret
# extraEnv:
# - name: APP_FILE
# value: extra/releasetime/app.py
5 changes: 3 additions & 2 deletions docs/GettingStarted/configuration/PelorusCore.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ The Pelorus chart supports deploying a [Thanos](https://thanos.io/) instance for
###### custom_ca

- **Required:** no
- **Type:** 'true' string or commented out for 'false'
- **Default Value:** false
- **Type:** boolean

: Whether or not the cluster serves custom signed certificates for ingress (e.g. router certs). If `true` we will load the custom via the [certificate injection method](https://docs.openshift.com/container-platform/4.11/networking/configuring-a-custom-pki.html#certificate-injection-using-operators_configuring-a-custom-pki).
: Whether or not the cluster serves custom signed certificates for ingress (e.g. router certs). If `true`, we will load the custom via the [certificate injection method](https://docs.openshift.com/container-platform/4.11/networking/configuring-a-custom-pki.html#certificate-injection-using-operators_configuring-a-custom-pki).

## Deploying Across Multiple Clusters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- config/manifests/bases/pelorus-operator.clusterserviceversion.yaml.original 2022-12-15 17:01:35.384242008 +0100
+++ config/manifests/bases/pelorus-operator.clusterserviceversion.yaml 2022-12-15 17:01:46.425296201 +0100
@@ -4,39 +4,111 @@
@@ -4,39 +56,163 @@
annotations:
alm-examples: '[]'
capabilities: Basic Install
Expand All @@ -25,6 +25,58 @@
+ kind: Pelorus
+ name: pelorus.charts.pelorus.konveyor.io
+ version: v1alpha1
+ specDescriptors:
+ - path: exporters.instances.[0].app_name
+ displayName: Exporter Instance Name
+ - path: exporters.instances.[0].exporter_type
+ - path: exporters.instances.[0].env_from_secrets.[0]
+ x-descriptors:
+ - urn:alm:descriptor:io.kubernetes:Secret
+ - path: exporters.instances.[0].env_from_configmaps.[0]
+ displayName: Env From ConfigMap
+ x-descriptors:
+ - urn:alm:descriptor:io.kubernetes:ConfigMap
+ - path: exporters.instances.[0].extraEnv
+ - path: exporters.instances.[0].enabled
+ - path: exporters.instances.[0].custom_certs.[0].map_name
+ x-descriptors:
+ - urn:alm:descriptor:io.kubernetes:ConfigMap
+ - path: exporters.instances.[0].image_tag
+ - path: exporters.instances.[0].image_name
+ - path: exporters.instances.[0].source_url
+ - path: exporters.instances.[0].source_ref
+ - path: external_prometheus_hosts
+ displayName: External Exporters
+ - path: external_prometheus_hosts[0].id
+ displayName: External Exporter name
+ - path: prometheus_retention
+ - path: prometheus_retention_size
+ - path: prometheus_storage
+ displayName: Prometheus Persistent Storage (PVC)
+ - path: prometheus_storage_pvc_capacity
+ displayName: Prometheus PVC Capacity
+ - path: prometheus_storage_pvc_storageclass
+ displayName: Prometheus PVC Storageclass
+ - path: federated_prometheus_hosts
+ displayName: Prometheus Federated Hosts
+ - path: federated_prometheus_hosts[0].id
+ displayName: Federated Exporter name
+ - path: openshift_prometheus_htpasswd_auth
+ displayName: Prometheus Internal Auth (htpasswd)
+ - path: openshift_prometheus_basic_auth_pass
+ displayName: Grafana Datasource Internal Auth (basic auth)
+ - path: thanos_bucket_name
+ displayName: Thanos S3 Bucket Name
+ - path: bucket_access_point
+ displayName: Thanos S3 Access Point
+ - path: bucket_access_key
+ displayName: Thanos S3 Access Key
+ - path: bucket_secret_access_key
+ displayName: Thanos S3 Secret Access Key
+ - path: thanos_version
+ displayName: Thanos Quay Image Tag
+ - path: custom_ca
+ displayName: CA Certificate Injection
+ description: |
+ Pelorus is a tool that helps IT organizations measure their impact on the overall performance of their organization. It does this by gathering metrics about team and organizational behaviors over time in some key areas of IT that have been shown to impact the value they deliver to the organization as a whole. Some of the key outcomes Pelorus can focus on are:
+
Expand Down
135 changes: 116 additions & 19 deletions scripts/pelorus-operator-patches/07_spec_description.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- config/crd/bases/charts.pelorus.konveyor.io_pelorus.yaml.original 2022-12-16 20:39:18.630409481 +0100
+++ config/crd/bases/charts.pelorus.konveyor.io_pelorus.yaml 2022-12-16 20:39:03.674340069 +0100
@@ -15,29 +42,104 @@
@@ -15,29 +139,201 @@
- name: v1alpha1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -47,18 +47,86 @@
- x-kubernetes-preserve-unknown-fields: true
+ properties:
+ exporters:
+ description: >-
+ References configuration for the Pelorus exporters. More
+ info about exporters configuration:
+ https://pelorus.readthedocs.io/en/latest/GettingStarted/configuration/PelorusExporters/
+
+ Example:
+ instances:
+ - app_name: < instance_name >
+ enabled: < won't be created if set to false >
+ exporter_type: < deploytime, committime, failure >
+ description: Configure Pelorus exporters' References.
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ properties:
+ instances:
+ type: array
+ items:
+ type: object
+ properties:
+ app_name:
+ description: Must consist of lower case alphanumeric characters or '-'.
+ type: string
+ exporter_type:
+ description: >-
+ Exporter type as in the:
+ https://pelorus.readthedocs.io/en/latest/Configuration/#configuring-exporters-overview
+ type: string
+ enum: [deploytime, committime, failure, webhook]
+ env_from_secrets:
+ description: Secret name(s) with configuration used by the exporter instance.
+ type: array
+ items:
+ type: string
+ env_from_configmaps:
+ description: ConfigMap name(s) with configuration used by the exporter instance.
+ type: array
+ items:
+ type: string
+ extraEnv:
+ description: List of Name and Value pairs used to configure the exporter instance.
+ type: array
+ items:
+ type: object
+ properties:
+ name:
+ description: 'Option name.'
+ type: string
+ value:
+ description: 'Option value.'
+ type: string
+ required:
+ - name
+ - value
+ enabled:
+ description: If set to false, exporter instance won't be created.
+ type: boolean
+ default: true
+ custom_certs:
+ description: ConfigMap name(s) with custom CA certificates.
+ type: array
+ items:
+ type: object
+ properties:
+ map_name:
+ description: 'ConfigMap name created from Certificate file.'
+ type: string
+ required:
+ - map_name
+ image_tag:
+ description: >-
+ DEVELOPMENT OPTION, DO NOT USE IN PRODUCTION
+ Exporter image tag.
+ type: string
+ image_name:
+ description: >-
+ DEVELOPMENT OPTION, DO NOT USE IN PRODUCTION
+ Exporter image name, with registry.
+ type: string
+ source_url:
+ description: >-
+ DEVELOPMENT OPTION, DO NOT USE IN PRODUCTION
+ Exporter git source code.
+ type: string
+ source_ref:
+ description: >-
+ DEVELOPMENT OPTION, DO NOT USE IN PRODUCTION
+ Exporter git reference or branch.
+ type: string
+ required:
mpryc marked this conversation as resolved.
Show resolved Hide resolved
+ - app_name
+ - exporter_type
+ prometheus_retention:
+ description: >-
+ Prometheus Retention time. More information:
Expand All @@ -81,32 +149,61 @@
+ description: Prometheus Persistent Volume storage class to be used.
+ type: string
+ federated_prometheus_hosts:
+ description: 'List of aditional Federation hosts'
+ description: 'List of additional Federation hosts.'
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ description: 'Description of the Federation host (this will be used as a label to select metrics in the federated instance)'
+ description: Must consist of lower case alphanumeric characters or '-'.
+ type: string
+ hostname:
+ description: 'the fully qualified domain name or ip address of the Federation host'
+ description: 'The fully qualified domain name or IP Address of the Prometheus Federation host.'
+ type: string
+ password:
+ description: 'the password used for the `internal` basic auth account (this is provided by the k8s metrics prometheus instances in a secret)'
+ description: 'The federated Prometheus "basic auth" password.'
+ type: string
+ required:
+ - id
+ - hostname
+ external_prometheus_hosts:
+ description: 'List of aditional external scrape hosts'
+ description: 'List of additional external scrape hosts.'
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ description: 'Description of external scrape host'
+ description: Must consist of lower case alphanumeric characters or '-'.
+ type: string
+ hostname:
+ description: 'the fully qualified domain name or ip address of the external scrape host'
+ description: 'The fully qualified domain name or IP Address of the external scrape host'
+ type: string
+ required:
+ - hostname
+ openshift_prometheus_htpasswd_auth:
+ description: Credentials for the internal user that are used by Grafana to communicate with the Prometheus and Thanos deployed by Pelorus. Must match the "Grafana Datasource Internal Auth (basic auth)".
+ type: string
+ openshift_prometheus_basic_auth_pass:
+ description: Password for Grafana to communicate with the Prometheus datasource. Must match the "Prometheus Internal Auth (htpasswd)".
+ type: string
+ thanos_version:
+ description: DEVELOPMENT OPTION, DO NOT USE IN PRODUCTION Thanos version from the Official Thanos podman image.
+ type: string
+ bucket_access_point:
+ description: S3 named network endpoint that is used to perform S3 object operations.
+ type: string
+ bucket_access_key:
+ description: S3 Access Key ID.
+ type: string
+ bucket_secret_access_key:
+ description: S3 Secret Access Key.
+ type: string
+ thanos_bucket_name:
+ description: S3 bucket name.
+ type: string
+ custom_ca:
+ description: Whether or not the cluster serves custom signed certificates for ingress (e.g. router certs).
+ type: boolean
mpryc marked this conversation as resolved.
Show resolved Hide resolved
status:
description: Status defines the observed state of Pelorus
type: object
Expand Down