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 KubernetesEndpoint
- type Links
- type NamespaceMeta
- type OtherLink
- type ProjectProfile
- type RemoteServer
- 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) String() string
- type WebHook
Constants ¶
View Source
const ( TemporaryTokenRandLength = 5 TemporaryTokenDurationHours = 10 StaledNewNamespaceDurationDays = 3 HoursInDay = 24 KeyValueLength = 2 TrueValue = "true" LabelScaleDownDelayShort = "scaleDownDelay" Namespace = "kubernetes-manager" 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 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 NamespaceMeta ¶ added in v0.4.0
func GetNamespaceMeta ¶ added in v0.4.5
func GetNamespaceMeta(namespace string) *NamespaceMeta
type ProjectProfile ¶ added in v0.4.1
type ProjectProfile struct { Name string NamespacePrefix string 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) Include string // project ids to include (comma separated) }
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) GetProjectSelectedBranch ¶ added in v0.4.3
func (p *ProjectProfile) GetProjectSelectedBranch(projectID int) string
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
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 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 }
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
Click to show internal directories.
Click to hide internal directories.