kedge

package module
v0.0.0-...-25931c7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 25 Imported by: 1

README

kedge

Install or update a kubernetes manifest by passing in the a Kubernetes manifest. The manifest can be a go-templates file. For example, a resource can specify namespace: "{{ .namespace }}" which will be filled in by the namespace value.

The main usage of this is to apply manifest files to your go-project without having to worry about the clientset used to do so. By using the dynamic client, your go project can just call kedge.Apply with minimal info to deploy any manifest.

Example:

package main

import (
	"github.com/isaaguilar/kedge"
	"os"
)

func main() {
	manifest := os.Args[1]
	kedge.Apply(kedge.KubernetesConfig(os.Getenv("KUBECONFIG")), manifest, "default", []string{})
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(config *rest.Config, inputFilename, namespace string, valueFilenames []string) error

func KubernetesConfig

func KubernetesConfig(kubeconfigPath string) *rest.Config

Types

This section is empty.

Jump to

Keyboard shortcuts

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