Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ metadata:
categories: |
Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery
containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6
createdAt: "2024-09-19T20:50:32Z"
createdAt: "2025-09-30T21:02:40Z"
description: |
Tool that helps IT organizations measure their impact on the overall performance of their organization
operatorframework.io/suggested-namespace: pelorus
Expand Down Expand Up @@ -496,3 +496,14 @@ spec:
name: Red Hat
url: https://redhat.com
version: 0.0.10-rc.6
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
20 changes: 0 additions & 20 deletions scripts/chart-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,6 @@ if ! grep "default \"v$CURRENT_CHART_VERSION\"" pelorus-operator/helm-charts/pel
exit 1
fi

# Ensure version of the Grafana and Prometheus operators is in sync
# with pelorus-operator.

GRAFANA_VER_HELM=$(grep grafana_subscription_version pelorus-operator/helm-charts/operators/values.yaml | cut -d':' -f2 | tr -d ' ')
PROMETHEUS_VER_HELM=$(grep prometheus_subscription_version pelorus-operator/helm-charts/operators/values.yaml | cut -d':' -f2 | tr -d ' ')

if ! grep "$GRAFANA_VER_HELM" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then
echo "ERROR: Grafana version $GRAFANA_VER_HELM not found in the pelorus-operator/bundle/metadata/properties.yaml"
exit 1
else
echo "OK: Grafana version $GRAFANA_VER_HELM in sync with the pelorus-operator/bundle/metadata/properties.yaml"
fi

if ! grep "$PROMETHEUS_VER_HELM" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then
echo "ERROR: Prometheus version $PROMETHEUS_VER_HELM not found in the pelorus-operator/bundle/metadata/properties.yaml"
exit 1
else
echo "OK: Prometheus version $PROMETHEUS_VER_HELM in sync with the pelorus-operator/bundle/metadata/properties.yaml"
fi

# Enforce operator version bump when charts folder is touched

CURRENT_OPERATOR_VERSION="$(grep "^VERSION ?= " pelorus-operator/Makefile | cut -c 12-)"
Expand Down
56 changes: 28 additions & 28 deletions scripts/update_projects_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
OPERATOR_DOMAIN = "pelorus.dora-metrics.io"

ROOT = Path(__file__).resolve().parent.parent
PELORUS_CHARTS_FOLDER = ROOT / "charts/pelorus"
PELORUS_CHARTS_FOLDER = ROOT / "pelorus-operator/helm-charts/pelorus"
PELORUS_EXPORTERS_FOLDER = PELORUS_CHARTS_FOLDER / "charts/exporters"
PELORUS_OPERATOR_FOLDER = ROOT / "pelorus-operator"
PATCHES_FOLDER = ROOT / "scripts/pelorus-operator-patches"
Expand All @@ -54,7 +54,7 @@
CHARTS_FILES_TO_UPDATE = {
# Files to updated in charts folder and number of changes in each one
PELORUS_CHARTS_FOLDER / "Chart.yaml": 2,
ROOT / "charts/operators/Chart.yaml": 1,
# ROOT / "charts/operators/Chart.yaml": 1,
PELORUS_EXPORTERS_FOLDER / "Chart.yaml": 1,
PELORUS_EXPORTERS_FOLDER / "templates/_deployment.yaml": 2,
PELORUS_EXPORTERS_FOLDER / "templates/_imagestream_from_image.yaml": 1,
Expand Down Expand Up @@ -123,8 +123,8 @@ def check_prerequisites(destination: Path, force: bool) -> None:
shutil.rmtree(destination)
destination.mkdir(parents=True)

if any(destination.iterdir()):
exit_error(f"Destination folder {destination} is not empty")
# if any(destination.iterdir()):
# exit_error(f"Destination folder {destination} is not empty")

for dependency in SHELL_DEPENDENCIES:
dependency_path = shutil.which(dependency)
Expand Down Expand Up @@ -254,24 +254,24 @@ def add_replaces_to_csv(


def update_operator_folder(next_operator_version: str, destination: Path) -> None:
logging.info("Creating operator init files")
# TODO run update command instead of init every time
run_command(
f"operator-sdk init --plugins=helm --domain={OPERATOR_DOMAIN} --project-name={OPERATOR_NAME}",
directory=destination,
)
logging.info("Creating operator api")
exporters_charts_in_operator = destination / "helm-charts/pelorus/charts/exporters"
exporters_charts_in_operator.mkdir(parents=True)
shutil.copytree(
PELORUS_EXPORTERS_FOLDER, exporters_charts_in_operator, dirs_exist_ok=True
)
run_command(
f"operator-sdk create api --helm-chart={PELORUS_CHARTS_FOLDER}",
directory=destination,
)
for file in exporters_charts_in_operator.parent.glob("*.tgz"):
file.unlink()
# logging.info("Creating operator init files")
# # TODO run update command instead of init every time
# run_command(
# f"operator-sdk init --plugins=helm --domain={OPERATOR_DOMAIN} --project-name={OPERATOR_NAME}",
# directory=destination,
# )
# logging.info("Creating operator api")
# exporters_charts_in_operator = destination / "helm-charts/pelorus/charts/exporters"
# exporters_charts_in_operator.mkdir(parents=True)
# shutil.copytree(
# PELORUS_EXPORTERS_FOLDER, exporters_charts_in_operator, dirs_exist_ok=True
# )
# run_command(
# f"operator-sdk create api --helm-chart={PELORUS_CHARTS_FOLDER}",
# directory=destination,
# )
# for file in exporters_charts_in_operator.parent.glob("*.tgz"):
# file.unlink()

replace_in_file(
file=PELORUS_OPERATOR_FOLDER / "Makefile",
Expand All @@ -282,7 +282,7 @@ def update_operator_folder(next_operator_version: str, destination: Path) -> Non
operator_image = f"quay.io/{OPERATOR_ORGANIZATION_NAME}/{OPERATOR_NAME}"
replace_in_file(
file=PELORUS_OPERATOR_FOLDER / "Makefile",
pattern=r"IMAGE_TAG_BASE \?= pelorus\.dora-metrics\.io/pelorus-operator",
pattern=r"IMAGE_TAG_BASE \?= quay\.io/pelorus/pelorus-operator",
new=f"IMAGE_TAG_BASE ?= {operator_image}",
number_of_changes=1,
)
Expand All @@ -292,15 +292,15 @@ def update_operator_folder(next_operator_version: str, destination: Path) -> Non
directory=destination,
)

for file in sorted(PATCHES_FOLDER.rglob("*")):
if file.is_file():
logging.info(f"Applying patch {file}")
run_command(f"patch -d {destination} -p0 < {file}")
# for file in sorted(PATCHES_FOLDER.rglob("*")):
# if file.is_file():
# logging.info(f"Applying patch {file}")
# run_command(f"patch -d {destination} -p0 < {file}")

replace_in_file(
file=PELORUS_OPERATOR_FOLDER
/ f"config/manifests/bases/{OPERATOR_CSV_FILE_NAME}",
pattern=" containerImage: placeholder",
pattern=r" containerImage: quay\.io/pelorus/pelorus-operator:.*",
new=f" containerImage: {operator_image}:{next_operator_version}",
number_of_changes=1,
)
Expand Down