Documentation ¶
Index ¶
- Constants
- Variables
- func SetBootStrapImageStruct(dep *appsv1.Deployment, componentspec v1alpha1.AlamedaComponentSpec, ...)
- func SetImagePullPolicy(dep *appsv1.Deployment, ctn string, imagePullPolicy corev1.PullPolicy)
- func SetImageStruct(dep *appsv1.Deployment, value interface{}, ctn string)
- func SetStatefulsetImageStruct(ss *appsv1.StatefulSet, value interface{}, ctn string)
- func SetStorageToMountPath(dep *appsv1.Deployment, storagestructs []v1alpha1.StorageSpec, ctn string, ...)
- func SetStorageToPersistentVolumeClaimSpec(pvc *corev1.PersistentVolumeClaim, storagestructs []v1alpha1.StorageSpec, ...)
- func SetStorageToVolumeSource(dep *appsv1.Deployment, storagestructs []v1alpha1.StorageSpec, ...)
- func StringInSlice(str string, list []string) bool
- type GroupEnums
Constants ¶
View Source
const ( FedemeterGroup GroupEnums = "alameda/fedemeter" AlamedaGroup GroupEnums = "alameda" GrafanaGroup GroupEnums = "grafana" InfluxDBGroup GroupEnums = "influxdb" //deployment name AlamedaaiDPN = "alameda-ai" AlamedaoperatorDPN = "alameda-operator" AlamedadatahubDPN = "alameda-datahub" AlamedaevictionerDPN = "alameda-evictioner" AdmissioncontrollerDPN = "admission-controller" AlamedarecommenderDPN = "alameda-recommender" AlamedaexecutorDPN = "alameda-executor" FedemeterDPN = "fedemeter-api" GrafanaDPN = "alameda-grafana" InfluxdbDPN = "alameda-influxdb" //container name AlamedaaiCTN = "alameda-ai-engine" AlamedaoperatorCTN = "alameda-operator" AlamedadatahubCTN = "alameda-datahub" AlamedaevictionerCTN = "alameda-evictioner" AdmissioncontrollerCTN = "admission-controller" AlamedarecommenderCTN = "alameda-recommender" AlamedaexecutorCTN = "alameda-executor" FedemeterCTN = "fedemeter-api" GetTokenCTN = "gettoken" GrafanaCTN = "grafana" InfluxdbCTN = "influxdb" //Statefulset name FedemeterInflixDBSSN = "fedemeter-influxdb" //CRD NAME AlamedaScalerName = "alamedascalers.autoscaling.containers.ai" AlamedaRecommendationName = "alamedarecommendations.autoscaling.containers.ai" //CRD Version OriAlamedaOperatorVersion = "v0.3.8" //AlamedaService modify Prometheus's var OriginPrometheus_URL = "https://prometheus-k8s.openshift-monitoring.svc:9091" OriginDeploymentPrometheusLocation = "ALAMEDA_DATAHUB_PROMETHEUS_URL" OriginComfigMapPrometheusLocation = "prometheus.yaml" NamespaceService = "federatorai.svc" DefaultNamespace = "federatorai" //MountPath DataMountPath = "/var/lib" LogMountPath = "/var/log" //Recommandation config OriginComfigMapRecommandation = "config.toml" //Execution config OriginComfigMapExecution = "config.yml" //fedemeter config OriginComfigMapFedemeterInfluxDBHost = "FEDEMETER_INFLUXDB_HOST" OriginComfigMapFedemeterDataHubHost = "DATAHUB_HOST" //Delete Deployment When Modify ConfigMap or Service(Temporary strategy) GrafanaYaml = "Deployment/alameda-grafanaDM.yaml" GrafanaDatasourcesName = "grafana-datasources" )
Variables ¶
View Source
var ( ConfigKeyList = []string{OriginComfigMapRecommandation, OriginComfigMapExecution, OriginComfigMapFedemeterInfluxDBHost, OriginComfigMapFedemeterDataHubHost} //if disable resource protection Disable_operand_resource_protection = "false" //AlamedaScaler version AlamedaScalerVersion = []string{"v1", "v2"} V1scalerOperatorVersionList = []string{"v0.3.6", "v0.3.7", "v0.3.8", "v0.3.9", "v0.3.10", "v0.3.11", "v0.3.12"} )
Functions ¶
func SetBootStrapImageStruct ¶
func SetBootStrapImageStruct(dep *appsv1.Deployment, componentspec v1alpha1.AlamedaComponentSpec, ctn string)
func SetImagePullPolicy ¶
func SetImagePullPolicy(dep *appsv1.Deployment, ctn string, imagePullPolicy corev1.PullPolicy)
if user section schema set pullpolicy then AlamedaService set Containers image's pullpolicy
func SetImageStruct ¶
func SetImageStruct(dep *appsv1.Deployment, value interface{}, ctn string)
if user set related image struct then AlamedaService set Containers image structure
func SetStatefulsetImageStruct ¶ added in v0.2.30
func SetStatefulsetImageStruct(ss *appsv1.StatefulSet, value interface{}, ctn string)
func SetStorageToMountPath ¶
func SetStorageToMountPath(dep *appsv1.Deployment, storagestructs []v1alpha1.StorageSpec, ctn string, volumeName string, group GroupEnums)
if user set pvc then AlamedaService set pvc to Deployment's MountPath
func SetStorageToPersistentVolumeClaimSpec ¶
func SetStorageToPersistentVolumeClaimSpec(pvc *corev1.PersistentVolumeClaim, storagestructs []v1alpha1.StorageSpec, pvctype v1alpha1.Usage)
if user set pvc then AlamedaService set PersistentVolumeClaimSpec
func SetStorageToVolumeSource ¶
func SetStorageToVolumeSource(dep *appsv1.Deployment, storagestructs []v1alpha1.StorageSpec, volumeName string, group GroupEnums)
if user set pvc then AlamedaService set pvc to Deployment's VolumeSource
func StringInSlice ¶ added in v0.2.5
Types ¶
type GroupEnums ¶
type GroupEnums string
Click to show internal directories.
Click to hide internal directories.