Documentation ¶
Index ¶
- Constants
- func ExtractProjectID(ServiceAccountJSON []byte) (string, error)
- func MinifyServiceAccount(serviceAccountJSON []byte) (string, error)
- type GCPBotanist
- func (b *GCPBotanist) ApplyCreateHook() error
- func (b *GCPBotanist) DeployBackupInfrastructure() error
- func (b *GCPBotanist) DeployInfrastructure() error
- func (b *GCPBotanist) DeployKube2IAMResources() error
- func (b *GCPBotanist) DestroyBackupInfrastructure() error
- func (b *GCPBotanist) DestroyInfrastructure() error
- func (b *GCPBotanist) DestroyKube2IAMResources() error
- func (b *GCPBotanist) GenerateAdmissionControlConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GenerateCloudConfigUserDataConfig() *common.CloudConfigUserDataConfig
- func (b *GCPBotanist) GenerateCloudProviderConfig() (string, error)
- func (b *GCPBotanist) GenerateEtcdBackupConfig() (map[string][]byte, map[string]interface{}, error)
- func (b *GCPBotanist) GenerateKube2IAMConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GenerateKubeAPIServerConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GenerateKubeControllerManagerConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GenerateKubeSchedulerConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GenerateMachineClassSecretData() map[string][]byte
- func (b *GCPBotanist) GenerateMachineConfig() ([]map[string]interface{}, []operation.MachineDeployment, error)
- func (b *GCPBotanist) GenerateNginxIngressConfig() (map[string]interface{}, error)
- func (b *GCPBotanist) GetCloudProviderName() string
- func (b *GCPBotanist) GetMachineClassInfo() (classKind, classPlural, classChartName string)
- func (b *GCPBotanist) RefreshCloudProviderConfig(currentConfig map[string]string) map[string]string
Constants ¶
const ( // ServiceAccountJSON is a constant for the key in a cloud provider secret that holds the Google service account. ServiceAccountJSON = "serviceaccount.json" // ProjectID is a constant for the key in a Google service account storing the project id. ProjectID = "project_id" )
Variables ¶
This section is empty.
Functions ¶
func ExtractProjectID ¶
ExtractProjectID extracts the value of the key "project_id" from the service account JSON document.
func MinifyServiceAccount ¶
MinifyServiceAccount uses the provided service account JSON objects and minifies it. This is required when you want to inject it as environment variable into Terraform.
Types ¶
type GCPBotanist ¶
type GCPBotanist struct { *operation.Operation CloudProviderName string VPCName string Project string MinifiedServiceAccount string }
GCPBotanist is a struct which has methods that perform GCP cloud-specific operations for a Shoot cluster.
func New ¶
func New(o *operation.Operation, purpose string) (*GCPBotanist, error)
New takes an operation object <o> and creates a new GCPBotanist object.
func (*GCPBotanist) ApplyCreateHook ¶
func (b *GCPBotanist) ApplyCreateHook() error
ApplyCreateHook does currently nothing for GCP.
func (*GCPBotanist) DeployBackupInfrastructure ¶
func (b *GCPBotanist) DeployBackupInfrastructure() error
DeployBackupInfrastructure kicks off a Terraform job which deploys the infrastructure resources for backup.
func (*GCPBotanist) DeployInfrastructure ¶
func (b *GCPBotanist) DeployInfrastructure() error
DeployInfrastructure kicks off a Terraform job which deploys the infrastructure.
func (*GCPBotanist) DeployKube2IAMResources ¶
func (b *GCPBotanist) DeployKube2IAMResources() error
DeployKube2IAMResources - Not needed on GCP
func (*GCPBotanist) DestroyBackupInfrastructure ¶
func (b *GCPBotanist) DestroyBackupInfrastructure() error
DestroyBackupInfrastructure kicks off a Terraform job which destroys the infrastructure for backup.
func (*GCPBotanist) DestroyInfrastructure ¶
func (b *GCPBotanist) DestroyInfrastructure() error
DestroyInfrastructure kicks off a Terraform job which destroys the infrastructure.
func (*GCPBotanist) DestroyKube2IAMResources ¶
func (b *GCPBotanist) DestroyKube2IAMResources() error
DestroyKube2IAMResources - Not needed on GCP.
func (*GCPBotanist) GenerateAdmissionControlConfig ¶
func (b *GCPBotanist) GenerateAdmissionControlConfig() (map[string]interface{}, error)
GenerateAdmissionControlConfig generates values which are required to render the chart admissions-controls properly.
func (*GCPBotanist) GenerateCloudConfigUserDataConfig ¶
func (b *GCPBotanist) GenerateCloudConfigUserDataConfig() *common.CloudConfigUserDataConfig
GenerateCloudConfigUserDataConfig generates values which are required to render the chart shoot-cloud-config properly.
func (*GCPBotanist) GenerateCloudProviderConfig ¶
func (b *GCPBotanist) GenerateCloudProviderConfig() (string, error)
GenerateCloudProviderConfig generates the GCE cloud provider config. See this for more details: https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/gce/gce.go
func (*GCPBotanist) GenerateEtcdBackupConfig ¶
func (b *GCPBotanist) GenerateEtcdBackupConfig() (map[string][]byte, map[string]interface{}, error)
GenerateEtcdBackupConfig returns the etcd backup configuration for the etcd Helm chart.
func (*GCPBotanist) GenerateKube2IAMConfig ¶
func (b *GCPBotanist) GenerateKube2IAMConfig() (map[string]interface{}, error)
GenerateKube2IAMConfig - Not needed on GCP.
func (*GCPBotanist) GenerateKubeAPIServerConfig ¶
func (b *GCPBotanist) GenerateKubeAPIServerConfig() (map[string]interface{}, error)
GenerateKubeAPIServerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-apiserver properly.
func (*GCPBotanist) GenerateKubeControllerManagerConfig ¶
func (b *GCPBotanist) GenerateKubeControllerManagerConfig() (map[string]interface{}, error)
GenerateKubeControllerManagerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-controller-manager properly.
func (*GCPBotanist) GenerateKubeSchedulerConfig ¶
func (b *GCPBotanist) GenerateKubeSchedulerConfig() (map[string]interface{}, error)
GenerateKubeSchedulerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the kube-scheduler properly.
func (*GCPBotanist) GenerateMachineClassSecretData ¶
func (b *GCPBotanist) GenerateMachineClassSecretData() map[string][]byte
GenerateMachineClassSecretData generates the secret data for the machine class secret (except the userData field which is computed elsewhere).
func (*GCPBotanist) GenerateMachineConfig ¶
func (b *GCPBotanist) GenerateMachineConfig() ([]map[string]interface{}, []operation.MachineDeployment, error)
GenerateMachineConfig generates the configuration values for the cloud-specific machine class Helm chart. It also generates a list of corresponding MachineDeployments. The provided worker groups will be distributed over the desired availability zones. It returns the computed list of MachineClasses and MachineDeployments.
func (*GCPBotanist) GenerateNginxIngressConfig ¶
func (b *GCPBotanist) GenerateNginxIngressConfig() (map[string]interface{}, error)
GenerateNginxIngressConfig generates values which are required to render the chart nginx-ingress properly.
func (*GCPBotanist) GetCloudProviderName ¶
func (b *GCPBotanist) GetCloudProviderName() string
GetCloudProviderName returns the Kubernetes cloud provider name for this cloud.
func (*GCPBotanist) GetMachineClassInfo ¶
func (b *GCPBotanist) GetMachineClassInfo() (classKind, classPlural, classChartName string)
GetMachineClassInfo returns the name of the class kind, the plural of it and the name of the Helm chart which contains the machine class template.
func (*GCPBotanist) RefreshCloudProviderConfig ¶
func (b *GCPBotanist) RefreshCloudProviderConfig(currentConfig map[string]string) map[string]string
RefreshCloudProviderConfig refreshes the cloud provider credentials in the existing cloud provider config. Not needed on GCP (cloud provider config does not contain the credentials), hence, the original is returned back.