Documentation ¶
Index ¶
- func CloseClusterForTenant(cluster *api.ClusterSource, tenant string) error
- func ContinueWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
- func CreateAdminTenant() error
- func CreateIntegration(ctx context.Context, tenant string, in *api.Integration) (*api.Integration, error)
- func CreateProject(ctx context.Context, tenant string, project *v1alpha1.Project) (*v1alpha1.Project, error)
- func CreateResource(ctx context.Context, project, tenant string, rsc *v1alpha1.Resource) (*v1alpha1.Resource, error)
- func CreateStage(ctx context.Context, project, tenant string, stg *v1alpha1.Stage) (*v1alpha1.Stage, error)
- func CreateTemplate(ctx context.Context, tenant string, stage *v1alpha1.Stage) (*v1alpha1.Stage, error)
- func CreateTenant(ctx context.Context, tenant *api.Tenant) (*api.Tenant, error)
- func CreateWorkflow(ctx context.Context, project, tenant string, wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
- func CreateWorkflowRun(ctx context.Context, project, workflow, tenant string, ...) (*v1alpha1.WorkflowRun, error)
- func CreateWorkflowTrigger(ctx context.Context, project, tenant string, wft *v1alpha1.WorkflowTrigger) (*v1alpha1.WorkflowTrigger, error)
- func DeleteIntegration(ctx context.Context, tenant, name string) error
- func DeleteProject(ctx context.Context, tenant, project string) error
- func DeleteResource(ctx context.Context, project, resource, tenant string) error
- func DeleteStage(ctx context.Context, project, stage, tenant string) error
- func DeleteTemplate(ctx context.Context, tenant, template string) error
- func DeleteTenant(ctx context.Context, name string) error
- func DeleteWorkflow(ctx context.Context, project, workflow, tenant string) error
- func DeleteWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) error
- func DeleteWorkflowTrigger(ctx context.Context, project, workflowtrigger, tenant string) error
- func GenerateNameModifier(tenant, project, wf string, object interface{}) error
- func GetContainerLogStream(ctx context.Context, ...) error
- func GetContainerLogs(ctx context.Context, ...) ([]byte, map[string]string, error)
- func GetIntegration(ctx context.Context, tenant, name string) (*api.Integration, error)
- func GetProject(ctx context.Context, tenant, name string) (*v1alpha1.Project, error)
- func GetResource(ctx context.Context, project, resource, tenant string) (*v1alpha1.Resource, error)
- func GetStage(ctx context.Context, project, stage, tenant string) (*v1alpha1.Stage, error)
- func GetTemplate(ctx context.Context, tenant, template string, includePublic bool) (*v1alpha1.Stage, error)
- func GetTenant(ctx context.Context, name string) (*api.Tenant, error)
- func GetWokerClusters(tenant string) ([]api.Integration, error)
- func GetWorkflow(ctx context.Context, project, workflow, tenant string) (*v1alpha1.Workflow, error)
- func GetWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
- func GetWorkflowTrigger(ctx context.Context, project, workflowtrigger, tenant string) (*v1alpha1.WorkflowTrigger, error)
- func InjectProjectLabelModifier(tenant, project, wf string, object interface{}) error
- func LabelCustomizedTemplate(stage *v1alpha1.Stage)
- func LabelStageTemplate(stage *v1alpha1.Stage)
- func ListIntegrations(ctx context.Context, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func ListProjects(ctx context.Context, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func ListResources(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func ListStages(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func ListTemplates(ctx context.Context, tenant string, includePublic bool, ...) (*types.ListResponse, error)
- func ListTenants(ctx context.Context, pagination *types.Pagination) (*types.ListResponse, error)
- func ListWorkflowRuns(ctx context.Context, project, workflow, tenant string, ...) (*types.ListResponse, error)
- func ListWorkflowTriggers(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func ListWorkflows(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
- func NamespaceToTenant(namespace *core_v1.Namespace) (*api.Tenant, error)
- func OpenClusterForTenant(cluster *api.ClusterSource, tenantName string) error
- func PauseWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
- func ReceiveContainerLogStream(ctx context.Context, ...) error
- func SecretToIntegration(secret *core_v1.Secret) (*api.Integration, error)
- func TenantModifier(tenant, project, wf string, object interface{}) error
- func UpdateAnnotations(oldm, newm map[string]string) map[string]string
- func UpdateIntegration(ctx context.Context, tenant, name string, in *api.Integration) (*api.Integration, error)
- func UpdateProject(ctx context.Context, tenant, pName string, project *v1alpha1.Project) (*v1alpha1.Project, error)
- func UpdateResource(ctx context.Context, project, resource, tenant string, rsc *v1alpha1.Resource) (*v1alpha1.Resource, error)
- func UpdateStage(ctx context.Context, project, stage, tenant string, stg *v1alpha1.Stage) (*v1alpha1.Stage, error)
- func UpdateTemplate(ctx context.Context, tenant, template string, stage *v1alpha1.Stage) (*v1alpha1.Stage, error)
- func UpdateTenant(ctx context.Context, name string, newTenant *api.Tenant) (*api.Tenant, error)
- func UpdateWorkflow(ctx context.Context, project, workflow, tenant string, wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
- func UpdateWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string, ...) (*v1alpha1.WorkflowRun, error)
- func UpdateWorkflowTrigger(ctx context.Context, project, workflowtrigger, tenant string, ...) (*v1alpha1.WorkflowTrigger, error)
- func WorkflowRunModifier(tenant, project, wf string, object interface{}) error
- type CreationModifier
- type GetMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseClusterForTenant ¶
func CloseClusterForTenant(cluster *api.ClusterSource, tenant string) error
CloseClusterForTenant close worker cluster for the tenant. It is dangerous since all pvc data will lost.
func ContinueWorkflowRun ¶
func ContinueWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
ContinueWorkflowRun updates the workflowrun overall status to Running.
func CreateAdminTenant ¶
func CreateAdminTenant() error
CreateAdminTenant creates cyclone admin tenant and initialize the tenant: - Create namespace - Create PVC - Load and create stage templates
func CreateIntegration ¶
func CreateIntegration(ctx context.Context, tenant string, in *api.Integration) (*api.Integration, error)
CreateIntegration creates an integration to store external system info for the tenant.
func CreateProject ¶
func CreateProject(ctx context.Context, tenant string, project *v1alpha1.Project) (*v1alpha1.Project, error)
CreateProject creates a project for the tenant.
func CreateResource ¶
func CreateResource(ctx context.Context, project, tenant string, rsc *v1alpha1.Resource) (*v1alpha1.Resource, error)
CreateResource ...
func CreateStage ¶
func CreateStage(ctx context.Context, project, tenant string, stg *v1alpha1.Stage) (*v1alpha1.Stage, error)
CreateStage ...
func CreateTemplate ¶
func CreateTemplate(ctx context.Context, tenant string, stage *v1alpha1.Stage) (*v1alpha1.Stage, error)
CreateTemplate creates a stage template for the tenant. 'stage' describe the template to create. Stage templates are special stages, with 'cyclone.io/stage-template' label. If created successfully, return the create template.
func CreateTenant ¶
CreateTenant creates a cyclone tenant
func CreateWorkflow ¶
func CreateWorkflow(ctx context.Context, project, tenant string, wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
CreateWorkflow ...
func CreateWorkflowRun ¶
func CreateWorkflowRun(ctx context.Context, project, workflow, tenant string, wfr *v1alpha1.WorkflowRun) (*v1alpha1.WorkflowRun, error)
CreateWorkflowRun ...
func CreateWorkflowTrigger ¶
func CreateWorkflowTrigger(ctx context.Context, project, tenant string, wft *v1alpha1.WorkflowTrigger) (*v1alpha1.WorkflowTrigger, error)
CreateWorkflowTrigger ...
func DeleteIntegration ¶
DeleteIntegration deletes a integration with the given tenant and name.
func DeleteProject ¶
DeleteProject deletes a project with the given tenant and project name.
func DeleteResource ¶
DeleteResource ...
func DeleteStage ¶
DeleteStage ...
func DeleteTemplate ¶
DeleteTemplate deletes a stage template with the given tenant and template name.
func DeleteTenant ¶
DeleteTenant deletes a tenant
func DeleteWorkflow ¶
DeleteWorkflow ...
func DeleteWorkflowRun ¶
DeleteWorkflowRun ...
func DeleteWorkflowTrigger ¶
DeleteWorkflowTrigger ...
func GenerateNameModifier ¶
GenerateNameModifier is a modifier of create cyclone CRD resources. It will give the resource a name if it is empty.
func GetContainerLogStream ¶
func GetContainerLogStream(ctx context.Context, project, workflow, workflowrun, tenant, stage, container string) error
GetContainerLogStream gets real-time log of container within stage.
func GetContainerLogs ¶
func GetContainerLogs(ctx context.Context, project, workflow, workflowrun, tenant, stage, container string, download bool) ([]byte, map[string]string, error)
GetContainerLogs handles the request to get container logs, only supports finished stage records.
func GetIntegration ¶
GetIntegration gets an integration with the given name under given tenant.
func GetProject ¶
GetProject gets a project with the given project name under given tenant.
func GetResource ¶
GetResource ...
func GetTemplate ¶
func GetTemplate(ctx context.Context, tenant, template string, includePublic bool) (*v1alpha1.Stage, error)
GetTemplate gets a stage template with the given template name under given tenant.
func GetWokerClusters ¶
func GetWokerClusters(tenant string) ([]api.Integration, error)
GetWokerClusters gets all clusters which are use to perform workload
func GetWorkflow ¶
GetWorkflow ...
func GetWorkflowRun ¶
func GetWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
GetWorkflowRun ...
func GetWorkflowTrigger ¶
func GetWorkflowTrigger(ctx context.Context, project, workflowtrigger, tenant string) (*v1alpha1.WorkflowTrigger, error)
GetWorkflowTrigger ...
func InjectProjectLabelModifier ¶
InjectProjectLabelModifier is a modifier of create cyclone CRD resources. It will add project labels for the resource.
func LabelCustomizedTemplate ¶
LabelCustomizedTemplate gives a label to indicate that this is a customized template
func LabelStageTemplate ¶
LabelStageTemplate gives a label to indicate that this stage is a stage template
func ListIntegrations ¶
func ListIntegrations(ctx context.Context, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListIntegrations get integrations the given tenant has access to. - ctx Context of the reqeust - tenant Tenant - pagination Pagination with page and limit.
func ListProjects ¶
func ListProjects(ctx context.Context, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListProjects list projects the given tenant has access to. - ctx Context of the reqeust - tenant Tenant - pagination Pagination with page and limit.
func ListResources ¶
func ListResources(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListResources ...
func ListStages ¶
func ListStages(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListStages ...
func ListTemplates ¶
func ListTemplates(ctx context.Context, tenant string, includePublic bool, pagination *types.Pagination) (*types.ListResponse, error)
ListTemplates get templates the given tenant has access to. - ctx Context of the reqeust - tenant Tenant - includePublic Whether to include system level stage templates, default to true - pagination Pagination with page and limit.
func ListTenants ¶
func ListTenants(ctx context.Context, pagination *types.Pagination) (*types.ListResponse, error)
ListTenants list all tenants' information
func ListWorkflowRuns ¶
func ListWorkflowRuns(ctx context.Context, project, workflow, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListWorkflowRuns ...
func ListWorkflowTriggers ¶
func ListWorkflowTriggers(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListWorkflowTriggers ...
func ListWorkflows ¶
func ListWorkflows(ctx context.Context, project, tenant string, pagination *types.Pagination) (*types.ListResponse, error)
ListWorkflows ...
func NamespaceToTenant ¶
NamespaceToTenant trans namespace to tenant
func OpenClusterForTenant ¶
func OpenClusterForTenant(cluster *api.ClusterSource, tenantName string) error
OpenClusterForTenant opens cluster to run workload.
func PauseWorkflowRun ¶
func PauseWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string) (*v1alpha1.WorkflowRun, error)
PauseWorkflowRun updates the workflowrun overall status to Waiting.
func ReceiveContainerLogStream ¶
func ReceiveContainerLogStream(ctx context.Context, project, workflow, workflowrun, tenant, stage, container string) error
ReceiveContainerLogStream receives real-time log of container within workflowrun stage.
func SecretToIntegration ¶
func SecretToIntegration(secret *core_v1.Secret) (*api.Integration, error)
SecretToIntegration translates secret to integration
func TenantModifier ¶
TenantModifier is a modifier of create cyclone tenant. This modifier will give some default value for tenant if it is nil.
func UpdateAnnotations ¶
UpdateAnnotations updates alias and description annotations
func UpdateIntegration ¶
func UpdateIntegration(ctx context.Context, tenant, name string, in *api.Integration) (*api.Integration, error)
UpdateIntegration updates an integration with the given tenant name and integration name. If updated successfully, return the updated integration.
func UpdateProject ¶
func UpdateProject(ctx context.Context, tenant, pName string, project *v1alpha1.Project) (*v1alpha1.Project, error)
UpdateProject updates a project with the given tenant name and project name. If updated successfully, return the updated project.
func UpdateResource ¶
func UpdateResource(ctx context.Context, project, resource, tenant string, rsc *v1alpha1.Resource) (*v1alpha1.Resource, error)
UpdateResource ...
func UpdateStage ¶
func UpdateStage(ctx context.Context, project, stage, tenant string, stg *v1alpha1.Stage) (*v1alpha1.Stage, error)
UpdateStage ...
func UpdateTemplate ¶
func UpdateTemplate(ctx context.Context, tenant, template string, stage *v1alpha1.Stage) (*v1alpha1.Stage, error)
UpdateTemplate updates a stage templates with the given tenant name and template name. If updated successfully, return the updated template.
func UpdateTenant ¶
UpdateTenant updates information for a specific tenant
func UpdateWorkflow ¶
func UpdateWorkflow(ctx context.Context, project, workflow, tenant string, wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
UpdateWorkflow ...
func UpdateWorkflowRun ¶
func UpdateWorkflowRun(ctx context.Context, project, workflow, workflowrun, tenant string, wfr *v1alpha1.WorkflowRun) (*v1alpha1.WorkflowRun, error)
UpdateWorkflowRun ...
func UpdateWorkflowTrigger ¶
func UpdateWorkflowTrigger(ctx context.Context, project, workflowtrigger, tenant string, wft *v1alpha1.WorkflowTrigger) (*v1alpha1.WorkflowTrigger, error)
UpdateWorkflowTrigger ...
func WorkflowRunModifier ¶
WorkflowRunModifier is a modifier of create cyclone workflowrun resources. It will add workflow labels for workflowrun.
Types ¶
type CreationModifier ¶
CreationModifier is used in creating cyclone resources. It's used to modify cyclone resources.
type GetMetadata ¶
type GetMetadata func(string, string) (meta_v1.ObjectMeta, error)
GetMetadata gets metadata of a type of k8s resources