generator

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderOlmCatalog added in v0.0.6

func RenderOlmCatalog(c *Config, image, version string) error

RenderOlmCatalog generates catalog manifests "deploy/olm-catalog/*" The current working directory must be the project repository root

func RenderOperatorYaml added in v0.0.2

func RenderOperatorYaml(c *Config, image string) error

RenderOperatorYaml generates "deploy/operator.yaml"

Types

type Config

type Config struct {
	// APIVersion is the kubernetes apiVersion that has the format of $GROUP_NAME/$VERSION.
	APIVersion string `yaml:"apiVersion"`
	// Kind is the kubernetes resource kind.
	Kind string `yaml:"kind"`
	// ProjectName is name of the new operator application
	// and is also the name of the base directory.
	ProjectName string `yaml:"projectName"`
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(apiVersion, kind, projectName, repoPath string) *Generator

NewGenerator creates a new scaffold Generator.

func (*Generator) Render

func (g *Generator) Render() error

Render generates the default project structure:

├── <projectName> │ ├── cmd │ │ └── <projectName> │ ├── config │ ├── deploy │ ├── pkg │ │ ├── apis │ │ │ └── <api-dir-name> // computed from apiDirName(apiVersion). │ │ │ └── <version> // computed from version(apiVersion). │ │ └── stub │ ├── tmp │ | ├── build │ | └── codegen │ └── version

Jump to

Keyboard shortcuts

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