Skip to content

Commit

Permalink
Merge pull request #86 from sighupio/hotfix/revert-commonLabels
Browse files Browse the repository at this point in the history
revert commonLables usage
  • Loading branch information
nutellinoit authored Mar 10, 2022
2 parents 943e329 + c042d7f commit ba36e78
Show file tree
Hide file tree
Showing 34 changed files with 105 additions and 183 deletions.
44 changes: 22 additions & 22 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 SIGHUP s.r.l All rights reserved.
# Copyright (c) 2022 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

Expand Down Expand Up @@ -141,27 +141,27 @@ steps:
- push
- tag

---
kind: pipeline
name: render-examples

depends_on:
- policeman

platform:
os: linux
arch: amd64

steps:
- name: examples
image: quay.io/sighup/furyctl-bats:v0.2.2_3.2.2
pull: always
depends_on: [clone]
commands:
- bats -t examples/tests.sh
when:
event:
- tag
# ---
# kind: pipeline
# name: render-examples

# depends_on:
# - policeman

# platform:
# os: linux
# arch: amd64

# steps:
# - name: examples
# image: quay.io/sighup/furyctl-bats:v0.2.2_3.2.2
# pull: always
# depends_on: [clone]
# commands:
# - bats -t examples/tests.sh
# when:
# event:
# - tag

---
kind: pipeline
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ Check the [compatibility matrix][compatibility-matrix] for additional informatio
```yaml
bases:
- name: monitoring/prometheus-operator
version: v1.14.0
version: v1.14.1
- name: monitoring/prometheus-operated
version: v1.14.0
version: v1.14.1
- name: monitoring/alertmanager-operated
version: v1.14.0
version: v1.14.1
- name: monitoring/node-exporter
version: v1.14.0
version: v1.14.1
- name: monitoring/kube-state-metrics
version: v1.14.0
version: v1.14.1
- name: monitoring/grafana
version: v1.14.0
version: v1.14.1
- name: monitoring/goldpinger
version: v1.14.0
version: v1.14.1
```
Along with the primary components, include one of the following components,
Expand All @@ -124,39 +124,39 @@ based on the cloud provider for service monitoring:
```yaml
...
- name: monitoring/eks-sm
version: v1.14.0
version: v1.14.1
```
- ServiceMonitor for Azure AKS cluster
```yaml
...
- name: monitoring/aks-sm
version: v1.14.0
version: v1.14.1
```
- ServiceMonitor for GCP GKE cluster
```yaml
...
- name: monitoring/gke-sm
version: v1.14.0
version: v1.14.1
```
- ServiceMonitor for OVH cluster
```yaml
...
- name: monitoring/ovh-sm
version: v1.14.0
version: v1.14.1
```
- ServiceMonitor for on-premises and for self-managed cluster
```yaml
...
- name: monitoring/kubeadm-sm
version: v1.14.0
version: v1.14.1
```
> See `furyctl` [documentation][furyctl-repo] for additional details about `Furyfile.yml` format.
Expand Down
6 changes: 2 additions & 4 deletions docs/COMPATIBILITY_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| v1.12.1 | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: | | |
| v1.12.2 | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: | | |
| v1.13.0 | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: | |
| v1.14.0 | | | | | | | :warning: | :warning: | :warning: | :warning: |
| v1.14.0 | | | | | | | :x: | :x: | :x: | :x: |
| v1.14.1 | | | | | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | :warning: |

- :white_check_mark: Compatible
Expand All @@ -40,6 +40,4 @@ because it is not officially supported by [SIGHUP](https://sighup.io).
because it is not officially supported by [SIGHUP](https://sighup.io).
- :warning: : module version: `v1.13.0` and Kubernetes Version: `1.22.x`. It works as expected. Marked as warning
because it is not officially supported by [SIGHUP](https://sighup.io).
- :warning: : module version: `v1.14.0` has a known issue where Prometheus Service is not working as expected. See [Issue #83](https://github.com/sighupio/fury-kubernetes-monitoring/issues/83).


- :x: module version `v1.14.0` has a known bug breaking upgrades. Please do not use.
2 changes: 1 addition & 1 deletion docs/releases/v1.14.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<h1>:x: This release contains issues, please use the version v1.14.1 instead :x:</h1>
# Monitoring Core Module Release 1.14.0

Welcome to the latest release of `monitoring` module of [`Kubernetes Fury
Expand Down Expand Up @@ -77,4 +78,3 @@ kustomize build katalog/node-exporter | kubectl apply -f-
kubectl delete statefulset.apps/alertmanager-main -n monitoring --cascade=orphan
kustomize build katalog/alertmanager-operated | kubectl apply -f-
```

53 changes: 47 additions & 6 deletions docs/releases/v1.14.1.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,58 @@
# Monitoring Core Module version v1.14.1

This patch includes hotfix in `prometheus-operated` and `alertmanager-operated` Kustomize projects.
This is a patch release reverts the `commonLabels` applied in `v1.14.0` because they break updating the module in the future.

## Changelog
## Update Guide 🦮

- Fixing the label selector for `prometheus-operated` and `alertmanager-operated` using Kustomize configurations.
### Warnings

## Upgrade path
- Since the release rollbacks some changes to immutable fields, if `deployments`, `statefulset` and `daemonsets`, are not deleted first before applying the module, it will error out. Check the Process below for more info.

To upgrade this core module from `v1.14.0` to `v1.14.1`, you need to download this new version, then apply the
`kustomize` project. No further action is required.
### Process

If you are upgrading from version `v1.14.0` to `v1.14.1` you need to download this new version and then apply the `kustomize` project as shown below.

There will be **downtime** on the components.

```bash
# Delete the deployments with the labels so they can be upgraded
kubectl delete deployment.apps/prometheus-operator -n monitoring
# Finally, apply the new version
kustomize build katalog/prometheus-operator | kubectl apply -f -
# Repeat for each package
kubectl delete statefulset.apps/prometheus-k8s -n monitoring
kustomize build katalog/prometheus-operated | kubectl apply -f -
kubectl delete deployment.apps/grafana -n monitoring
kustomize build katalog/grafana | kubectl apply -f -
kubectl delete -n kube-system deployment.apps/metrics-server
kustomize build katalog/metrics-server | kubectl apply -f -
kubectl delete daemonset.apps/goldpinger -n monitoring
kustomize build katalog/goldpinger | kubectl apply -f-
kustomize build katalog/kubeadm-sm | kubectl apply -f-
kubectl delete daemonset.apps/kube-proxy-metrics -n monitoring
kustomize build katalog/kube-proxy-metrics | kubectl apply -f-
kubectl delete deployment.apps/kube-state-metrics -n monitoring
kustomize build katalog/kube-state-metrics | kubectl apply -f-
kubectl delete daemonset.apps/node-exporter -n monitoring
kustomize build katalog/node-exporter | kubectl apply -f-
kubectl delete statefulset.apps/alertmanager-main -n monitoring
kustomize build katalog/alertmanager-operated | kubectl apply -f-
```

If you are upgrading from a version `< v1.14.0`, you can simply apply the `kustomize` project as shown below.

```bash
kustomize build katalog/prometheus-operator | kubectl apply -f -
kustomize build katalog/prometheus-operated | kubectl apply -f -
kustomize build katalog/node-exporter | kubectl apply -f -
kustomize build katalog/metrics-server | kubectl apply -f -
kustomize build katalog/kubeadm-sm | kubectl apply -f -
kustomize build katalog/kube-state-metrics | kubectl apply -f -
kustomize build katalog/kube-proxy-metrics | kubectl apply -f -
kustomize build katalog/grafana | kubectl apply -f -
kustomize build katalog/goldpinger | kubectl apply -f -
kustomize build katalog/gke-sm | kubectl apply -f -
kustomize build katalog/eks-sm | kubectl apply -f -
kustomize build katalog/alertmanager-operated | kubectl apply -f -
kustomize build katalog/aks-sm | kubectl apply -f -
```
4 changes: 2 additions & 2 deletions examples/alertmanager-configuration/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

bases:
- name: monitoring/alertmanager-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1
4 changes: 2 additions & 2 deletions examples/alertmanager-operated-deployment/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/alertmanager-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

2 changes: 1 addition & 1 deletion examples/grafana-add-dashboard/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

bases:
- name: monitoring/grafana
version: v1.13.0
version: v1.14.1
2 changes: 1 addition & 1 deletion examples/grafana-configuration/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

bases:
- name: monitoring/grafana
version: v1.13.0
version: v1.14.1
4 changes: 2 additions & 2 deletions examples/prometheus-additionalScrapes/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

6 changes: 3 additions & 3 deletions examples/prometheus-alertmanager-externalUrl/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

bases:
- name: monitoring/alertmanager-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

4 changes: 2 additions & 2 deletions examples/prometheus-externalLabels/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

4 changes: 2 additions & 2 deletions examples/prometheus-operated-deployment/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

4 changes: 2 additions & 2 deletions examples/prometheus-operated-nodeSelector/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

4 changes: 2 additions & 2 deletions examples/prometheus-rules/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1

4 changes: 2 additions & 2 deletions examples/serviceMonitor/Furyfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

bases:
- name: monitoring/prometheus-operated
version: v1.13.0
version: v1.14.1
- name: monitoring/prometheus-operator
version: v1.13.0
version: v1.14.1
6 changes: 0 additions & 6 deletions katalog/aks-sm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
module.kfd.sighup.io/name: "monitoring"
module.kfd.sighup.io/version: "v1.14.1"
module.kfd.sighup.io/component: "aks-sm"
kfd.sighup.io/source: "kustomize"

resources:
- ../configs/aks
8 changes: 0 additions & 8 deletions katalog/alertmanager-operated/configuration.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions katalog/alertmanager-operated/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ kind: Kustomization

namespace: monitoring

commonLabels:
module.kfd.sighup.io/name: "monitoring"
module.kfd.sighup.io/version: "v1.14.1"
module.kfd.sighup.io/component: "alertmanager-operated"
kfd.sighup.io/source: "kustomize"

configurations:
- configuration.yaml

resources:
- deploy.yml
- rbac.yml
Expand Down
6 changes: 0 additions & 6 deletions katalog/configs/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
module.kfd.sighup.io/name: "monitoring"
module.kfd.sighup.io/version: "v1.14.1"
module.kfd.sighup.io/component: "configs"
kfd.sighup.io/source: "kustomize"

resources:
- ./bases/default
6 changes: 0 additions & 6 deletions katalog/eks-sm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
module.kfd.sighup.io/name: "monitoring"
module.kfd.sighup.io/version: "v1.14.1"
module.kfd.sighup.io/component: "eks-sm"
kfd.sighup.io/source: "kustomize"

resources:
- ../configs/eks
6 changes: 0 additions & 6 deletions katalog/gke-sm/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonLabels:
module.kfd.sighup.io/name: "monitoring"
module.kfd.sighup.io/version: "v1.14.1"
module.kfd.sighup.io/component: "gke-sm"
kfd.sighup.io/source: "kustomize"

resources:
- ../configs/gke
Loading

0 comments on commit ba36e78

Please sign in to comment.