Documentation ¶
Index ¶
- Constants
- Variables
- func GetGCClusterRole(ctx context.Context, clnt client.Client) (rbacv1.ClusterRole, error)
- func GetOrCreateGCClusterRole(clnt client.Client) (*rbacv1.ClusterRole, error)
- func GetServiceAddress(svc *corev1.Service, portName string) (string, error)
- func GetServiceDNS(svc *corev1.Service) string
- func ServerHasAPIGroup(apiGroupName string) (bool, error)
- func ServerHasResourceInAPIGroupVersion(resourceName, apiGroupVersion string) (bool, error)
- func SetBootStrapImageStruct(dep *appsv1.Deployment, componentspec v1alpha1.AlamedaComponentSpec, ...)
- func SetDaemonSetImagePullPolicy(ds *appsv1.DaemonSet, ctn string, imagePullPolicy corev1.PullPolicy)
- func SetImagePullPolicy(dep *appsv1.Deployment, ctn string, imagePullPolicy corev1.PullPolicy)
- func SetStatefulSetImagePullPolicy(sts *appsv1.StatefulSet, ctn string, imagePullPolicy corev1.PullPolicy)
- 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
- func StringSliceDelete(slice1 []string, slice2 []string) []string
- type GroupEnums
Constants ¶
View Source
const ( Openshift_FEDEMETER_WORKER_NODE_LOWER_LIMIT = "1" Openshift_FEDEMETER_FILTER_TABLE = "no_filter" NKS_FEDEMETER_WORKER_NODE_LOWER_LIMIT = "2" NKS_FEDEMETER_FILTER_TABLE = "stackpoint_filter" 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" AlamedadispatcherDPN = "alameda-ai-dispatcher" AlamedaRabbitMQDPN = "alameda-rabbitmq" FedemeterDPN = "fedemeter-api" GrafanaDPN = "alameda-grafana" InfluxdbDPN = "alameda-influxdb" AlamedaweavescopeDPN = "alameda-weave-scope-app" AlamedaweavescopeProbeDPN = "alameda-weave-scope-cluster-agent" AlamedaanalyzerDPN = "alameda-analyzer" AlamedaNotifierDPN = "alameda-notifier" FederatoraiAgentDPN = "federatorai-agent" FederatoraiAgentAppDPN = "federatorai-agent-app" FederatoraiAgentGPUDPN = "federatorai-agent-gpu" FederatoraiRestDPN = "federatorai-rest" FederatoraiAgentPreloaderDPN = "federatorai-agent-preloader" FederatoraiFrontendDPN = "federatorai-dashboard-frontend" FederatoraiBackendDPN = "federatorai-dashboard-backend" //DaemonSet name AlamedaweavescopeAgentDS = "alameda-weave-scope-agent" //container name AlamedaaiCTN = "alameda-ai-engine" AlamedaoperatorCTN = "alameda-operator" AlamedadatahubCTN = "alameda-datahub" AlamedaevictionerCTN = "alameda-evictioner" AdmissioncontrollerCTN = "admission-controller" AlamedarecommenderCTN = "alameda-recommender" AlamedaexecutorCTN = "alameda-executor" AlamedadispatcherCTN = "ai-dispatcher" AlamedaRabbitMQCTN = "rabbitmq" FedemeterCTN = "fedemeter-api" FedemeterInfluxDBCTN = "fedemeter-influxdb" GetTokenCTN = "gettoken" GrafanaCTN = "grafana" InfluxdbCTN = "influxdb" AlamedaweavescopeCTN = "alameda-weave-scope-app" AlamedaweavescopeProbeCTN = "alameda-weave-scope-cluster-agent" AlamedaweavescopeAgentCTN = "alameda-weave-scope-agent" AlamedaanalyzerCTN = "alameda-analyzer" AlamedaNofitierCTN = "alameda-notifier" FederatoraiAgentCTN = "federatorai-agent" FederatoraiAgentGPUCTN = "federatorai-agent-gpu" FederatoraiAgentAppCTN = "federatorai-agent-app" FederatoraiRestCTN = "federatorai-rest" FederatoraiAgentPreloaderCTN = "federatorai-agent-preloader" FederatoraiBackendCTN = "federatorai-dashboard-backend" FederatoraiFrontendCTN = "federatorai-dashboard-frontend" //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 DefaultNamespace = "federatorai" NamespaceServiceAccount = "serviceaccount:federatorai" //MountPath DataMountPath = "/var/lib" LogMountPath = "/var/log" //Delete Deployment When Modify ConfigMap or Service(Temporary strategy) GrafanaYaml = "Deployment/alameda-grafanaDM.yaml" GrafanaDatasourcesName = "grafana-datasources" // Influxdb environment variables name AlamedaInfluxDBAdminUserEnvName = "INFLUXDB_ADMIN_USER" AlamedaInfluxDBAdminPasswordEnvName = "INFLUXDB_ADMIN_PASSWORD" AlamedaInfluxDBHTTPSEnabledEnvName = "INFLUXDB_HTTP_HTTPS_ENABLED" AlamedaInfluxDBAPIPort = 8086 )
Variables ¶
View Source
var ( //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 GetGCClusterRole ¶
func GetOrCreateGCClusterRole ¶
func GetOrCreateGCClusterRole(clnt client.Client) (*rbacv1.ClusterRole, error)
func GetServiceAddress ¶ added in v0.9.1
GetServiceAddress returns address combining dns name with port number base on port name
func GetServiceDNS ¶ added in v0.9.1
GetServiceDNS returns service dns
func ServerHasAPIGroup ¶
func SetBootStrapImageStruct ¶
func SetBootStrapImageStruct(dep *appsv1.Deployment, componentspec v1alpha1.AlamedaComponentSpec, ctn string)
func SetDaemonSetImagePullPolicy ¶ added in v0.2.35
func SetDaemonSetImagePullPolicy(ds *appsv1.DaemonSet, ctn string, imagePullPolicy corev1.PullPolicy)
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 SetStatefulSetImagePullPolicy ¶ added in v0.9.1
func SetStatefulSetImagePullPolicy(sts *appsv1.StatefulSet, ctn string, imagePullPolicy corev1.PullPolicy)
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
func StringSliceDelete ¶ added in v0.9.1
StringSliceDelete removes elements in slice2 from slice1
Types ¶
type GroupEnums ¶
type GroupEnums string
Click to show internal directories.
Click to hide internal directories.