func (c *metrics) getPorts() []corev1.ContainerPort {
	return []corev1.ContainerPort{
		{
			Name:          utils.MetricsPortName,
			ContainerPort: utils.MetricsPort,
		},
	}
}
getPorts get the container ports.
package container
import (
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/util/intstr"
	"github.com/radondb/radondb-mysql-kubernetes/mysqlcluster"
	"github.com/radondb/radondb-mysql-kubernetes/utils"
)
type metrics struct {
	*mysqlcluster.MysqlCluster
	name string
}
func (c *metrics) getName() string {
	return c.name
}
func (c *metrics) getImage() string {
	return c.Spec.MetricsOpts.Image
}
func (c *metrics) getCommand() []string {
	return nil
}
func (c *metrics) getEnvVars() []corev1.EnvVar {
	return []corev1.EnvVar{
		getEnvVarFromSecret(c.GetNameForResource(utils.Secret), "DATA_SOURCE_NAME", "data-source", true),
	}
}
func (c *metrics) getLifecycle() *corev1.Lifecycle {
	return nil
}
func (c *metrics) getResources() corev1.ResourceRequirements {
	return c.Spec.MetricsOpts.Resources
}