package scaffold

import "github.com/oslokommune/okctl/pkg/scaffold"

Package scaffold knows how to generate necessary resources for deploying an okctl application

Package scaffold knows how to turn an okctl application into Kubernetes and ArgoCD resources

Index

Functions

func GenerateApplicationBase

func GenerateApplicationBase(opts GenerateApplicationBaseOpts) error

GenerateApplicationBase converts an Application to Kustomize base files

func GenerateApplicationOverlay

func GenerateApplicationOverlay(opts GenerateApplicationOverlayOpts) error

GenerateApplicationOverlay generates patches for environment specific parts of the kubernetes resources

func GenerateArgoCDApplicationManifest

func GenerateArgoCDApplicationManifest(opts GenerateArgoCDApplicationManifestOpts) (io.Reader, error)

GenerateArgoCDApplicationManifest generates an ArgoCD Application manifest

func ResourceAsBytes

func ResourceAsBytes(data interface{}) ([]byte, error)

ResourceAsBytes knows how to convert a Kubernetes resource to a byte array

Types

type GenerateApplicationBaseOpts

type GenerateApplicationBaseOpts struct {
	SaveManifest ManifestSaver
	Application  v1alpha1.Application
}

GenerateApplicationBaseOpts contains required data to generate application base manifests

type GenerateApplicationOverlayOpts

type GenerateApplicationOverlayOpts struct {
	SavePatch   PatchSaver
	Application v1alpha1.Application

	Domain         string
	CertificateARN string
}

GenerateApplicationOverlayOpts contains required data to generate application patches

type GenerateArgoCDApplicationManifestOpts

type GenerateArgoCDApplicationManifestOpts struct {
	Name          string
	Namespace     string
	IACRepoURL    string
	SourceSyncDir string
	Prune         bool
}

GenerateArgoCDApplicationManifestOpts contains required information to generate an ArgoCD Application Manifest

type ManifestSaver

type ManifestSaver func(filename string, content []byte) error

ManifestSaver defines a function which store manifests

type PatchSaver

type PatchSaver func(kind string, patch jsonpatch.Patch) error

PatchSaver defines a function which store patches

Source Files

api.go convert.go types.go

Directories

PathSynopsis
pkg/scaffold/resourcesPackage resources knows how to generate Kubernetes, Kustomize and ArgoCD resources
Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
11 packages
Last checked
18 hours ago

Tools for package owners.