// createApplicationSet creates an ApplicationSet object with labels for the Application template
createApplicationSet creates an ApplicationSet object with labels for the Application template
// createApplicationSet creates an ApplicationSet object with labels for the Application template
func createApplicationSetWithLabels(ctx context.Context, name string, namespace string, labels map[string]string) (applicationset.ApplicationSet, error) {
	applicationSet := applicationset.ApplicationSet{
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: namespace,
		},
		Spec: applicationset.ApplicationSetSpec{
			Template: applicationset.ApplicationSetTemplate{
				ApplicationSetTemplateMeta: applicationset.ApplicationSetTemplateMeta{
					Name:      name,
					Namespace: namespace,
					Labels:    labels,
				},
			},
			Generators: []applicationset.ApplicationSetGenerator{{}},
		},
	}
	if err := k8sClient.Create(ctx, &applicationSet); err != nil {
		return applicationset.ApplicationSet{}, err
	}
	return applicationSet, nil
}
func createApplicationSetWithLabels ( ctx context . Context , name string , namespace string , labels map [ string ] string ) ( applicationset . ApplicationSet , error ) { applicationSet := applicationset . ApplicationSet { ObjectMeta : metav1 . ObjectMeta { Name : name , Namespace : namespace , } , Spec : applicationset . ApplicationSetSpec { Template : applicationset . ApplicationSetTemplate { ApplicationSetTemplateMeta : applicationset . ApplicationSetTemplateMeta { Name : name , Namespace : namespace , Labels : labels , } , } , Generators : [ ] applicationset . ApplicationSetGenerator { { } } , } , } if err := k8sClient . Create ( ctx , & applicationSet ) ; err != nil { return applicationset . ApplicationSet { } , err } return applicationSet , nil }
createApplicationSet creates an ApplicationSet object with labels for the Application template
createApplicationSet creates an ApplicationSet object with labels for the Application template