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 federator app version to 0.3.5 / charts to 0.4.1 #81

Merged
merged 3 commits into from
Dec 15, 2023
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
8 changes: 5 additions & 3 deletions .github/workflows/e2e-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
env:
GOARCH: amd64
CGO_ENABLED: 0
SETUP_GO_VERSION: '^1.18'
SETUP_GO_VERSION: '^1.20'
YQ_VERSION: v4.25.1
E2E_CI: true
REPO: rancher
Expand All @@ -48,17 +48,19 @@ jobs:
matrix:
k3s_version:
# k3d version list k3s | sed 's/+/-/' | sort -h
- ${{ github.event.inputs.k3s_version || 'v1.20.15-k3s1' }}
- ${{ github.event.inputs.k3s_version || 'v1.28.4-k3s2' }}
steps:
-
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '>=1.17.0'
go-version: '>=1.20.0'
- uses: azure/setup-kubectl@v3
- uses: azure/setup-helm@v3
with:
version: v3.11.1
-
name: Install mikefarah/yq
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/create-projecthelmchart.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/delete-projecthelmchart.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/entry
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

cd $(dirname $0)/../../../..

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/generate-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/install-federator.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/e2e/scripts/install-monitoring.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

HELM_REPO="rancher-charts"

cd $(dirname $0)/../../../..

helm repo add rancher-charts https://charts.rancher.io
helm version

helm repo add ${HELM_REPO} https://charts.rancher.io
helm repo update
helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring-crd rancher-charts/rancher-monitoring-crd

echo "Installing rancher monitoring crd with :\n"

helm search repo ${HELM_REPO}/rancher-monitoring-crd --versions --max-col-width=0 | head -n 2

helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring-crd ${HELM_REPO}/rancher-monitoring-crd

if [[ "${E2E_CI}" == "true" ]]; then
e2e_args="--set grafana.resources=null --set prometheus.prometheusSpec.resources=null --set alertmanager.alertmanagerSpec.resources=null"
Expand All @@ -28,6 +38,9 @@ case "${KUBERNETES_DISTRIBUTION_TYPE}" in
exit 1
esac

helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring ${cluster_args} ${e2e_args} ${RANCHER_HELM_ARGS} rancher-charts/rancher-monitoring
echo "Installing rancher monitoring with :\n"

helm search repo ${HELM_REPO}/rancher-monitoring --versions --max-col-width=0 | head -n 2
helm upgrade --install --create-namespace -n cattle-monitoring-system rancher-monitoring ${cluster_args} ${e2e_args} ${RANCHER_HELM_ARGS} ${HELM_REPO}/rancher-monitoring

echo "PASS: Rancher Monitoring has been installed"
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/uninstall-federator.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/validate-federator.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e/scripts/validate-monitoring.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x

source $(dirname $0)/entry

Expand Down
Binary file not shown.
Binary file not shown.
18 changes: 18 additions & 0 deletions charts/prometheus-federator/0.4.1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Prometheus Federator
catalog.cattle.io/namespace: cattle-monitoring-system
catalog.cattle.io/os: linux,windows
catalog.cattle.io/permits-os: linux,windows
catalog.cattle.io/provides-gvr: helm.cattle.io.projecthelmchart/v1alpha1
catalog.cattle.io/release-name: prometheus-federator
apiVersion: v2
appVersion: 0.3.5
dependencies:
- condition: helmProjectOperator.enabled
name: helmProjectOperator
repository: file://./charts/helmProjectOperator
description: Prometheus Federator
icon: https://raw.githubusercontent.com/rancher/prometheus-federator/main/assets/logos/prometheus-federator.svg
name: prometheus-federator
version: 0.4.1
120 changes: 120 additions & 0 deletions charts/prometheus-federator/0.4.1/README.md

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions charts/prometheus-federator/0.4.1/app-README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Prometheus Federator

This chart deploys an operator that manages Project Monitoring Stacks composed of the following set of resources that are scoped to project namespaces:
- [Prometheus](https://prometheus.io/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator))
- [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) (managed externally by [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator))
- [Grafana](https://github.com/helm/charts/tree/master/stable/grafana) (deployed via an embedded Helm chart)
- Default PrometheusRules and Grafana dashboards based on the collection of community-curated resources from [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus/)
- Default ServiceMonitors that watch the deployed Prometheus, Grafana, and Alertmanager

Since this Project Monitoring Stack deploys Prometheus Operator CRs, an existing Prometheus Operator instance must already be deployed in the cluster for Prometheus Federator to successfully be able to deploy Project Monitoring Stacks. It is recommended to use [`rancher-monitoring`](https://rancher.com/docs/rancher/v2.6/en/monitoring-alerting/) for this. For more information on how the chart works or advanced configurations, please read the `README.md`.

## Upgrading to Kubernetes v1.25+

Starting in Kubernetes v1.25, [Pod Security Policies](https://kubernetes.io/docs/concepts/security/pod-security-policy/) have been removed from the Kubernetes API.

As a result, **before upgrading to Kubernetes v1.25** (or on a fresh install in a Kubernetes v1.25+ cluster), users are expected to perform an in-place upgrade of this chart with `global.cattle.psp.enabled` set to `false` if it has been previously set to `true`.
> **Note:**
> In this chart release, any previous field that was associated with any PSP resources have been removed in favor of a single global field: `global.cattle.psp.enabled`.
> **Note:**
> If you upgrade your cluster to Kubernetes v1.25+ before removing PSPs via a `helm upgrade` (even if you manually clean up resources), **it will leave the Helm release in a broken state within the cluster such that further Helm operations will not work (`helm uninstall`, `helm upgrade`, etc.).**
>
> If your charts get stuck in this state, please consult the Rancher docs on how to clean up your Helm release secrets.
Upon setting `global.cattle.psp.enabled` to false, the chart will remove any PSP resources deployed on its behalf from the cluster. This is the default setting for this chart.
As a replacement for PSPs, [Pod Security Admission](https://kubernetes.io/docs/concepts/security/pod-security-admission/) should be used. Please consult the Rancher docs for more details on how to configure your chart release namespaces to work with the new Pod Security Admission and apply Pod Security Standards.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/display-name: Helm Project Operator
catalog.cattle.io/kube-version: '>=1.16.0-0'
catalog.cattle.io/namespace: cattle-helm-system
catalog.cattle.io/os: linux,windows
catalog.cattle.io/permits-os: linux,windows
catalog.cattle.io/provides-gvr: helm.cattle.io.projecthelmchart/v1alpha1
catalog.cattle.io/rancher-version: '>= 2.6.0-0'
catalog.cattle.io/release-name: helm-project-operator
apiVersion: v2
appVersion: 0.2.1
description: Helm Project Operator
name: helmProjectOperator
version: 0.2.1
Loading