Ceph-mon: clean ceph rgw related jobs and keyrings
Change-Id: I19cffd6b1a79a80b05895400dc4e3fa151dbc623
This commit is contained in:
parent
e31f82668e
commit
c437860b2e
@ -20,13 +20,11 @@ set -ex
|
||||
export LC_ALL=C
|
||||
: "${HOSTNAME:=$(uname -n)}"
|
||||
: "${MGR_NAME:=${HOSTNAME}}"
|
||||
: "${RGW_NAME:=${HOSTNAME}}"
|
||||
: "${MDS_NAME:=mds-${HOSTNAME}}"
|
||||
: "${MDS_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-mds/${CLUSTER}.keyring}"
|
||||
: "${RGW_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-rgw/${CLUSTER}.keyring}"
|
||||
: "${OSD_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-osd/${CLUSTER}.keyring}"
|
||||
|
||||
for keyring in ${OSD_BOOTSTRAP_KEYRING} ${MDS_BOOTSTRAP_KEYRING} ${RGW_BOOTSTRAP_KEYRING}; do
|
||||
for keyring in ${OSD_BOOTSTRAP_KEYRING} ${MDS_BOOTSTRAP_KEYRING} ; do
|
||||
mkdir -p "$(dirname "$keyring")"
|
||||
done
|
||||
|
||||
@ -38,9 +36,6 @@ done
|
||||
# Create socket directory
|
||||
mkdir -p /run/ceph
|
||||
|
||||
# Creating rados directories
|
||||
mkdir -p "/var/lib/ceph/radosgw/${RGW_NAME}"
|
||||
|
||||
# Create the MDS directory
|
||||
mkdir -p "/var/lib/ceph/mds/${CLUSTER}-${MDS_NAME}"
|
||||
|
||||
|
@ -5,7 +5,6 @@ export LC_ALL=C
|
||||
: "${MON_KEYRING:=/etc/ceph/${CLUSTER}.mon.keyring}"
|
||||
: "${ADMIN_KEYRING:=/etc/ceph/${CLUSTER}.client.admin.keyring}"
|
||||
: "${MDS_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-mds/${CLUSTER}.keyring}"
|
||||
: "${RGW_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-rgw/${CLUSTER}.keyring}"
|
||||
: "${OSD_BOOTSTRAP_KEYRING:=/var/lib/ceph/bootstrap-osd/${CLUSTER}.keyring}"
|
||||
|
||||
if [[ -z "$CEPH_PUBLIC_NETWORK" ]]; then
|
||||
@ -81,7 +80,7 @@ if [ ! -e "${MON_DATA_DIR}/keyring" ]; then
|
||||
fi
|
||||
|
||||
# Testing if it's not the first monitor, if one key doesn't exist we assume none of them exist
|
||||
for KEYRING in ${OSD_BOOTSTRAP_KEYRING} ${MDS_BOOTSTRAP_KEYRING} ${RGW_BOOTSTRAP_KEYRING} ${ADMIN_KEYRING}; do
|
||||
for KEYRING in ${OSD_BOOTSTRAP_KEYRING} ${MDS_BOOTSTRAP_KEYRING} ${ADMIN_KEYRING}; do
|
||||
ceph-authtool ${MON_KEYRING} --import-keyring ${KEYRING}
|
||||
done
|
||||
|
||||
|
@ -32,6 +32,4 @@ data:
|
||||
{{ .Values.conf.templates.keyring.bootstrap.mgr | indent 4 }}
|
||||
bootstrap.keyring.osd: |
|
||||
{{ .Values.conf.templates.keyring.bootstrap.osd | indent 4 }}
|
||||
bootstrap.keyring.rgw: |
|
||||
{{ .Values.conf.templates.keyring.bootstrap.rgw | indent 4 }}
|
||||
{{- end }}
|
||||
|
@ -176,10 +176,6 @@ spec:
|
||||
mountPath: /var/lib/ceph/bootstrap-mds/ceph.keyring
|
||||
subPath: ceph.keyring
|
||||
readOnly: true
|
||||
- name: ceph-bootstrap-rgw-keyring
|
||||
mountPath: /var/lib/ceph/bootstrap-rgw/ceph.keyring
|
||||
subPath: ceph.keyring
|
||||
readOnly: true
|
||||
- name: pod-var-lib-ceph
|
||||
mountPath: /var/lib/ceph
|
||||
readOnly: false
|
||||
@ -239,7 +235,4 @@ spec:
|
||||
- name: ceph-bootstrap-mds-keyring
|
||||
secret:
|
||||
secretName: {{ .Values.secrets.keyrings.mds }}
|
||||
- name: ceph-bootstrap-rgw-keyring
|
||||
secret:
|
||||
secretName: {{ .Values.secrets.keyrings.rgw }}
|
||||
{{- end }}
|
||||
|
@ -16,8 +16,7 @@ limitations under the License.
|
||||
|
||||
{{- if and .Values.manifests.job_keyring .Values.deployment.storage_secrets }}
|
||||
{{- $envAll := . }}
|
||||
{{- range $key1, $cephBootstrapKey := tuple "mds" "osd" "rgw" "mon" "mgr" }}
|
||||
{{- if not (and (not $envAll.Values.manifests.deployment_rgw) (eq $cephBootstrapKey "rgw")) }}
|
||||
{{- range $key1, $cephBootstrapKey := tuple "mds" "osd" "mon" "mgr" }}
|
||||
{{- $jobName := print $cephBootstrapKey "-keyring-generator" }}
|
||||
|
||||
{{- $serviceAccountName := print "ceph-" $jobName }}
|
||||
@ -117,4 +116,3 @@ spec:
|
||||
defaultMode: 0444
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -106,7 +106,6 @@ secrets:
|
||||
mon: ceph-mon-keyring
|
||||
mds: ceph-bootstrap-mds-keyring
|
||||
osd: ceph-bootstrap-osd-keyring
|
||||
rgw: ceph-bootstrap-rgw-keyring
|
||||
mgr: ceph-bootstrap-mgr-keyring
|
||||
admin: ceph-client-admin-keyring
|
||||
|
||||
@ -142,10 +141,6 @@ conf:
|
||||
[client.bootstrap-osd]
|
||||
key = {{ key }}
|
||||
caps mon = "allow profile bootstrap-osd"
|
||||
rgw: |
|
||||
[client.bootstrap-rgw]
|
||||
key = {{ key }}
|
||||
caps mon = "allow profile bootstrap-rgw"
|
||||
ceph:
|
||||
global:
|
||||
# auth
|
||||
@ -318,7 +313,6 @@ manifests:
|
||||
configmap_templates: true
|
||||
daemonset_mon: true
|
||||
deployment_moncheck: true
|
||||
deployment_rgw: true
|
||||
job_image_repo_sync: true
|
||||
job_bootstrap: true
|
||||
job_keyring: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user