Documentation ¶
Index ¶
- Constants
- type Client
- type ListParameters
- type OperationDetailResponse
- type OperationResponse
- type OperationResponseList
- type ParallelStrategySpec
- type Parameters
- type RuntimeTarget
- type ScheduleType
- type StatusResponse
- type StatusResponseList
- type StrategySpec
- type StrategyType
- type TargetSpec
- type UpgradeResponse
Constants ¶
const (
// StateParam parameter used in list orchestrations / operations queries to filter by state
StateParam = "state"
)
const TargetAll = "all"
TargetAll all SKRs provisioned successfully and not deprovisioning
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ListOrchestrations(params ListParameters) (StatusResponseList, error) GetOrchestration(orchestrationID string) (StatusResponse, error) ListOperations(orchestrationID string, params ListParameters) (OperationResponseList, error) GetOperation(orchestrationID, operationID string) (OperationDetailResponse, error) UpgradeKyma(params Parameters) (UpgradeResponse, error) }
Client is the interface to interact with the KEB /orchestrations and /upgrade API as an HTTP client using OIDC ID token in JWT format.
func NewClient ¶
NewClient constructs and returns new Client for KEB /runtimes API It takes the following arguments:
- ctx : context in which the http request will be executed
- url : base url of all KEB APIs, e.g. https://kyma-env-broker.kyma.local
- auth : TokenSource object which provides the ID token for the HTTP request
type ListParameters ¶
ListParameters hold attributes of list orchestrations / operations queries.
type OperationDetailResponse ¶
type OperationDetailResponse struct { OperationResponse KymaConfig gqlschema.KymaConfigInput `json:"kymaConfig"` ClusterConfig gqlschema.GardenerConfigInput `json:"clusterConfig"` }
type OperationResponse ¶
type OperationResponse struct { OperationID string `json:"operationID"` RuntimeID string `json:"runtimeID"` GlobalAccountID string `json:"globalAccountID"` SubAccountID string `json:"subAccountID"` OrchestrationID string `json:"orchestrationID"` ServicePlanID string `json:"servicePlanID"` ServicePlanName string `json:"servicePlanName"` DryRun bool `json:"dryRun"` ShootName string `json:"shootName"` MaintenanceWindowBegin time.Time `json:"maintenanceWindowBegin"` MaintenanceWindowEnd time.Time `json:"maintenanceWindowEnd"` State string `json:"state"` Description string `json:"description"` }
type OperationResponseList ¶
type OperationResponseList struct { Data []OperationResponse `json:"data"` Count int `json:"count"` TotalCount int `json:"totalCount"` }
type ParallelStrategySpec ¶
type ParallelStrategySpec struct {
Workers int `json:"workers"`
}
ParallelStrategySpec defines parameters for the parallel orchestration strategy
type Parameters ¶
type Parameters struct { Targets TargetSpec `json:"targets"` Strategy StrategySpec `json:"strategy,omitempty"` DryRun bool `json:"dryRun,omitempty"` }
Parameters hold the attributes of orchestration create (upgrade) requests.
type RuntimeTarget ¶
type RuntimeTarget struct { // Valid values: "all" Target string `json:"target,omitempty"` // Regex pattern to match against the runtime's GlobalAccount field. E.g. CA50125541TID000000000741207136, CA.* GlobalAccount string `json:"globalAccount,omitempty"` // Regex pattern to match against the runtime's SubAccount field. E.g. 0d20e315-d0b4-48a2-9512-49bc8eb03cd1 SubAccount string `json:"subAccount,omitempty"` // Regex pattern to match against the shoot cluster's Region field (not SCP platform-region). E.g. "europe|eu-" Region string `json:"region,omitempty"` // RuntimeID is used to indicate a specific runtime RuntimeID string `json:"runtimeID,omitempty"` // PlanName is used to match runtimes with the same plan PlanName string `json:"planName,omitempty"` }
RuntimeTarget captures a specification of SKR targets to resolve for an orchestration. When a RuntimeTarget defines multiple fields, all should match to any given runtime to be selected (i.e. the terms are AND-ed).
type ScheduleType ¶
type ScheduleType string
const ( Immediate ScheduleType = "immediate" MaintenanceWindow ScheduleType = "maintenanceWindow" )
type StatusResponse ¶
type StatusResponseList ¶
type StatusResponseList struct { Data []StatusResponse `json:"data"` Count int `json:"count"` TotalCount int `json:"totalCount"` }
type StrategySpec ¶
type StrategySpec struct { Type StrategyType `json:"type"` Schedule ScheduleType `json:"schedule,omitempty"` Parallel ParallelStrategySpec `json:"parallel,omitempty"` }
StrategySpec is the strategy part common for all orchestration trigger/status API
type TargetSpec ¶
type TargetSpec struct { Include []RuntimeTarget `json:"include"` Exclude []RuntimeTarget `json:"exclude,omitempty"` }
TargetSpec is the targets part common for all orchestration trigger/status API
type UpgradeResponse ¶
type UpgradeResponse struct {
OrchestrationID string `json:"orchestrationID"`
}