Documentation
¶
Index ¶
- Variables
- func Decode(decoder runtime.Decoder, data []byte, into runtime.Object) error
- func GetProjectsFromDB(ctx context.Context) ([]models.Project, error)
- func GetSeedsFromDB(ctx context.Context) ([]models.Seed, error)
- func InferShootFromInstanceName(ctx context.Context, name string) (*models.Shoot, error)
Constants ¶
This section is empty.
Variables ¶
var ErrCannotInferShoot = errors.New("cannot infer shoot")
ErrCannotInferShoot is an error which is returned when a shoot cannot be inferred from the specified instance name.
Functions ¶
func Decode ¶ added in v0.1.14
Decode takes a `decoder` and decodes the provided `data` into the provided object. The underlying `into` address is used to assign the decoded object.
func GetProjectsFromDB ¶ added in v0.1.8
GetProjectsFromDB fetches the models.Project items from the database.
func GetSeedsFromDB ¶
GetSeedsFromDB fetches the models.Seed items from the database.
func InferShootFromInstanceName ¶ added in v0.1.6
InferShootFromInstanceName infers the shoot from a Virtual Machine instance name.
The GCP, AWS and Azure extension providers follow the same naming convention when creating a new Virtual Machine, which is:
Convention: <shoot-namespace>-<worker-pool>-z<zone-index>-<pool-hash>-<vm-hash>
Example: shoot--myproject--myshoot-mypool-z1-abcde-12345
The <pool-hash> and <vm-hash> represent the first 5 bytes from a SHA-256 digest.
Use this utility function to infer shoot details for Virtual Machines provisioned by the GCP, AWS, Azure or OpenStack extensions only.
Types ¶
This section is empty.