Documentation
¶
Index ¶
- func CalculateDeployResources(deploy *kubtypes.Deployment)
- func CheckDeploymentCreateQuotas(ns kubtypes.Namespace, nsUsage kubtypes.Resource, deploy kubtypes.Deployment) error
- func CheckDeploymentReplaceQuotas(ns kubtypes.Namespace, nsUsage kubtypes.Resource, ...) error
- func CheckDeploymentReplicasChangeQuotas(ns kubtypes.Namespace, nsUsage kubtypes.Resource, deploy kubtypes.Deployment, ...) error
- func CheckServiceCreateQuotas(ns kubtypes.Namespace, nsUsage stats.Service, serviceType service.ServiceType) error
- func DetermineServiceType(svc kubtypes.Service) service.ServiceType
- func IngressPaths(service kubtypes.Service, path string, servicePort int) ([]kubtypes.Path, error)
- func IsAdminRole(ctx context.Context) bool
- type DeployActions
- type DomainActions
- type IngressActions
- type ResourcesActions
- type ServiceActions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDeployResources ¶
func CalculateDeployResources(deploy *kubtypes.Deployment)
func DetermineServiceType ¶
func DetermineServiceType(svc kubtypes.Service) service.ServiceType
DetermineServiceType deduces service type from service ports. If we have one or more "Port" set it is internal.
func IngressPaths ¶
IngressPaths generates ingress paths by service ports
func IsAdminRole ¶
IsAdminRole checks that request came from user with admin permissions.
Types ¶
type DeployActions ¶
type DeployActions interface {
GetDeploymentsList(ctx context.Context, nsID string) (deployment.DeploymentList, error)
GetDeployment(ctx context.Context, nsID, deplName string) (*deployment.DeploymentResource, error)
GetDeploymentVersionsList(ctx context.Context, nsID, deployName string) (deployment.DeploymentList, error)
GetDeploymentVersion(ctx context.Context, nsID, deplName, version string) (*deployment.DeploymentResource, error)
DiffDeployments(ctx context.Context, nsID, deplName, version1, version2 string) (*string, error)
DiffDeploymentsPrevious(ctx context.Context, nsID, deplName, version string) (*string, error)
CreateDeployment(ctx context.Context, nsID string, deploy kubtypes.Deployment) (*deployment.DeploymentResource, error)
ChangeActiveDeployment(ctx context.Context, nsID, deplName, version string) (*deployment.DeploymentResource, error)
UpdateDeployment(ctx context.Context, nsID string, deploy kubtypes.Deployment) (*deployment.DeploymentResource, error)
SetDeploymentReplicas(ctx context.Context, nsID, deplName string, req kubtypes.UpdateReplicas) (*deployment.DeploymentResource, error)
SetDeploymentContainerImage(ctx context.Context, nsID, deplName string, req kubtypes.UpdateImage) (*deployment.DeploymentResource, error)
RenameDeploymentVersion(ctx context.Context, nsID, deplName, oldversion, newversion string) (*deployment.DeploymentResource, error)
DeleteDeployment(ctx context.Context, nsID, deplName string) error
DeleteDeploymentVersion(ctx context.Context, nsID, deplName, version string) error
DeleteAllDeployments(ctx context.Context, nsID string) error
}
type DomainActions ¶
type DomainActions interface {
GetDomainsList(ctx context.Context, page, per_page string) (domain.DomainList, error)
GetDomain(ctx context.Context, domain string) (*domain.Domain, error)
AddDomain(ctx context.Context, req domain.Domain) (*domain.Domain, error)
DeleteDomain(ctx context.Context, domain string) error
}
type IngressActions ¶
type IngressActions interface {
CreateIngress(ctx context.Context, nsID string, req kubtypes.Ingress) (*ingress.IngressResource, error)
GetIngressesList(ctx context.Context, nsID string) (ingress.IngressList, error)
GetIngress(ctx context.Context, nsID, ingressName string) (*ingress.IngressResource, error)
UpdateIngress(ctx context.Context, nsID string, req kubtypes.Ingress) (*ingress.IngressResource, error)
DeleteIngress(ctx context.Context, nsID, ingressName string) error
DeleteAllIngresses(ctx context.Context, nsID string) error
}
type ResourcesActions ¶
type ServiceActions ¶
type ServiceActions interface {
CreateService(ctx context.Context, nsID string, req kubtypes.Service) (*service.ServiceResource, error)
GetServices(ctx context.Context, nsID string) (service.ServiceList, error)
GetService(ctx context.Context, nsID, serviceName string) (*service.ServiceResource, error)
UpdateService(ctx context.Context, nsID string, req kubtypes.Service) (*service.ServiceResource, error)
DeleteService(ctx context.Context, nsID, serviceName string) error
DeleteAllServices(ctx context.Context, nsID string) error
}
Click to show internal directories.
Click to hide internal directories.