config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2019 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigMapSourceDir represents a location where ConfigMap is attached to the pod
	ConfigMapSourceDir = mountBaseDir + "/config-map"
	// SecretSourceDir represents a location where Secrets is attached to the pod
	SecretSourceDir = mountBaseDir + "/secret"
	// ServiceAccountSourceDir represents the location where the ServiceAccount token is attached to the pod
	ServiceAccountSourceDir = "/var/run/secrets/kubernetes.io/serviceaccount/"

	// ConfigMapDisksDir represents a path to ConfigMap iso images
	ConfigMapDisksDir = mountBaseDir + "/config-map-disks"
	// SecretDisksDir represents a path to Secrets iso images
	SecretDisksDir = mountBaseDir + "/secret-disks"
	// ServiceAccountDisksDir represents a path to the ServiceAccount iso image
	ServiceAccountDiskDir = mountBaseDir + "/service-account-disk"
	// ServiceAccountDisksName represents the name of the ServiceAccount iso image
	ServiceAccountDiskName = "service-account.iso"
)

Functions

func CreateConfigMapDisks

func CreateConfigMapDisks(vmi *v1.VirtualMachineInstance) error

CreateConfigMapDisks creates ConfigMap iso disks which are attached to vmis

func CreateSecretDisks

func CreateSecretDisks(vmi *v1.VirtualMachineInstance) error

CreateSecretDisks creates Secret iso disks which are attached to vmis

func CreateServiceAccountDisk added in v0.9.2

func CreateServiceAccountDisk(vmi *v1.VirtualMachineInstance) error

CreateServiceAccountDisk creates the ServiceAccount iso disk which is attached to vmis

func GetConfigMapDiskPath

func GetConfigMapDiskPath(volumeName string) string

GetConfigMapDiskPath returns a path to ConfigMap iso image created based on a volume name

func GetConfigMapSourcePath

func GetConfigMapSourcePath(volumeName string) string

GetConfigMapSourcePath returns a path to ConfigMap mounted on a pod

func GetSecretDiskPath

func GetSecretDiskPath(volumeName string) string

GetSecretDiskPath returns a path to Secret iso image created based on volume name

func GetSecretSourcePath

func GetSecretSourcePath(volumeName string) string

GetSecretSourcePath returns a path to Secret mounted on a pod

func GetServiceAccountDiskPath added in v0.9.2

func GetServiceAccountDiskPath() string

GetServiceAccountDiskPath returns a path to the ServiceAccount iso image

Types

type Type

type Type string

Type represents allowed config types like ConfigMap or Secret

const (
	// ConfigMap respresents a configmap type,
	// https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
	ConfigMap Type = "configmap"
	// Secret represents a secret type,
	// https://kubernetes.io/docs/concepts/configuration/secret/
	Secret Type = "secret"
	// ServiceAccount represents a secret type,
	// https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
	ServiceAccount Type = "serviceaccount"
)

Jump to

Keyboard shortcuts

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