gcpbotanist

package
v0.0.0-...-1764fb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2019 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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

func ExtractProjectID(ServiceAccountJSON []byte) (string, error)

ExtractProjectID extracts the value of the key "project_id" from the service account JSON document.

func MinifyServiceAccount

func MinifyServiceAccount(serviceAccountJSON []byte) (string, error)

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) DeployBackupInfrastructure

func (b *GCPBotanist) DeployBackupInfrastructure() error

DeployBackupInfrastructure kicks off a Terraform job which deploys the infrastructure resources for backup.

func (*GCPBotanist) DeployCloudSpecificControlPlane

func (b *GCPBotanist) DeployCloudSpecificControlPlane() error

DeployCloudSpecificControlPlane does currently nothing for GCP.

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) DestroyKube2IAMResources

func (b *GCPBotanist) DestroyKube2IAMResources() error

DestroyKube2IAMResources - Not needed on GCP.

func (*GCPBotanist) GenerateCSIConfig

func (b *GCPBotanist) GenerateCSIConfig() (map[string]interface{}, error)

GenerateCSIConfig generates the configuration for CSI charts

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) GenerateCloudControllerManagerConfig

func (b *GCPBotanist) GenerateCloudControllerManagerConfig() (map[string]interface{}, string, error)

GenerateCloudControllerManagerConfig generates the cloud provider specific values which are required to render the Deployment manifest of the cloud-controller-manager 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) GenerateETCDStorageClassConfig

func (b *GCPBotanist) GenerateETCDStorageClassConfig() map[string]interface{}

GenerateETCDStorageClassConfig generates values which are required to create etcd volume storageclass properly.

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) GenerateKubeAPIServerExposeConfig

func (b *GCPBotanist) GenerateKubeAPIServerExposeConfig() (map[string]interface{}, error)

GenerateKubeAPIServerExposeConfig defines the cloud provider specific values which configure how the kube-apiserver is exposed to the public.

func (*GCPBotanist) GenerateKubeAPIServerServiceConfig

func (b *GCPBotanist) GenerateKubeAPIServerServiceConfig() (map[string]interface{}, error)

GenerateKubeAPIServerServiceConfig generates the cloud provider specific values which are required to render the Service manifest of the kube-apiserver-service 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) GenerateNginxIngressConfig

func (b *GCPBotanist) GenerateNginxIngressConfig() (map[string]interface{}, error)

GenerateNginxIngressConfig generates values which are required to render the chart nginx-ingress properly.

func (*GCPBotanist) GenerateStorageClassesConfig

func (b *GCPBotanist) GenerateStorageClassesConfig() (map[string]interface{}, error)

GenerateStorageClassesConfig generates values which are required to render the chart storage-classes properly.

func (*GCPBotanist) GenerateVPNShootConfig

func (b *GCPBotanist) GenerateVPNShootConfig() (map[string]interface{}, error)

GenerateVPNShootConfig generate cloud-specific vpn override - nothing unique for gcp

func (*GCPBotanist) GetCloudProviderName

func (b *GCPBotanist) GetCloudProviderName() string

GetCloudProviderName returns the Kubernetes cloud provider name for this cloud.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL