Documentation ¶
Index ¶
Constants ¶
const (
IDParamName = "name"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func NewAPI ¶
func NewAPI( clusterGroupManager *cgroup.Manager, deploymentManager *deployment.CGDeploymentManager, logger logrus.FieldLogger, baseErrorHandler emperror.Handler, ) *API
func (*API) AddRoutes ¶
func (a *API) AddRoutes(group *gin.RouterGroup)
AddRoutes adds cluster group deployments related API routes
func (*API) Create ¶
@Summary Create Cluster Group Deployment @Description creates a new cluster group deployment, installs or upgrades deployment on each member cluster accordingly @Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param deployment body deployment.ClusterGroupDeployment true "Deployment Create Request" @Success 201 {object} deployment.CreateUpdateDeploymentResponse "Multi-cluster deployment has been created successfully. All install / upgrade operations on all targeted clusters returned with no errors." @Success 207 {object} common.ErrorResponse "Partial failure, meaning that Multi-cluster deployment has been created successfully, however there was as least one failure on one of the target clusters" @Failure 400 {object} common.ErrorResponse @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments [post] @Security bearerAuth
func (*API) Delete ¶
@Summary Delete Cluster Group Deployment @Description deletes a cluster group deployment, also deleting deployments from member clusters @Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param deploymentName path string true "release name of a cluster group deployment" @Param force query boolean false "if true cluster group deployment gets deleted even if some deployments can not be deleted from each target cluster" @Success 202 {object} deployment.TargetClusterStatus "Multi-cluster deployment has been deleted successfully. All delete operations on all targeted clusters returned with no errors." @Success 207 {object} common.ErrorResponse "Partial failure, meaning that there was as least one failure on one of the target clusters" @Failure 400 {object} common.ErrorResponse Deployment Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments/{deploymentName} [delete] @Security bearerAuth
func (*API) Get ¶
@Summary Get Cluster Group Deployment @Description retrieve info about a cluster group deployment and it's status on each member cluster @Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param deploymentName path string true "release name of a cluster group deployment" @Success 200 {object} deployment.DeploymentInfo @Failure 400 {object} common.ErrorResponse Deployment Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments/{deploymentName} [get] @Security bearerAuth
func (*API) List ¶
@Summary Get All Deployments of a Cluster Group @Description retrieve all deployments from a cluster group @Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Success 200 {array} deployment.ListDeploymentResponse @Failure 400 {object} common.ErrorResponse Deployment Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments [get] @Security bearerAuth
func (*API) Sync ¶
@Summary Synchronize Cluster Group Deployment @Description install / upgrade deployment to target clusters where deployment is not found or has wrong
version/values (like somebody deleted, updated the deployment on that given cluster using Single Cluster Deployment API), deletes deployment from target clusters which are not member of a cluster group anymore
@Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param deploymentName path string true "release name of a cluster group deployment" @Success 202 {object} deployment.TargetClusterStatus "Multi-cluster deployment has been synced successfully. All upgrade / install operations on all targeted clusters returned with no errors." @Success 207 {object} common.ErrorResponse "Partial failure, meaning that there was as least one failure on one of the target clusters" @Failure 400 {object} common.ErrorResponse Deployment Not Found @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments/{deploymentName}/sync [put] @Security bearerAuth
func (*API) Upgrade ¶
@Summary Update Cluster Group Deployment @Description updates a cluster group deployment, installs or upgrades deployment on each member cluster accordingly @Tags clustergroup deployments @Accept json @Produce json @Param orgid path uint true "Organization ID" @Param clusterGroupId path uint true "Cluster Group ID" @Param deploymentName path string true "release name of a cluster group deployment" @Param deployment body deployment.ClusterGroupDeployment true "Deployment Update Request" @Success 202 {object} deployment.CreateUpdateDeploymentResponse "Multi-cluster deployment has been updated successfully. All upgrade / install operations on all targeted clusters returned with no errors." @Success 207 {object} common.ErrorResponse "Partial failure, meaning that Multi-cluster deployment has been update successfully, however there was as least one failure on one of the target clusters" @Failure 400 {object} common.ErrorResponse @Failure 404 {object} common.ErrorResponse @Router /api/v1/orgs/{orgid}/clustergroups/{clusterGroupId}/deployments/{deploymentName} [put] @Security bearerAuth