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 ¶
- func GetVersion() string
- func Load(ctx context.Context) error
- func Validate(ctx context.Context) error
- type Canary
- type CanaryPhase1
- type CanaryPhase1Strategy
- type CanaryPhase2
- type CanaryQualityGate
- type CanaryService
- type CanaryStrategy
- type ConfigMap
- type Deployment
- type Hpa
- type Pdb
- type Prometheus
- func (p *Prometheus) Enabled() bool
- func (p *Prometheus) GetCreateConfigInterval() time.Duration
- func (p *Prometheus) GetEndpoint(action string) string
- func (p *Prometheus) GetReadyWaitStep() time.Duration
- func (p *Prometheus) GetScrapeInterval() time.Duration
- func (p *Prometheus) HasLocalPrometheus() bool
- type Service
- type Type
- type WebHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVersion ¶
func GetVersion() string
Types ¶
type Canary ¶ added in v1.1.2
type Canary struct { Enabled bool Strategy CanaryStrategy QualityGate *CanaryQualityGate Phase1 *CanaryPhase1 Phase2 *CanaryPhase2 ServiceMesh string ServiceMeshConfig string Services []*CanaryService // contains filtered or unexported fields }
func (*Canary) GetServiceMesh ¶ added in v1.1.2
func (c *Canary) GetServiceMesh() types.ServiceMesh
type CanaryPhase1 ¶ added in v1.1.2
type CanaryPhase1 struct { Strategy CanaryPhase1Strategy MaxExecutionTimeSeconds *uint16 // CanaryPhase1CanaryStrategy CanaryPercentMin *types.CanaryProviderPercent CanaryPercentMax *types.CanaryProviderPercent CanaryPercentStep *uint8 CanaryIntervalSeconds *uint16 }
func (*CanaryPhase1) GetCanaryInterval ¶ added in v1.1.2
func (cp1 *CanaryPhase1) GetCanaryInterval() time.Duration
func (*CanaryPhase1) GetMaxExecutionTime ¶ added in v1.1.2
func (cp1 *CanaryPhase1) GetMaxExecutionTime() time.Duration
type CanaryPhase1Strategy ¶ added in v1.1.2
type CanaryPhase1Strategy string
const ( CanaryPhase1CanaryStrategy CanaryPhase1Strategy = "CanaryStrategy" CanaryPhase1ABTestStrategy CanaryPhase1Strategy = "ABTestStrategy" )
func (CanaryPhase1Strategy) Validate ¶ added in v1.1.2
func (value CanaryPhase1Strategy) Validate() error
type CanaryPhase2 ¶ added in v1.1.2
type CanaryPhase2 struct {
MaxExecutionTimeSeconds *uint16
}
func (*CanaryPhase2) GetMaxExecutionTime ¶ added in v1.1.2
func (cp2 *CanaryPhase2) GetMaxExecutionTime() time.Duration
type CanaryQualityGate ¶ added in v1.1.2
func (*CanaryQualityGate) GetErrorBudgetPeriod ¶ added in v1.1.2
func (q *CanaryQualityGate) GetErrorBudgetPeriod() time.Duration
type CanaryService ¶ added in v1.1.2
type CanaryService struct {
Name string
}
type CanaryStrategy ¶ added in v1.1.2
type CanaryStrategy string
const ( CanaryStrategyAllPhases CanaryStrategy = "CanaryStrategyAllPhases" CanaryStrategyOnlyPhase1 CanaryStrategy = "CanaryStrategyOnlyPhase1" CanaryStrategyOnlyPhase2 CanaryStrategy = "CanaryStrategyOnlyPhase2" )
func (CanaryStrategy) HasPhase1 ¶ added in v1.1.2
func (e CanaryStrategy) HasPhase1() bool
func (CanaryStrategy) HasPhase2 ¶ added in v1.1.2
func (e CanaryStrategy) HasPhase2() bool
func (CanaryStrategy) Validate ¶ added in v1.1.2
func (e CanaryStrategy) Validate() error
type Deployment ¶
func (*Deployment) GetHpa ¶
func (d *Deployment) GetHpa(values *Type) Hpa
func (*Deployment) GetMinReplicas ¶
func (d *Deployment) GetMinReplicas(values *Type) int32
func (*Deployment) GetPdb ¶
func (d *Deployment) GetPdb(values *Type) Pdb
type Pdb ¶
func (*Pdb) GetMaxUnavailable ¶ added in v1.1.1
func (pdb *Pdb) GetMaxUnavailable() *intstr.IntOrString
func (*Pdb) GetMinAvailable ¶ added in v1.1.1
func (pdb *Pdb) GetMinAvailable() *intstr.IntOrString
type Prometheus ¶ added in v1.1.2
type Prometheus struct { URL string AuthUser string AuthPassword string AllowedMetricsRegex string LocalConfigPath string ReadyWaitStepSeconds uint ScrapeIntervalSeconds uint CreateConfigIntervalSeconds uint // to reduce the number of metrics in prometheus, select only pods with these labels // if empty, all pods will be selected in local prometheus PodLabelSelector []string }
func (*Prometheus) Enabled ¶ added in v1.1.2
func (p *Prometheus) Enabled() bool
func (*Prometheus) GetCreateConfigInterval ¶ added in v1.1.2
func (p *Prometheus) GetCreateConfigInterval() time.Duration
func (*Prometheus) GetEndpoint ¶ added in v1.1.2
func (p *Prometheus) GetEndpoint(action string) string
func (*Prometheus) GetReadyWaitStep ¶ added in v1.1.2
func (p *Prometheus) GetReadyWaitStep() time.Duration
func (*Prometheus) GetScrapeInterval ¶ added in v1.1.2
func (p *Prometheus) GetScrapeInterval() time.Duration
func (*Prometheus) HasLocalPrometheus ¶ added in v1.1.2
func (p *Prometheus) HasLocalPrometheus() bool
type Type ¶
type Type struct { Canary *Canary Version types.Version CurrentVersion types.Version Name string Namespace string Environment string Deployments []*Deployment Services []*Service ConfigMaps []*ConfigMap WebHooks []*WebHook Pdb Pdb PodCheckIntervalSeconds int32 PodCheckAvailableTimes int32 MaxProcessingTimeSeconds int32 Hpa Hpa MinReplicas int32 CreateService bool DeleteOrigins bool Prometheus *Prometheus // contains filtered or unexported fields }
func (*Type) CanRollBack ¶ added in v1.1.2
func (*Type) GetMaxProcessingTime ¶ added in v1.1.2
func (*Type) GetPodCheckInterval ¶ added in v1.1.2
func (*Type) SetCanNotRollback ¶ added in v1.1.2
func (t *Type) SetCanNotRollback()
after that time rollback will not available.
Click to show internal directories.
Click to hide internal directories.