Merge pull request #16740 from rook/mergify/bp/release-1.18/pr-16731

toolbox: merge rook-config-override ConfigMap into ceph.conf (backport #16731)
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-11-19 12:17:14 -07:00
commit f65097bbd6
4 files changed
+45

No files matched your search

+7
View File
@@ -27,6 +27,9 @@ spec:
mountPath: /etc/rook
- name: ceph-admin-secret
mountPath: /var/lib/rook-ceph-mon
- name: rook-config-override
mountPath: /etc/rook-config-override
readOnly: true
containers:
- name: script
image: docker.io/rook/ceph:v1.18.7
@@ -57,6 +60,10 @@ spec:
items:
- key: data
path: mon-endpoints
- name: rook-config-override
configMap:
name: rook-config-override
optional: true
- name: ceph-config
emptyDir: {}
restartPolicy: Never
@@ -35,6 +35,7 @@ spec:
CEPH_CONFIG="/etc/ceph/ceph.conf"
MON_CONFIG="/etc/rook/mon-endpoints"
KEYRING_FILE="/etc/ceph/keyring"
CONFIG_OVERRIDE="/etc/rook-config-override/config"
# create a ceph config file in its default location so ceph/rados tools can be used
# without specifying any arguments
@@ -55,6 +56,13 @@ spec:
[client.admin]
keyring = ${KEYRING_FILE}
EOF
# Merge the config override if it exists and is not empty
if [ -f "${CONFIG_OVERRIDE}" ] && [ -s "${CONFIG_OVERRIDE}" ]; then
echo "$DATE merging config override from ${CONFIG_OVERRIDE}"
echo "" >> ${CEPH_CONFIG}
cat ${CONFIG_OVERRIDE} >> ${CEPH_CONFIG}
fi
}
# watch the endpoints config file and update if the mon endpoints ever change
@@ -114,6 +122,9 @@ spec:
- name: ceph-admin-secret
mountPath: /var/lib/rook-ceph-mon
readOnly: true
- name: rook-config-override
mountPath: /etc/rook-config-override
readOnly: true
volumes:
- name: ceph-admin-secret
secret:
@@ -128,6 +139,10 @@ spec:
items:
- key: data
path: mon-endpoints
- name: rook-config-override
configMap:
name: rook-config-override
optional: true
- name: ceph-config
emptyDir: {}
tolerations:
+15
View File
@@ -29,6 +29,7 @@ spec:
CEPH_CONFIG="/etc/ceph/ceph.conf"
MON_CONFIG="/etc/rook/mon-endpoints"
KEYRING_FILE="/etc/ceph/keyring"
CONFIG_OVERRIDE="/etc/rook-config-override/config"
# create a ceph config file in its default location so ceph/rados tools can be used
# without specifying any arguments
@@ -49,6 +50,13 @@ spec:
[client.admin]
keyring = ${KEYRING_FILE}
EOF
# Merge the config override if it exists and is not empty
if [ -f "${CONFIG_OVERRIDE}" ] && [ -s "${CONFIG_OVERRIDE}" ]; then
echo "$DATE merging config override from ${CONFIG_OVERRIDE}"
echo "" >> ${CEPH_CONFIG}
cat ${CONFIG_OVERRIDE} >> ${CEPH_CONFIG}
fi
}
# watch the endpoints config file and update if the mon endpoints ever change
@@ -108,6 +116,9 @@ spec:
- name: ceph-admin-secret
mountPath: /var/lib/rook-ceph-mon
readOnly: true
- name: rook-config-override
mountPath: /etc/rook-config-override
readOnly: true
volumes:
- name: ceph-admin-secret
secret:
@@ -122,6 +133,10 @@ spec:
items:
- key: data
path: mon-endpoints
- name: rook-config-override
configMap:
name: rook-config-override
optional: true
- name: ceph-config
emptyDir: {}
tolerations:
+8
View File
@@ -17,6 +17,7 @@
CEPH_CONFIG="/etc/ceph/ceph.conf"
MON_CONFIG="/etc/rook/mon-endpoints"
KEYRING_FILE="/etc/ceph/keyring"
CONFIG_OVERRIDE="/etc/rook-config-override/config"
# create a ceph config file in its default location so ceph/rados tools can be used
# without specifying any arguments
@@ -37,6 +38,13 @@ mon_host = ${mon_endpoints}
[client.admin]
keyring = ${KEYRING_FILE}
EOF
# Merge the config override if it exists and is not empty
if [ -f "${CONFIG_OVERRIDE}" ] && [ -s "${CONFIG_OVERRIDE}" ]; then
echo "$DATE merging config override from ${CONFIG_OVERRIDE}"
echo "" >> ${CEPH_CONFIG}
cat ${CONFIG_OVERRIDE} >> ${CEPH_CONFIG}
fi
}
# watch the endpoints config file and update if the mon endpoints ever change