Documentation ¶
Overview ¶
Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func CheckConfig() error
- func GetEnvDefault(name string, defaultValue string) string
- func GetVersion() string
- func Load() error
- type Autotest
- type AutotestAction
- type AutotestCustomAction
- type AutotestCustomActionEnv
- type AutotestCustomActionEnvType
- type Cache
- type KubernetesEndpoint
- type Links
- type LocalProxy
- type LocalProxyTemplate
- type NamespaceMeta
- type OtherLink
- type ProjectProfile
- func (p *ProjectProfile) GetExclude() []string
- func (p *ProjectProfile) GetInclude() []string
- func (p *ProjectProfile) GetIncludeNamespaced() []string
- func (p *ProjectProfile) GetProjectSelectedBranch(projectID int) string
- func (p *ProjectProfile) GetProjectSortPriority(projectID int) int
- func (p *ProjectProfile) GetRequired() []string
- func (p *ProjectProfile) IsProjectRequired(projectID int) bool
- func (p *ProjectProfile) Validate() error
- type ProjectProfileNameType
- type ProjectSetting
- type RemoteServer
- type Sentry
- type Snapshot
- type Template
- type Type
- func (t *Type) DeepCopy() *Type
- func (t *Type) GetAutotestByID(id string) *Autotest
- func (t *Type) GetBatchShedulePeriod() time.Duration
- func (t *Type) GetDefaultDelay() string
- func (t *Type) GetGracefulShutdown() time.Duration
- func (t *Type) GetKubernetesEndpointByName(name string) *KubernetesEndpoint
- func (t *Type) GetKubernetesEndpoints() []*KubernetesEndpoint
- func (t *Type) GetProjectSetting(projectID string) *ProjectSetting
- func (t *Type) String() string
- type WebHook
- type WikiPage
Constants ¶
View Source
const ( TemporaryTokenRandLength = 5 TemporaryTokenDurationHours = 10 StaledNewNamespaceDurationDays = 3 HoursInDay = 24 KeyValueLength = 2 TrueValue = "true" LabelScaleDownDelayShort = "scaleDownDelay" Namespace = "kubernetes-manager" AnnotationPrefix = Namespace + "/" FilterLabels = Namespace + "=true" LabelType = Namespace + "/type" LabelScaleDownDelay = Namespace + "/" + LabelScaleDownDelayShort LabelLastScaleDate = Namespace + "/lastScaleDate" LabelGitBranch = Namespace + "/git-branch" LabelGitProjectID = Namespace + "/git-project-id" LabelGitProjectOrigin = Namespace + "/git-project-origin" LabelRegistryTag = Namespace + "/registry-tag" LabelSystemNamespace = Namespace + "/system-namespace" TagNamespace = Namespace + "/namespace" TagCluster = Namespace + "/cluster" LabelNamespaceCreator = Namespace + "/user-creator" LabelProjectProfile = Namespace + "/profile" LabelInstalledProject = Namespace + "/project" LabelEnvironmentName = Namespace + "/environment-name" LabelUserLiked = Namespace + "/user-liked" LabelGitSyncOrigin = Namespace + "/git-sync-origin" LabelGitSyncBranch = Namespace + "/git-sync-branch" LabelDescription = Namespace + "/description" HeaderOwner = "X-Owner" )
Variables ¶
This section is empty.
Functions ¶
func CheckConfig ¶ added in v0.2.7
func CheckConfig() error
func GetEnvDefault ¶ added in v0.2.7
func GetVersion ¶
func GetVersion() string
Types ¶
type Autotest ¶ added in v0.4.4
type Autotest struct { Pattern string ProjectID int ReportURL string ProgressURL string Actions []*AutotestAction CustomAction *AutotestCustomAction FilterByNamespace bool }
func (*Autotest) GetActionByTest ¶ added in v0.4.4
func (a *Autotest) GetActionByTest(test string) *AutotestAction
type AutotestAction ¶ added in v0.4.4
type AutotestCustomAction ¶ added in v0.4.5
type AutotestCustomAction struct { ProjectID int Tests []string Env []*AutotestCustomActionEnv }
func (*AutotestCustomAction) DeepCopy ¶ added in v0.4.5
func (d *AutotestCustomAction) DeepCopy() *AutotestCustomAction
type AutotestCustomActionEnv ¶ added in v0.4.5
type AutotestCustomActionEnv struct { Name string Default string Description string Type AutotestCustomActionEnvType }
type AutotestCustomActionEnvType ¶ added in v0.4.5
type AutotestCustomActionEnvType string
const ( AutotestCustomActionEnvList AutotestCustomActionEnvType = "list" AutotestCustomActionEnvText AutotestCustomActionEnvType = "text" )
type KubernetesEndpoint ¶ added in v0.2.7
type Links ¶ added in v0.3.1
type LocalProxy ¶ added in v0.4.7
type LocalProxy struct {
Templates []*LocalProxyTemplate
}
type LocalProxyTemplate ¶ added in v0.4.7
type NamespaceMeta ¶ added in v0.4.0
func GetNamespaceMeta ¶ added in v0.4.5
func GetNamespaceMeta(ctx context.Context, namespace string) *NamespaceMeta
func (*NamespaceMeta) GetTemplatedValue ¶ added in v0.4.6
func (n *NamespaceMeta) GetTemplatedValue(ctx context.Context) *NamespaceMeta
type ProjectProfile ¶ added in v0.4.1
type ProjectProfile struct { Name string NamespaceNameType ProjectProfileNameType NamespacePrefix string DefaultPriority int SortPriorities string // sort priority (comma separated format projectId=number) DefaultBranch string // use default branch for project (comma separated format projectId=main) Required string // project ids to be required (comma separated) Exclude string // project ids to exclude (comma separated) or * for all Include string // project ids to include (comma separated) IncludeNamespaced string // project ids to include (comma separated) for namespaced PipelineVariables map[string]string }
func GetProjectProfileByName ¶ added in v0.4.1
func GetProjectProfileByName(name string) *ProjectProfile
func GetProjectProfileByNamespace ¶ added in v0.4.1
func GetProjectProfileByNamespace(namespace string) *ProjectProfile
func (*ProjectProfile) GetExclude ¶ added in v0.4.1
func (p *ProjectProfile) GetExclude() []string
func (*ProjectProfile) GetInclude ¶ added in v0.4.1
func (p *ProjectProfile) GetInclude() []string
func (*ProjectProfile) GetIncludeNamespaced ¶ added in v0.4.7
func (p *ProjectProfile) GetIncludeNamespaced() []string
func (*ProjectProfile) GetProjectSelectedBranch ¶ added in v0.4.3
func (p *ProjectProfile) GetProjectSelectedBranch(projectID int) string
func (*ProjectProfile) GetProjectSortPriority ¶ added in v0.4.6
func (p *ProjectProfile) GetProjectSortPriority(projectID int) int
func (*ProjectProfile) GetRequired ¶ added in v0.4.1
func (p *ProjectProfile) GetRequired() []string
func (*ProjectProfile) IsProjectRequired ¶ added in v0.4.1
func (p *ProjectProfile) IsProjectRequired(projectID int) bool
func (*ProjectProfile) Validate ¶ added in v0.4.6
func (p *ProjectProfile) Validate() error
type ProjectProfileNameType ¶ added in v0.4.6
type ProjectProfileNameType string
const ( ProjectProfileNameTypeSimple ProjectProfileNameType = "simple" ProjectProfileNameTypeService ProjectProfileNameType = "service-name" ProjectProfileNameTypeJiraIssue ProjectProfileNameType = "jira-issue" )
type ProjectSetting ¶ added in v0.4.6
type RemoteServer ¶ added in v0.4.3
type Type ¶
type Type struct { GracefulShutdownSeconds *int ConfigPath *string LogLevel *string Links *Links BatchEnabled *bool NamespaceMeta []*NamespaceMeta DebugTemplates []*Template ProjectProfiles []*ProjectProfile ProjectSettings []*ProjectSetting KubernetesEndpoints []*KubernetesEndpoint WebListen *string FrontDist *string RemoveBranchDaysInactive *int GitlabToken *string GitlabTokenUser *string GitlabURL *string IngressHostDefaultProtocol *string RemoveBranchLastScaleDate *int ExternalServicesTopic *string BatchShedulePeriodSeconds *int PodName *string PodNamespace *string WebHooks []WebHook Snapshots Snapshot RemoteServer RemoteServer Autotests []*Autotest DelayHours *int WikiPages []*WikiPage Cache *Cache Sentry *Sentry LocalProxy *LocalProxy }
func (*Type) GetAutotestByID ¶ added in v0.4.4
func (*Type) GetBatchShedulePeriod ¶ added in v0.4.5
func (*Type) GetDefaultDelay ¶ added in v0.4.5
func (*Type) GetGracefulShutdown ¶ added in v0.4.5
func (*Type) GetKubernetesEndpointByName ¶ added in v0.4.5
func (t *Type) GetKubernetesEndpointByName(name string) *KubernetesEndpoint
func (*Type) GetKubernetesEndpoints ¶ added in v0.4.5
func (t *Type) GetKubernetesEndpoints() []*KubernetesEndpoint
func (*Type) GetProjectSetting ¶ added in v0.4.6
func (t *Type) GetProjectSetting(projectID string) *ProjectSetting
Click to show internal directories.
Click to hide internal directories.