Documentation ¶
Index ¶
- Constants
- func ConstructPipelineInput(input []byte) (string, *gqlclient.PipelineAttributes, error)
- func DescribeCluster(cluster *consoleclient.ClusterFragment) (string, error)
- func DescribeService(service *consoleclient.ServiceDeploymentExtended) (string, error)
- func DescribeServiceContext(sc *consoleclient.ServiceContextFragment) (string, error)
- func InstallAgent(url, token, namespace, version string, values map[string]interface{}) error
- func IsAlreadyAgentInstalled(k8sClient *kubernetes.Clientset) (bool, error)
- func NormalizeExtUrl(uri string) string
- func NormalizeUrl(url string) string
- func UninstallAgent(namespace string) error
- type Config
- type ConsoleClient
- type Gate
- type Pipeline
- type PipelineEdge
- type PipelineStage
- type PrefixWriter
- type PromotionCriteria
- type StageService
- type VersionedConfig
Constants ¶
View Source
const ( ChartName = "deployment-operator" ReleaseName = "deploy-operator" RepoUrl = "https://pluralsh.github.io/deployment-operator" OperatorNamespace = "plrl-deploy-operator" )
View Source
const ( LEVEL_0 = iota LEVEL_1 LEVEL_2 LEVEL_3 LEVEL_4 )
Each level has 2 spaces for PrefixWriter
View Source
const (
ConfigName = "console.yml"
)
Variables ¶
This section is empty.
Functions ¶
func ConstructPipelineInput ¶
func ConstructPipelineInput(input []byte) (string, *gqlclient.PipelineAttributes, error)
func DescribeCluster ¶
func DescribeCluster(cluster *consoleclient.ClusterFragment) (string, error)
func DescribeService ¶
func DescribeService(service *consoleclient.ServiceDeploymentExtended) (string, error)
func DescribeServiceContext ¶ added in v0.8.5
func DescribeServiceContext(sc *consoleclient.ServiceContextFragment) (string, error)
func InstallAgent ¶
func IsAlreadyAgentInstalled ¶ added in v0.9.6
func IsAlreadyAgentInstalled(k8sClient *kubernetes.Clientset) (bool, error)
func NormalizeExtUrl ¶ added in v0.9.10
func NormalizeUrl ¶ added in v0.9.1
func UninstallAgent ¶
Types ¶
type Config ¶
func ReadConfig ¶
func ReadConfig() (conf Config)
type ConsoleClient ¶
type ConsoleClient interface { Url() string ExtUrl() string Token() string AgentUrl(id string) (string, error) ListClusters() (*consoleclient.ListClusters, error) GetProject(name string) (*consoleclient.ProjectFragment, error) GetCluster(clusterId, clusterName *string) (*consoleclient.ClusterFragment, error) GetDeployToken(clusterId, clusterName *string) (string, error) UpdateCluster(id string, attr consoleclient.ClusterUpdateAttributes) (*consoleclient.UpdateCluster, error) DeleteCluster(id string) error DetachCluster(id string) error ListClusterServices(clusterId, handle *string) ([]*consoleclient.ServiceDeploymentEdgeFragment, error) CreateRepository(url string, privateKey, passphrase, username, password *string) (*consoleclient.CreateGitRepository, error) ListRepositories() (*consoleclient.ListGitRepositories, error) UpdateRepository(id string, attrs consoleclient.GitAttributes) (*consoleclient.UpdateGitRepository, error) CreateClusterService(clusterId, clusterName *string, attr consoleclient.ServiceDeploymentAttributes) (*consoleclient.ServiceDeploymentExtended, error) UpdateClusterService(serviceId, serviceName, clusterName *string, attributes consoleclient.ServiceUpdateAttributes) (*consoleclient.ServiceDeploymentExtended, error) CloneService(clusterId string, serviceId, serviceName, clusterName *string, attributes consoleclient.ServiceCloneAttributes) (*consoleclient.ServiceDeploymentFragment, error) GetClusterService(serviceId, serviceName, clusterName *string) (*consoleclient.ServiceDeploymentExtended, error) DeleteClusterService(serviceId string) (*consoleclient.DeleteServiceDeployment, error) ListProviders() (*consoleclient.ListProviders, error) CreateProviderCredentials(name string, attr consoleclient.ProviderCredentialAttributes) (*consoleclient.CreateProviderCredential, error) DeleteProviderCredentials(id string) (*consoleclient.DeleteProviderCredential, error) SavePipeline(name string, attrs consoleclient.PipelineAttributes) (*consoleclient.PipelineFragment, error) CreatePipelineContext(id string, attrs consoleclient.PipelineContextAttributes) (*consoleclient.PipelineContextFragment, error) GetPipelineContext(id string) (*consoleclient.PipelineContextFragment, error) CreateCluster(attributes consoleclient.ClusterAttributes) (*consoleclient.CreateCluster, error) CreateProvider(attr consoleclient.ClusterProviderAttributes) (*consoleclient.CreateClusterProvider, error) MyCluster() (*consoleclient.MyCluster, error) SaveServiceContext(name string, attributes consoleclient.ServiceContextAttributes) (*consoleclient.ServiceContextFragment, error) GetServiceContext(name string) (*consoleclient.ServiceContextFragment, error) KickClusterService(serviceId, serviceName, clusterName *string) (*consoleclient.ServiceDeploymentExtended, error) ListNotificationSinks(after *string, first *int64) (*consoleclient.ListNotificationSinks_NotificationSinks, error) CreateNotificationSinks(attr consoleclient.NotificationSinkAttributes) (*consoleclient.NotificationSinkFragment, error) UpdateDeploymentSettings(attr consoleclient.DeploymentSettingsAttributes) (*consoleclient.UpdateDeploymentSettings, error) GetGlobalSettings() (*consoleclient.DeploymentSettingsFragment, error) ListStackRuns(stackID string) (*consoleclient.ListStackRuns, error) CreatePullRequest(id string, branch, context *string) (*consoleclient.PullRequestFragment, error) GetPrAutomationByName(name string) (*consoleclient.PrAutomationFragment, error) }
func NewConsoleClient ¶
func NewConsoleClient(token, url string) (ConsoleClient, error)
type Pipeline ¶
type Pipeline struct { Name string `json:"name"` Stages []PipelineStage `json:"stages"` Edges []PipelineEdge `json:"edges"` }
type PipelineEdge ¶
type PipelineStage ¶
type PipelineStage struct { Name string `json:"name"` Services []StageService `json:"services"` }
type PrefixWriter ¶
type PrefixWriter interface { // Write writes text with the specified indentation level. Write(level int, format string, a ...interface{}) // WriteLine writes an entire line with no indentation level. WriteLine(a ...interface{}) // Flush forces indentation to be reset. Flush() }
PrefixWriter can write text at various indentation levels.
func NewPrefixWriter ¶
func NewPrefixWriter(out io.Writer) PrefixWriter
NewPrefixWriter creates a new PrefixWriter.
type PromotionCriteria ¶
type StageService ¶
type StageService struct { Name string `json:"name"` Criteria *PromotionCriteria `json:"criteria"` }
type VersionedConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.