We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a139c commit 914f9aeCopy full SHA for 914f9ae
content/ja/examples/application/mysql/mysql-statefulset.yaml
@@ -22,7 +22,7 @@ spec:
22
- |
23
set -ex
24
# Generate mysql server-id from pod ordinal index.
25
- [[ `hostname` =~ -([0-9]+)$ ]] || exit 1
+ [[ $HOSTNAME =~ -([0-9]+)$ ]] || exit 1
26
ordinal=${BASH_REMATCH[1]}
27
echo [mysqld] > /mnt/conf.d/server-id.cnf
28
# Add an offset to avoid reserved server-id=0 value.
0 commit comments