template

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDeployment

func ParseDeployment(template DeploymentTemplate) *appsv1.Deployment

func ParsePersistentVolume

func ParsePersistentVolume(template PersistentVolumeTemplate) *corev1.PersistentVolume

func ParseService

func ParseService(template ServiceTemplate) *corev1.Service

Types

type DeploymentContainerTemplate

type DeploymentContainerTemplate struct {
	Name        string                          `json: "name"`
	Image       string                          `json: "image"`
	Ports       []int                           `json: "ports"`
	Env         []KeyValue                      `json: "env"`
	VolumeMount []DeploymentVolumeMountTemplate `json: "volumeMount"`
}

type DeploymentTemplate

type DeploymentTemplate struct {
	Name         string                        `json: "name"`
	TemplateName string                        `json: "templateName"`
	ReplicaCount int                           `json: "replicaCount"`
	Volume       []DeploymentVolumeTemplate    `json: "volume"`
	Containers   []DeploymentContainerTemplate `json: "containers"`
}

type DeploymentVolumeMountTemplate

type DeploymentVolumeMountTemplate struct {
	Name      string `json: "name"`
	MountPath string `json: "mountPath"`
}

type DeploymentVolumeTemplate

type DeploymentVolumeTemplate struct {
	Name      string `json: "name"`
	ClaimName string `json: "claimName"`
}

type KeyValue

type KeyValue struct {
	Key   string `json: "key"`
	Value string `json: "value"`
}

type PersistentVolumeClaimTemplate

type PersistentVolumeClaimTemplate struct {
	Name             string   `json: "name"`
	Capacity         string   `json: "capacity"`
	AccessMode       []string `json: "accessMode"`
	StorageClassName string   `json: "storageClassName"`
}

type PersistentVolumeTemplate

type PersistentVolumeTemplate struct {
	Name     string
	Capacity string
	HostPath string
}

type ServicePortTemplate

type ServicePortTemplate struct {
	Name          string `json: "name"`
	TargetPort    int32  `json: "targetPort"`
	NodePort      int32  `json: "nodePort"`
	ContainerPort int32  `json: "containerPort"`
}

type ServiceTemplate

type ServiceTemplate struct {
	Name         string                `json: "name"`
	Type         string                `json: "type"`
	TemplateName string                `json: "templateName"`
	Ports        []ServicePortTemplate `json: "ports"`
}

Jump to

Keyboard shortcuts

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