// HPA returns a HPA instance with specified config values for HPA version v2beta1
HPA returns a HPA instance with specified config values for HPA version v2beta1
// HPA returns a HPA instance with specified config values for HPA version v2beta1
func HPAv2beta1(api *wso2v1alpha1.API, dep *appsv1.Deployment, owner *[]metav1.OwnerReference) *v2beta1.HorizontalPodAutoscaler {
	targetResource := v2beta1.CrossVersionObjectReference{
		Kind:       "Deployment",
		Name:       dep.Name,
		APIVersion: "apps/v1",
	}
	minReplicas := int32(api.Spec.Replicas)
	return &v2beta1.HorizontalPodAutoscaler{
		ObjectMeta: metav1.ObjectMeta{
			Name:            dep.Name,
			Namespace:       dep.Namespace,
			OwnerReferences: *owner,
		},
		Spec: v2beta1.HorizontalPodAutoscalerSpec{
			MinReplicas:    &minReplicas,
			MaxReplicas:    hpaMaxReplicas,
			ScaleTargetRef: targetResource,
			Metrics:        metricsHpaV2beta1,
		},
	}
}
func HPAv2beta1 ( api * wso2v1alpha1 . API , dep * appsv1 . Deployment , owner * [ ] metav1 . OwnerReference ) * v2beta1 . HorizontalPodAutoscaler { targetResource := v2beta1 . CrossVersionObjectReference { Kind : " " , Name : dep . Name , APIVersion : " " , } minReplicas := int32 ( api . Spec . Replicas ) return & v2beta1 . HorizontalPodAutoscaler { ObjectMeta : metav1 . ObjectMeta { Name : dep . Name , Namespace : dep . Namespace , OwnerReferences : * owner , } , Spec : v2beta1 . HorizontalPodAutoscalerSpec { MinReplicas : & minReplicas , MaxReplicas : hpaMaxReplicas , ScaleTargetRef : targetResource , Metrics : metricsHpaV2beta1 , } , } }
HPA returns a HPA instance with specified config values for HPA version v2beta1
HPA returns a HPA instance with specified config values for HPA version v2beta1
// target resource // min replicas // HPA instance