package gitops

import (
	corev1 "k8s.io/api/core/v1"

	cloudv1 "github.com/tidbcloud/infra-api/api/v1"
)

// ConfigProvider is the interface to access the specs managed by gitops
// Note: only part of the providers ships with gitops support, try to access machine spec for an unsupported provider
// will result an error.
type ConfigProvider interface {
	GetMachineSpec(provider *cloudv1.Provider, component cloudv1.ClusterComponent) (*MachineSpec, error)
	GetResourceSpec(provider *cloudv1.Provider, component cloudv1.ClusterComponent) (*ResourceSpec, error)
}

type MachineSpec struct {
	MachineType  string
	MachineImage string

	SystemVolumeType string
	SystemVolumeSize string
}

type ResourceSpec struct {
	Resources    corev1.ResourceRequirements
	StorageClass string
}
