openstack-helm-infra/ceph-rgw/templates/bin/_rgw-restart.sh.tpl
Alexander Vlasov 70b0b9b266 [ceph-rgw] Add rwg restart job
Some updates to rgw config like zone or zonegroup changes that can
be done during bootstrap process require rgw restart.
Add restart job which when enabled will use
'kubectl rollout restart deployment'
in order to restart rgw

This will be more useful in greenfield scenarios where
we need to setup zone/zonegroups right after rgw svc up which
needs to restart rgw svc.

Change-Id: I6667237e92a8b87a06d2a59c65210c482f3b7302
2020-06-25 13:15:56 +00:00

26 lines
831 B
Smarty

#!/bin/bash
{{/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
export LC_ALL=C
TIMEOUT="{{ .Values.conf.rgw_restart.timeout | default 600 }}s"
kubectl rollout restart deployment ceph-rgw
kubectl rollout status --timeout=${TIMEOUT} deployment ceph-rgw
if [ "$?" -ne 0 ]; then
echo "Ceph rgw deployment was not able to restart in ${TIMEOUT}"
fi