I’m trying to setup two maria DBs using the alias feature
However, when accessing the DB with the alias it seems they both point to the same DB
This is my .gitlab.yml
services:
- name: mariadb:10.3
alias: db1
- name: mariadb:10.3
alias: db2
variables:
MYSQL_ROOT_PASSWORD: rootpw
MYSQL_DATABASE: dbname
MYSQL_USER: user
MYSQL_PASSWORD: pass
script:
- mysql -h db1 --user=user --password=pass dbname -e "create table xxx (id varchar(255) primary key)"
- mysql -h db2 --user=user --password=pass dbname -e "show tables"
I don’t expect db2 to have the table created on db1 but that’s what the second script line prints
Running with gitlab-runner 13.2.0 (353dd94e)
on gitlab-runner-gitlab-runner-555b8ff667-84cct 5vF-n5hz
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image python:3.7.7-slim ...
....
Tables_in_dbname
xxx
The job runs on Kubernetes v1.14 with gitlab runner 13.2.
I understand there was this issue - Kubernetes executor should expose services via HostAliases (#2229) · Issues · GitLab.org / gitlab-runner · GitLab but it seems resolved.
Is there something wrong with my setup? or is it K8/gitlab issue?