templates

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CommonFunctions = `` /* 1120-byte string literal not displayed */
View Source
const KindTemplate = `` /* 1496-byte string literal not displayed */
View Source
const KubeadmTemplate = `` /* 4772-byte string literal not displayed */
View Source
const NvDriverTemplate = `` /* 1121-byte string literal not displayed */

From https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html#ubuntu-lts

Variables

This section is empty.

Functions

func GetCRISocket added in v0.2.7

func GetCRISocket(runtime string) (string, error)

GetCRISocket returns the CRI socket path based on the container runtime

func NewKernelTemplate added in v0.2.8

func NewKernelTemplate(env v1alpha1.Environment) (*bytes.Buffer, error)

NewKernelTemplate creates a new kernel template

Types

type ContainerToolkit

type ContainerToolkit struct {
	ContainerRuntime string
	EnableCDI        bool
}

func NewContainerToolkit

func NewContainerToolkit(env v1alpha1.Environment) *ContainerToolkit

func (*ContainerToolkit) Execute

func (t *ContainerToolkit) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type Containerd

type Containerd struct {
	Version string
}

func NewContainerd

func NewContainerd(env v1alpha1.Environment) *Containerd

func (*Containerd) Execute

func (t *Containerd) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type CriO

type CriO struct {
	Version string
}

func NewCriO

func NewCriO(env v1alpha1.Environment) *CriO

func (*CriO) Execute

func (t *CriO) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type Docker

type Docker struct {
	Version string
}

func NewDocker

func NewDocker(env v1alpha1.Environment) *Docker

func (*Docker) Execute

func (t *Docker) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type KubeadmConfig added in v0.2.7

type KubeadmConfig struct {
	// Template defines the kubeadm configuration
	// template to use for generating the configuration
	// if no template is provided, the default template
	// is used
	Template string

	CriSocket            string
	ClusterName          string
	KubernetesVersion    string
	ControlPlaneEndpoint string
	PodSubnet            string
	FeatureGates         string // Feature gates as comma-separated string
	RuntimeConfig        string // Runtime config (for feature gates) resource.k8s.io/v1beta1=true
}

KubeadmConfig holds configuration values for kubeadm

func NewKubeadmConfig added in v0.2.7

func NewKubeadmConfig(env v1alpha1.Environment) (*KubeadmConfig, error)

NewKubeadmConfig initializes a KubeadmConfig from a Kubernetes struct

func (*KubeadmConfig) GenerateKubeadmConfig added in v0.2.7

func (c *KubeadmConfig) GenerateKubeadmConfig() (string, error)

GenerateKubeadmConfig generates the kubeadm YAML configuration

func (*KubeadmConfig) ParseFeatureGates added in v0.2.7

func (c *KubeadmConfig) ParseFeatureGates() map[string]string

ParseFeatureGates converts "Feature1=true,Feature2=false" to a map of strings for YAML

type Kubernetes

type Kubernetes struct {
	Version               string
	Installer             string
	KubeletReleaseVersion string
	Arch                  string
	CniPluginsVersion     string
	CalicoVersion         string
	CrictlVersion         string
	K8sEndpointHost       string
	K8sFeatureGates       string
	UseLegacyInit         bool
	CriSocket             string
	// Kind exclusive
	KindConfig string
}

func NewKubernetes

func NewKubernetes(env v1alpha1.Environment) (*Kubernetes, error)

func (*Kubernetes) Execute

func (k *Kubernetes) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type NvDriver

type NvDriver v1alpha1.NVIDIADriver

func NewNvDriver

func NewNvDriver(env v1alpha1.Environment) *NvDriver

func (*NvDriver) Execute

func (t *NvDriver) Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error

type Template

type Template interface {
	Execute(tpl *bytes.Buffer, env v1alpha1.Environment) error
}

Template is the interface that wraps the Execute method.

Jump to

Keyboard shortcuts

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