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

Update prometheus and grafana versions for ocp 4.16 compatability #1166

Merged
merged 14 commits into from
Sep 24, 2024
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
213 changes: 3 additions & 210 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,211 +1,4 @@
# Chart Testing
# Pelorus Next

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/helm/chart-testing)](https://goreportcard.com/report/github.com/helm/chart-testing)
![ci](https://github.com/helm/chart-testing/workflows/ci/badge.svg)

`ct` is the the tool for testing Helm charts.
It is meant to be used for linting and testing pull requests.
It automatically detects charts changed against the target branch.

## Installation

### Prerequisites

It is recommended to use the provided Docker image which can be [found on Quay](https://quay.io/helmpack/chart-testing/).
It comes with all necessary tools installed.

* [Helm](http://helm.sh)
* [Git](https://git-scm.com) (2.17.0 or later)
* [Yamllint](https://github.com/adrienverge/yamllint)
* [Yamale](https://github.com/23andMe/Yamale)
* [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)

### Binary Distribution

Download the release distribution for your OS from the Releases page:

https://github.com/helm/chart-testing/releases

Unpack the `ct` binary, add it to your PATH, and you are good to go!

### Docker Image

A Docker image is available at `quay.io/helmpack/chart-testing` with list of
available tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags).

### Homebrew

```console
$ brew install chart-testing
```

## Usage

See documentation for individual commands:

* [ct](doc/ct.md)
* [ct install](doc/ct_install.md)
* [ct lint](doc/ct_lint.md)
* [ct lint-and-install](doc/ct_lint-and-install.md)
* [ct list-changed](doc/ct_list-changed.md)
* [ct version](doc/ct_version.md)

For a more extensive how-to guide, please see:

* [charts-repo-actions-demo](https://github.com/helm/charts-repo-actions-demo)

## Configuration

`ct` is a command-line application.
All command-line flags can also be set via environment variables or config file.
Environment variables must be prefixed with `CT_`.
Underscores must be used instead of hyphens.

CLI flags, environment variables, and a config file can be mixed.
The following order of precedence applies:

1. CLI flags
1. Environment variables
1. Config file

Note that linting requires config file for [yamllint](https://github.com/adrienverge/yamllint) and [yamale](https://github.com/23andMe/Yamale).
If not specified, these files are search in the current directory, the `.ct` directory in current directory, `$HOME/.ct`, and `/etc/ct`, in that order.
Samples are provided in the [etc](etc) folder.

### Examples

The following example show various way of configuring the same thing:

#### CLI

#### Remote repo

With remote repo:

ct install --remote upstream --chart-dirs stable,incubator --build-id pr-42

#### Local repo

If you have a chart in current directory and ct installed on the host then you can run:

ct install --chart-dirs . --charts .

With docker it works with:

docker run -it --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.1 ct install --chart-dirs . --charts .

Notice that `workdir` param is important and must be the same as volume mounted.


#### Environment Variables

export CT_REMOTE=upstream
export CT_CHART_DIRS=stable,incubator
export CT_BUILD_ID

ct install

#### Config File

`config.yaml`:

```yaml
remote: upstream
chart-dirs:
- stable
- incubator
build-id: pr-42
```

#### Config Usage

ct install --config config.yaml


`ct` supports any format [Viper](https://github.com/spf13/viper) can read, i. e. JSON, TOML, YAML, HCL, and Java properties files.

Notice that if no config file is specified, then `ct.yaml` (or any of the supported formats) is loaded from the current directory, `$HOME/.ct`, or `/etc/ct`, in that order, if found.


#### Using private chart repositories

When adding chart-repos you can specify additional arguments for the `helm repo add` command using `helm-repo-extra-args` on a per-repo basis.
You can also specify OCI registries which will be added using the `helm registry login` command, they also support the `helm-repo-extra-args` for authentication.
This could for example be used to authenticate a private chart repository.

`config.yaml`:

```yaml
chart-repos:
- incubator=https://incubator.io
- basic-auth=https://private.com
- ssl-repo=https://self-signed.ca
- oci-registry=oci://nice-oci-registry.pt
helm-repo-extra-args:
- ssl-repo=--ca-file ./my-ca.crt
```

ct install --config config.yaml --helm-repo-extra-args "basic-auth=--username user --password secret"

## Building from Source

`ct` is built using Go 1.13 or higher.

`build.sh` is used to build and release the tool.
It uses [Goreleaser](https://goreleaser.com/) under the covers.

Note: on MacOS you will need `GNU Coreutils readlink`.
You can install it with:

```console
brew install coreutils
```

Then add `gnubin` to your `$PATH`, with:

```console
echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"' >> ~/.bash_profile
bash --login
```

To use the build script:

```console
$ ./build.sh -h
Usage: build.sh <options>

Build ct using Goreleaser.

-h, --help Display help
-d, --debug Display verbose output and run Goreleaser with --debug
-r, --release Create a release using Goreleaser. This includes the creation
of a GitHub release and building and pushing the Docker image.
If this flag is not specified, Goreleaser is run with --snapshot
```

## Releasing

### Prepare Release

Before a release is created, versions have to be updated in the examples.
A pull request needs to be created for this, which should be merged right before the release is cut.
Here's a previous one for reference: https://github.com/helm/chart-testing/pull/89

### Create Release

The release workflow is [dispatched from github actions](https://github.com/helm/chart-testing/actions)
Versions must start with a lower-case `v`, e. g. `v3.7.1`.

## Supported versions

The previous MAJOR version will be supported for three months after each new MAJOR release.

Within this support window, pull requests for the previous MAJOR version should be made against the previous release branch.
For example, if the current MAJOR version is `v2`, the pull request base branch should be `release-v1`.

## Upgrading

When upgrading from `< v2.0.0` you will also need to change the usage in your scripts.
This is because, while the [v2.0.0](https://github.com/helm/chart-testing/releases/tag/v2.0.0) release has parity with `v1`, it was refactored from a bash library to Go so there are minor syntax differences.
Compare [v1 usage](https://github.com/helm/chart-testing/tree/release-v1#usage) with this (`v2`) version's README [usage](#usage) section above.
> [!WARNING]
> This is NOT the active branch for pelorus. This is _Pelorus Next_, a future iteration of this repo that is not yet active. Please switch to the [master](https://github.com/dora-metrics/pelorus/tree/master) branch for the current active iteration of Pelorus.
2 changes: 1 addition & 1 deletion charts/operators/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.13-rc.5
version: 2.0.13-rc.6
4 changes: 2 additions & 2 deletions charts/operators/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
grafana_subscription_version: 5.12.0
prometheus_subscription_version: 0.56.3
grafana_subscription_version: ">=5.12.0"
prometheus_subscription_version: ">=0.56.3"
6 changes: 3 additions & 3 deletions charts/pelorus/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: exporters
repository: file://./charts/exporters
version: 2.0.13-rc.5
digest: sha256:8e2357c1c6a1dd97e1875e6faa59cfa04480ed10fa6b96aee01ed00df4fb0b94
generated: "2024-09-11T14:40:09.478494302Z"
version: 2.0.13-rc.6
digest: sha256:c8732216313eb1f6ddacb5b7200c9405dd0f24f35ecab0d7c691cc94c9adbd26
generated: "2024-09-18T19:32:18.988569071Z"
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.13-rc.5
version: 2.0.13-rc.6

dependencies:
- name: exporters
version: 2.0.13-rc.5
version: 2.0.13-rc.6
repository: file://./charts/exporters
2 changes: 1 addition & 1 deletion charts/pelorus/charts/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.13-rc.5
version: 2.0.13-rc.6
4 changes: 2 additions & 2 deletions charts/pelorus/charts/exporters/templates/_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
containers:
- name: {{ .app_name }}
imagePullPolicy: Always
image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }}
image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }}
volumeMounts:
{{- range $config := .custom_certs }}
- name: custom-cert-volume-{{$config.map_name}}
Expand Down Expand Up @@ -62,7 +62,7 @@ spec:
value: {{ .image_name }}:{{ .image_tag | default "latest" }}
{{- end }}
{{- else }}
value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }}
value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }}
{{- end }}
{{- end }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
name: {{ .image_name }}:{{ .image_tag | default "latest" }}
{{- end }}
{{- else }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }}
name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }}
# .image_name
{{- end }}
name: {{ .image_tag | default "stable" }}
Expand Down
2 changes: 1 addition & 1 deletion charts/pelorus/templates/dashboard-sdp-byapp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
name: dashboard-sdp-byapp
Expand Down
2 changes: 1 addition & 1 deletion charts/pelorus/templates/dashboard-sdp.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDashboard
metadata:
name: dashboard-sdp
Expand Down
2 changes: 1 addition & 1 deletion charts/pelorus/templates/grafana-thanos-datasource.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaDataSource
metadata:
name: prometheus-grafana-datasource
Expand Down
2 changes: 1 addition & 1 deletion charts/pelorus/templates/grafana.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apiVersion: integreatly.org/v1alpha1
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: grafana-oauth
Expand Down
2 changes: 1 addition & 1 deletion pelorus-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.0.10-rc.5
VERSION ?= 0.0.10-rc.6

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ metadata:
capabilities: Basic Install
categories: |
Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery
containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.5
createdAt: "2024-09-11T14:40:10Z"
containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6
createdAt: "2024-09-19T20:50:32Z"
description: |
Tool that helps IT organizations measure their impact on the overall performance of their organization
operatorframework.io/suggested-namespace: pelorus
operators.operatorframework.io/builder: operator-sdk-v1.33.0
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
repository: https://github.com/dora-metrics/pelorus/
support: Pelorus Community
name: pelorus-operator.v0.0.10-rc.5
name: pelorus-operator.v0.0.10-rc.6
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -189,6 +189,13 @@ spec:
- events
verbs:
- create
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- apiGroups:
- charts.pelorus.dora-metrics.io
resources:
Expand Down Expand Up @@ -310,7 +317,7 @@ spec:
- delete
- list
- apiGroups:
- integreatly.org
- grafana.integreatly.org
resources:
- grafanas
- grafanadashboards
Expand All @@ -322,6 +329,7 @@ spec:
- watch
- create
- delete
- patch
- apiGroups:
- build.openshift.io
resources:
Expand Down Expand Up @@ -385,7 +393,7 @@ spec:
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
- --leader-election-id=pelorus-operator
image: quay.io/pelorus/pelorus-operator:0.0.10-rc.5
image: quay.io/pelorus/pelorus-operator:0.0.10-rc.6
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -487,15 +495,4 @@ spec:
provider:
name: Red Hat
url: https://redhat.com
version: 0.0.10-rc.5
replaces: pelorus-operator.v0.0.9
skips:
- pelorus-operator.v0.0.9
- pelorus-operator.v0.0.8
- pelorus-operator.v0.0.7
- pelorus-operator.v0.0.6
- pelorus-operator.v0.0.5
- pelorus-operator.v0.0.4
- pelorus-operator.v0.0.3
- pelorus-operator.v0.0.2
- pelorus-operator.v0.0.1
version: 0.0.10-rc.6
Loading