Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Addons = map[string]*Addon{ "dashboard": NewAddon([]*BinAsset{ MustBinAsset("deploy/addons/dashboard/dashboard-ns.yaml", vmpath.GuestAddonsDir, "dashboard-ns.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-clusterrole.yaml", vmpath.GuestAddonsDir, "dashboard-clusterrole.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-clusterrolebinding.yaml", vmpath.GuestAddonsDir, "dashboard-clusterrolebinding.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-configmap.yaml", vmpath.GuestAddonsDir, "dashboard-configmap.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-dp.yaml", vmpath.GuestAddonsDir, "dashboard-dp.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-role.yaml", vmpath.GuestAddonsDir, "dashboard-role.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-rolebinding.yaml", vmpath.GuestAddonsDir, "dashboard-rolebinding.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-sa.yaml", vmpath.GuestAddonsDir, "dashboard-sa.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-secret.yaml", vmpath.GuestAddonsDir, "dashboard-secret.yaml", "0640", false), MustBinAsset("deploy/addons/dashboard/dashboard-svc.yaml", vmpath.GuestAddonsDir, "dashboard-svc.yaml", "0640", false), }, false, "dashboard"), "default-storageclass": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/storageclass/storageclass.yaml.tmpl", vmpath.GuestAddonsDir, "storageclass.yaml", "0640", false), }, true, "default-storageclass"), "storage-provisioner": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/storage-provisioner/storage-provisioner.yaml.tmpl", vmpath.GuestAddonsDir, "storage-provisioner.yaml", "0640", true), }, true, "storage-provisioner"), "storage-provisioner-gluster": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/storage-provisioner-gluster/storage-gluster-ns.yaml.tmpl", vmpath.GuestAddonsDir, "storage-gluster-ns.yaml", "0640", false), MustBinAsset( "deploy/addons/storage-provisioner-gluster/glusterfs-daemonset.yaml.tmpl", vmpath.GuestAddonsDir, "glusterfs-daemonset.yaml", "0640", false), MustBinAsset( "deploy/addons/storage-provisioner-gluster/heketi-deployment.yaml.tmpl", vmpath.GuestAddonsDir, "heketi-deployment.yaml", "0640", false), MustBinAsset( "deploy/addons/storage-provisioner-gluster/storage-provisioner-glusterfile.yaml.tmpl", vmpath.GuestAddonsDir, "storage-privisioner-glusterfile.yaml", "0640", false), }, false, "storage-provisioner-gluster"), "efk": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/efk/elasticsearch-rc.yaml.tmpl", vmpath.GuestAddonsDir, "elasticsearch-rc.yaml", "0640", true), MustBinAsset( "deploy/addons/efk/elasticsearch-svc.yaml.tmpl", vmpath.GuestAddonsDir, "elasticsearch-svc.yaml", "0640", false), MustBinAsset( "deploy/addons/efk/fluentd-es-rc.yaml.tmpl", vmpath.GuestAddonsDir, "fluentd-es-rc.yaml", "0640", true), MustBinAsset( "deploy/addons/efk/fluentd-es-configmap.yaml.tmpl", vmpath.GuestAddonsDir, "fluentd-es-configmap.yaml", "0640", false), MustBinAsset( "deploy/addons/efk/kibana-rc.yaml.tmpl", vmpath.GuestAddonsDir, "kibana-rc.yaml", "0640", false), MustBinAsset( "deploy/addons/efk/kibana-svc.yaml.tmpl", vmpath.GuestAddonsDir, "kibana-svc.yaml", "0640", false), }, false, "efk"), "ingress": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/ingress/ingress-configmap.yaml.tmpl", vmpath.GuestAddonsDir, "ingress-configmap.yaml", "0640", false), MustBinAsset( "deploy/addons/ingress/ingress-rbac.yaml.tmpl", vmpath.GuestAddonsDir, "ingress-rbac.yaml", "0640", false), MustBinAsset( "deploy/addons/ingress/ingress-dp.yaml.tmpl", vmpath.GuestAddonsDir, "ingress-dp.yaml", "0640", true), }, false, "ingress"), "istio-provisioner": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/istio-provisioner/istio-operator.yaml.tmpl", vmpath.GuestAddonsDir, "istio-operator.yaml", "0640", true), }, false, "istio-provisioner"), "istio": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/istio/istio-default-profile.yaml.tmpl", vmpath.GuestAddonsDir, "istio-default-profile.yaml", "0640", false), }, false, "istio"), "metrics-server": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/metrics-server/metrics-apiservice.yaml.tmpl", vmpath.GuestAddonsDir, "metrics-apiservice.yaml", "0640", false), MustBinAsset( "deploy/addons/metrics-server/metrics-server-deployment.yaml.tmpl", vmpath.GuestAddonsDir, "metrics-server-deployment.yaml", "0640", true), MustBinAsset( "deploy/addons/metrics-server/metrics-server-service.yaml.tmpl", vmpath.GuestAddonsDir, "metrics-server-service.yaml", "0640", false), }, false, "metrics-server"), "registry": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/registry/registry-rc.yaml.tmpl", vmpath.GuestAddonsDir, "registry-rc.yaml", "0640", false), MustBinAsset( "deploy/addons/registry/registry-svc.yaml.tmpl", vmpath.GuestAddonsDir, "registry-svc.yaml", "0640", false), MustBinAsset( "deploy/addons/registry/registry-proxy.yaml.tmpl", vmpath.GuestAddonsDir, "registry-proxy.yaml", "0640", false), }, false, "registry"), "registry-creds": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/registry-creds/registry-creds-rc.yaml.tmpl", vmpath.GuestAddonsDir, "registry-creds-rc.yaml", "0640", false), }, false, "registry-creds"), "freshpod": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/freshpod/freshpod-rc.yaml.tmpl", vmpath.GuestAddonsDir, "freshpod-rc.yaml", "0640", true), }, false, "freshpod"), "nvidia-driver-installer": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/gpu/nvidia-driver-installer.yaml.tmpl", vmpath.GuestAddonsDir, "nvidia-driver-installer.yaml", "0640", true), }, false, "nvidia-driver-installer"), "nvidia-gpu-device-plugin": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/gpu/nvidia-gpu-device-plugin.yaml.tmpl", vmpath.GuestAddonsDir, "nvidia-gpu-device-plugin.yaml", "0640", true), }, false, "nvidia-gpu-device-plugin"), "logviewer": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/logviewer/logviewer-dp-and-svc.yaml.tmpl", vmpath.GuestAddonsDir, "logviewer-dp-and-svc.yaml", "0640", false), MustBinAsset( "deploy/addons/logviewer/logviewer-rbac.yaml.tmpl", vmpath.GuestAddonsDir, "logviewer-rbac.yaml", "0640", false), }, false, "logviewer"), "gvisor": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/gvisor/gvisor-pod.yaml.tmpl", vmpath.GuestAddonsDir, "gvisor-pod.yaml", "0640", true), MustBinAsset( "deploy/addons/gvisor/gvisor-runtimeclass.yaml", vmpath.GuestAddonsDir, "gvisor-runtimeclass.yaml", "0640", false), MustBinAsset( "deploy/addons/gvisor/gvisor-config.toml", vmpath.GuestGvisorDir, constants.GvisorConfigTomlTargetName, "0640", true), }, false, "gvisor"), "helm-tiller": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/helm-tiller/helm-tiller-dp.tmpl", vmpath.GuestAddonsDir, "helm-tiller-dp.yaml", "0640", true), MustBinAsset( "deploy/addons/helm-tiller/helm-tiller-rbac.tmpl", vmpath.GuestAddonsDir, "helm-tiller-rbac.yaml", "0640", true), MustBinAsset( "deploy/addons/helm-tiller/helm-tiller-svc.tmpl", vmpath.GuestAddonsDir, "helm-tiller-svc.yaml", "0640", true), }, false, "helm-tiller"), "ingress-dns": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/ingress-dns/ingress-dns-pod.yaml", vmpath.GuestAddonsDir, "ingress-dns-pod.yaml", "0640", false), }, false, "ingress-dns"), }
Addons is the list of addons TODO: Make dynamically loadable: move this data to a .yaml file within each addon directory
Functions ¶
func GenerateTemplateData ¶ added in v1.0.0
func GenerateTemplateData(cfg config.KubernetesConfig) interface{}
GenerateTemplateData generates template data for template assets
Types ¶
type Addon ¶
type Addon struct { Assets []*BinAsset // contains filtered or unexported fields }
Addon is a named list of assets, that can be enabled
type BaseAsset ¶
BaseAsset is the base asset class
func (*BaseAsset) GetAssetName ¶
GetAssetName returns asset name
func (*BaseAsset) GetModTime ¶ added in v1.6.0
GetModTime returns mod time
func (*BaseAsset) GetPermissions ¶
GetPermissions returns permissions
func (*BaseAsset) GetTargetDir ¶
GetTargetDir returns target dir
func (*BaseAsset) GetTargetName ¶
GetTargetName returns target name
type BinAsset ¶ added in v1.1.0
type BinAsset struct { BaseAsset // contains filtered or unexported fields }
BinAsset is a bindata (binary data) asset
func MustBinAsset ¶ added in v1.1.0
MustBinAsset creates a new BinAsset, or panics if invalid
func NewBinAsset ¶ added in v1.1.0
func NewBinAsset(name, targetDir, targetName, permissions string, isTemplate bool) (*BinAsset, error)
NewBinAsset creates a new BinAsset
func (*BinAsset) Evaluate ¶ added in v1.1.0
func (m *BinAsset) Evaluate(data interface{}) (*MemoryAsset, error)
Evaluate evaluates the template to a new asset
func (*BinAsset) IsTemplate ¶ added in v1.1.0
IsTemplate returns if the asset is a template
type CopyableFile ¶
type CopyableFile interface { io.Reader GetLength() int GetAssetName() string GetTargetDir() string GetTargetName() string GetPermissions() string GetModTime() (time.Time, error) Seek(int64, int) (int64, error) }
CopyableFile is something that can be copied
type FileAsset ¶
type FileAsset struct { BaseAsset // contains filtered or unexported fields }
FileAsset is an asset using a file
func NewFileAsset ¶
NewFileAsset creates a new FileAsset
func (*FileAsset) GetModTime ¶ added in v1.6.0
GetModTime returns modification time of the file
type MemoryAsset ¶
type MemoryAsset struct { BaseAsset // contains filtered or unexported fields }
MemoryAsset is a memory-based asset
func NewMemoryAsset ¶
func NewMemoryAsset(d []byte, targetDir, targetName, permissions string) *MemoryAsset
NewMemoryAsset creates a new MemoryAsset
func NewMemoryAssetTarget ¶ added in v0.22.2
func NewMemoryAssetTarget(d []byte, targetPath, permissions string) *MemoryAsset
NewMemoryAssetTarget creates a new MemoryAsset, with target