From e2063905de1d27ad654e165df9193339f7d4e2fc Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Tue, 19 Mar 2024 15:06:17 -0500 Subject: [PATCH] feat: new doc updates (#161) Signed-off-by: Kevin Carter --- docs/{examples => }/alertmanager-encore.md | 3 ++- docs/{examples => }/alertmanager-slack.md | 1 + docs/genestack-upgrade.md | 25 ++++++++++++++++++++++ docs/k8s-config.md | 12 +++++++++-- mkdocs.yml | 5 ++++- 5 files changed, 42 insertions(+), 4 deletions(-) rename docs/{examples => }/alertmanager-encore.md (98%) rename docs/{examples => }/alertmanager-slack.md (98%) diff --git a/docs/examples/alertmanager-encore.md b/docs/alertmanager-encore.md similarity index 98% rename from docs/examples/alertmanager-encore.md rename to docs/alertmanager-encore.md index 282b12ac..572963f0 100644 --- a/docs/examples/alertmanager-encore.md +++ b/docs/alertmanager-encore.md @@ -1,9 +1,10 @@ +# Encore Alerts The following example describes configuration options to send alerts via alertmanager to Rackspace encore, the `Encore UUID` is derived by account where the secret `SECRET KEY` is used per application submitting webhooks: -```yaml +``` yaml global: resolve_timeout: 5m receivers: diff --git a/docs/examples/alertmanager-slack.md b/docs/alertmanager-slack.md similarity index 98% rename from docs/examples/alertmanager-slack.md rename to docs/alertmanager-slack.md index 7a7ef539..6b6a77cb 100644 --- a/docs/examples/alertmanager-slack.md +++ b/docs/alertmanager-slack.md @@ -1,3 +1,4 @@ +# Slack Alerts The following example describes configuration options to send alerts via alertmanager to slack using a slack hook. diff --git a/docs/genestack-upgrade.md b/docs/genestack-upgrade.md index 8832c897..f1c62446 100644 --- a/docs/genestack-upgrade.md +++ b/docs/genestack-upgrade.md @@ -31,3 +31,28 @@ An update is generally the same as an install. Many of the Genestack application * When needing to run an upgrade for the infrastructure operators, consult the operator documentation to validate the steps required. * When needing to run an upgrade for the OpenStack components, simply re-run the `helm` charts as documented in the Genestack installation process. + +## Kubernetes Upgrade Notes + +Over the course of normal operations it's likely that a CRD will change versions, names, or something else. In these cases, should an operator or helm chart not gracefully handle an full upgrade, the `kubectl convert` plugin can be used to make some adjustments where needed. + +!!! example "Converting mmontes CRDs to mariadb official ones" + + ``` shell + kubectl get --namespace openstack crd.namespace -o yaml value > /tmp/value.crd.namespace.yaml + kubectl convert -f /tmp/value.crd.namespace.yaml --output-version new-namespace/VERSION + ``` + +## Kubernetes Finalizers + +When processing an upgrade there may come a time when a finalizer is stuck, typically something that happens when an operator or an api reference is changed. If this happens one way to resolve the issue is to patch the Finalizers. + +!!! warning + + Patching Finalizers could leave orphaned resources. Before patching a finalizer be sure your "ready." + +!!! example "Patching Finalizers" + + ``` shell + kubectl patch $@ --type='json' -p='[{"op": "remove", "path": "/metadata/finalizers"}]' + ``` diff --git a/docs/k8s-config.md b/docs/k8s-config.md index 0f3cb870..f65c6617 100644 --- a/docs/k8s-config.md +++ b/docs/k8s-config.md @@ -8,8 +8,16 @@ Install the `kubectl` tool. ``` shell curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -sudo mv kubectl /usr/local/bin/ -sudo chmod +x /usr/local/bin/kubectl +sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl +``` + +### Install the `convert` plugin + +The convert plugin can be used to assist with upgrades. + +``` shell +curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" +sudo install -o root -g root -m 0755 kubectl-convert /usr/local/bin/kubectl-convert ``` ## Retrieve the kube config diff --git a/mkdocs.yml b/mkdocs.yml index ce4435f5..69760446 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -143,6 +143,7 @@ nav: - Kubernetes Dashboard: k8s-dashboard.md - Kubernetes Taint: k8s-taint.md - Retrieve kube config: k8s-config.md + - Prometheus: prometheus.md - Storage: - storage-overview.md - Ceph Internal: storage-ceph-rook-internal.md @@ -185,13 +186,15 @@ nav: - Ceilometer: openstack-ceilometer.md - Monitoring: - Monitoring Overview: prometheus-monitoring-overview.md - - Prometheus: prometheus.md - Grafana: grafana.md - MySQL Exporter: prometheus-mysql-exporter.md - RabbitMQ Exporter: prometheus-rabbitmq-exporter.md - Memcached Exporter: prometheus-memcached-exporter.md - Postgres Exporter: prometheus-postgres-exporter.md - Openstack Exporter: prometheus-openstack-metrics-exporter.md + - Alert Manager Examples: + - alertmanager-encore.md + - alertmanager-slack.md - Operational Guide: - Running Genestack Upgrade: genestack-upgrade.md - Running Kubespray Upgrade: k8s-kubespray-upgrade.md