Documentation ¶
Index ¶
- Constants
- func CreateNamespace(tenant string, client *kubernetes.Clientset) error
- func CreateResourceQuota(tenant *api.Tenant, namespace string, client *kubernetes.Clientset) error
- func NamespaceTenant(n string) string
- func ParseResourceList(resources map[core_v1.ResourceName]string) (map[core_v1.ResourceName]resource.Quantity, error)
- func TenantNamespace(tenant string) string
- func TenantPVC(tenant string) string
- func TenantResourceQuota(tenant string) string
- func UpdateResourceQuota(tenant *api.Tenant, namespace string, client *kubernetes.Clientset) error
Constants ¶
View Source
const ( // DefaultTenant is the name of the cyclone default tenant, it's a default tenant created // when Cyclone start. DefaultTenant = "system" // TenantNamespacePrefix is the prefix of namespace which related to a specific tenant TenantNamespacePrefix = "cyclone-" // TenantPVCPrefix is the prefix of pvc which related to a specific tenant TenantPVCPrefix = "cyclone-pvc-" // DefaultPVCSize is the default size of pvc DefaultPVCSize = "5Gi" // SceneCICD is the label value used to indicate cyclone CI/CD scenario SceneCICD = "cicd" // SceneAI is the label value used to indicate cyclone AI scenario SceneAI = "ai" // CronTimerTrigger represents the trigger of workflowruns triggered by cron timer. CronTimerTrigger = "cron-timer" // QuotaCPULimit represents default value of 'limits.cpu' QuotaCPULimit = "2" // QuotaCPURequest represents default value of 'requests.cpu' QuotaCPURequest = "1" // QuotaMemoryLimit represents default value of 'limits.memory' QuotaMemoryLimit = "4Gi" // QuotaMemoryRequest represents default value of 'requests.memory' QuotaMemoryRequest = "2Gi" // SecretKeyIntegration is the key of the secret dada to indicate its value is about integration information. SecretKeyIntegration = "integration" // CachePrefixPath is the prefix path of acceleration caches CachePrefixPath = "caches" )
Variables ¶
This section is empty.
Functions ¶
func CreateNamespace ¶
func CreateNamespace(tenant string, client *kubernetes.Clientset) error
CreateNamespace creates a namespace
func CreateResourceQuota ¶
CreateResourceQuota creates resource quota for tenant
func NamespaceTenant ¶
NamespaceTenant retrieves tenant from given namespace name.
func ParseResourceList ¶
func ParseResourceList(resources map[core_v1.ResourceName]string) (map[core_v1.ResourceName]resource.Quantity, error)
ParseResourceList parse resouces from 'map[string]string' to 'ResourceList'
func TenantNamespace ¶
TenantNamespace gets namespace from given tenant name.
func TenantResourceQuota ¶
TenantResourceQuota returns resource quota name related the tenant
func UpdateResourceQuota ¶
UpdateResourceQuota updates resource quota for tenant
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.