vault

package
v2.1.153 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//DefaultVaultAbbreviation is vault service accounts suffix
	DefaultVaultAbbreviation = "vt"
)

Variables

View Source
var (
	ServiceAccountRoles = []string{"roles/storage.objectAdmin",
		"roles/cloudkms.admin",
		"roles/cloudkms.cryptoKeyEncrypterDecrypter",
	}
)

Functions

func CreateBucket

func CreateBucket(gcloud gke.GClouder, vaultName, bucketName string, projectID, zone string, recreate bool, batchMode bool, handles util.IOFileHandles) (string, error)

CreateBucket Creates a bucket in GKE to store the backend (encrypted) data for vault

func CreateVaultGCPServiceAccount

func CreateVaultGCPServiceAccount(gcloud gke.GClouder, kubeClient kubernetes.Interface, vaultName, namespace, clusterName, projectID string) (string, error)

CreateGCPServiceAccount creates a service account in GCP for the vault service

func GetGoogleProjectID

func GetGoogleProjectID(kubeClient kubernetes.Interface, ns string) string

GetGoogleProjectID returns the Google project ID as registered in the install values during the Jenkins X install process. If the project ID cannot be read the empty string is returned.

func GetGoogleZone

func GetGoogleZone(kubeClient kubernetes.Interface, ns string) string

GetGoogleZone returns the Google zone as registered in the install values during the Jenkins X install process. If the zone cannot be read the empty string is returned.

Types

type KmsConfig

type KmsConfig struct {
	Keyring  string
	Key      string
	Location string
	// contains filtered or unexported fields
}

KmsConfig keeps the configuration for Google KMS service

func CreateKmsConfig

func CreateKmsConfig(gcloud gke.GClouder, vaultName, keyringName string, keyName string, projectID string) (*KmsConfig, error)

CreateKmsConfig creates a KMS config for the GKE Vault

Jump to

Keyboard shortcuts

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