Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderOperatorYaml ¶ added in v0.0.2
RenderOperatorYaml generates "deploy/operator.yaml"
Types ¶
type Boilerplate ¶
type Boilerplate struct {
ProjectName string
}
Boilerplate contains all the customized data needed to generate codegen/boilerplate.go.txt for a new operator when pairing with boilerplateTmpl template.
type Build ¶
Build contains all the customized data needed to generate tmp/build.sh for a new operator when pairing with buildTmpl template.
type CRYaml ¶ added in v0.0.2
CRYaml contains all the customized data needed to generate deploy/cr.yaml.
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 Doc ¶
Doc contains all the customized data needed to generate apis/<apiDirName>/<version>/doc.go for a new operator when pairing with apisDocTmpl template.
type DockerFile ¶
type DockerFile struct {
ProjectName string
}
DockerFile contains all the customized data needed to generate tmp/build/Dockerfie for a new operator when pairing with dockerFileTmpl template.
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
NewGenerator creates a new scaffold Generator.
func (*Generator) Render ¶
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
type Handler ¶
type Handler struct { // imports OperatorSDKImport string RepoPath string Kind string APIDirName string Version string }
Handler contains all the customized data needed to generate stub/handler.go for a new operator when pairing with handlerTmpl template.
type Main ¶
type Main struct { // imports OperatorSDKImport string StubImport string SDKVersionImport string APIVersion string Kind string }
Main contains all the customized data needed to generate cmd/<projectName>/main.go for a new operator when pairing with mainTmpl template.
type OperatorYaml ¶
type OperatorYaml struct { Kind string KindSingular string KindPlural string GroupName string Version string ProjectName string Image string }
OperatorYaml contains all the customized data needed to generate deploy/operator.yaml for a new operator when pairing with operatorYamlTmpl template.
type RBACYaml ¶
type RBACYaml struct {
ProjectName string
}
RBACYaml contains all the customized data needed to generate deploy/rbac.yaml for a new operator when pairing with rbacYamlTmpl template.
type Register ¶
Register contains all the customized data needed to generate apis/<apiDirName>/<version>/register.go for a new operator when pairing with apisDocTmpl template.
type Types ¶
Types contains all the customized data needed to generate apis/<apiDirName>/<version>/types.go for a new operator when pairing with apisTypesTmpl template.
type UpdateGenerated ¶
UpdateGenerated contains all the customized data needed to generate codegen/update-generated.sh for a new operator when pairing with updateGeneratedTmpl template.