Skip to content

Commit

Permalink
Showing 3 changed files with 48 additions and 4 deletions.
45 changes: 45 additions & 0 deletions docs/content/how-to/restart-control-plane-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Restart Control Plane Components with Restart Annotation

The Restart Annotation allows a user to trigger a rolling restart of all control-plane components in the management cluster. This is helpful in certain situations like when you want to force a reload of all the certificates components are using in the control plane. It is also a helpful operational debug step to see if a restart resolves any abnormalities being experienced in the control plane components.

To utilize: the restart annotation is passed to the Hostedcluster object

```
apiVersion: hypershift.openshift.io/v1alpha1
kind: HostedCluster
metadata:
name: example
namespace: master
annotations:
hypershift.openshift.io/restart-date: "2022-01-31T12:56:54+0000"
....
```

When that annotation is passed: every component in the clusters control plane will proceed to do a rolling restart. This will occur anytime a new value is passed to the restart date annotation.

The list of components restarted are listed below:
- catalog-operator
- certified-operators-catalog
- cluster-api
- cluster-autoscaler
- cluster-policy-controller
- cluster-version-operator
- community-operators-catalog
- control-plane-operator
- hosted-cluster-config-operator
- ignition-server
- ingress-operator
- konnectivity-agent
- konnectivity-server
- kube-apiserver
- kube-controller-manager
- kube-scheduler
- machine-approver
- oauth-openshift
- olm-operator
- openshift-apiserver
- openshift-controller-manager
- openshift-oauth-apiserver
- packageserver
- redhat-marketplace-catalog
- redhat-operators-catalog
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@ nav:
- how-to/deploy-aws-private-clusters.md
- how-to/oauth.md
- how-to/distribute-hosted-cluster-workloads.md
- how-to/restart-control-plane-components.md
- 'Reference':
- reference/index.md
- reference/api.md
Original file line number Diff line number Diff line change
@@ -1753,7 +1753,7 @@ func (r *HostedClusterReconciler) reconcileIgnitionServer(ctx context.Context, c
RunAsUser: k8sutilspointer.Int64Ptr(config.DefaultSecurityContextUser),
}
}

hyperutil.SetRestartAnnotation(hcluster, ignitionServerDeployment)
hyperutil.SetColocation(hcluster, ignitionServerDeployment)
hyperutil.SetControlPlaneIsolation(hcluster, ignitionServerDeployment)
hyperutil.SetDefaultPriorityClass(ignitionServerDeployment)
@@ -2323,9 +2323,7 @@ func reconcileCAPIManagerDeployment(deployment *appsv1.Deployment, hc *hyperv1.H
}

hyperutil.SetColocation(hc, deployment)
// TODO (alberto): Reconsider enable this back when we face a real need
// with no better solution.
// hyperutil.SetRestartAnnotation(hc, deployment)
hyperutil.SetRestartAnnotation(hc, deployment)
hyperutil.SetControlPlaneIsolation(hc, deployment)
hyperutil.SetDefaultPriorityClass(deployment)
switch hc.Spec.ControllerAvailabilityPolicy {

0 comments on commit 685db72

Please sign in to comment.