Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateEvaluationName(checkType CheckType, evalName string) string
- func GenerateTaskName(checkType CheckType, taskName string) string
- func TruncateString(s string, max int) string
- type CheckType
- type GaugeFloatValue
- type GaugeValue
- type KeptnPhase
- type KeptnPhaseType
- type KeptnState
- type StatusSummary
Constants ¶
View Source
const ( AppName attribute.Key = attribute.Key("keptn.deployment.app.name") AppVersion attribute.Key = attribute.Key("keptn.deployment.app.version") AppNamespace attribute.Key = attribute.Key("keptn.deployment.app.namespace") AppStatus attribute.Key = attribute.Key("keptn.deployment.app.status") AppPreviousVersion attribute.Key = attribute.Key("keptn.deployment.app.previousversion") WorkloadName attribute.Key = attribute.Key("keptn.deployment.workload.name") WorkloadVersion attribute.Key = attribute.Key("keptn.deployment.workload.version") WorkloadPreviousVersion attribute.Key = attribute.Key("keptn.deployment.workload.previousversion") WorkloadNamespace attribute.Key = attribute.Key("keptn.deployment.workload.namespace") WorkloadStatus attribute.Key = attribute.Key("keptn.deployment.workload.status") TaskStatus attribute.Key = attribute.Key("keptn.deployment.task.status") TaskName attribute.Key = attribute.Key("keptn.deployment.task.name") TaskType attribute.Key = attribute.Key("keptn.deployment.task.type") EvaluationStatus attribute.Key = attribute.Key("keptn.deployment.evaluation.status") EvaluationName attribute.Key = attribute.Key("keptn.deployment.evaluation.name") EvaluationType attribute.Key = attribute.Key("keptn.deployment.evaluation.type") )
View Source
const AppAnnotation = "keptn.sh/app"
View Source
const K8sRecommendedAppAnnotations = "app.kubernetes.io/part-of"
View Source
const K8sRecommendedVersionAnnotations = "app.kubernetes.io/version"
View Source
const K8sRecommendedWorkloadAnnotations = "app.kubernetes.io/name"
View Source
const MaxAppNameLength = 25
View Source
const MaxTaskNameLength = 25
View Source
const MaxVersionLength = 12
View Source
const MaxWorkloadNameLength = 25
View Source
const NamespaceEnabledAnnotation = "keptn.sh/lifecycle-toolkit"
View Source
const PostDeploymentEvaluationAnnotation = "keptn.sh/post-deployment-evaluations"
View Source
const PostDeploymentTaskAnnotation = "keptn.sh/post-deployment-tasks"
View Source
const PreDeploymentEvaluationAnnotation = "keptn.sh/pre-deployment-evaluations"
View Source
const PreDeploymentTaskAnnotation = "keptn.sh/pre-deployment-tasks"
View Source
const TaskNameAnnotation = "keptn.sh/task-name"
View Source
const VersionAnnotation = "keptn.sh/version"
View Source
const WorkloadAnnotation = "keptn.sh/workload"
Variables ¶
View Source
var ( PhaseWorkloadPreDeployment = KeptnPhaseType{LongName: "Workload Pre-Deployment Tasks", ShortName: "WorkloadPreDeployTasks"} PhaseWorkloadPostDeployment = KeptnPhaseType{LongName: "Workload Post-Deployment Tasks", ShortName: "WorkloadPostDeployTasks"} PhaseWorkloadPreEvaluation = KeptnPhaseType{LongName: "Workload Pre-Deployment Evaluations", ShortName: "WorkloadPreDeployEvaluations"} PhaseWorkloadPostEvaluation = KeptnPhaseType{LongName: "Workload Post-Deployment Evaluations", ShortName: "WorkloadPostDeployEvaluations"} PhaseWorkloadDeployment = KeptnPhaseType{LongName: "Workload Deployment", ShortName: "WorkloadDeploy"} PhaseAppPreDeployment = KeptnPhaseType{LongName: "App Pre-Deployment Tasks", ShortName: "AppPreDeployTasks"} PhaseAppPostDeployment = KeptnPhaseType{LongName: "App Post-Deployment Tasks", ShortName: "AppPostDeployTasks"} PhaseAppPreEvaluation = KeptnPhaseType{LongName: "App Pre-Deployment Evaluations", ShortName: "AppPreDeployEvaluations"} PhaseAppPostEvaluation = KeptnPhaseType{LongName: "App Post-Deployment Evaluations", ShortName: "AppPostDeployEvaluations"} PhaseAppDeployment = KeptnPhaseType{LongName: "App Deployment", ShortName: "AppDeploy"} PhaseCompleted = KeptnPhaseType{LongName: "Completed", ShortName: "Completed"} )
View Source
var ErrTooLongAnnotations = fmt.Errorf("too long annotations, maximum length for app and workload is 25 characters, for version 12 characters")
Functions ¶
func GenerateEvaluationName ¶
func GenerateTaskName ¶
func TruncateString ¶
Types ¶
type CheckType ¶
type CheckType string
const PostDeploymentCheckType CheckType = "post"
const PostDeploymentEvaluationCheckType CheckType = "post-eval"
const PreDeploymentCheckType CheckType = "pre"
const PreDeploymentEvaluationCheckType CheckType = "pre-eval"
type GaugeFloatValue ¶
type GaugeValue ¶
type KeptnPhase ¶
type KeptnPhase KeptnPhaseType
type KeptnPhaseType ¶
type KeptnState ¶
type KeptnState string
const ( StateProgressing KeptnState = "Progressing" StateSucceeded KeptnState = "Succeeded" StateFailed KeptnState = "Failed" StateUnknown KeptnState = "Unknown" StatePending KeptnState = "Pending" )
func GetOverallState ¶
func GetOverallState(s StatusSummary) KeptnState
func (KeptnState) IsCompleted ¶
func (k KeptnState) IsCompleted() bool
func (KeptnState) IsFailed ¶
func (k KeptnState) IsFailed() bool
func (KeptnState) IsSucceeded ¶
func (k KeptnState) IsSucceeded() bool
type StatusSummary ¶
type StatusSummary struct { Total int // contains filtered or unexported fields }
func UpdateStatusSummary ¶
func UpdateStatusSummary(status KeptnState, summary StatusSummary) StatusSummary
func (StatusSummary) GetTotalCount ¶
func (s StatusSummary) GetTotalCount() int
Click to show internal directories.
Click to hide internal directories.