render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ManifestFileSuffix = []string{"yaml", "yml", "json"}

ManifestFileSuffix indictes common suffixes of files to render

Functions

This section is empty.

Types

type Renderer

type Renderer interface {
	// RenderObjects renders kubernetes objects using provided TemplateData
	RenderObjects(data *TemplateData) ([]*unstructured.Unstructured, error)
	DaemonSet(params *types.DaemonsetParams) (*appsv1.DaemonSet, error)
	Deployment(params *types.DeploymentParams) (*appsv1.Deployment, error)
	StatefulSet(params *types.StatefulSetParams) (*appsv1.StatefulSet, error)
	Service(params *types.ServiceParams) (*corev1.Service, error)
	ServiceAccount(params *types.ServiceAccountParams) (*corev1.ServiceAccount, error)
	Role(params *types.RoleParams) (*rbacv1.Role, error)
	RoleBinding(params *types.RoleBindingParams) (*rbacv1.RoleBinding, error)
	SCC(params *types.SCCParams) (*securityv1.SecurityContextConstraints, error)
	Ingress(params *types.IngressParams) (*networkingv1.Ingress, error)
	HPA(params *types.HPAParams) (*autoscalingv2.HorizontalPodAutoscaler, error)
	ServiceMonitor(params *types.ServiceMonitorParams) (*monitoringv1.ServiceMonitor, error)
}

Renderer renders k8s objects from a manifest source dir and TemplateData used by the templating engine

func NewRenderer

func NewRenderer(directory string) Renderer

NewRenderer creates a Renderer object, that will render all template files provided. file format needs to be either json or yaml.

type TemplateData

type TemplateData struct {
	// Funcs are additional Functions used during the templating process
	Funcs template.FuncMap
	// Data used for the rendering process
	Data interface{}
}

TemplateData is used by the templating engine to render templates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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