Documentation
¶
Overview ¶
Package build implements a common system for building kubernetes for deployers to use.
Index ¶
- Constants
- Variables
- func NewCosHmacCredentials(filename string) *credentials.Credentials
- func StoreCommonBinaries(kuberoot string, outroot string)
- type BuildAndStageStrategy
- type Builder
- type COSConfig
- type CosHmacCredentialsProvider
- type HMACKeys
- type IBMCOSStager
- type MakeBuilder
- type NoopBuilder
- type NoopStager
- type Options
- type Stager
Constants ¶
View Source
const CosHmacCredentialsProviderName = "CosHmacCredentialsProvider"
CosHmacCredentialsProviderName provides a name of CosHmacCreds provider
Variables ¶
View Source
var (
CommonTestBinaries = []string{
"kubectl",
"e2e.test",
"ginkgo",
}
)
View Source
var ( // ErrCosHmacCredentialsHomeNotFound is emitted when the user directory cannot be found. ErrCosHmacCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil) )
Functions ¶
func NewCosHmacCredentials ¶
func NewCosHmacCredentials(filename string) *credentials.Credentials
NewCosHmacCredentials returns a pointer to a new Credentials object
func StoreCommonBinaries ¶
StoreCommonBinaries will best effort try to store commonly built binaries to the output directory
Types ¶
type BuildAndStageStrategy ¶
type BuildAndStageStrategy string //nolint:revive
ignore package name stutter
const ( // MakeStrategy builds using make and (optionally) stages using krel MakeStrategy BuildAndStageStrategy = "make" )
type COSConfig ¶
type COSConfig struct { APIKey string `json:"apikey"` COSHMACKeys HMACKeys `json:"cos_hmac_keys"` Endpoints string `json:"endpoints"` IAMAPIKeyDesc string `json:"iam_apikey_description"` IAMAPIKeyID string `json:"iam_apikey_id"` IAMAPIKeyName string `json:"iam_apikey_name"` IAMRoleCRN string `json:"iam_role_crn"` IAMServiceIDCRN string `json:"iam_serviceid_crn"` ResourceInstanceID string `json:"resource_instance_id"` }
type CosHmacCredentialsProvider ¶
type CosHmacCredentialsProvider struct { // Path to the COS HMAC credentials file. // // If empty will look for "COS_HMAC_CREDENTIALS_FILE" env variable. If the // env value is empty will default to current user's home directory. // Linux/OSX: "$HOME/.ibmcloud/hmac_credentials" // Windows: "%USERPROFILE%\.ibmcloud\hmac_credentials" Filename string // contains filtered or unexported fields }
func (*CosHmacCredentialsProvider) IsExpired ¶
func (p *CosHmacCredentialsProvider) IsExpired() bool
IsExpired returns if the cos hmac credentials have expired.
func (*CosHmacCredentialsProvider) Retrieve ¶
func (p *CosHmacCredentialsProvider) Retrieve() (credentials.Value, error)
Retrieve reads and extracts the cos hmac credentials from the current users home directory.
type IBMCOSStager ¶
type IBMCOSStager struct { StageLocation string RepoRoot string Region string Bucket string Path string TargetBuildArch string Credentials *credentials.Credentials }
func NewIBMCOSStager ¶
func NewIBMCOSStager(stageLocation, repoRoot, targetBuildArch, cosCredType string) (*IBMCOSStager, error)
func (*IBMCOSStager) Stage ¶
func (i *IBMCOSStager) Stage(version string) error
Stage implements Stager.
type MakeBuilder ¶
func (*MakeBuilder) Build ¶
func (m *MakeBuilder) Build() (string, error)
Build builds kubernetes with the quick-release make target
type NoopBuilder ¶
type NoopBuilder struct{}
func (*NoopBuilder) Build ¶
func (n *NoopBuilder) Build() (string, error)
type NoopStager ¶
type NoopStager struct{}
func (*NoopStager) Stage ¶
func (n *NoopStager) Stage(string) error
type Options ¶
type Options struct { Strategy string `flag:"~strategy" desc:"Determines the build strategy to use either make or bazel."` StageLocation string `` /* 134-byte string literal not displayed */ RepoRoot string `flag:"-"` ImageLocation string `flag:"~image-location" desc:"Image registry where built images are stored."` StageExtraGCPFiles bool `flag:"-"` VersionSuffix string `flag:"-"` UpdateLatest bool `flag:"~update-latest" desc:"Whether should upload the build number to the GCS"` TargetBuildArch string `flag:"~target-build-arch" desc:"Target architecture for the test artifacts for dockerized build"` COSCredType string `flag:"~cos-cred-type" desc:"IBM COS credential type(supported options: shared, cos_hmac)"` Builder Stager }
Click to show internal directories.
Click to hide internal directories.