Skip to content

Commit 210f802

Browse files
authored
Merge pull request #36596 from Intimaria/patch-1
use $HOSTNAME env variable instead of hostname command in new Oracle based mysql container
2 parents 4e4862d + 9283a69 commit 210f802

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en/examples/application/mysql/mysql-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
- |
2525
set -ex
2626
# Generate mysql server-id from pod ordinal index.
27-
[[ `hostname` =~ -([0-9]+)$ ]] || exit 1
27+
[[ $HOSTNAME =~ -([0-9]+)$ ]] || exit 1
2828
ordinal=${BASH_REMATCH[1]}
2929
echo [mysqld] > /mnt/conf.d/server-id.cnf
3030
# Add an offset to avoid reserved server-id=0 value.

0 commit comments

Comments
 (0)