@@ -101,22 +101,58 @@ type GPUPoolDefinition struct {
101101
102102// ComputingVendorConfig defines the Cloud vendor connection such as AWS, GCP, Azure etc.
103103type ComputingVendorConfig struct {
104- Name string `json:"name,omitempty"` // Name of the computing vendor.
105- Type string `json:"type,omitempty"` // Type of the computing vendor (e.g., aws, lambdalabs, gcp, azure, together.ai).
106- AuthType string `json:"authType,omitempty"` // Authentication type (e.g., accessKey, serviceAccount).
104+ Name string `json:"name,omitempty"`
105+
106+ // support popular cloud providers
107+ Type ComputingVendorName `json:"type,omitempty"`
108+
109+ AuthType AuthTypeEnum `json:"authType,omitempty"` // Authentication type (e.g., accessKey, serviceAccount).
107110
108111 // +optional
112+ // +kubebuilder:default=true
109113 Enable * bool `json:"enable,omitempty"` // Enable or disable the computing vendor.
110114
111- GPUNodeControllerType string `json:"gpuNodeControllerType,omitempty"` // Type of GPU node controller (e.g., asg, karpenter, native).
112- Params ComputingVendorParams `json:"params,omitempty"`
115+ Params ComputingVendorParams `json:"params,omitempty"`
113116}
114117
118+ // +kubebuilder:validation:Enum=accessKey;serviceAccountRole
119+ type AuthTypeEnum string
120+
121+ const (
122+ AuthTypeAccessKey AuthTypeEnum = "accessKey"
123+ AuthTypeServiceAccountRole AuthTypeEnum = "serviceAccountRole"
124+ )
125+
126+ // +kubebuilder:validation:Enum=aws;lambda-labs;gcp;azure;oracle-oci;ibm;openshift;vultr;together-ai;aliyun;nvidia;tencent;runpod
127+ type ComputingVendorName string
128+
129+ const (
130+ ComputingVendorAWS ComputingVendorName = "aws"
131+ ComputingVendorGCP ComputingVendorName = "gcp"
132+ ComputingVendorAzure ComputingVendorName = "azure"
133+ ComputingVendorOracle ComputingVendorName = "oracle-oci"
134+ ComputingVendorIBM ComputingVendorName = "ibm"
135+ ComputingVendorOpenShift ComputingVendorName = "openshift"
136+ ComputingVendorVultr ComputingVendorName = "vultr"
137+ ComputingVendorTogetherAI ComputingVendorName = "together-ai"
138+ ComputingVendorLambdaLabs ComputingVendorName = "lambda-labs"
139+ ComputingVendorAliyun ComputingVendorName = "aliyun"
140+ ComputingVendorNvidia ComputingVendorName = "nvidia"
141+ ComputingVendorTencent ComputingVendorName = "tencent"
142+ ComputingVendorRunPod ComputingVendorName = "runpod"
143+ )
144+
115145type ComputingVendorParams struct {
116- Region string `json:"region,omitempty"` // Region for the computing vendor.
117- AccessKey string `json:"accessKey,omitempty"` // Access key for the computing vendor.
118- SecretKey string `json:"secretKey,omitempty"` // Secret key for the computing vendor.
119- IAMRole string `json:"iamRole,omitempty"` // IAM role for the computing vendor like AWS
146+ DefaultRegion string `json:"defaultRegion,omitempty"` // Region for the computing vendor.
147+
148+ // the secret of access key and secret key, must be mounted as env var or file path
149+ AccessKeyPath string `json:"accessKeyPath,omitempty"`
150+ SecretKeyPath string `json:"secretKeyPath,omitempty"`
151+ AccessKeyEnvVar string `json:"accessKeyEnvVar,omitempty"`
152+ SecretKeyEnvVar string `json:"secretKeyEnvVar,omitempty"`
153+
154+ // preferred IAM role since it's more secure
155+ IAMRole string `json:"iamRole,omitempty"`
120156}
121157
122158// StorageVendorConfig defines Postgres database with extensions for timeseries storage and other resource aggregation results, system events and diagnostics reports etc.
0 commit comments