func BuildStatefulSet()

in internal/testhelpers/resources.go [241:259]


func BuildStatefulSet(name types.NamespacedName, appLabel string) *appsv1.StatefulSet {
	var two int32 = 2
	return &appsv1.StatefulSet{
		TypeMeta: metav1.TypeMeta{Kind: "StatefulSet", APIVersion: "apps/v1"},
		ObjectMeta: metav1.ObjectMeta{
			Name:      name.Name,
			Namespace: name.Namespace,
			Labels:    map[string]string{"app": appLabel},
		},
		Spec: appsv1.StatefulSetSpec{
			Replicas:       &two,
			UpdateStrategy: appsv1.StatefulSetUpdateStrategy{Type: "RollingUpdate"},
			Selector: &metav1.LabelSelector{
				MatchLabels: map[string]string{"app": appLabel},
			},
			Template: buildPodTemplateSpec(3600, appLabel),
		},
	}
}