Rotate OpenStack Credentials
The following document describes the necessary actions that must be taken LCM-wise after an OpenStack credential rotation.
Change the OpenStack credentials (how to do that is out of scope).
Trigger rotation of managed components
Immediately afterwards renew the OpenStack connection of the Kubernetes cluster. This will update the
kube-system/cloud-configsecret and restart the cloud-controller-manager, csi-cinder-controllerplugin and csi-cinder-nodeplugin in thekube-systemnamespace.$ bash managed-k8s/actions/apply-k8s-supplements.sh connect-k8s-to-openstack.yaml
Immediately afterwards renew the OpenStack connection of the Kubernetes cluster. This will update the
kube-system/cloud-configsecret and restart the cloud-controller-manager, csi-cinder-controllerplugin and csi-cinder-nodeplugin in thekube-systemnamespace. It will also update thekube-system/ch-k8s-lbaas-controller-configsecret and restart the ch-k8s-lbaas-controller in thekube-systemnamespace.$ bash managed-k8s/actions/apply-k8s-supplements.sh connect-k8s-to-openstack.yaml $ bash managed-k8s/actions/apply-k8s-supplements.sh install-ch-k8s-lbaas.yaml
Verify that everything is able to come up after it has been restarted.
Check which Pods besides the above mentioned have mounted the
kube-system/cloud-configsecret:kubectl get pods --all-namespaces -o json | jq --raw-output '.items[] | select(.spec | has("volumes")) | select(.spec.volumes[].secret.secretName=="cloud-config") | "\(.metadata.namespace)/\(.metadata.name)"'
Check which Pods are referencing the
kube-system/cloud-configsecret in their env:kubectl get pods--all-namespaces -o json | jq --raw-output '.items[] | select(.spec.containers[].env[]?.valueFrom.secretKeyRef.name=="cloud-config") | "\(.metadata.namespace)/\(.metadata.name)\n"'
Figure out how these Pods are controlled and (rollout) restart them.
Update Thanos bucket configuration
Thanos is enabled if yk8s.k8s-service-layer.prometheus.use_thanos is set to
true. If the custom bucket management setting yk8s.k8s-service-layer.prometheus.manage_thanos_bucket is unset or set totrue, apply the required changes by running the following update script:$ bash managed-k8s/actions/apply-k8s-supplements.sh install-monitoring.yaml
This ensures that the Kubernetes secret
thanos-bucket-configfor Thanos is updated.Thanos is disabled if yk8s.k8s-service-layer.prometheus.use_thanos is unset or set to
false.In this case, no further action is necessary.