// mysqlService creates a new Service for a MySQL
mysqlService creates a new Service for a MySQL
// mysqlService creates a new Service for a MySQL
func mysqlService(apimanager *apimv1alpha1.Apimanager) *corev1.Service {
	labels := map[string]string{
		"deployment": "wso2apim-with-analytics-mysql",
	}
	return &corev1.Service{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "wso2am-mysql-db-service",
			Namespace: apimanager.Namespace,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(apimanager, apimv1alpha1.SchemeGroupVersion.WithKind("Apimanager")),
			},
		},
		Spec: corev1.ServiceSpec{
			Selector: labels,
			Type:     "ClusterIP",
			Ports: []corev1.ServicePort{
				{
					Name:       "mysql-port",
					Protocol:   corev1.ProtocolTCP,
					Port:       3306,
					TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: 3306},
				},
			},
		},
	}
}
func mysqlService ( apimanager * apimv1alpha1 . Apimanager ) * corev1 . Service { labels := map [ string ] string { " " : " " , } return & corev1 . Service { ObjectMeta : metav1 . ObjectMeta { Name : " " , Namespace : apimanager . Namespace , OwnerReferences : [ ] metav1 . OwnerReference { * metav1 . NewControllerRef ( apimanager , apimv1alpha1 . SchemeGroupVersion . WithKind ( " " ) ) , } , } , Spec : corev1 . ServiceSpec { Selector : labels , Type : " " , Ports : [ ] corev1 . ServicePort { { Name : " " , Protocol : corev1 . ProtocolTCP , Port : 3306 , TargetPort : intstr . IntOrString { Type : intstr . Int , IntVal : 3306 } , } , } , } , } }
mysqlService creates a new Service for a MySQL
mysqlService creates a new Service for a MySQL