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

revert commonLables usage #86

Merged
merged 3 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
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 deployment.apps/kube-proxy-metrics -n monitoring
kustomize build katalog/kube-proxy-metrics | kubectl apply -f-
kubectl delete daemonset.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
6 changes: 0 additions & 6 deletions katalog/goldpinger/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
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: "goldpinger"
kfd.sighup.io/source: "kustomize"

namespace: monitoring

resources:
Expand Down
6 changes: 0 additions & 6 deletions katalog/grafana/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
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: "grafana"
kfd.sighup.io/source: "kustomize"

namespace: monitoring

resources:
Expand Down
6 changes: 0 additions & 6 deletions katalog/kube-proxy-metrics/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +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: "kube-proxy-metrics"
kfd.sighup.io/source: "kustomize"

images:
- name: kube-rbac-proxy
newName: registry.sighup.io/fury/brancz/kube-rbac-proxy
Expand Down
6 changes: 0 additions & 6 deletions katalog/kube-state-metrics/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
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: "kube-state-metrics"
kfd.sighup.io/source: "kustomize"

namespace: monitoring

images:
Expand Down
6 changes: 0 additions & 6 deletions katalog/kubeadm-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: "kubeadm-sm"
kfd.sighup.io/source: "kustomize"

resources:
- ../configs/kubeadm
Loading