Documentation ¶
Index ¶
Constants ¶
View Source
const ( InstallationModeFlat = "flat" InstallationModeNormal = "normal" AppTypeKsonnet = "ksonnet" AppTypeHelm = "helm" AppTypeKustomize = "kustomize" AppTypeDirectory = "dir" )
Variables ¶
View Source
var ( // Errors ErrEmptyAppSpecifier = errors.New("empty app not allowed") ErrEmptyAppName = errors.New("app name can not be empty, please specify application name") ErrEmptyProjectName = errors.New("project name can not be empty, please specificy project name with: --project") ErrAppAlreadyInstalledOnProject = errors.New("application already installed on project") ErrAppCollisionWithExistingBase = errors.New("an application with the same name and a different base already exists, consider choosing a different name") ErrUnknownAppType = errors.New("unknown application type") )
Functions ¶
func GenerateManifests ¶
func GenerateManifests(k *kusttypes.Kustomization) ([]byte, error)
GenerateManifests writes the in-memory kustomization to disk, fixes relative resources and runs kustomize build, then returns the generated manifests.
If there is a namespace on 'k' a namespace.yaml file with the namespace object will be written next to the persisted kustomization.yaml.
To include the namespace in the generated manifests just add 'namespace.yaml' to the resources of the kustomization
func InferAppType ¶
using heuristic from https://argoproj.github.io/argo-cd/user-guide/tool_detection/#tool-detection
Types ¶
type Application ¶
type ClusterResConfig ¶ added in v0.2.0
type Config ¶
type Config struct { AppName string `json:"appName"` UserGivenName string `json:"userGivenName"` DestNamespace string `json:"destNamespace"` DestServer string `json:"destServer"` SrcPath string `json:"srcPath"` SrcRepoURL string `json:"srcRepoURL"` SrcTargetRevision string `json:"srcTargetRevision"` Labels map[string]string `json:"labels"` Annotations map[string]string `json:"annotations"` }
type CreateOptions ¶
type CreateOptions struct { AppName string AppType string AppSpecifier string DestNamespace string DestServer string InstallationMode string Labels map[string]string Annotations map[string]string Exclude string Include string }
func AddFlags ¶
func AddFlags(cmd *cobra.Command) *CreateOptions
AddFlags adds application creation flags to cmd.
func (*CreateOptions) Parse ¶
func (o *CreateOptions) Parse(projectName, repoURL, targetRevision, repoRoot string) (Application, error)
CreateOptions impl
Parse tries to parse `CreateOptions` into an `Application`.
Click to show internal directories.
Click to hide internal directories.