// MakeService generates, but does not create, a Service for the given
// DockerHubSource.
MakeService generates, but does not create, a Service for the given
DockerHubSource.
// MakeService generates but does not create a Service for the given // DockerHubSource .
func MakeService(args *ServiceArgs) *v1.Service {
	labels := Labels(args.Source.Name)
	ksvc := &v1.Service{
		ObjectMeta: metav1.ObjectMeta{
			GenerateName: fmt.Sprintf("%s-", args.Source.Name),
			Namespace:    args.Source.Namespace,
			Labels:       labels,
			OwnerReferences: []metav1.OwnerReference{
				*kmeta.NewControllerRef(args.Source),
			},
		},
		Spec: v1.ServiceSpec{
			ConfigurationSpec: v1.ConfigurationSpec{
				Template: v1.RevisionTemplateSpec{
					Spec: v1.RevisionSpec{
						PodSpec: corev1.PodSpec{
							Containers: []corev1.Container{{
								Image: args.ReceiveAdapterImage,
								Env:   args.GetEnv(),
							}},
						},
					},
				},
			},
		},
	}
	ksvc.Spec.Template.Spec.SetDefaults(args.Context)
	return ksvc
}
func MakeService ( args * ServiceArgs ) * v1 . Service { labels := Labels ( args . Source . Name ) ksvc := & v1 . Service { ObjectMeta : metav1 . ObjectMeta { GenerateName : fmt . Sprintf ( " " , args . Source . Name ) , Namespace : args . Source . Namespace , Labels : labels , OwnerReferences : [ ] metav1 . OwnerReference { * kmeta . NewControllerRef ( args . Source ) , } , } , Spec : v1 . ServiceSpec { ConfigurationSpec : v1 . ConfigurationSpec { Template : v1 . RevisionTemplateSpec { Spec : v1 . RevisionSpec { PodSpec : corev1 . PodSpec { Containers : [ ] corev1 . Container { { Image : args . ReceiveAdapterImage , Env : args . GetEnv ( ) , } } , } , } , } , } , } , } ksvc . Spec . Template . Spec . SetDefaults ( args . Context ) return ksvc }
MakeService generates, but does not create, a Service for the given
DockerHubSource.
MakeService generates but does not create a Service for the given DockerHubSource .