Documentation ¶
Index ¶
- Constants
- func CheckBTPCredsMatching(a, b keb.Component) bool
- func CheckBTPCredsValid(clusterConfiguration reconcilerApi.Cluster) error
- func DetermineMajorVersion(version string) int
- func GetBTPOperatorProvisioningOverrides(creds *ServiceManagerOperatorCredentials, clusterId string) []*gqlschema.ConfigEntryInput
- func GetBTPOperatorReconcilerOverrides(creds *ServiceManagerOperatorCredentials, clusterID string) []reconcilerApi.Configuration
- func GetClusterIDWithKubeconfig(kubeconfig string) (string, error)
- func IsEuAccess(platformRegion string) bool
- func NewSchemeForTests() *runtime.Scheme
- type AutoScalerParameters
- type AvsEvaluationStatus
- type AvsLifecycleData
- type CloudProvider
- type ClusterIDGetter
- type ComponentConfigurationInputList
- type ComponentSource
- type ConfigForPlan
- type DeprovisioningOperation
- type ERSContext
- type ERSContextStats
- type EventHub
- type Instance
- type InstanceDetails
- type InstanceStats
- type InstanceWithOperation
- type KymaComponent
- type MonitoringData
- type NetworkingDTO
- type OIDCConfigDTO
- type Operation
- func (o *Operation) EventErrorf(err error, fmt string, args ...any)
- func (o *Operation) EventInfof(fmt string, args ...any)
- func (o *Operation) FinishStage(stageName string)
- func (o *Operation) IsFinished() bool
- func (o *Operation) IsStageFinished(stage string) bool
- func (op *Operation) TimeSinceReconcilerDeregistrationTriggered() time.Duration
- type OperationStats
- type OperationType
- type Orchestration
- type ProvisionerInputCreator
- type ProvisioningOperation
- type ProvisioningParameters
- type ProvisioningParametersDTO
- type RuntimeState
- type RuntimeVersionData
- func NewEmptyRuntimeVersion() *RuntimeVersionData
- func NewRuntimeVersionFromAccountMapping(version string, majorVersion int) *RuntimeVersionData
- func NewRuntimeVersionFromDefaults(version string) *RuntimeVersionData
- func NewRuntimeVersionFromParameters(version string, majorVersion int) *RuntimeVersionData
- type RuntimeVersionOrigin
- type ServiceManagerBasicAuth
- type ServiceManagerCredentials
- type ServiceManagerEntryDTO
- type ServiceManagerOperatorCredentials
- type UpdatingOperation
- type UpdatingParametersDTO
- type UpgradeClusterOperation
- type UpgradeKymaOperation
Constants ¶
const ( BTPOperatorComponentName = "btp-operator" // BTP Operator overrides keys BTPOperatorClientID = "manager.secret.clientid" BTPOperatorClientSecret = "manager.secret.clientsecret" BTPOperatorURL = "manager.secret.url" // deprecated, for btp-operator v0.2.0 BTPOperatorSMURL = "manager.secret.sm_url" // for btp-operator v0.2.3 BTPOperatorTokenURL = "manager.secret.tokenurl" BTPOperatorClusterID = "cluster.id" BTPOperatorPriorityClass = "manager.priorityClassName" BTPOperatorPriorityClassValue = "kyma-system" )
const ( GitKymaProject = "kyma-project" GitKymaRepo = "kyma" )
GitKymaProject and GitKymaRepo define public Kyma GitHub parameters used for external evaluation.
const (
LicenceTypeLite = "TestDevelopmentAndDemo"
)
Variables ¶
This section is empty.
Functions ¶
func CheckBTPCredsMatching ¶
func CheckBTPCredsValid ¶
func CheckBTPCredsValid(clusterConfiguration reconcilerApi.Cluster) error
func DetermineMajorVersion ¶
func GetBTPOperatorProvisioningOverrides ¶
func GetBTPOperatorProvisioningOverrides(creds *ServiceManagerOperatorCredentials, clusterId string) []*gqlschema.ConfigEntryInput
func GetBTPOperatorReconcilerOverrides ¶
func GetBTPOperatorReconcilerOverrides(creds *ServiceManagerOperatorCredentials, clusterID string) []reconcilerApi.Configuration
func IsEuAccess ¶
func NewSchemeForTests ¶
KEB tests can run in parallel resulting in concurrent access to scheme maps if the global scheme from client-go is used. For this reason, KEB tests each have their own scheme.
Types ¶
type AutoScalerParameters ¶
type AutoScalerParameters struct { AutoScalerMin *int `json:"autoScalerMin,omitempty"` AutoScalerMax *int `json:"autoScalerMax,omitempty"` MaxSurge *int `json:"maxSurge,omitempty"` }
func (AutoScalerParameters) Validate ¶
func (p AutoScalerParameters) Validate(planMin, planMax int) error
FIXME: this is a makeshift check until the provisioner is capable of returning error messages https://github.com/kyma-project/control-plane/issues/946
type AvsEvaluationStatus ¶
type AvsLifecycleData ¶
type AvsLifecycleData struct { AvsEvaluationInternalId int64 `json:"avs_evaluation_internal_id"` AVSEvaluationExternalId int64 `json:"avs_evaluation_external_id"` AvsInternalEvaluationStatus AvsEvaluationStatus `json:"avs_internal_evaluation_status"` AvsExternalEvaluationStatus AvsEvaluationStatus `json:"avs_external_evaluation_status"` AVSInternalEvaluationDeleted bool `json:"avs_internal_evaluation_deleted"` AVSExternalEvaluationDeleted bool `json:"avs_external_evaluation_deleted"` }
type CloudProvider ¶
type CloudProvider string
const ( Azure CloudProvider = "Azure" AWS CloudProvider = "AWS" GCP CloudProvider = "GCP" UnknownProvider CloudProvider = "unknown" Openstack CloudProvider = "OpenStack" )
type ClusterIDGetter ¶
type ComponentConfigurationInputList ¶
type ComponentConfigurationInputList []*gqlschema.ComponentConfigurationInput
func (ComponentConfigurationInputList) DeepCopy ¶
func (l ComponentConfigurationInputList) DeepCopy() []*gqlschema.ComponentConfigurationInput
type ComponentSource ¶
type ComponentSource struct {
URL string `json:"url"`
}
type ConfigForPlan ¶
type ConfigForPlan struct { AdditionalComponents []KymaComponent `json:"additional-components" yaml:"additional-components"` KymaTemplate string `json:"kyma-template" yaml:"kyma-template"` }
func (*ConfigForPlan) ContainsAdditionalComponent ¶
func (c *ConfigForPlan) ContainsAdditionalComponent(componentName string) bool
type DeprovisioningOperation ¶
type DeprovisioningOperation struct {
Operation
}
DeprovisioningOperation holds all information about de-provisioning operation
func NewDeprovisioningOperationWithID ¶
func NewDeprovisioningOperationWithID(operationID string, instance *Instance) (DeprovisioningOperation, error)
NewDeprovisioningOperationWithID creates a fresh (just starting) instance of the DeprovisioningOperation with provided ID
func NewSuspensionOperationWithID ¶
func NewSuspensionOperationWithID(operationID string, instance *Instance) DeprovisioningOperation
NewSuspensionOperationWithID creates a fresh (just starting) instance of the DeprovisioningOperation which does not remove the instance.
type ERSContext ¶
type ERSContext struct { TenantID string `json:"tenant_id,omitempty"` SubAccountID string `json:"subaccount_id"` GlobalAccountID string `json:"globalaccount_id"` SMOperatorCredentials *ServiceManagerOperatorCredentials `json:"sm_operator_credentials,omitempty"` Active *bool `json:"active,omitempty"` UserID string `json:"user_id"` CommercialModel *string `json:"commercial_model,omitempty"` LicenseType *string `json:"license_type,omitempty"` Origin *string `json:"origin,omitempty"` Platform *string `json:"platform,omitempty"` Region *string `json:"region,omitempty"` }
func InheritMissingERSContext ¶
func InheritMissingERSContext(currentOperation, previousOperation ERSContext) ERSContext
func UpdateInstanceERSContext ¶
func UpdateInstanceERSContext(instance, operation ERSContext) ERSContext
func (ERSContext) DisableEnterprisePolicyFilter ¶
func (e ERSContext) DisableEnterprisePolicyFilter() *bool
func (ERSContext) ERSUpdate ¶
func (e ERSContext) ERSUpdate() bool
type ERSContextStats ¶
ERSContextStats provides aggregated information regarding ERSContext
type Instance ¶
type Instance struct { InstanceID string RuntimeID string GlobalAccountID string SubscriptionGlobalAccountID string SubAccountID string ServiceID string ServiceName string ServicePlanID string ServicePlanName string DashboardURL string Parameters ProvisioningParameters ProviderRegion string InstanceDetails InstanceDetails CreatedAt time.Time UpdatedAt time.Time DeletedAt time.Time ExpiredAt *time.Time Version int Provider CloudProvider Reconcilable bool }
func (*Instance) GetInstanceDetails ¶
func (i *Instance) GetInstanceDetails() (InstanceDetails, error)
func (*Instance) GetSubscriptionGlobalAccoundID ¶
type InstanceDetails ¶
type InstanceDetails struct { Avs AvsLifecycleData `json:"avs"` EventHub EventHub `json:"eh"` SubAccountID string `json:"sub_account_id"` RuntimeID string `json:"runtime_id"` ShootName string `json:"shoot_name"` ShootDomain string `json:"shoot_domain"` ClusterName string `json:"clusterName"` ShootDNSProviders gardener.DNSProvidersData `json:"shoot_dns_providers"` Monitoring MonitoringData `json:"monitoring"` EDPCreated bool `json:"edp_created"` ClusterConfigurationVersion int64 `json:"cluster_configuration_version"` Kubeconfig string `json:"-"` ServiceManagerClusterID string `json:"sm_cluster_id"` KymaResourceNamespace string `json:"kyma_resource_namespace"` KymaResourceName string `json:"kyma_resource_name"` EuAccess bool `json:"eu_access"` }
type InstanceStats ¶
InstanceStats provide number of instances per Global Account ID
type InstanceWithOperation ¶
type InstanceWithOperation struct { Instance Type sql.NullString State sql.NullString Description sql.NullString OpCreatedAt time.Time IsSuspensionOp bool }
type KymaComponent ¶
type KymaComponent struct { Name string `json:"name"` ReleaseName string `json:"release"` Namespace string `json:"namespace"` Source *ComponentSource `json:"source,omitempty"` }
KymaComponent represents single Kyma component
type MonitoringData ¶
type NetworkingDTO ¶
type OIDCConfigDTO ¶
type OIDCConfigDTO struct { ClientID string `json:"clientID" yaml:"clientID"` GroupsClaim string `json:"groupsClaim" yaml:"groupsClaim"` IssuerURL string `json:"issuerURL" yaml:"issuerURL"` SigningAlgs []string `json:"signingAlgs" yaml:"signingAlgs"` UsernameClaim string `json:"usernameClaim" yaml:"usernameClaim"` UsernamePrefix string `json:"usernamePrefix" yaml:"usernamePrefix"` }
func (*OIDCConfigDTO) IsProvided ¶
func (o *OIDCConfigDTO) IsProvided() bool
func (*OIDCConfigDTO) Validate ¶
func (o *OIDCConfigDTO) Validate() error
type Operation ¶
type Operation struct { // following fields are serialized to JSON and stored in the storage InstanceDetails ID string `json:"-"` Version int `json:"-"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` Type OperationType `json:"-"` InstanceID string `json:"-"` ProvisionerOperationID string `json:"-"` State domain.LastOperationState `json:"-"` Description string `json:"-"` ProvisioningParameters ProvisioningParameters `json:"-"` InputCreator ProvisionerInputCreator `json:"-"` // OrchestrationID specifies the origin orchestration which triggers the operation, empty for OSB operations (provisioning/deprovisioning) OrchestrationID string `json:"-"` FinishedStages []string `json:"-"` LastError kebError.LastError `json:"-"` // PROVISIONING RuntimeVersion RuntimeVersionData `json:"runtime_version"` DashboardURL string `json:"dashboardURL"` // DEPROVISIONING // Temporary indicates that this deprovisioning operation must not remove the instance Temporary bool `json:"temporary"` ClusterConfigurationDeleted bool `json:"clusterConfigurationDeleted"` Retries int `json:"-"` ReconcilerDeregistrationAt time.Time `json:"reconcilerDeregistrationAt"` ExcutedButNotCompleted []string `json:"excutedButNotCompleted"` UserAgent string `json:"userAgent,omitempty"` // UPDATING UpdatingParameters UpdatingParametersDTO `json:"updating_parameters"` CheckReconcilerStatus bool `json:"check_reconciler_status"` K8sClient client.Client `json:"-"` // Last runtime state payload LastRuntimeState RuntimeState `json:"-"` // Flag used by the steps regarding BTP-Operator credentials update // denotes whether the payload to reconciler differs from last runtime state RequiresReconcilerUpdate bool `json:"-"` // UPGRADE KYMA orchestration.RuntimeOperation `json:"runtime_operation"` ClusterConfigurationApplied bool `json:"cluster_configuration_applied"` // KymaTemplate is read from the configuration then used in the apply_kyma step KymaTemplate string `json:"KymaTemplate"` }
func NewUpdateOperation ¶
func NewUpdateOperation(operationID string, instance *Instance, updatingParams UpdatingParametersDTO) Operation
func (*Operation) EventInfof ¶
func (*Operation) FinishStage ¶
func (*Operation) IsFinished ¶
func (*Operation) IsStageFinished ¶
func (*Operation) TimeSinceReconcilerDeregistrationTriggered ¶
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 OperationType ¶
type OperationType string
OperationType defines the possible types of an asynchronous operation to a broker.
const ( // OperationTypeProvision means provisioning OperationType OperationTypeProvision OperationType = "provision" // OperationTypeDeprovision means deprovision OperationType OperationTypeDeprovision OperationType = "deprovision" // OperationTypeUndefined means undefined OperationType OperationTypeUndefined OperationType = "" // OperationTypeUpgradeKyma means upgrade Kyma OperationType OperationTypeUpgradeKyma OperationType = "upgradeKyma" // OperationTypeUpdate means update OperationTypeUpdate OperationType = "update" // OperationTypeUpgradeCluster means upgrade cluster (shoot) OperationType OperationTypeUpgradeCluster OperationType = "upgradeCluster" )
type Orchestration ¶
type Orchestration struct { OrchestrationID string Type orchestration.Type 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) IsCanceled ¶
func (o *Orchestration) IsCanceled() bool
IsCanceled returns true if orchestration's cancellation endpoint was ever triggered
func (*Orchestration) IsFinished ¶
func (o *Orchestration) IsFinished() bool
type ProvisionerInputCreator ¶
type ProvisionerInputCreator interface { SetProvisioningParameters(params ProvisioningParameters) ProvisionerInputCreator SetShootName(string) 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) CreateUpgradeShootInput() (gqlschema.UpgradeShootInput, error) EnableOptionalComponent(componentName string) ProvisionerInputCreator DisableOptionalComponent(componentName string) ProvisionerInputCreator Provider() CloudProvider Configuration() *ConfigForPlan CreateClusterConfiguration() (reconcilerApi.Cluster, error) CreateProvisionClusterInput() (gqlschema.ProvisionRuntimeInput, error) SetKubeconfig(kcfg string) ProvisionerInputCreator SetRuntimeID(runtimeID string) ProvisionerInputCreator SetInstanceID(instanceID string) ProvisionerInputCreator SetShootDomain(shootDomain string) ProvisionerInputCreator SetShootDNSProviders(dnsProviders gardener.DNSProvidersData) ProvisionerInputCreator SetClusterName(name string) ProvisionerInputCreator SetOIDCLastValues(oidcConfig gqlschema.OIDCConfigInput) ProvisionerInputCreator }
type ProvisioningOperation ¶
type ProvisioningOperation struct {
Operation
}
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
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"` PlatformProvider CloudProvider `json:"platform_provider"` }
func (ProvisioningParameters) IsEqual ¶
func (p ProvisioningParameters) IsEqual(input ProvisioningParameters) bool
type ProvisioningParametersDTO ¶
type ProvisioningParametersDTO struct { AutoScalerParameters `json:",inline"` Name string `json:"name"` TargetSecret *string `json:"targetSecret,omitempty"` VolumeSizeGb *int `json:"volumeSizeGb,omitempty"` MachineType *string `json:"machineType,omitempty"` Region *string `json:"region,omitempty"` Purpose *string `json:"purpose,omitempty"` // 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,omitempty"` Zones []string `json:"zones,omitempty"` OptionalComponentsToInstall []string `json:"components,omitempty"` KymaVersion string `json:"kymaVersion,omitempty"` OverridesVersion string `json:"overridesVersion,omitempty"` RuntimeAdministrators []string `json:"administrators,omitempty"` //Provider - used in Trial plan to determine which cloud provider to use during provisioning Provider *CloudProvider `json:"provider,omitempty"` Kubeconfig string `json:"kubeconfig,omitempty"` ShootName string `json:"shootName,omitempty"` ShootDomain string `json:"shootDomain,omitempty"` OIDC *OIDCConfigDTO `json:"oidc,omitempty"` Networking *NetworkingDTO `json:"networking,omitempty""` }
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"` ClusterSetup *reconcilerApi.Cluster `json:"clusterSetup,omitempty"` KymaVersion string `json:"kyma_version"` }
func NewRuntimeState ¶
func NewRuntimeState(runtimeID, operationID string, kymaConfig *gqlschema.KymaConfigInput, clusterConfig *gqlschema.GardenerConfigInput) RuntimeState
func NewRuntimeStateWithReconcilerInput ¶
func NewRuntimeStateWithReconcilerInput(runtimeID, operationID string, reconcilerInput *reconcilerApi.Cluster) RuntimeState
func (*RuntimeState) GetKymaConfig ¶
func (r *RuntimeState) GetKymaConfig() gqlschema.KymaConfigInput
func (*RuntimeState) GetKymaVersion ¶
func (r *RuntimeState) GetKymaVersion() string
type RuntimeVersionData ¶
type RuntimeVersionData struct { Version string `json:"version"` Origin RuntimeVersionOrigin `json:"origin"` MajorVersion int `json:"major_version"` }
RuntimeVersionData describes the Kyma Version used for the cluster provisioning or upgrade
func NewEmptyRuntimeVersion ¶
func NewEmptyRuntimeVersion() *RuntimeVersionData
func NewRuntimeVersionFromAccountMapping ¶
func NewRuntimeVersionFromAccountMapping(version string, majorVersion int) *RuntimeVersionData
func NewRuntimeVersionFromDefaults ¶
func NewRuntimeVersionFromDefaults(version string) *RuntimeVersionData
func NewRuntimeVersionFromParameters ¶
func NewRuntimeVersionFromParameters(version string, majorVersion int) *RuntimeVersionData
func (RuntimeVersionData) IsEmpty ¶
func (rv RuntimeVersionData) IsEmpty() bool
type RuntimeVersionOrigin ¶
type RuntimeVersionOrigin string
RuntimeVersionOrigin defines the possible sources of the Kyma Version parameter
const ( Parameters RuntimeVersionOrigin = "parameters" Defaults RuntimeVersionOrigin = "defaults" AccountMapping RuntimeVersionOrigin = "account-mapping" )
type ServiceManagerBasicAuth ¶
type ServiceManagerCredentials ¶
type ServiceManagerCredentials struct {
BasicAuth ServiceManagerBasicAuth `json:"basic"`
}
type ServiceManagerEntryDTO ¶
type ServiceManagerEntryDTO struct { Credentials ServiceManagerCredentials `json:"credentials"` URL string `json:"url"` }
type UpdatingOperation ¶
type UpdatingOperation struct {
Operation
}
type UpdatingParametersDTO ¶
type UpdatingParametersDTO struct { AutoScalerParameters `json:",inline"` OIDC *OIDCConfigDTO `json:"oidc,omitempty"` RuntimeAdministrators []string `json:"administrators,omitempty"` MachineType *string `json:"machineType,omitempty"` // Expired - means that the trial SKR is marked as expired Expired bool `json:"expired"` }
func (UpdatingParametersDTO) UpdateAutoScaler ¶
func (u UpdatingParametersDTO) UpdateAutoScaler(p *ProvisioningParametersDTO) bool
type UpgradeClusterOperation ¶
type UpgradeClusterOperation struct {
Operation
}
UpgradeClusterOperation holds all information about upgrade cluster (shoot) operation
type UpgradeKymaOperation ¶
type UpgradeKymaOperation struct {
Operation
}
UpgradeKymaOperation holds all information about upgrade Kyma operation
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. |
btpmanager
|
|
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 |
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. |
provisioning
|
|
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. |