Description:
Greetings,
The metrics sidecar currently doesn't support fetching images from a private Docker registry. This is required because it currently has another bug (https://bugs.mysql.com/bug.php?id=113196) that necessitates the use of custom images with embedded credentials for the metrics sidecar. Therefore, we need to keep it private and not in a public repository. Thanks!
How to repeat:
Create a simple InnoDB cluster with the below spec:
apiVersion: mysql.oracle.com/v2
kind: InnoDBCluster
metadata:
name: mycluster
spec:
secretName: mypwds
tlsUseSelfSigned: true
imageRepository: registry.example.com/mysql
imagePullSecrets:
name: gitlab-registry
instances: 1
router:
instances: 1
metrics:
enable: true
image: mysqld_exporter
monitor: true
monitorSpec: {}
options: []
Upon creation, this will successfully fetch the following images from the private registry: registry.example.com/mysql
community-operator:8.4.0-2.1.3
community-server:8.4.0
community-router:8.4.0
However, the metrics container will fail with ImagePullBackOff as it attempts to fetch the image from Docker Hub.
Suggested fix:
We need an option to fetch the metrics (mysqld_exporter) image from private registries.