jx: github.com/jenkins-x/jx/pkg/cloud/iks Index | Files

package iks

import "github.com/jenkins-x/jx/pkg/cloud/iks"

Index

Package Files

accounts.go auth.go cli.go clusters.go datacenters.go helper.go iam.go iks.go regions.go registry.go zones.go

Constants

const (
    ErrCodeNotAuthorized        = "NotAuthorized"
    ErrCodeUnableToAuthenticate = "UnableToAuthenticate"
)
const (
    //ErrCodeInvalidToken  ...
    ErrCodeInvalidToken = "InvalidToken"
)

func AuthenticateAPIKey Uses

func AuthenticateAPIKey(apikey string, config *ibmcloud.Config) error

func AuthenticatePassword Uses

func AuthenticatePassword(username string, password string, config *ibmcloud.Config) error

func AuthenticateSSO Uses

func AuthenticateSSO(passcode string, config *ibmcloud.Config) error

func ComputeClusterConfigDir Uses

func ComputeClusterConfigDir(name string) (string, error)

func ConfigFromJSON Uses

func ConfigFromJSON(config *ibmcloud.Config) (accountID string, err error)

func Filter Uses

func Filter(vs []containerv1.KubeVersion, f func(containerv1.KubeVersion) bool) []containerv1.KubeVersion

func GetAccounts Uses

func GetAccounts(accounts []Account) map[string]*Account

func GetAuthRegions Uses

func GetAuthRegions(config *ibmcloud.Config) ([]string, error)

func GetClusterID Uses

func GetClusterID() (string, error)

func GetClusterName Uses

func GetClusterName() (string, error)

func GetClusterRegistry Uses

func GetClusterRegistry(kubeClient kubernetes.Interface) string

Try to use the regional registry used by the cluster We will also set the corresponding secret for jenkins-x right away

func GetKubeClusterID Uses

func GetKubeClusterID(kubeClient kubernetes.Interface) (string, error)

func GetKubeClusterRegion Uses

func GetKubeClusterRegion(kubeClient kubernetes.Interface) (string, error)

func GetKubeVersions Uses

func GetKubeVersions(versions containerv1.KubeVersions) ([]string, string, error)

func GetMachineTypes Uses

func GetMachineTypes(zone Zone, region Region, machinetypes MachineTypes) ([]string, error)

func GetPrivateVLANs Uses

func GetPrivateVLANs(zone Zone, region Region, vlans VLANs) ([]string, error)

func GetPublicVLANs Uses

func GetPublicVLANs(zone Zone, region Region, vlans VLANs) ([]string, error)

func GetRegions Uses

func GetRegions(regions Regions) ([]string, error)

func GetRegistryConfigJSON Uses

func GetRegistryConfigJSON(registry string) (string, error)

func GetZones Uses

func GetZones(region Region, zones Zones) ([]string, error)

func InstallIBMCloud Uses

func InstallIBMCloud(skipPathScan bool) error

func InstallIBMCloudWithVersion Uses

func InstallIBMCloudWithVersion(version string, skipPathScan bool) error

InstallIBMCloudWithVersion installs a specific version of IBM cloud CLI

func RefreshTokenToLinkAccounts Uses

func RefreshTokenToLinkAccounts(account *Account, config *ibmcloud.Config) error

type Account Uses

type Account struct {
    GUID          string
    Name          string
    Type          string
    State         string
    OwnerGUID     string
    OwnerUserID   string
    OwnerUniqueID string
    CustomerID    string
    CountryCode   string
    CurrencyCode  string
    Organizations []AccountOrganization
    IMSAccountID  string
}

Account Model ...

type AccountEntity Uses

type AccountEntity struct {
    Name                 string                `json:"name"`
    Type                 string                `json:"type"`
    State                string                `json:"state"`
    OwnerGUID            string                `json:"owner"`
    OwnerUserID          string                `json:"owner_userid"`
    OwnerUniqueID        string                `json:"owner_unique_id"`
    CustomerID           string                `json:"customer_id"`
    CountryCode          string                `json:"country_code"`
    CurrencyCode         string                `json:"currency_code"`
    Organizations        []AccountOrganization `json:"organizations_region"`
    Linkages             []Linkage             `json:"linkages"`
    BluemixSubscriptions []BluemixSubscription `json:"bluemix_subscriptions"`
}

AccountEntity ...

type AccountNameQueryResponse Uses

type AccountNameQueryResponse struct {
    Metadata Metadata
    Entity   AccountEntity
}

AccountQueryResponse ...

func (AccountNameQueryResponse) ToModel Uses

func (nameQueryResponse AccountNameQueryResponse) ToModel() Account

type AccountOrganization Uses

type AccountOrganization struct {
    GUID   string `json:"guid"`
    Region string `json:"region"`
}

AccountOrganization ...

type AccountQueryResponse Uses

type AccountQueryResponse struct {
    Metadata Metadata
    Accounts []AccountResource `json:"resources"`
}

AccountQueryResponse ...

type AccountResource Uses

type AccountResource struct {
    Resource
    Entity AccountEntity
}

AccountResource ...

func (AccountResource) ToModel Uses

func (resource AccountResource) ToModel() Account

ToModel ...

type AccountServiceAPI Uses

type AccountServiceAPI interface {
    Accounts() Accounts
}

AccountServiceAPI is the accountv2 client ...

func NewAccountServiceAPI Uses

func NewAccountServiceAPI(sess *session.Session) (AccountServiceAPI, error)

New ...

type Accounts Uses

type Accounts interface {
    List() ([]Account, error)
    FindByOrg(orgGUID string, region string) (*Account, error)
    FindByOwner(userID string) (*Account, error)
    Get(accountId string) (*Account, error)
}

Accounts ...

type AddTokenResponse Uses

type AddTokenResponse struct {
    Token string `json:"token"`
}

type Auth Uses

type Auth struct {
    Auth string `json:"auth,omitempty"`
}

type BluemixSubscription Uses

type BluemixSubscription struct {
    SoftlayerAccountID string `json:"softlayer_account_id"`
}

type ClusterConfig Uses

type ClusterConfig struct {
    ClusterID      string `json:"cluster_id"`
    ClusterName    string `json:"cluster_name"`
    ClusterType    string `json:"cluster_type"`
    ClusterPayTier string `json:"cluster_pay_tier"`
    Datacenter     string `json:"datacenter"`
    AccountID      string `json:"account_id"`
    Created        string `json:"created"`
}

This name is the name known to cruiser

type Clusters Uses

type Clusters interface {
    GetClusterConfig(name string, target containerv1.ClusterTargetHeader) (string, error)
}

type Config Uses

type Config struct {
    Auths map[string]*Auth `json:"auths,omitempty"`
}

type ConfigJSON Uses

type ConfigJSON struct {
    APIEndpoint     string `json:"APIEndpoint"`
    ConsoleEndpoint string `json:"ConsoleEndpoint"`
    Region          string `json:"Region"`
    RegionID        string `json:"RegionID"`
    RegionType      string `json:"RegionType"`
    IAMEndpoint     string `json:"IAMEndpoint"`
    IAMToken        string `json:"IAMToken"`
    IAMRefreshToken string `json:"IAMRefreshToken"`
    Account         struct {
        GUID  string `json:"GUID"`
        Name  string `json:"Name"`
        Owner string `json:"Owner"`
    }   `json:"Account"`
    ResourceGroup struct {
        GUID    string `json:"GUID"`
        Name    string `json:"Name"`
        State   string `json:"State"`
        Default bool   `json:"Default"`
        QuotaID string `json:"QuotaID"`
    }   `json:"ResourceGroup"`
    CFEETargeted bool   `json:"CFEETargeted"`
    CFEEEnvID    string `json:"CFEEEnvID"`
    PluginRepos  []struct {
        Name string `json:"Name"`
        URL  string `json:"URL"`
    }   `json:"PluginRepos"`
    SSLDisabled                bool   `json:"SSLDisabled"`
    Locale                     string `json:"Locale"`
    Trace                      string `json:"Trace"`
    ColorEnabled               string `json:"ColorEnabled"`
    HTTPTimeout                int    `json:"HTTPTimeout"`
    CLIInfoEndpoint            string `json:"CLIInfoEndpoint"`
    CheckCLIVersionDisabled    bool   `json:"CheckCLIVersionDisabled"`
    UsageStatsDisabled         bool   `json:"UsageStatsDisabled"`
    SDKVersion                 string `json:"SDKVersion"`
    UpdateCheckInterval        int    `json:"UpdateCheckInterval"`
    UpdateRetryCheckInterval   int    `json:"UpdateRetryCheckInterval"`
    UpdateNotificationInterval int    `json:"UpdateNotificationInterval"`
}

type IAMAuthRepository Uses

type IAMAuthRepository struct {
    // contains filtered or unexported fields
}

IAMAuthRepository ...

func NewIAMAuthRepository Uses

func NewIAMAuthRepository(config *bluemix.Config, client *rest.Client) (*IAMAuthRepository, error)

NewIAMAuthRepository ...

func (*IAMAuthRepository) AuthenticateAPIKey Uses

func (auth *IAMAuthRepository) AuthenticateAPIKey(apiKey string) error

AuthenticateAPIKey ...

func (*IAMAuthRepository) AuthenticatePassword Uses

func (auth *IAMAuthRepository) AuthenticatePassword(username string, password string) error

AuthenticatePassword ...

func (*IAMAuthRepository) AuthenticateSSO Uses

func (auth *IAMAuthRepository) AuthenticateSSO(passcode string) error

AuthenticateSSO ...

func (*IAMAuthRepository) RefreshToken Uses

func (auth *IAMAuthRepository) RefreshToken() (string, error)

RefreshToken ...

func (*IAMAuthRepository) RefreshTokenToLinkAccounts Uses

func (auth *IAMAuthRepository) RefreshTokenToLinkAccounts(account *Account) error

type IAMError Uses

type IAMError struct {
    ErrorCode    string `json:"errorCode"`
    ErrorMessage string `json:"errorMessage"`
    ErrorDetails string `json:"errorDetails"`
}

IAMError ...

func (IAMError) Description Uses

func (e IAMError) Description() string

Description ...

type IAMTokenResponse Uses

type IAMTokenResponse struct {
    AccessToken     string `json:"access_token"`
    RefreshToken    string `json:"refresh_token"`
    UAAAccessToken  string `json:"uaa_token"`
    UAARefreshToken string `json:"uaa_refresh_token"`
    TokenType       string `json:"token_type"`
}

IAMTokenResponse ...

type KubernetesServiceAPI Uses

type KubernetesServiceAPI interface {
    Zones() Zones
    Regions() Regions
    MachineTypes() MachineTypes
    VLANs() VLANs
    Clusters() Clusters
}

func New Uses

func New(sess *session.Session) (KubernetesServiceAPI, error)

func NewSessionless Uses

func NewSessionless(sess *session.Session) (KubernetesServiceAPI, error)

No auth session is required for region and zone calls

type Linkage Uses

type Linkage struct {
    Origin string `json:"origin"`
    State  string `json:"state"`
}

type MachineType Uses

type MachineType struct {
    Name                      string
    Memory                    string
    NetworkSpeed              string
    Cores                     string
    Os                        string
    ServerType                string
    Storage                   string
    SecondaryStorage          string
    SecondaryStorageEncrypted bool
    Deprecated                bool
    CorrespondingMachineType  string
    IsTrusted                 bool
    Gpus                      string
}

type MachineTypes Uses

type MachineTypes interface {
    GetMachineTypes(zone Zone, region Region) ([]MachineType, error)
    GetMachineType(machinetypearg string, zone Zone, region Region) (*MachineType, error)
}

type Metadata Uses

type Metadata struct {
    GUID string `json:"guid"`
    URL  string `json:"url"`
}

Metadata ...

type Region Uses

type Region struct {
    Name        string `json:"name"`
    Alias       string `json:"alias"`
    CfURL       string `json:"cfURL"`
    FreeEnabled bool   `json:"freeEnabled"`
}

type RegionResponse Uses

type RegionResponse struct {
    Regions []Region `json:"regions"`
}

type Regions Uses

type Regions interface {
    GetRegions() ([]Region, error)
    GetRegion(region string) (*Region, error)
}

type Registry Uses

type Registry interface {
    AddToken(account string, description string, permanent bool, write bool) (string, error)
}

type RegistryServiceAPI Uses

type RegistryServiceAPI interface {
    Registry() Registry
}

func NewRegistryServiceAPI Uses

func NewRegistryServiceAPI(sess *session.Session) (RegistryServiceAPI, error)

New ...

type Resource Uses

type Resource struct {
    Metadata Metadata
}

Resource ...

type VLAN Uses

type VLAN struct {
    ID         string `json:"id"`
    Type       string `json:"type"`
    Properties struct {
        Name                       string `json:"name"`
        Note                       string `json:"note"`
        PrimaryRouter              string `json:"primary_router"`
        VlanNumber                 string `json:"vlan_number"`
        VlanType                   string `json:"vlan_type"`
        Location                   string `json:"location"`
        LocalDiskStorageCapability string `json:"local_disk_storage_capability"`
        SanStorageCapability       string `json:"san_storage_capability"`
    }   `json:"properties"`
}

type VLANs Uses

type VLANs interface {
    GetVLANs(zone Zone, region Region) ([]VLAN, error)
    GetVLAN(vlanarg string, zone Zone, region Region) (*VLAN, error)
}

type Zone Uses

type Zone struct {
    ID    string
    Metro string
}

type Zones Uses

type Zones interface {
    GetZones(region Region) ([]Zone, error)
    GetZone(zone string, region Region) (*Zone, error)
}

Package iks imports 29 packages (graph) and is imported by 3 packages. Updated 2019-09-13. Refresh now. Tools for package owners.