internal

package
v0.0.0-...-fb2c256 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pending    = "pending"
	InProgress = "in progress"
	Succeeded  = "succeeded"
	Failed     = "failed"
)
View Source
const (
	LicenceTypeLite = "TestDevelopmentAndDemo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvsLifecycleData

type AvsLifecycleData struct {
	AvsEvaluationInternalId int64 `json:"avs_evaluation_internal_id"`
	AVSEvaluationExternalId int64 `json:"avs_evaluation_external_id"`

	AVSInternalEvaluationDeleted bool `json:"avs_internal_evaluation_deleted"`
	AVSExternalEvaluationDeleted bool `json:"avs_external_evaluation_deleted"`
}

type ComponentConfigurationInputList

type ComponentConfigurationInputList []*gqlschema.ComponentConfigurationInput

func (ComponentConfigurationInputList) DeepCopy

type DeprovisioningOperation

type DeprovisioningOperation struct {
	Operation `json:"-"`

	ProvisioningParameters string           `json:"provisioning_parameters"`
	Avs                    AvsLifecycleData `json:"avs"`
	EventHub               EventHub         `json:"eh"`
	SubAccountID           string           `json:"-"`
	RuntimeID              string           `json:"runtime_id"`
}

DeprovisioningOperation holds all information about de-provisioning operation

func NewDeprovisioningOperationWithID

func NewDeprovisioningOperationWithID(operationID, instanceID string) (DeprovisioningOperation, error)

NewProvisioningOperationWithID creates a fresh (just starting) instance of the ProvisioningOperation with provided ID

func (*DeprovisioningOperation) GetProvisioningParameters

func (do *DeprovisioningOperation) GetProvisioningParameters() (ProvisioningParameters, error)

func (*DeprovisioningOperation) SetProvisioningParameters

func (do *DeprovisioningOperation) SetProvisioningParameters(parameters ProvisioningParameters) error

type ERSContext

type ERSContext struct {
	TenantID        string                  `json:"tenant_id"`
	SubAccountID    string                  `json:"subaccount_id"`
	GlobalAccountID string                  `json:"globalaccount_id"`
	ServiceManager  *ServiceManagerEntryDTO `json:"sm_platform_credentials,omitempty"`
}

type EventHub

type EventHub struct {
	Deleted bool `json:"event_hub_deleted"`
}

type Instance

type Instance struct {
	InstanceID      string
	RuntimeID       string
	GlobalAccountID string
	SubAccountID    string
	ServiceID       string
	ServiceName     string
	ServicePlanID   string
	ServicePlanName string

	DashboardURL           string
	ProvisioningParameters string
	ProviderRegion         string

	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt time.Time
}

func (Instance) GetProvisioningParameters

func (instance Instance) GetProvisioningParameters() (ProvisioningParameters, error)

type InstanceStats

type InstanceStats struct {
	TotalNumberOfInstances int
	PerGlobalAccountID     map[string]int
}

InstanceStats provide number of instances per Global Account ID

type InstanceWithOperation

type InstanceWithOperation struct {
	Instance

	Type        sql.NullString
	State       sql.NullString
	Description sql.NullString
}

type LMS

type LMS struct {
	TenantID    string    `json:"tenant_id"`
	Failed      bool      `json:"failed"`
	RequestedAt time.Time `json:"requested_at"`
}

type LMSTenant

type LMSTenant struct {
	ID        string
	Name      string
	Region    string
	CreatedAt time.Time
}

type Operation

type Operation struct {
	ID        string
	Version   int
	CreatedAt time.Time
	UpdatedAt time.Time

	InstanceID             string
	ProvisionerOperationID string
	State                  domain.LastOperationState
	Description            string

	// OrchestrationID specifies the origin orchestration which triggers the operation, empty for OSB operations (provisioning/deprovisioning)
	OrchestrationID string
}

func (*Operation) IsFinished

func (o *Operation) IsFinished() bool

type OperationStats

type OperationStats struct {
	Provisioning   map[domain.LastOperationState]int
	Deprovisioning map[domain.LastOperationState]int
}

OperationStats provide number of operations per type and state

type Orchestration

type Orchestration struct {
	OrchestrationID string
	State           string
	Description     string
	CreatedAt       time.Time
	UpdatedAt       time.Time
	Parameters      orchestration.Parameters
}

Orchestration holds all information about an orchestration. Orchestration performs operations of a specific type (UpgradeKymaOperation, UpgradeClusterOperation) on specific targets of SKRs.

func (*Orchestration) IsFinished

func (o *Orchestration) IsFinished() bool

type ProvisionerInputCreator

type ProvisionerInputCreator interface {
	SetProvisioningParameters(params ProvisioningParameters) ProvisionerInputCreator
	SetLabel(key, value string) ProvisionerInputCreator
	// Deprecated, use: AppendOverrides
	SetOverrides(component string, overrides []*gqlschema.ConfigEntryInput) ProvisionerInputCreator
	AppendOverrides(component string, overrides []*gqlschema.ConfigEntryInput) ProvisionerInputCreator
	AppendGlobalOverrides(overrides []*gqlschema.ConfigEntryInput) ProvisionerInputCreator
	CreateProvisionRuntimeInput() (gqlschema.ProvisionRuntimeInput, error)
	CreateUpgradeRuntimeInput() (gqlschema.UpgradeRuntimeInput, error)
	EnableOptionalComponent(componentName string) ProvisionerInputCreator
}

type ProvisioningOperation

type ProvisioningOperation struct {
	Operation `json:"-"`

	// following fields are serialized to JSON and stored in the storage
	Lms                    LMS    `json:"lms"`
	ProvisioningParameters string `json:"provisioning_parameters"`

	// following fields are not stored in the storage
	InputCreator ProvisionerInputCreator `json:"-"`

	Avs AvsLifecycleData `json:"avs"`

	RuntimeID string `json:"runtime_id"`
}

ProvisioningOperation holds all information about provisioning operation

func NewProvisioningOperation

func NewProvisioningOperation(instanceID string, parameters ProvisioningParameters) (ProvisioningOperation, error)

NewProvisioningOperation creates a fresh (just starting) instance of the ProvisioningOperation

func NewProvisioningOperationWithID

func NewProvisioningOperationWithID(operationID, instanceID string, parameters ProvisioningParameters) (ProvisioningOperation, error)

NewProvisioningOperationWithID creates a fresh (just starting) instance of the ProvisioningOperation with provided ID

func (*ProvisioningOperation) GetProvisioningParameters

func (po *ProvisioningOperation) GetProvisioningParameters() (ProvisioningParameters, error)

func (*ProvisioningOperation) SetProvisioningParameters

func (po *ProvisioningOperation) SetProvisioningParameters(parameters ProvisioningParameters) error

type ProvisioningParameters

type ProvisioningParameters struct {
	PlanID     string                    `json:"plan_id"`
	ServiceID  string                    `json:"service_id"`
	ErsContext ERSContext                `json:"ers_context"`
	Parameters ProvisioningParametersDTO `json:"parameters"`

	// PlatformRegion defines the Platform region send in the request path, terminology:
	//  - `Platform` is a place where KEB is registered and which later sends request to KEB.
	//  - `Region` value is use e.g. for billing integration such as EDP.
	PlatformRegion string `json:"platform_region"`
}

func (ProvisioningParameters) IsEqual

type ProvisioningParametersDTO

type ProvisioningParametersDTO struct {
	Name         string  `json:"name"`
	TargetSecret *string `json:"targetSecret"`
	VolumeSizeGb *int    `json:"volumeSizeGb"`
	MachineType  *string `json:"machineType"`
	Region       *string `json:"region"`
	Purpose      *string `json:"purpose"`
	// LicenceType - based on this parameter, some options can be enabled/disabled when preparing the input
	// for the provisioner e.g. use default overrides for SKR instead overrides from resource
	// with "provisioning-runtime-override" label when LicenceType is "TestDevelopmentAndDemo"
	LicenceType                 *string  `json:"licence_type"`
	Zones                       []string `json:"zones"`
	AutoScalerMin               *int     `json:"autoScalerMin"`
	AutoScalerMax               *int     `json:"autoScalerMax"`
	MaxSurge                    *int     `json:"maxSurge"`
	MaxUnavailable              *int     `json:"maxUnavailable"`
	OptionalComponentsToInstall []string `json:"components"`
	KymaVersion                 string   `json:"kymaVersion"`
	//Provider - used in Trial plan to determine which cloud provider to use during provisioning
	Provider *TrialCloudProvider `json:"provider"`
}

type Runtime

type Runtime struct {
	InstanceID      string `json:"instanceId"`
	RuntimeID       string `json:"runtimeId"`
	GlobalAccountID string `json:"globalAccountId"`
	SubAccountID    string `json:"subaccountId"`
	// The corresponding shoot cluster's .metadata.name value
	ShootName string `json:"shootName"`
	// The corresponding shoot cluster's .spec.maintenance.timeWindow.Begin value, which is in in "HHMMSS+[HHMM TZ]" format, e.g. "040000+0000"
	MaintenanceWindowBegin time.Time `json:"maintenanceWindowBegin"`
	// The corresponding shoot cluster's .spec.maintenance.timeWindow.End value, which is in "HHMMSS+[HHMM TZ]" format, e.g. "040000+0000"
	MaintenanceWindowEnd time.Time `json:"maintenanceWindowEnd"`
}

Runtime is the data type which captures the needed runtime specific attributes to perform orchestrations on a given runtime.

type RuntimeOperation

type RuntimeOperation struct {
	Operation `json:"-"`

	DryRun                 bool      `json:"dryRun"`
	ShootName              string    `json:"shootName"`
	MaintenanceWindowBegin time.Time `json:"maintenanceWindowBegin"`
	MaintenanceWindowEnd   time.Time `json:"maintenanceWindowEnd"`
	RuntimeID              string    `json:"runtimeId"`
	GlobalAccountID        string    `json:"globalAccountId"`
	SubAccountID           string    `json:"subAccountId"`
}

RuntimeOperation holds information about operation performed on a runtime

type RuntimeState

type RuntimeState struct {
	ID string `json:"id"`

	CreatedAt time.Time `json:"created_at"`

	RuntimeID   string `json:"runtimeId"`
	OperationID string `json:"operationId"`

	KymaConfig    gqlschema.KymaConfigInput     `json:"kymaConfig"`
	ClusterConfig gqlschema.GardenerConfigInput `json:"clusterConfig"`
}

func NewRuntimeState

func NewRuntimeState(runtimeID, operationID string, kymaConfig *gqlschema.KymaConfigInput, clusterConfig *gqlschema.GardenerConfigInput) RuntimeState

type ServiceManagerBasicAuth

type ServiceManagerBasicAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type ServiceManagerCredentials

type ServiceManagerCredentials struct {
	BasicAuth ServiceManagerBasicAuth `json:"basic"`
}

type ServiceManagerEntryDTO

type ServiceManagerEntryDTO struct {
	Credentials ServiceManagerCredentials `json:"credentials"`
	URL         string                    `json:"url"`
}

type TrialCloudProvider

type TrialCloudProvider string
const Azure TrialCloudProvider = "Azure"
const Gcp TrialCloudProvider = "GCP"

type UpgradeKymaOperation

type UpgradeKymaOperation struct {
	RuntimeOperation `json:"runtime_operation"`
	InputCreator     ProvisionerInputCreator `json:"-"`

	PlanID                 string `json:"plan_id"`
	ProvisioningParameters string `json:"provisioning_parameters"`
}

UpgradeKymaOperation holds all information about upgrade Kyma operation

func (*UpgradeKymaOperation) GetProvisioningParameters

func (do *UpgradeKymaOperation) GetProvisioningParameters() (ProvisioningParameters, error)

func (*UpgradeKymaOperation) SetProvisioningParameters

func (do *UpgradeKymaOperation) SetProvisioningParameters(parameters ProvisioningParameters) error

Directories

Path Synopsis
Package appinfo is responsible for defining REST endpoints which are serving overall information about created and managed resources e.g.
Package appinfo is responsible for defining REST endpoints which are serving overall information about created and managed resources e.g.
Currently added in this package to be able to access plans schemas.
Currently added in this package to be able to access plans schemas.
cis
e2e
This package provides a syntactic sugar and helper functions to make http things easier to read or to express
This package provides a syntactic sugar and helper functions to make http things easier to read or to express
ias
lms
automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
Package copied from https://github.com/kyma-project/kyma/blob/1.11.0/components/service-binding-usage-controller/internal/platform/logger/spy/logger.go Only Reset() method was added.
Package copied from https://github.com/kyma-project/kyma/blob/1.11.0/components/service-binding-usage-controller/internal/platform/logger/spy/logger.go Only Reset() method was added.
This package is NOT FOR PRODUCTION USE CASE.
This package is NOT FOR PRODUCTION USE CASE.
third_party
machinebox/graphql
Package graphql provides a low level GraphQL client.
Package graphql provides a low level GraphQL client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL