From 925f9486e33e3bddfa4c853b114f2b9019ae9813 Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Sat, 17 Nov 2018 16:20:25 -0800 Subject: [PATCH] Restructure application sources to separate types (#799) --- cmd/argocd/commands/app.go | 218 +-- controller/services/application.pb.go | 8 +- controller/state.go | 5 +- pkg/apis/application/v1alpha1/generated.pb.go | 1183 +++++++++++++---- pkg/apis/application/v1alpha1/generated.proto | 33 +- pkg/apis/application/v1alpha1/types.go | 185 ++- .../v1alpha1/zz_generated.deepcopy.go | 80 ++ reposerver/repository/repository.go | 89 +- reposerver/repository/repository.pb.go | 294 ++-- reposerver/repository/repository.proto | 5 +- reposerver/repository/repository_test.go | 10 +- server/account/account.pb.go | 8 +- server/application/application.go | 7 +- server/application/application.pb.go | 38 +- server/cluster/cluster.pb.go | 14 +- server/project/project.pb.go | 18 +- server/repository/repository.go | 12 +- server/repository/repository.pb.go | 32 +- server/session/session.pb.go | 10 +- server/settings/settings.pb.go | 14 +- server/swagger.json | 52 +- server/version/version.pb.go | 6 +- test/e2e/app_management_test.go | 2 +- util/argo/argo.go | 77 +- util/argo/argo_test.go | 21 + util/hash/hash.go | 12 + util/helm/helm.go | 27 +- util/helm/helm_test.go | 10 +- util/kustomize/kustomize.go | 20 +- util/kustomize/kustomize_test.go | 12 +- 30 files changed, 1646 insertions(+), 856 deletions(-) create mode 100644 util/hash/hash.go diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 71f6626ba7..88dcaee4d5 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -92,48 +92,13 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra. } appName = args[0] } - if appOpts.repoURL == "" || appOpts.appPath == "" || appName == "" { - log.Fatal("name, repo, path are required") - } app = argoappv1.Application{ ObjectMeta: metav1.ObjectMeta{ Name: appName, }, - Spec: argoappv1.ApplicationSpec{ - Project: appOpts.project, - Source: argoappv1.ApplicationSource{ - RepoURL: appOpts.repoURL, - Path: appOpts.appPath, - Environment: appOpts.env, - TargetRevision: appOpts.revision, - }, - }, } - } - if appOpts.destServer != "" { - app.Spec.Destination.Server = appOpts.destServer - } - if appOpts.destNamespace != "" { - app.Spec.Destination.Namespace = appOpts.destNamespace - } - if appOpts.namePrefix != "" { - app.Spec.Source.NamePrefix = appOpts.namePrefix - } - setParameterOverrides(&app, appOpts.parameters) - if len(appOpts.valuesFiles) > 0 { - app.Spec.Source.ValuesFiles = appOpts.valuesFiles - } - switch appOpts.syncPolicy { - case "automated": - app.Spec.SyncPolicy = &argoappv1.SyncPolicy{ - Automated: &argoappv1.SyncPolicyAutomated{ - Prune: appOpts.autoPrune, - }, - } - case "none", "": - app.Spec.SyncPolicy = nil - default: - log.Fatalf("Invalid sync-policy: %s", appOpts.syncPolicy) + setAppOptions(c.Flags(), &app, &appOpts) + setParameterOverrides(&app, appOpts.parameters) } conn, appIf := argocdclient.NewClientOrDie(clientOpts).NewApplicationClientOrDie() defer util.Close(conn) @@ -192,15 +157,7 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com fmt.Printf(printOpFmtStr, "Repo:", app.Spec.Source.RepoURL) fmt.Printf(printOpFmtStr, "Target:", app.Spec.Source.TargetRevision) fmt.Printf(printOpFmtStr, "Path:", app.Spec.Source.Path) - if app.Spec.Source.Environment != "" { - fmt.Printf(printOpFmtStr, "Environment:", app.Spec.Source.Environment) - } - if len(app.Spec.Source.ValuesFiles) > 0 { - fmt.Printf(printOpFmtStr, "Helm Values:", strings.Join(app.Spec.Source.ValuesFiles, ",")) - } - if len(app.Spec.Source.NamePrefix) > 0 { - fmt.Printf(printOpFmtStr, "Name Prefix:", app.Spec.Source.NamePrefix) - } + printAppSourceDetails(&app.Spec.Source) var syncPolicy string if app.Spec.SyncPolicy != nil && app.Spec.SyncPolicy.Automated != nil { syncPolicy = "Automated" @@ -244,6 +201,21 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com return command } +func printAppSourceDetails(appSrc *argoappv1.ApplicationSource) { + if env := argoappv1.KsonnetEnv(appSrc); env != "" { + fmt.Printf(printOpFmtStr, "Environment:", env) + } + valueFiles := argoappv1.HelmValueFiles(appSrc) + if len(valueFiles) > 0 { + fmt.Printf(printOpFmtStr, "Helm Values:", strings.Join(valueFiles, ",")) + } + if appSrc.Kustomize != nil { + if appSrc.Kustomize.NamePrefix != "" { + fmt.Printf(printOpFmtStr, "Name Prefix:", appSrc.Kustomize.NamePrefix) + } + } +} + func printAppConditions(w io.Writer, app *argoappv1.Application) { fmt.Fprintf(w, "CONDITION\tMESSAGE\n") for _, item := range app.Status.Conditions { @@ -287,8 +259,7 @@ func printParams(app *argoappv1.Application) { } fmt.Println() w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) - isKsonnet := app.Spec.Source.Environment != "" - if isKsonnet { + if needsComponentColumn(&app.Spec.Source) { fmt.Fprintf(w, "COMPONENT\tNAME\tVALUE\tOVERRIDE\n") for _, p := range app.Status.Parameters { overrideValue := overrides[fmt.Sprintf("%s/%s", p.Component, p.Name)] @@ -304,6 +275,16 @@ func printParams(app *argoappv1.Application) { _ = w.Flush() } +// needsComponentColumn returns true if the app source is such that it requires parameters in the +// COMPONENT=PARAM=NAME +func needsComponentColumn(source *argoappv1.ApplicationSource) bool { + ksEnv := argoappv1.KsonnetEnv(source) + if ksEnv != "" { + return true + } + return false +} + // NewApplicationSetCommand returns a new instance of an `argocd app set` command func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Command { var ( @@ -322,41 +303,7 @@ func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com defer util.Close(conn) app, err := appIf.Get(context.Background(), &application.ApplicationQuery{Name: &appName}) errors.CheckError(err) - visited := 0 - c.Flags().Visit(func(f *pflag.Flag) { - visited++ - switch f.Name { - case "repo": - app.Spec.Source.RepoURL = appOpts.repoURL - case "path": - app.Spec.Source.Path = appOpts.appPath - case "env": - app.Spec.Source.Environment = appOpts.env - case "revision": - app.Spec.Source.TargetRevision = appOpts.revision - case "values": - app.Spec.Source.ValuesFiles = appOpts.valuesFiles - case "dest-server": - app.Spec.Destination.Server = appOpts.destServer - case "dest-namespace": - app.Spec.Destination.Namespace = appOpts.destNamespace - case "project": - app.Spec.Project = appOpts.project - case "name-prefix": - app.Spec.Source.NamePrefix = appOpts.namePrefix - case "sync-policy": - switch appOpts.syncPolicy { - case "automated": - app.Spec.SyncPolicy = &argoappv1.SyncPolicy{ - Automated: &argoappv1.SyncPolicyAutomated{}, - } - case "none": - app.Spec.SyncPolicy = nil - default: - log.Fatalf("Invalid sync-policy: %s", appOpts.syncPolicy) - } - } - }) + visited := setAppOptions(c.Flags(), app, &appOpts) if visited == 0 { log.Error("Please set at least one option to update") c.HelpFunc()(c, args) @@ -368,7 +315,6 @@ func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com } app.Spec.SyncPolicy.Automated.Prune = appOpts.autoPrune } - setParameterOverrides(app, appOpts.parameters) oldOverrides := app.Spec.Source.ComponentParameterOverrides updatedSpec, err := appIf.UpdateSpec(context.Background(), &application.ApplicationUpdateSpecRequest{ @@ -385,6 +331,77 @@ func NewApplicationSetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com return command } +func setAppOptions(flags *pflag.FlagSet, app *argoappv1.Application, appOpts *appOptions) int { + visited := 0 + flags.Visit(func(f *pflag.Flag) { + visited++ + switch f.Name { + case "repo": + app.Spec.Source.RepoURL = appOpts.repoURL + case "path": + app.Spec.Source.Path = appOpts.appPath + case "env": + setKsonnetOpt(&app.Spec.Source, &appOpts.env) + case "revision": + app.Spec.Source.TargetRevision = appOpts.revision + case "values": + setHelmOpt(&app.Spec.Source, appOpts.valuesFiles, nil) + case "release-name": + setHelmOpt(&app.Spec.Source, nil, &appOpts.releaseName) + case "dest-server": + app.Spec.Destination.Server = appOpts.destServer + case "dest-namespace": + app.Spec.Destination.Namespace = appOpts.destNamespace + case "project": + app.Spec.Project = appOpts.project + case "nameprefix": + setKustomizeOpt(&app.Spec.Source, &appOpts.namePrefix) + case "sync-policy": + switch appOpts.syncPolicy { + case "automated": + app.Spec.SyncPolicy = &argoappv1.SyncPolicy{ + Automated: &argoappv1.SyncPolicyAutomated{}, + } + case "none": + app.Spec.SyncPolicy = nil + default: + log.Fatalf("Invalid sync-policy: %s", appOpts.syncPolicy) + } + } + }) + return visited +} + +func setKsonnetOpt(src *argoappv1.ApplicationSource, env *string) { + if src.Ksonnet == nil { + src.Ksonnet = &argoappv1.ApplicationSourceKsonnet{} + } + if env != nil { + src.Ksonnet.Environment = *env + } +} + +func setKustomizeOpt(src *argoappv1.ApplicationSource, namePrefix *string) { + if src.Kustomize == nil { + src.Kustomize = &argoappv1.ApplicationSourceKustomize{} + } + if namePrefix != nil { + src.Kustomize.NamePrefix = *namePrefix + } +} + +func setHelmOpt(src *argoappv1.ApplicationSource, valueFiles []string, releaseName *string) { + if src.Helm == nil { + src.Helm = &argoappv1.ApplicationSourceHelm{} + } + if valueFiles != nil { + src.Helm.ValueFiles = valueFiles + } + if releaseName != nil { + src.Helm.ReleaseName = *releaseName + } +} + func checkDroppedParams(newOverrides []argoappv1.ComponentParameter, oldOverrides []argoappv1.ComponentParameter) { newOverrideMap := argo.ParamToMap(newOverrides) @@ -406,6 +423,7 @@ type appOptions struct { destNamespace string parameters []string valuesFiles []string + releaseName string project string syncPolicy string autoPrune bool @@ -421,10 +439,11 @@ func addAppFlags(command *cobra.Command, opts *appOptions) { command.Flags().StringVar(&opts.destNamespace, "dest-namespace", "", "K8s target namespace (overrides the namespace specified in the ksonnet app.yaml)") command.Flags().StringArrayVarP(&opts.parameters, "parameter", "p", []string{}, "set a parameter override (e.g. -p guestbook=image=example/guestbook:latest)") command.Flags().StringArrayVar(&opts.valuesFiles, "values", []string{}, "Helm values file(s) to use") + command.Flags().StringVar(&opts.releaseName, "release-name", "", "Helm release-name") command.Flags().StringVar(&opts.project, "project", "", "Application project name") command.Flags().StringVar(&opts.syncPolicy, "sync-policy", "", "Set the sync policy (one of: automated, none)") command.Flags().BoolVar(&opts.autoPrune, "auto-prune", false, "Set automatic pruning when sync is automated") - command.Flags().StringVar(&opts.namePrefix, "name-prefix", "", "Set a prefix to add to resource names for kustomize and helm app") + command.Flags().StringVar(&opts.namePrefix, "nameprefix", "", "Kustomize nameprefix") } // NewApplicationUnsetCommand returns a new instance of an `argocd app unset` command @@ -432,13 +451,12 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C var ( parameters []string valuesFiles []string - namePrefix bool ) var command = &cobra.Command{ Use: "unset APPNAME -p COMPONENT=PARAM", Short: "Unset application parameters", Run: func(c *cobra.Command, args []string) { - if len(args) != 1 || (len(parameters) == 0 && len(valuesFiles) == 0 && !namePrefix) { + if len(args) != 1 || (len(parameters) == 0 && len(valuesFiles) == 0) { c.HelpFunc()(c, args) os.Exit(1) } @@ -447,7 +465,7 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C defer util.Close(conn) app, err := appIf.Get(context.Background(), &application.ApplicationQuery{Name: &appName}) errors.CheckError(err) - isKsonnetApp := app.Spec.Source.Environment != "" + isKsonnetApp := argoappv1.KsonnetEnv(&app.Spec.Source) != "" updated := false for _, paramStr := range parameters { @@ -475,23 +493,21 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C } } } + specValueFiles := argoappv1.HelmValueFiles(&app.Spec.Source) for _, valuesFile := range valuesFiles { - for i, vf := range app.Spec.Source.ValuesFiles { + for i, vf := range specValueFiles { if vf == valuesFile { - app.Spec.Source.ValuesFiles = append(app.Spec.Source.ValuesFiles[0:i], app.Spec.Source.ValuesFiles[i+1:]...) + specValueFiles = append(specValueFiles[0:i], specValueFiles[i+1:]...) updated = true break } } } - if namePrefix { - app.Spec.Source.NamePrefix = "" - updated = true - } - + setHelmOpt(&app.Spec.Source, specValueFiles, nil) if !updated { return } + _, err = appIf.UpdateSpec(context.Background(), &application.ApplicationUpdateSpecRequest{ Name: &app.Name, Spec: app.Spec, @@ -501,8 +517,6 @@ func NewApplicationUnsetCommand(clientOpts *argocdclient.ClientOptions) *cobra.C } command.Flags().StringArrayVarP(¶meters, "parameter", "p", []string{}, "unset a parameter override (e.g. -p guestbook=image)") command.Flags().StringArrayVar(&valuesFiles, "values", []string{}, "unset one or more helm values files") - command.Flags().BoolVar(&namePrefix, "name-prefix", false, "Unset the name prefix") - return command } @@ -670,8 +684,8 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co var fmtStr string headers := []interface{}{"NAME", "CLUSTER", "NAMESPACE", "PROJECT", "STATUS", "HEALTH", "CONDITIONS"} if output == "wide" { - fmtStr = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" - headers = append(headers, "ENV", "REPO", "PATH", "TARGET") + fmtStr = "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n" + headers = append(headers, "REPO", "PATH", "TARGET") } else { fmtStr = "%s\t%s\t%s\t%s\t%s\t%s\t%s\n" } @@ -687,7 +701,7 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co formatConditionsSummary(app), } if output == "wide" { - vals = append(vals, app.Spec.Source.Environment, app.Spec.Source.RepoURL, app.Spec.Source.Path, app.Spec.Source.TargetRevision) + vals = append(vals, app.Spec.Source.RepoURL, app.Spec.Source.Path, app.Spec.Source.TargetRevision) } fmt.Fprintf(w, fmtStr, vals...) } @@ -1136,10 +1150,10 @@ func setParameterOverrides(app *argoappv1.Application, parameters []string) { } else { newParams = make([]argoappv1.ComponentParameter, 0) } - isKsonnetApp := app.Spec.Source.Environment != "" + needsComponent := needsComponentColumn(&app.Spec.Source) for _, paramStr := range parameters { var newParam argoappv1.ComponentParameter - if isKsonnetApp { + if needsComponent { parts := strings.SplitN(paramStr, "=", 3) if len(parts) != 3 { log.Fatalf("Expected ksonnet parameter of the form: component=param=value. Received: %s", paramStr) diff --git a/controller/services/application.pb.go b/controller/services/application.pb.go index f90ee4f47a..198eb0987e 100644 --- a/controller/services/application.pb.go +++ b/controller/services/application.pb.go @@ -40,7 +40,7 @@ func (m *ResourcesQuery) Reset() { *m = ResourcesQuery{} } func (m *ResourcesQuery) String() string { return proto.CompactTextString(m) } func (*ResourcesQuery) ProtoMessage() {} func (*ResourcesQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_application_b7c966df2a6bd563, []int{0} + return fileDescriptor_application_ceea98df6b81388c, []int{0} } func (m *ResourcesQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ func (m *ResourcesResponse) Reset() { *m = ResourcesResponse{} } func (m *ResourcesResponse) String() string { return proto.CompactTextString(m) } func (*ResourcesResponse) ProtoMessage() {} func (*ResourcesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_application_b7c966df2a6bd563, []int{1} + return fileDescriptor_application_ceea98df6b81388c, []int{1} } func (m *ResourcesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,10 +729,10 @@ var ( ) func init() { - proto.RegisterFile("controller/services/application.proto", fileDescriptor_application_b7c966df2a6bd563) + proto.RegisterFile("controller/services/application.proto", fileDescriptor_application_ceea98df6b81388c) } -var fileDescriptor_application_b7c966df2a6bd563 = []byte{ +var fileDescriptor_application_ceea98df6b81388c = []byte{ // 328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xcb, 0x4a, 0x03, 0x31, 0x14, 0x35, 0x7d, 0x20, 0x8d, 0xa0, 0x18, 0x5c, 0x0c, 0x5d, 0x94, 0x52, 0x10, 0x66, 0x63, 0x42, diff --git a/controller/state.go b/controller/state.go index f5ab99196d..45edbbe514 100644 --- a/controller/state.go +++ b/controller/state.go @@ -117,14 +117,11 @@ func (s *appStateManager) getTargetObjs(app *v1alpha1.Application, revision stri manifestInfo, err := repoClient.GenerateManifest(context.Background(), &repository.ManifestRequest{ Repo: repo, - Environment: app.Spec.Source.Environment, - Path: app.Spec.Source.Path, Revision: revision, ComponentParameterOverrides: mfReqOverrides, AppLabel: app.Name, - ValueFiles: app.Spec.Source.ValuesFiles, Namespace: app.Spec.Destination.Namespace, - NamePrefix: app.Spec.Source.NamePrefix, + ApplicationSource: &app.Spec.Source, }) if err != nil { return nil, nil, err diff --git a/pkg/apis/application/v1alpha1/generated.pb.go b/pkg/apis/application/v1alpha1/generated.pb.go index 850ed61161..74af83ed1d 100644 --- a/pkg/apis/application/v1alpha1/generated.pb.go +++ b/pkg/apis/application/v1alpha1/generated.pb.go @@ -30,7 +30,7 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package func (m *AWSAuthConfig) Reset() { *m = AWSAuthConfig{} } func (*AWSAuthConfig) ProtoMessage() {} func (*AWSAuthConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{0} + return fileDescriptor_generated_f5f02cc29db3d341, []int{0} } func (m *AWSAuthConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -58,7 +58,7 @@ var xxx_messageInfo_AWSAuthConfig proto.InternalMessageInfo func (m *AppProject) Reset() { *m = AppProject{} } func (*AppProject) ProtoMessage() {} func (*AppProject) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{1} + return fileDescriptor_generated_f5f02cc29db3d341, []int{1} } func (m *AppProject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,7 +86,7 @@ var xxx_messageInfo_AppProject proto.InternalMessageInfo func (m *AppProjectList) Reset() { *m = AppProjectList{} } func (*AppProjectList) ProtoMessage() {} func (*AppProjectList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{2} + return fileDescriptor_generated_f5f02cc29db3d341, []int{2} } func (m *AppProjectList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -114,7 +114,7 @@ var xxx_messageInfo_AppProjectList proto.InternalMessageInfo func (m *AppProjectSpec) Reset() { *m = AppProjectSpec{} } func (*AppProjectSpec) ProtoMessage() {} func (*AppProjectSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{3} + return fileDescriptor_generated_f5f02cc29db3d341, []int{3} } func (m *AppProjectSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -142,7 +142,7 @@ var xxx_messageInfo_AppProjectSpec proto.InternalMessageInfo func (m *Application) Reset() { *m = Application{} } func (*Application) ProtoMessage() {} func (*Application) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{4} + return fileDescriptor_generated_f5f02cc29db3d341, []int{4} } func (m *Application) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -170,7 +170,7 @@ var xxx_messageInfo_Application proto.InternalMessageInfo func (m *ApplicationCondition) Reset() { *m = ApplicationCondition{} } func (*ApplicationCondition) ProtoMessage() {} func (*ApplicationCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{5} + return fileDescriptor_generated_f5f02cc29db3d341, []int{5} } func (m *ApplicationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,7 +198,7 @@ var xxx_messageInfo_ApplicationCondition proto.InternalMessageInfo func (m *ApplicationDestination) Reset() { *m = ApplicationDestination{} } func (*ApplicationDestination) ProtoMessage() {} func (*ApplicationDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{6} + return fileDescriptor_generated_f5f02cc29db3d341, []int{6} } func (m *ApplicationDestination) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -226,7 +226,7 @@ var xxx_messageInfo_ApplicationDestination proto.InternalMessageInfo func (m *ApplicationList) Reset() { *m = ApplicationList{} } func (*ApplicationList) ProtoMessage() {} func (*ApplicationList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{7} + return fileDescriptor_generated_f5f02cc29db3d341, []int{7} } func (m *ApplicationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -254,7 +254,7 @@ var xxx_messageInfo_ApplicationList proto.InternalMessageInfo func (m *ApplicationSource) Reset() { *m = ApplicationSource{} } func (*ApplicationSource) ProtoMessage() {} func (*ApplicationSource) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{8} + return fileDescriptor_generated_f5f02cc29db3d341, []int{8} } func (m *ApplicationSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -279,10 +279,94 @@ func (m *ApplicationSource) XXX_DiscardUnknown() { var xxx_messageInfo_ApplicationSource proto.InternalMessageInfo +func (m *ApplicationSourceHelm) Reset() { *m = ApplicationSourceHelm{} } +func (*ApplicationSourceHelm) ProtoMessage() {} +func (*ApplicationSourceHelm) Descriptor() ([]byte, []int) { + return fileDescriptor_generated_f5f02cc29db3d341, []int{9} +} +func (m *ApplicationSourceHelm) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplicationSourceHelm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *ApplicationSourceHelm) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationSourceHelm.Merge(dst, src) +} +func (m *ApplicationSourceHelm) XXX_Size() int { + return m.Size() +} +func (m *ApplicationSourceHelm) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationSourceHelm.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationSourceHelm proto.InternalMessageInfo + +func (m *ApplicationSourceKsonnet) Reset() { *m = ApplicationSourceKsonnet{} } +func (*ApplicationSourceKsonnet) ProtoMessage() {} +func (*ApplicationSourceKsonnet) Descriptor() ([]byte, []int) { + return fileDescriptor_generated_f5f02cc29db3d341, []int{10} +} +func (m *ApplicationSourceKsonnet) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplicationSourceKsonnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *ApplicationSourceKsonnet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationSourceKsonnet.Merge(dst, src) +} +func (m *ApplicationSourceKsonnet) XXX_Size() int { + return m.Size() +} +func (m *ApplicationSourceKsonnet) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationSourceKsonnet.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationSourceKsonnet proto.InternalMessageInfo + +func (m *ApplicationSourceKustomize) Reset() { *m = ApplicationSourceKustomize{} } +func (*ApplicationSourceKustomize) ProtoMessage() {} +func (*ApplicationSourceKustomize) Descriptor() ([]byte, []int) { + return fileDescriptor_generated_f5f02cc29db3d341, []int{11} +} +func (m *ApplicationSourceKustomize) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ApplicationSourceKustomize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *ApplicationSourceKustomize) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationSourceKustomize.Merge(dst, src) +} +func (m *ApplicationSourceKustomize) XXX_Size() int { + return m.Size() +} +func (m *ApplicationSourceKustomize) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationSourceKustomize.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationSourceKustomize proto.InternalMessageInfo + func (m *ApplicationSpec) Reset() { *m = ApplicationSpec{} } func (*ApplicationSpec) ProtoMessage() {} func (*ApplicationSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{9} + return fileDescriptor_generated_f5f02cc29db3d341, []int{12} } func (m *ApplicationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,7 +394,7 @@ var xxx_messageInfo_ApplicationSpec proto.InternalMessageInfo func (m *ApplicationStatus) Reset() { *m = ApplicationStatus{} } func (*ApplicationStatus) ProtoMessage() {} func (*ApplicationStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{10} + return fileDescriptor_generated_f5f02cc29db3d341, []int{13} } func (m *ApplicationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +422,7 @@ var xxx_messageInfo_ApplicationStatus proto.InternalMessageInfo func (m *ApplicationWatchEvent) Reset() { *m = ApplicationWatchEvent{} } func (*ApplicationWatchEvent) ProtoMessage() {} func (*ApplicationWatchEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{11} + return fileDescriptor_generated_f5f02cc29db3d341, []int{14} } func (m *ApplicationWatchEvent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -366,7 +450,7 @@ var xxx_messageInfo_ApplicationWatchEvent proto.InternalMessageInfo func (m *Cluster) Reset() { *m = Cluster{} } func (*Cluster) ProtoMessage() {} func (*Cluster) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{12} + return fileDescriptor_generated_f5f02cc29db3d341, []int{15} } func (m *Cluster) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,7 +478,7 @@ var xxx_messageInfo_Cluster proto.InternalMessageInfo func (m *ClusterConfig) Reset() { *m = ClusterConfig{} } func (*ClusterConfig) ProtoMessage() {} func (*ClusterConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{13} + return fileDescriptor_generated_f5f02cc29db3d341, []int{16} } func (m *ClusterConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -422,7 +506,7 @@ var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo func (m *ClusterList) Reset() { *m = ClusterList{} } func (*ClusterList) ProtoMessage() {} func (*ClusterList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{14} + return fileDescriptor_generated_f5f02cc29db3d341, []int{17} } func (m *ClusterList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -450,7 +534,7 @@ var xxx_messageInfo_ClusterList proto.InternalMessageInfo func (m *ComparisonResult) Reset() { *m = ComparisonResult{} } func (*ComparisonResult) ProtoMessage() {} func (*ComparisonResult) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{15} + return fileDescriptor_generated_f5f02cc29db3d341, []int{18} } func (m *ComparisonResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -478,7 +562,7 @@ var xxx_messageInfo_ComparisonResult proto.InternalMessageInfo func (m *ComponentParameter) Reset() { *m = ComponentParameter{} } func (*ComponentParameter) ProtoMessage() {} func (*ComponentParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{16} + return fileDescriptor_generated_f5f02cc29db3d341, []int{19} } func (m *ComponentParameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -506,7 +590,7 @@ var xxx_messageInfo_ComponentParameter proto.InternalMessageInfo func (m *ConnectionState) Reset() { *m = ConnectionState{} } func (*ConnectionState) ProtoMessage() {} func (*ConnectionState) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{17} + return fileDescriptor_generated_f5f02cc29db3d341, []int{20} } func (m *ConnectionState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -534,7 +618,7 @@ var xxx_messageInfo_ConnectionState proto.InternalMessageInfo func (m *DeploymentInfo) Reset() { *m = DeploymentInfo{} } func (*DeploymentInfo) ProtoMessage() {} func (*DeploymentInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{18} + return fileDescriptor_generated_f5f02cc29db3d341, []int{21} } func (m *DeploymentInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -562,7 +646,7 @@ var xxx_messageInfo_DeploymentInfo proto.InternalMessageInfo func (m *HealthStatus) Reset() { *m = HealthStatus{} } func (*HealthStatus) ProtoMessage() {} func (*HealthStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{19} + return fileDescriptor_generated_f5f02cc29db3d341, []int{22} } func (m *HealthStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -590,7 +674,7 @@ var xxx_messageInfo_HealthStatus proto.InternalMessageInfo func (m *HookStatus) Reset() { *m = HookStatus{} } func (*HookStatus) ProtoMessage() {} func (*HookStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{20} + return fileDescriptor_generated_f5f02cc29db3d341, []int{23} } func (m *HookStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -618,7 +702,7 @@ var xxx_messageInfo_HookStatus proto.InternalMessageInfo func (m *JWTToken) Reset() { *m = JWTToken{} } func (*JWTToken) ProtoMessage() {} func (*JWTToken) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{21} + return fileDescriptor_generated_f5f02cc29db3d341, []int{24} } func (m *JWTToken) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -646,7 +730,7 @@ var xxx_messageInfo_JWTToken proto.InternalMessageInfo func (m *Operation) Reset() { *m = Operation{} } func (*Operation) ProtoMessage() {} func (*Operation) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{22} + return fileDescriptor_generated_f5f02cc29db3d341, []int{25} } func (m *Operation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -674,7 +758,7 @@ var xxx_messageInfo_Operation proto.InternalMessageInfo func (m *OperationState) Reset() { *m = OperationState{} } func (*OperationState) ProtoMessage() {} func (*OperationState) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{23} + return fileDescriptor_generated_f5f02cc29db3d341, []int{26} } func (m *OperationState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,7 +786,7 @@ var xxx_messageInfo_OperationState proto.InternalMessageInfo func (m *ParameterOverrides) Reset() { *m = ParameterOverrides{} } func (*ParameterOverrides) ProtoMessage() {} func (*ParameterOverrides) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{24} + return fileDescriptor_generated_f5f02cc29db3d341, []int{27} } func (m *ParameterOverrides) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -730,7 +814,7 @@ var xxx_messageInfo_ParameterOverrides proto.InternalMessageInfo func (m *ProjectRole) Reset() { *m = ProjectRole{} } func (*ProjectRole) ProtoMessage() {} func (*ProjectRole) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{25} + return fileDescriptor_generated_f5f02cc29db3d341, []int{28} } func (m *ProjectRole) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -758,7 +842,7 @@ var xxx_messageInfo_ProjectRole proto.InternalMessageInfo func (m *Repository) Reset() { *m = Repository{} } func (*Repository) ProtoMessage() {} func (*Repository) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{26} + return fileDescriptor_generated_f5f02cc29db3d341, []int{29} } func (m *Repository) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -786,7 +870,7 @@ var xxx_messageInfo_Repository proto.InternalMessageInfo func (m *RepositoryList) Reset() { *m = RepositoryList{} } func (*RepositoryList) ProtoMessage() {} func (*RepositoryList) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{27} + return fileDescriptor_generated_f5f02cc29db3d341, []int{30} } func (m *RepositoryList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -814,7 +898,7 @@ var xxx_messageInfo_RepositoryList proto.InternalMessageInfo func (m *ResourceDetails) Reset() { *m = ResourceDetails{} } func (*ResourceDetails) ProtoMessage() {} func (*ResourceDetails) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{28} + return fileDescriptor_generated_f5f02cc29db3d341, []int{31} } func (m *ResourceDetails) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -842,7 +926,7 @@ var xxx_messageInfo_ResourceDetails proto.InternalMessageInfo func (m *ResourceNode) Reset() { *m = ResourceNode{} } func (*ResourceNode) ProtoMessage() {} func (*ResourceNode) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{29} + return fileDescriptor_generated_f5f02cc29db3d341, []int{32} } func (m *ResourceNode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -870,7 +954,7 @@ var xxx_messageInfo_ResourceNode proto.InternalMessageInfo func (m *ResourceState) Reset() { *m = ResourceState{} } func (*ResourceState) ProtoMessage() {} func (*ResourceState) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{30} + return fileDescriptor_generated_f5f02cc29db3d341, []int{33} } func (m *ResourceState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -898,7 +982,7 @@ var xxx_messageInfo_ResourceState proto.InternalMessageInfo func (m *ResourceSummary) Reset() { *m = ResourceSummary{} } func (*ResourceSummary) ProtoMessage() {} func (*ResourceSummary) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{31} + return fileDescriptor_generated_f5f02cc29db3d341, []int{34} } func (m *ResourceSummary) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -926,7 +1010,7 @@ var xxx_messageInfo_ResourceSummary proto.InternalMessageInfo func (m *SyncOperation) Reset() { *m = SyncOperation{} } func (*SyncOperation) ProtoMessage() {} func (*SyncOperation) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{32} + return fileDescriptor_generated_f5f02cc29db3d341, []int{35} } func (m *SyncOperation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -954,7 +1038,7 @@ var xxx_messageInfo_SyncOperation proto.InternalMessageInfo func (m *SyncOperationResource) Reset() { *m = SyncOperationResource{} } func (*SyncOperationResource) ProtoMessage() {} func (*SyncOperationResource) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{33} + return fileDescriptor_generated_f5f02cc29db3d341, []int{36} } func (m *SyncOperationResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -982,7 +1066,7 @@ var xxx_messageInfo_SyncOperationResource proto.InternalMessageInfo func (m *SyncOperationResult) Reset() { *m = SyncOperationResult{} } func (*SyncOperationResult) ProtoMessage() {} func (*SyncOperationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{34} + return fileDescriptor_generated_f5f02cc29db3d341, []int{37} } func (m *SyncOperationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1010,7 +1094,7 @@ var xxx_messageInfo_SyncOperationResult proto.InternalMessageInfo func (m *SyncPolicy) Reset() { *m = SyncPolicy{} } func (*SyncPolicy) ProtoMessage() {} func (*SyncPolicy) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{35} + return fileDescriptor_generated_f5f02cc29db3d341, []int{38} } func (m *SyncPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1038,7 +1122,7 @@ var xxx_messageInfo_SyncPolicy proto.InternalMessageInfo func (m *SyncPolicyAutomated) Reset() { *m = SyncPolicyAutomated{} } func (*SyncPolicyAutomated) ProtoMessage() {} func (*SyncPolicyAutomated) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{36} + return fileDescriptor_generated_f5f02cc29db3d341, []int{39} } func (m *SyncPolicyAutomated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1066,7 +1150,7 @@ var xxx_messageInfo_SyncPolicyAutomated proto.InternalMessageInfo func (m *SyncStrategy) Reset() { *m = SyncStrategy{} } func (*SyncStrategy) ProtoMessage() {} func (*SyncStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{37} + return fileDescriptor_generated_f5f02cc29db3d341, []int{40} } func (m *SyncStrategy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1094,7 +1178,7 @@ var xxx_messageInfo_SyncStrategy proto.InternalMessageInfo func (m *SyncStrategyApply) Reset() { *m = SyncStrategyApply{} } func (*SyncStrategyApply) ProtoMessage() {} func (*SyncStrategyApply) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{38} + return fileDescriptor_generated_f5f02cc29db3d341, []int{41} } func (m *SyncStrategyApply) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1122,7 +1206,7 @@ var xxx_messageInfo_SyncStrategyApply proto.InternalMessageInfo func (m *SyncStrategyHook) Reset() { *m = SyncStrategyHook{} } func (*SyncStrategyHook) ProtoMessage() {} func (*SyncStrategyHook) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{39} + return fileDescriptor_generated_f5f02cc29db3d341, []int{42} } func (m *SyncStrategyHook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1150,7 +1234,7 @@ var xxx_messageInfo_SyncStrategyHook proto.InternalMessageInfo func (m *TLSClientConfig) Reset() { *m = TLSClientConfig{} } func (*TLSClientConfig) ProtoMessage() {} func (*TLSClientConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_generated_bc0c401ace3cdbf9, []int{40} + return fileDescriptor_generated_f5f02cc29db3d341, []int{43} } func (m *TLSClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1185,6 +1269,9 @@ func init() { proto.RegisterType((*ApplicationDestination)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationDestination") proto.RegisterType((*ApplicationList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationList") proto.RegisterType((*ApplicationSource)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSource") + proto.RegisterType((*ApplicationSourceHelm)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSourceHelm") + proto.RegisterType((*ApplicationSourceKsonnet)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSourceKsonnet") + proto.RegisterType((*ApplicationSourceKustomize)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSourceKustomize") proto.RegisterType((*ApplicationSpec)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSpec") proto.RegisterType((*ApplicationStatus)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationStatus") proto.RegisterType((*ApplicationWatchEvent)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationWatchEvent") @@ -1601,7 +1688,114 @@ func (m *ApplicationSource) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } - dAtA[i] = 0x3a + if m.Helm != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Helm.Size())) + n9, err := m.Helm.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Kustomize != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Kustomize.Size())) + n10, err := m.Kustomize.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Ksonnet != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Ksonnet.Size())) + n11, err := m.Ksonnet.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *ApplicationSourceHelm) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationSourceHelm) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ReleaseName))) + i += copy(dAtA[i:], m.ReleaseName) + if len(m.ValueFiles) > 0 { + for _, s := range m.ValueFiles { + dAtA[i] = 0x12 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *ApplicationSourceKsonnet) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationSourceKsonnet) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Environment))) + i += copy(dAtA[i:], m.Environment) + return i, nil +} + +func (m *ApplicationSourceKustomize) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ApplicationSourceKustomize) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.NamePrefix))) i += copy(dAtA[i:], m.NamePrefix) @@ -1626,19 +1820,19 @@ func (m *ApplicationSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) - n9, err := m.Source.MarshalTo(dAtA[i:]) + n12, err := m.Source.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n12 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Destination.Size())) - n10, err := m.Destination.MarshalTo(dAtA[i:]) + n13, err := m.Destination.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n13 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Project))) @@ -1647,11 +1841,11 @@ func (m *ApplicationSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SyncPolicy.Size())) - n11, err := m.SyncPolicy.MarshalTo(dAtA[i:]) + n14, err := m.SyncPolicy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n14 } return i, nil } @@ -1674,11 +1868,11 @@ func (m *ApplicationStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ComparisonResult.Size())) - n12, err := m.ComparisonResult.MarshalTo(dAtA[i:]) + n15, err := m.ComparisonResult.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n15 if len(m.History) > 0 { for _, msg := range m.History { dAtA[i] = 0x12 @@ -1706,20 +1900,20 @@ func (m *ApplicationStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Health.Size())) - n13, err := m.Health.MarshalTo(dAtA[i:]) + n16, err := m.Health.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n16 if m.OperationState != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.OperationState.Size())) - n14, err := m.OperationState.MarshalTo(dAtA[i:]) + n17, err := m.OperationState.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n17 } if len(m.Conditions) > 0 { for _, msg := range m.Conditions { @@ -1758,11 +1952,11 @@ func (m *ApplicationWatchEvent) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Application.Size())) - n15, err := m.Application.MarshalTo(dAtA[i:]) + n18, err := m.Application.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n18 return i, nil } @@ -1792,19 +1986,19 @@ func (m *Cluster) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Config.Size())) - n16, err := m.Config.MarshalTo(dAtA[i:]) + n19, err := m.Config.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n19 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConnectionState.Size())) - n17, err := m.ConnectionState.MarshalTo(dAtA[i:]) + n20, err := m.ConnectionState.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n20 return i, nil } @@ -1838,20 +2032,20 @@ func (m *ClusterConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TLSClientConfig.Size())) - n18, err := m.TLSClientConfig.MarshalTo(dAtA[i:]) + n21, err := m.TLSClientConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n21 if m.AWSAuthConfig != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSAuthConfig.Size())) - n19, err := m.AWSAuthConfig.MarshalTo(dAtA[i:]) + n22, err := m.AWSAuthConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n22 } return i, nil } @@ -1874,11 +2068,11 @@ func (m *ClusterList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n20, err := m.ListMeta.MarshalTo(dAtA[i:]) + n23, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n23 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1912,19 +2106,19 @@ func (m *ComparisonResult) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ComparedAt.Size())) - n21, err := m.ComparedAt.MarshalTo(dAtA[i:]) + n24, err := m.ComparedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n24 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ComparedTo.Size())) - n22, err := m.ComparedTo.MarshalTo(dAtA[i:]) + n25, err := m.ComparedTo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n25 dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) @@ -2005,11 +2199,11 @@ func (m *ConnectionState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ModifiedAt.Size())) - n23, err := m.ModifiedAt.MarshalTo(dAtA[i:]) + n26, err := m.ModifiedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n26 } return i, nil } @@ -2048,11 +2242,11 @@ func (m *DeploymentInfo) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DeployedAt.Size())) - n24, err := m.DeployedAt.MarshalTo(dAtA[i:]) + n27, err := m.DeployedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n27 dAtA[i] = 0x28 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ID)) @@ -2170,11 +2364,11 @@ func (m *Operation) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Sync.Size())) - n25, err := m.Sync.MarshalTo(dAtA[i:]) + n28, err := m.Sync.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n28 } return i, nil } @@ -2197,11 +2391,11 @@ func (m *OperationState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Operation.Size())) - n26, err := m.Operation.MarshalTo(dAtA[i:]) + n29, err := m.Operation.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n29 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) @@ -2214,29 +2408,29 @@ func (m *OperationState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SyncResult.Size())) - n27, err := m.SyncResult.MarshalTo(dAtA[i:]) + n30, err := m.SyncResult.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n30 } dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n28, err := m.StartedAt.MarshalTo(dAtA[i:]) + n31, err := m.StartedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n31 if m.FinishedAt != nil { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FinishedAt.Size())) - n29, err := m.FinishedAt.MarshalTo(dAtA[i:]) + n32, err := m.FinishedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n29 + i += n32 } return i, nil } @@ -2358,11 +2552,11 @@ func (m *Repository) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConnectionState.Size())) - n30, err := m.ConnectionState.MarshalTo(dAtA[i:]) + n33, err := m.ConnectionState.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n33 return i, nil } @@ -2384,11 +2578,11 @@ func (m *RepositoryList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n31, err := m.ListMeta.MarshalTo(dAtA[i:]) + n34, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n34 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2518,11 +2712,11 @@ func (m *ResourceState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Health.Size())) - n32, err := m.Health.MarshalTo(dAtA[i:]) + n35, err := m.Health.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n35 return i, nil } @@ -2564,11 +2758,11 @@ func (m *ResourceSummary) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Health.Size())) - n33, err := m.Health.MarshalTo(dAtA[i:]) + n36, err := m.Health.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n36 return i, nil } @@ -2611,21 +2805,21 @@ func (m *SyncOperation) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SyncStrategy.Size())) - n34, err := m.SyncStrategy.MarshalTo(dAtA[i:]) + n37, err := m.SyncStrategy.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n37 } if m.ParameterOverrides != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ParameterOverrides.Size())) - n35, err := m.ParameterOverrides.MarshalTo(dAtA[i:]) + n38, err := m.ParameterOverrides.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n38 } if len(m.Resources) > 0 { for _, msg := range m.Resources { @@ -2737,11 +2931,11 @@ func (m *SyncPolicy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Automated.Size())) - n36, err := m.Automated.MarshalTo(dAtA[i:]) + n39, err := m.Automated.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n39 } return i, nil } @@ -2791,21 +2985,21 @@ func (m *SyncStrategy) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Apply.Size())) - n37, err := m.Apply.MarshalTo(dAtA[i:]) + n40, err := m.Apply.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n40 } if m.Hook != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Hook.Size())) - n38, err := m.Hook.MarshalTo(dAtA[i:]) + n41, err := m.Hook.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n41 } return i, nil } @@ -2854,11 +3048,11 @@ func (m *SyncStrategyHook) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SyncStrategyApply.Size())) - n39, err := m.SyncStrategyApply.MarshalTo(dAtA[i:]) + n42, err := m.SyncStrategyApply.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n42 return i, nil } @@ -3064,6 +3258,46 @@ func (m *ApplicationSource) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.Helm != nil { + l = m.Helm.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Kustomize != nil { + l = m.Kustomize.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Ksonnet != nil { + l = m.Ksonnet.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ApplicationSourceHelm) Size() (n int) { + var l int + _ = l + l = len(m.ReleaseName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.ValueFiles) > 0 { + for _, s := range m.ValueFiles { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ApplicationSourceKsonnet) Size() (n int) { + var l int + _ = l + l = len(m.Environment) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ApplicationSourceKustomize) Size() (n int) { + var l int + _ = l l = len(m.NamePrefix) n += 1 + l + sovGenerated(uint64(l)) return n @@ -3677,6 +3911,39 @@ func (this *ApplicationSource) String() string { `TargetRevision:` + fmt.Sprintf("%v", this.TargetRevision) + `,`, `ComponentParameterOverrides:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ComponentParameterOverrides), "ComponentParameter", "ComponentParameter", 1), `&`, ``, 1) + `,`, `ValuesFiles:` + fmt.Sprintf("%v", this.ValuesFiles) + `,`, + `Helm:` + strings.Replace(fmt.Sprintf("%v", this.Helm), "ApplicationSourceHelm", "ApplicationSourceHelm", 1) + `,`, + `Kustomize:` + strings.Replace(fmt.Sprintf("%v", this.Kustomize), "ApplicationSourceKustomize", "ApplicationSourceKustomize", 1) + `,`, + `Ksonnet:` + strings.Replace(fmt.Sprintf("%v", this.Ksonnet), "ApplicationSourceKsonnet", "ApplicationSourceKsonnet", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ApplicationSourceHelm) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ApplicationSourceHelm{`, + `ReleaseName:` + fmt.Sprintf("%v", this.ReleaseName) + `,`, + `ValueFiles:` + fmt.Sprintf("%v", this.ValueFiles) + `,`, + `}`, + }, "") + return s +} +func (this *ApplicationSourceKsonnet) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ApplicationSourceKsonnet{`, + `Environment:` + fmt.Sprintf("%v", this.Environment) + `,`, + `}`, + }, "") + return s +} +func (this *ApplicationSourceKustomize) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ApplicationSourceKustomize{`, `NamePrefix:` + fmt.Sprintf("%v", this.NamePrefix) + `,`, `}`, }, "") @@ -5343,6 +5610,342 @@ func (m *ApplicationSource) Unmarshal(dAtA []byte) error { m.ValuesFiles = append(m.ValuesFiles, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Helm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Helm == nil { + m.Helm = &ApplicationSourceHelm{} + } + if err := m.Helm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kustomize", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Kustomize == nil { + m.Kustomize = &ApplicationSourceKustomize{} + } + if err := m.Kustomize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ksonnet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ksonnet == nil { + m.Ksonnet = &ApplicationSourceKsonnet{} + } + if err := m.Ksonnet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationSourceHelm) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationSourceHelm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationSourceHelm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReleaseName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReleaseName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueFiles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValueFiles = append(m.ValueFiles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationSourceKsonnet) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationSourceKsonnet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationSourceKsonnet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Environment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ApplicationSourceKustomize) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ApplicationSourceKustomize: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ApplicationSourceKustomize: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType) } @@ -10256,188 +10859,196 @@ var ( ) func init() { - proto.RegisterFile("github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto", fileDescriptor_generated_bc0c401ace3cdbf9) + proto.RegisterFile("github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.proto", fileDescriptor_generated_f5f02cc29db3d341) } -var fileDescriptor_generated_bc0c401ace3cdbf9 = []byte{ - // 2856 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0x5b, 0x8c, 0x1b, 0x57, - 0x75, 0xc7, 0x8f, 0x5d, 0xfb, 0x78, 0x77, 0x93, 0xdc, 0x3e, 0x30, 0x5b, 0x69, 0x77, 0x35, 0xe1, - 0x51, 0x50, 0xeb, 0x25, 0x11, 0x85, 0x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5a, 0xae, 0xd4, 0xd8, 0x69, 0x1c, 0x3b, 0x76, 0x9e, 0x85, 0x62, 0x10, 0xf6, 0x3d, - 0x11, 0x04, 0x25, 0x75, 0x00, 0x7b, 0x0c, 0x88, 0x05, 0x8e, 0x0d, 0x56, 0xcd, 0x70, 0x88, 0xfb, - 0x62, 0x38, 0x29, 0x29, 0x65, 0xb6, 0x38, 0x14, 0x4b, 0x2c, 0x7a, 0x0d, 0x16, 0x29, 0xcf, 0x30, - 0xa1, 0x1d, 0x91, 0xd6, 0x70, 0x06, 0x57, 0x11, 0x0d, 0x8d, 0x9d, 0x75, 0xfa, 0xe8, 0x70, 0x6d, - 0x51, 0x87, 0xe0, 0x94, 0x38, 0xf4, 0x33, 0x03, 0x50, 0x30, 0xee, 0xce, 0xd5, 0x98, 0xb2, 0x11, - 0x1b, 0x6d, 0xf3, 0xac, 0x47, 0x59, 0xa4, 0x8d, 0x19, 0x96, 0xc7, 0x28, 0x80, 0x5e, 0x37, 0xf4, - 0x6d, 0x8f, 0xb8, 0xa1, 0xd8, 0x9b, 0x61, 0x8b, 0x2d, 0x96, 0x5b, 0x77, 0xde, 0xf9, 0xdc, 0x36, - 0xe0, 0x91, 0xb1, 0xef, 0x9d, 0x2c, 0x04, 0x8f, 0xaf, 0x70, 0x71, 0x5c, 0xe5, 0x27, 0xc5, 0x95, - 0xf9, 0xeb, 0x1c, 0x3c, 0x34, 0x66, 0x3a, 0x40, 0x37, 0x75, 0xeb, 0x18, 0x33, 0xdb, 0x85, 0xc9, - 0xf2, 0x2d, 0xfe, 0x3d, 0x32, 0xce, 0x26, 0x77, 0xb9, 0xa0, 0x39, 0x80, 0x62, 0xdb, 0xf7, 0x3b, - 0xf1, 0x26, 0x66, 0x9a, 0x36, 0x44, 0xed, 0x0f, 0xac, 0x32, 0x33, 0x35, 0x7b, 0xa6, 0x58, 0xb0, - 0x37, 0xbf, 0x6f, 0x80, 0x76, 0x11, 0x8b, 0x5e, 0x85, 0xb2, 0xdd, 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x43, 0x4e, 0x58, 0xe0, 0x84, 0x15, 0xd6, 0x23, 0xec, 0x08, 0x10, 0x8e, 0x71, 0xc8, 0x84, - 0x79, 0xc7, 0xe6, 0x54, 0x45, 0x4e, 0x05, 0xfc, 0x86, 0x70, 0x93, 0x13, 0x49, 0x8c, 0x55, 0x7b, - 0xfb, 0x83, 0xd5, 0xb9, 0x77, 0x3e, 0x58, 0x9d, 0x7b, 0xf7, 0x83, 0xd5, 0xb9, 0xdb, 0x47, 0xab, - 0xc6, 0xdb, 0x47, 0xab, 0xc6, 0x3b, 0x47, 0xab, 0xc6, 0xbb, 0x47, 0xab, 0xc6, 0xdf, 0x8f, 0x56, - 0x8d, 0x1f, 0x7f, 0xb8, 0x3a, 0xf7, 0x62, 0x29, 0x36, 0xed, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x37, 0x91, 0xeb, 0xc1, 0x72, 0x2e, 0x00, 0x00, +var fileDescriptor_generated_f5f02cc29db3d341 = []byte{ + // 2990 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x3a, 0x5d, 0x6c, 0x23, 0x57, + 0xd5, 0x19, 0xff, 0x24, 0xf6, 0x71, 0x92, 0xdd, 0xbd, 0xfd, 0xf9, 0xfc, 0xa5, 0x52, 0x12, 0xcd, + 0xf2, 0x53, 0x50, 0xeb, 0xb0, 0x2b, 0x0a, 0xa5, 0x20, 0xa4, 0x4c, 0xb2, 0xdb, 0xa4, 0xd9, 0xcd, + 0xba, 0xd7, 0x69, 0x57, 0x2a, 0x55, 0x61, 0x76, 0x7c, 0x63, 0xcf, 0xda, 0x9e, 0x99, 0xce, 0x1d, + 0x67, 0xd7, 0xad, 0x5a, 0x6d, 0x41, 0x20, 0x10, 0x20, 0x01, 0x15, 0x02, 0x89, 0x97, 0x0a, 0xc1, + 0x0b, 0x8f, 0xa8, 0xe2, 0x81, 0x47, 0x1e, 0x50, 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 0x20, 0x27, 0x2d, 0xab, 0x52, 0x7f, 0x72, 0x44, 0xb1, 0xc6, 0xd6, 0xfc, 0xc8, 0x48, + 0xe5, 0xff, 0xab, 0x76, 0xe4, 0xb4, 0x2f, 0x1c, 0xb0, 0x9e, 0x65, 0x27, 0xd5, 0xec, 0x7e, 0x51, + 0x6f, 0x76, 0x3f, 0x3e, 0x5c, 0xf9, 0xf4, 0xb8, 0x7d, 0xcf, 0x0d, 0x46, 0xa1, 0xc6, 0x49, 0x68, + 0x7d, 0xf1, 0x6b, 0x50, 0xd1, 0x64, 0x96, 0x59, 0x6b, 0x5a, 0xdd, 0x60, 0x92, 0xaa, 0xb4, 0x43, + 0xac, 0xf3, 0x33, 0xff, 0x92, 0x83, 0x39, 0x39, 0x66, 0x9e, 0xb8, 0xbb, 0x5e, 0x85, 0x02, 0xab, + 0x00, 0xd9, 0x66, 0x90, 0x57, 0x3c, 0x0e, 0x41, 0x01, 0xcc, 0x3a, 0x7c, 0x69, 0x25, 0xe7, 0xa1, + 0xad, 0x49, 0x22, 0x47, 0x48, 0x27, 0x96, 0x60, 0x4a, 0x26, 0xf1, 0x8c, 0x25, 0x1f, 0x36, 0x87, + 0x9f, 0x72, 0x58, 0x6d, 0x74, 0x94, 0xf3, 0x16, 0x26, 0x9e, 0xfd, 0x36, 0xd2, 0x14, 0xad, 0xff, + 0x93, 0xdc, 0x4f, 0x65, 0x00, 0x38, 0xcb, 0xdb, 0xfc, 0x5d, 0x1e, 0x16, 0x52, 0x92, 0xa3, 0xc7, + 0xa0, 0xd4, 0xa7, 0x24, 0xf4, 0x54, 0xcb, 0x90, 0x8c, 0x07, 0xcf, 0xc9, 0x73, 0x9c, 0x60, 0x30, + 0xec, 0xc0, 0xa6, 0xf4, 0x86, 0x1f, 0x36, 0xa5, 0x9e, 0x13, 0xec, 0xba, 0x3c, 0xc7, 0x09, 0x06, + 0x6b, 0x07, 0xae, 0x11, 0x3b, 0x24, 0xe1, 0x9e, 0xdf, 0x21, 0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 0x8b, 0x2d, 0x96, + 0x5b, 0xb7, 0xdf, 0xf9, 0xdc, 0x32, 0xe0, 0xa1, 0x91, 0xef, 0x9d, 0x2c, 0x04, 0x8f, 0xaf, 0x70, + 0x71, 0x5c, 0xe5, 0xc7, 0xc5, 0x95, 0xf9, 0xab, 0x1c, 0x3c, 0x30, 0x62, 0x3a, 0x40, 0x37, 0x74, + 0xed, 0x18, 0x53, 0xdb, 0x85, 0xc9, 0xf2, 0x2d, 0xfe, 0x2f, 0x30, 0x4a, 0x27, 0x77, 0xb8, 0xa0, + 0xd9, 0x87, 0x62, 0xdb, 0xf7, 0x3b, 0xf1, 0x26, 0x66, 0x92, 0x36, 0x44, 0xed, 0x0f, 0xac, 0x32, + 0x53, 0x35, 0x7b, 0xa6, 0x58, 0x90, 0x37, 0xbf, 0x67, 0x80, 0x76, 0x11, 0x8b, 0x5e, 0x85, 0xb2, + 0xdd, 0x8f, 0xfc, 0x9e, 0x1d, 0x91, 0xa6, 0x6c, 0xae, 0x76, 0xa7, 0x72, 0xe5, 0xbb, 0x1e, 0x53, + 0x15, 0x1a, 0x4a, 0x1e, 0xb1, 0xe2, 0x67, 0x3e, 0x25, 0x2c, 0x96, 0x79, 0x41, 0x25, 0x0d, 0x63, + 0x7c, 0xd2, 0x30, 0xff, 0x61, 0x40, 0x2a, 0x58, 0x51, 0x0f, 0x8a, 0x4c, 0xa4, 0xc1, 0x14, 0x2e, + 0xfa, 0x75, 0xba, 0xeb, 0x8c, 0xa6, 0xd0, 0x23, 0xff, 0x89, 0x05, 0x17, 0xe4, 0x42, 0x81, 0x29, + 0x54, 0x2e, 0x92, 0x77, 0xa6, 0xc4, 0x8d, 0x99, 0x4a, 0xfe, 0xfb, 0xc5, 0xf7, 0x3b, 0x98, 0xb3, + 0x30, 0x9f, 0x84, 0x33, 0x43, 0x12, 0x31, 0x25, 0xed, 0xfb, 0xf1, 0xff, 0x1a, 0x34, 0x25, 0x5d, + 0x64, 0x87, 0x58, 0xc0, 0x58, 0xf7, 0x75, 0x3a, 0x4b, 0x9e, 0xe5, 0xb1, 0x33, 0x34, 0x4b, 0xef, + 0x9e, 0x68, 0xed, 0xff, 0xa5, 0x50, 0xc3, 0xe2, 0xe3, 0x61, 0x09, 0x98, 0x45, 0xb3, 0xd7, 0x32, + 0x2c, 0x86, 0x5c, 0x8f, 0x12, 0xa7, 0x1f, 0xc6, 0x1f, 0xaa, 0xb6, 0x3d, 0xf2, 0x1c, 0x27, 0x18, + 0xe8, 0x3c, 0x80, 0xb8, 0x16, 0xdc, 0x55, 0x63, 0x56, 0xb2, 0xe9, 0x6a, 0x24, 0x10, 0xac, 0x61, + 0xb1, 0x49, 0xd3, 0x21, 0x61, 0xb4, 0xc9, 0x86, 0x0b, 0x96, 0x5c, 0xe6, 0xc5, 0xa4, 0xb9, 0x21, + 0xcf, 0x70, 0x02, 0x45, 0x9f, 0x84, 0xb9, 0x0e, 0x19, 0x70, 0xc4, 0x02, 0x47, 0x14, 0x7f, 0xd5, + 0x11, 0x47, 0x38, 0x86, 0x21, 0x13, 0x66, 0x1d, 0x9b, 0x63, 0x15, 0x39, 0x16, 0xf0, 0x1b, 0xc2, + 0x75, 0x8e, 0x24, 0x21, 0x56, 0xed, 0x9d, 0x0f, 0x97, 0x67, 0xde, 0xfd, 0x70, 0x79, 0xe6, 0xbd, + 0x0f, 0x97, 0x67, 0x6e, 0x1d, 0x2d, 0x1b, 0xef, 0x1c, 0x2d, 0x1b, 0xef, 0x1e, 0x2d, 0x1b, 0xef, + 0x1d, 0x2d, 0x1b, 0x7f, 0x3f, 0x5a, 0x36, 0x7e, 0xf4, 0xd1, 0xf2, 0xcc, 0x0b, 0xa5, 0x58, 0xb5, + 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xff, 0x8c, 0xff, 0x35, 0xd4, 0x30, 0x00, 0x00, } diff --git a/pkg/apis/application/v1alpha1/generated.proto b/pkg/apis/application/v1alpha1/generated.proto index 8a66e580bc..7146db8b11 100644 --- a/pkg/apis/application/v1alpha1/generated.proto +++ b/pkg/apis/application/v1alpha1/generated.proto @@ -108,6 +108,7 @@ message ApplicationSource { optional string path = 2; // Environment is a ksonnet application environment name + // DEPRECATED: specify environment in ksonnet.environment instead optional string environment = 3; // TargetRevision defines the commit, tag, or branch in which to sync the application to. @@ -118,10 +119,38 @@ message ApplicationSource { repeated ComponentParameter componentParameterOverrides = 5; // ValuesFiles is a list of Helm values files to use when generating a template + // DEPRECATED: specify values in helm.valueFiles instead repeated string valuesFiles = 6; - // NamePrefix is a prefix appended to resources for helm and kustomize apps - optional string namePrefix = 7; + // Helm holds helm specific options + optional ApplicationSourceHelm helm = 7; + + // Kustomize holds kustomize specific options + optional ApplicationSourceKustomize kustomize = 8; + + // Ksonnet holds ksonnet specific options + optional ApplicationSourceKsonnet ksonnet = 9; +} + +// ApplicationSourceHelm holds helm specific options +message ApplicationSourceHelm { + // The Helm release name. If omitted will use the application name + optional string releaseName = 1; + + // ValuesFiles is a list of Helm value files to use when generating a template + repeated string valueFiles = 2; +} + +// ApplicationSourceKsonnet holds ksonnet specific options +message ApplicationSourceKsonnet { + // Environment is a ksonnet application environment name + optional string environment = 1; +} + +// ApplicationSourceKustomize holds kustomize specific options +message ApplicationSourceKustomize { + // NamePrefix is a prefix appended to resources for kustomize apps + optional string namePrefix = 1; } // ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. diff --git a/pkg/apis/application/v1alpha1/types.go b/pkg/apis/application/v1alpha1/types.go index c49a375d3d..c83041bbcf 100644 --- a/pkg/apis/application/v1alpha1/types.go +++ b/pkg/apis/application/v1alpha1/types.go @@ -18,6 +18,107 @@ import ( "github.com/argoproj/argo-cd/util/git" ) +// Application is a definition of Application resource. +// +genclient +// +genclient:noStatus +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type Application struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + Spec ApplicationSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Status ApplicationStatus `json:"status" protobuf:"bytes,3,opt,name=status"` + Operation *Operation `json:"operation,omitempty" protobuf:"bytes,4,opt,name=operation"` +} + +// ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. +type ApplicationSpec struct { + // Source is a reference to the location ksonnet application definition + Source ApplicationSource `json:"source" protobuf:"bytes,1,opt,name=source"` + // Destination overrides the kubernetes server and namespace defined in the environment ksonnet app.yaml + Destination ApplicationDestination `json:"destination" protobuf:"bytes,2,name=destination"` + // Project is a application project name. Empty name means that application belongs to 'default' project. + Project string `json:"project" protobuf:"bytes,3,name=project"` + // SyncPolicy controls when a sync will be performed + SyncPolicy *SyncPolicy `json:"syncPolicy,omitempty" protobuf:"bytes,4,name=syncPolicy"` +} + +// ApplicationSource contains information about github repository, path within repository and target application environment. +type ApplicationSource struct { + // RepoURL is the git repository URL of the application manifests + RepoURL string `json:"repoURL" protobuf:"bytes,1,opt,name=repoURL"` + // Path is a directory path within the repository containing a + Path string `json:"path" protobuf:"bytes,2,opt,name=path"` + // Environment is a ksonnet application environment name + // DEPRECATED: specify environment in ksonnet.environment instead + Environment string `json:"environment,omitempty" protobuf:"bytes,3,opt,name=environment"` + // TargetRevision defines the commit, tag, or branch in which to sync the application to. + // If omitted, will sync to HEAD + TargetRevision string `json:"targetRevision,omitempty" protobuf:"bytes,4,opt,name=targetRevision"` + // ComponentParameterOverrides are a list of parameter override values + ComponentParameterOverrides []ComponentParameter `json:"componentParameterOverrides,omitempty" protobuf:"bytes,5,opt,name=componentParameterOverrides"` + // ValuesFiles is a list of Helm values files to use when generating a template + // DEPRECATED: specify values in helm.valueFiles instead + ValuesFiles []string `json:"valuesFiles,omitempty" protobuf:"bytes,6,opt,name=valuesFiles"` + // Helm holds helm specific options + Helm *ApplicationSourceHelm `json:"helm,omitempty" protobuf:"bytes,7,opt,name=helm"` + // Kustomize holds kustomize specific options + Kustomize *ApplicationSourceKustomize `json:"kustomize,omitempty" protobuf:"bytes,8,opt,name=kustomize"` + // Ksonnet holds ksonnet specific options + Ksonnet *ApplicationSourceKsonnet `json:"ksonnet,omitempty" protobuf:"bytes,9,opt,name=ksonnet"` +} + +type ApplicationSourceType string + +const ( + ApplicationSourceTypeHelm ApplicationSourceType = "Helm" + ApplicationSourceTypeKustomize ApplicationSourceType = "Kustomize" + ApplicationSourceTypeKsonnet ApplicationSourceType = "Ksonnet" + ApplicationSourceTypeDirectory ApplicationSourceType = "Directory" +) + +// ApplicationSourceHelm holds helm specific options +type ApplicationSourceHelm struct { + // The Helm release name. If omitted will use the application name + ReleaseName string `json:"releaseName,omitempty" protobuf:"bytes,1,opt,name=releaseName"` + // ValuesFiles is a list of Helm value files to use when generating a template + ValueFiles []string `json:"valueFiles,omitempty" protobuf:"bytes,2,opt,name=valueFiles"` +} + +// ApplicationSourceKustomize holds kustomize specific options +type ApplicationSourceKustomize struct { + // NamePrefix is a prefix appended to resources for kustomize apps + NamePrefix string `json:"namePrefix" protobuf:"bytes,1,opt,name=namePrefix"` +} + +// ApplicationSourceKsonnet holds ksonnet specific options +type ApplicationSourceKsonnet struct { + // Environment is a ksonnet application environment name + Environment string `json:"environment,omitempty" protobuf:"bytes,1,opt,name=environment"` +} + +// ApplicationDestination contains deployment destination information +type ApplicationDestination struct { + // Server overrides the environment server value in the ksonnet app.yaml + Server string `json:"server,omitempty" protobuf:"bytes,1,opt,name=server"` + // Namespace overrides the environment namespace value in the ksonnet app.yaml + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` +} + +// ApplicationStatus contains information about application status in target environment. +type ApplicationStatus struct { + ComparisonResult ComparisonResult `json:"comparisonResult" protobuf:"bytes,1,opt,name=comparisonResult"` + History []DeploymentInfo `json:"history" protobuf:"bytes,2,opt,name=history"` + Parameters []ComponentParameter `json:"parameters,omitempty" protobuf:"bytes,3,opt,name=parameters"` + Health HealthStatus `json:"health,omitempty" protobuf:"bytes,4,opt,name=health"` + OperationState *OperationState `json:"operationState,omitempty" protobuf:"bytes,5,opt,name=operationState"` + Conditions []ApplicationCondition `json:"conditions,omitempty" protobuf:"bytes,6,opt,name=conditions"` +} + +// Operation contains requested operation parameters. +type Operation struct { + Sync *SyncOperation `json:"sync,omitempty" protobuf:"bytes,1,opt,name=sync"` +} + // SyncOperationResource contains resources to sync. type SyncOperationResource struct { Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` @@ -61,11 +162,6 @@ func (po ParameterOverrides) String() string { return fmt.Sprintf("%v", []ComponentParameter(po)) } -// Operation contains requested operation parameters. -type Operation struct { - Sync *SyncOperation `json:"sync,omitempty" protobuf:"bytes,1,opt,name=sync"` -} - type OperationPhase string const ( @@ -215,18 +311,6 @@ type DeploymentInfo struct { ID int64 `json:"id" protobuf:"bytes,5,opt,name=id"` } -// Application is a definition of Application resource. -// +genclient -// +genclient:noStatus -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type Application struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Spec ApplicationSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - Status ApplicationStatus `json:"status" protobuf:"bytes,3,opt,name=status"` - Operation *Operation `json:"operation,omitempty" protobuf:"bytes,4,opt,name=operation"` -} - // ApplicationWatchEvent contains information about application change. type ApplicationWatchEvent struct { Type watch.EventType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=k8s.io/apimachinery/pkg/watch.EventType"` @@ -247,18 +331,6 @@ type ApplicationList struct { Items []Application `json:"items" protobuf:"bytes,2,rep,name=items"` } -// ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. -type ApplicationSpec struct { - // Source is a reference to the location ksonnet application definition - Source ApplicationSource `json:"source" protobuf:"bytes,1,opt,name=source"` - // Destination overrides the kubernetes server and namespace defined in the environment ksonnet app.yaml - Destination ApplicationDestination `json:"destination" protobuf:"bytes,2,name=destination"` - // Project is a application project name. Empty name means that application belongs to 'default' project. - Project string `json:"project" protobuf:"bytes,3,name=project"` - // SyncPolicy controls when a sync will be performed - SyncPolicy *SyncPolicy `json:"syncPolicy,omitempty" protobuf:"bytes,4,name=syncPolicy"` -} - // ComponentParameter contains information about component parameter value type ComponentParameter struct { Component string `json:"component,omitempty" protobuf:"bytes,1,opt,name=component"` @@ -266,33 +338,6 @@ type ComponentParameter struct { Value string `json:"value" protobuf:"bytes,3,opt,name=value"` } -// ApplicationSource contains information about github repository, path within repository and target application environment. -type ApplicationSource struct { - // RepoURL is the git repository URL of the application manifests - RepoURL string `json:"repoURL" protobuf:"bytes,1,opt,name=repoURL"` - // Path is a directory path within the repository containing a - Path string `json:"path" protobuf:"bytes,2,opt,name=path"` - // Environment is a ksonnet application environment name - Environment string `json:"environment,omitempty" protobuf:"bytes,3,opt,name=environment"` - // TargetRevision defines the commit, tag, or branch in which to sync the application to. - // If omitted, will sync to HEAD - TargetRevision string `json:"targetRevision,omitempty" protobuf:"bytes,4,opt,name=targetRevision"` - // ComponentParameterOverrides are a list of parameter override values - ComponentParameterOverrides []ComponentParameter `json:"componentParameterOverrides,omitempty" protobuf:"bytes,5,opt,name=componentParameterOverrides"` - // ValuesFiles is a list of Helm values files to use when generating a template - ValuesFiles []string `json:"valuesFiles,omitempty" protobuf:"bytes,6,opt,name=valuesFiles"` - // NamePrefix is a prefix appended to resources for helm and kustomize apps - NamePrefix string `json:"namePrefix" protobuf:"bytes,7,opt,name=namePrefix"` -} - -// ApplicationDestination contains deployment destination information -type ApplicationDestination struct { - // Server overrides the environment server value in the ksonnet app.yaml - Server string `json:"server,omitempty" protobuf:"bytes,1,opt,name=server"` - // Namespace overrides the environment namespace value in the ksonnet app.yaml - Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` -} - // ComparisonStatus is a type which represents possible comparison results type ComparisonStatus string @@ -303,16 +348,6 @@ const ( ComparisonStatusOutOfSync ComparisonStatus = "OutOfSync" ) -// ApplicationStatus contains information about application status in target environment. -type ApplicationStatus struct { - ComparisonResult ComparisonResult `json:"comparisonResult" protobuf:"bytes,1,opt,name=comparisonResult"` - History []DeploymentInfo `json:"history" protobuf:"bytes,2,opt,name=history"` - Parameters []ComponentParameter `json:"parameters,omitempty" protobuf:"bytes,3,opt,name=parameters"` - Health HealthStatus `json:"health,omitempty" protobuf:"bytes,4,opt,name=health"` - OperationState *OperationState `json:"operationState,omitempty" protobuf:"bytes,5,opt,name=operationState"` - Conditions []ApplicationCondition `json:"conditions,omitempty" protobuf:"bytes,6,opt,name=conditions"` -} - // ApplicationConditionType represents type of application condition. Type name has following convention: // prefix "Error" means error condition // prefix "Warning" means warning condition @@ -726,3 +761,21 @@ func (r ResourceState) LiveObject() (*unstructured.Unstructured, error) { func (r ResourceState) TargetObject() (*unstructured.Unstructured, error) { return UnmarshalToUnstructured(r.TargetState) } + +// KsonnetEnv is helper to get the ksonnet environment from the legacy field or structured field +// TODO: delete this helper when we drop the top level Environment field +func KsonnetEnv(source *ApplicationSource) string { + if source.Ksonnet != nil && source.Ksonnet.Environment != "" { + return source.Ksonnet.Environment + } + return source.Environment +} + +// HelmValueFiles is helper to get the helm value files from the legacy field or structured field +// TODO: delete this helper when we drop the top level ValuesFiles field +func HelmValueFiles(source *ApplicationSource) []string { + if source.Helm != nil && len(source.Helm.ValueFiles) > 0 { + return source.Helm.ValueFiles + } + return source.ValuesFiles +} diff --git a/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go index b1a107edbf..f99ba0ae3b 100644 --- a/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go @@ -243,6 +243,33 @@ func (in *ApplicationSource) DeepCopyInto(out *ApplicationSource) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.Helm != nil { + in, out := &in.Helm, &out.Helm + if *in == nil { + *out = nil + } else { + *out = new(ApplicationSourceHelm) + (*in).DeepCopyInto(*out) + } + } + if in.Kustomize != nil { + in, out := &in.Kustomize, &out.Kustomize + if *in == nil { + *out = nil + } else { + *out = new(ApplicationSourceKustomize) + **out = **in + } + } + if in.Ksonnet != nil { + in, out := &in.Ksonnet, &out.Ksonnet + if *in == nil { + *out = nil + } else { + *out = new(ApplicationSourceKsonnet) + **out = **in + } + } return } @@ -256,6 +283,59 @@ func (in *ApplicationSource) DeepCopy() *ApplicationSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationSourceHelm) DeepCopyInto(out *ApplicationSourceHelm) { + *out = *in + if in.ValueFiles != nil { + in, out := &in.ValueFiles, &out.ValueFiles + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSourceHelm. +func (in *ApplicationSourceHelm) DeepCopy() *ApplicationSourceHelm { + if in == nil { + return nil + } + out := new(ApplicationSourceHelm) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationSourceKsonnet) DeepCopyInto(out *ApplicationSourceKsonnet) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSourceKsonnet. +func (in *ApplicationSourceKsonnet) DeepCopy() *ApplicationSourceKsonnet { + if in == nil { + return nil + } + out := new(ApplicationSourceKsonnet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationSourceKustomize) DeepCopyInto(out *ApplicationSourceKustomize) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationSourceKustomize. +func (in *ApplicationSourceKustomize) DeepCopy() *ApplicationSourceKustomize { + if in == nil { + return nil + } + out := new(ApplicationSourceKustomize) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) { *out = *in diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 46d8ea15b9..88b92b5e0d 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -23,6 +23,7 @@ import ( "github.com/argoproj/argo-cd/util" "github.com/argoproj/argo-cd/util/cache" "github.com/argoproj/argo-cd/util/git" + "github.com/argoproj/argo-cd/util/hash" "github.com/argoproj/argo-cd/util/helm" "github.com/argoproj/argo-cd/util/ksonnet" "github.com/argoproj/argo-cd/util/kube" @@ -34,15 +35,6 @@ const ( DefaultRepoCacheExpiration = 24 * time.Hour ) -type AppSourceType string - -const ( - AppSourceKsonnet AppSourceType = "ksonnet" - AppSourceHelm AppSourceType = "helm" - AppSourceKustomize AppSourceType = "kustomize" - AppSourceDirectory AppSourceType = "directory" -) - // Service implements ManifestService interface type Service struct { repoLock *util.KeyLock @@ -160,7 +152,7 @@ func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*Mani if err != nil { return nil, err } - appPath := filepath.Join(gitClient.Root(), q.Path) + appPath := filepath.Join(gitClient.Root(), q.ApplicationSource.Path) genRes, err := generateManifests(appPath, q) if err != nil { @@ -179,6 +171,29 @@ func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*Mani return &res, nil } +// helper to formulate helm template options from a manifest request +func helmOpts(q *ManifestRequest) helm.HelmTemplateOpts { + opts := helm.HelmTemplateOpts{ + Namespace: q.Namespace, + } + valueFiles := v1alpha1.HelmValueFiles(q.ApplicationSource) + if q.ApplicationSource.Helm != nil { + opts.ReleaseName = q.ApplicationSource.Helm.ReleaseName + opts.ValueFiles = valueFiles + } + return opts +} + +func kustomizeOpts(q *ManifestRequest) kustomize.KustomizeBuildOpts { + opts := kustomize.KustomizeBuildOpts{ + Namespace: q.Namespace, + } + if q.ApplicationSource.Kustomize != nil { + opts.NamePrefix = q.ApplicationSource.Kustomize.NamePrefix + } + return opts +} + // generateManifests generates manifests from a path func generateManifests(appPath string, q *ManifestRequest) (*ManifestResponse, error) { var targetObjs []*unstructured.Unstructured @@ -188,31 +203,29 @@ func generateManifests(appPath string, q *ManifestRequest) (*ManifestResponse, e appSourceType := IdentifyAppSourceTypeByAppDir(appPath) switch appSourceType { - case AppSourceKsonnet: - targetObjs, params, dest, err = ksShow(appPath, q.Environment, q.ComponentParameterOverrides) - case AppSourceHelm: - // TODO: Add prefix + case v1alpha1.ApplicationSourceTypeKsonnet: + env := v1alpha1.KsonnetEnv(q.ApplicationSource) + targetObjs, params, dest, err = ksShow(appPath, env, q.ComponentParameterOverrides) + case v1alpha1.ApplicationSourceTypeHelm: h := helm.NewHelmApp(appPath) err = h.DependencyBuild() if err != nil { return nil, err } - appName := q.AppLabel - if q.NamePrefix != "" { - appName = q.NamePrefix + q.AppLabel - } - targetObjs, err = h.Template(appName, q.Namespace, q.ValueFiles, q.ComponentParameterOverrides) + opts := helmOpts(q) + targetObjs, err = h.Template(q.AppLabel, opts, q.ComponentParameterOverrides) if err != nil { return nil, err } - params, err = h.GetParameters(q.ValueFiles) + params, err = h.GetParameters(opts.ValueFiles) if err != nil { return nil, err } - case AppSourceKustomize: + case v1alpha1.ApplicationSourceTypeKustomize: k := kustomize.NewKustomizeApp(appPath) - targetObjs, params, err = k.Build(q.Namespace, q.NamePrefix, q.ComponentParameterOverrides) - case AppSourceDirectory: + opts := kustomizeOpts(q) + targetObjs, params, err = k.Build(opts, q.ComponentParameterOverrides) + case v1alpha1.ApplicationSourceTypeDirectory: targetObjs, err = findManifests(appPath) } if err != nil { @@ -271,31 +284,31 @@ func tempRepoPath(repo string) string { } // IdentifyAppSourceTypeByAppDir examines a directory and determines its application source type -func IdentifyAppSourceTypeByAppDir(appDirPath string) AppSourceType { +func IdentifyAppSourceTypeByAppDir(appDirPath string) v1alpha1.ApplicationSourceType { if pathExists(appDirPath, "app.yaml") { - return AppSourceKsonnet + return v1alpha1.ApplicationSourceTypeKsonnet } if pathExists(appDirPath, "Chart.yaml") { - return AppSourceHelm + return v1alpha1.ApplicationSourceTypeHelm } if pathExists(appDirPath, "kustomization.yaml") { - return AppSourceKustomize + return v1alpha1.ApplicationSourceTypeKustomize } - return AppSourceDirectory + return v1alpha1.ApplicationSourceTypeDirectory } // IdentifyAppSourceTypeByAppPath determines application source type by app file path -func IdentifyAppSourceTypeByAppPath(appFilePath string) AppSourceType { +func IdentifyAppSourceTypeByAppPath(appFilePath string) v1alpha1.ApplicationSourceType { if strings.HasSuffix(appFilePath, "app.yaml") { - return AppSourceKsonnet + return v1alpha1.ApplicationSourceTypeKsonnet } if strings.HasSuffix(appFilePath, "Chart.yaml") { - return AppSourceHelm + return v1alpha1.ApplicationSourceTypeHelm } if strings.HasSuffix(appFilePath, "kustomization.yaml") { - return AppSourceKustomize + return v1alpha1.ApplicationSourceTypeKustomize } - return AppSourceDirectory + return v1alpha1.ApplicationSourceTypeDirectory } // checkoutRevision is a convenience function to initialize a repo, fetch, and checkout a revision @@ -317,9 +330,13 @@ func checkoutRevision(gitClient git.Client, commitSHA string) (string, error) { } func manifestCacheKey(commitSHA string, q *ManifestRequest) string { + appSrc := q.ApplicationSource.DeepCopy() + appSrc.RepoURL = "" // superceded by commitSHA + appSrc.TargetRevision = "" // superceded by commitSHA + appSrcStr, _ := json.Marshal(appSrc) pStr, _ := json.Marshal(q.ComponentParameterOverrides) - valuesFiles := strings.Join(q.ValueFiles, ",") - return fmt.Sprintf("mfst|%s|%s|%s|%s|%s|%s|%s|%s", q.AppLabel, q.Path, q.Environment, commitSHA, string(pStr), valuesFiles, q.Namespace, q.NamePrefix) + fnva := hash.FNVa(string(appSrcStr) + string(pStr)) + return fmt.Sprintf("mfst|%s|%s|%s|%d", q.AppLabel, commitSHA, q.Namespace, fnva) } func listDirCacheKey(commitSHA string, q *ListDirRequest) string { @@ -350,7 +367,7 @@ func ksShow(appPath, envName string, overrides []*v1alpha1.ComponentParameter) ( } dest, err := ksApp.Destination(envName) if err != nil { - return nil, nil, nil, status.Errorf(codes.NotFound, "environment %q does not exist in ksonnet app", envName) + return nil, nil, nil, status.Errorf(codes.InvalidArgument, err.Error()) } targetObjs, err := ksApp.Show(envName) if err != nil { diff --git a/reposerver/repository/repository.pb.go b/reposerver/repository/repository.pb.go index 68e3cf670d..6f779041a7 100644 --- a/reposerver/repository/repository.pb.go +++ b/reposerver/repository/repository.pb.go @@ -31,13 +31,10 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type ManifestRequest struct { Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"` Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` AppLabel string `protobuf:"bytes,5,opt,name=appLabel,proto3" json:"appLabel,omitempty"` ComponentParameterOverrides []*v1alpha1.ComponentParameter `protobuf:"bytes,6,rep,name=componentParameterOverrides" json:"componentParameterOverrides,omitempty"` - ValueFiles []string `protobuf:"bytes,7,rep,name=valueFiles" json:"valueFiles,omitempty"` Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` - NamePrefix string `protobuf:"bytes,9,opt,name=namePrefix,proto3" json:"namePrefix,omitempty"` + ApplicationSource *v1alpha1.ApplicationSource `protobuf:"bytes,10,opt,name=applicationSource" json:"applicationSource,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -47,7 +44,7 @@ func (m *ManifestRequest) Reset() { *m = ManifestRequest{} } func (m *ManifestRequest) String() string { return proto.CompactTextString(m) } func (*ManifestRequest) ProtoMessage() {} func (*ManifestRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{0} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{0} } func (m *ManifestRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -90,20 +87,6 @@ func (m *ManifestRequest) GetRevision() string { return "" } -func (m *ManifestRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *ManifestRequest) GetEnvironment() string { - if m != nil { - return m.Environment - } - return "" -} - func (m *ManifestRequest) GetAppLabel() string { if m != nil { return m.AppLabel @@ -118,13 +101,6 @@ func (m *ManifestRequest) GetComponentParameterOverrides() []*v1alpha1.Component return nil } -func (m *ManifestRequest) GetValueFiles() []string { - if m != nil { - return m.ValueFiles - } - return nil -} - func (m *ManifestRequest) GetNamespace() string { if m != nil { return m.Namespace @@ -132,11 +108,11 @@ func (m *ManifestRequest) GetNamespace() string { return "" } -func (m *ManifestRequest) GetNamePrefix() string { +func (m *ManifestRequest) GetApplicationSource() *v1alpha1.ApplicationSource { if m != nil { - return m.NamePrefix + return m.ApplicationSource } - return "" + return nil } type ManifestResponse struct { @@ -154,7 +130,7 @@ func (m *ManifestResponse) Reset() { *m = ManifestResponse{} } func (m *ManifestResponse) String() string { return proto.CompactTextString(m) } func (*ManifestResponse) ProtoMessage() {} func (*ManifestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{1} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{1} } func (m *ManifestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -232,7 +208,7 @@ func (m *ListDirRequest) Reset() { *m = ListDirRequest{} } func (m *ListDirRequest) String() string { return proto.CompactTextString(m) } func (*ListDirRequest) ProtoMessage() {} func (*ListDirRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{2} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{2} } func (m *ListDirRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -294,7 +270,7 @@ func (m *FileList) Reset() { *m = FileList{} } func (m *FileList) String() string { return proto.CompactTextString(m) } func (*FileList) ProtoMessage() {} func (*FileList) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{3} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{3} } func (m *FileList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -344,7 +320,7 @@ func (m *GetFileRequest) Reset() { *m = GetFileRequest{} } func (m *GetFileRequest) String() string { return proto.CompactTextString(m) } func (*GetFileRequest) ProtoMessage() {} func (*GetFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{4} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{4} } func (m *GetFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -406,7 +382,7 @@ func (m *GetFileResponse) Reset() { *m = GetFileResponse{} } func (m *GetFileResponse) String() string { return proto.CompactTextString(m) } func (*GetFileResponse) ProtoMessage() {} func (*GetFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_bbb9ca7fa4202717, []int{5} + return fileDescriptor_repository_a8022d4991c5d6a5, []int{5} } func (m *GetFileResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -626,18 +602,6 @@ func (m *ManifestRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintRepository(dAtA, i, uint64(len(m.Revision))) i += copy(dAtA[i:], m.Revision) } - if len(m.Path) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintRepository(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - } - if len(m.Environment) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintRepository(dAtA, i, uint64(len(m.Environment))) - i += copy(dAtA[i:], m.Environment) - } if len(m.AppLabel) > 0 { dAtA[i] = 0x2a i++ @@ -656,32 +620,21 @@ func (m *ManifestRequest) MarshalTo(dAtA []byte) (int, error) { i += n } } - if len(m.ValueFiles) > 0 { - for _, s := range m.ValueFiles { - dAtA[i] = 0x3a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } if len(m.Namespace) > 0 { dAtA[i] = 0x42 i++ i = encodeVarintRepository(dAtA, i, uint64(len(m.Namespace))) i += copy(dAtA[i:], m.Namespace) } - if len(m.NamePrefix) > 0 { - dAtA[i] = 0x4a + if m.ApplicationSource != nil { + dAtA[i] = 0x52 i++ - i = encodeVarintRepository(dAtA, i, uint64(len(m.NamePrefix))) - i += copy(dAtA[i:], m.NamePrefix) + i = encodeVarintRepository(dAtA, i, uint64(m.ApplicationSource.Size())) + n2, err := m.ApplicationSource.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 } if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) @@ -774,11 +727,11 @@ func (m *ListDirRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRepository(dAtA, i, uint64(m.Repo.Size())) - n2, err := m.Repo.MarshalTo(dAtA[i:]) + n3, err := m.Repo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n2 + i += n3 } if len(m.Revision) > 0 { dAtA[i] = 0x12 @@ -853,11 +806,11 @@ func (m *GetFileRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintRepository(dAtA, i, uint64(m.Repo.Size())) - n3, err := m.Repo.MarshalTo(dAtA[i:]) + n4, err := m.Repo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n4 } if len(m.Revision) > 0 { dAtA[i] = 0x12 @@ -924,14 +877,6 @@ func (m *ManifestRequest) Size() (n int) { if l > 0 { n += 1 + l + sovRepository(uint64(l)) } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovRepository(uint64(l)) - } - l = len(m.Environment) - if l > 0 { - n += 1 + l + sovRepository(uint64(l)) - } l = len(m.AppLabel) if l > 0 { n += 1 + l + sovRepository(uint64(l)) @@ -942,18 +887,12 @@ func (m *ManifestRequest) Size() (n int) { n += 1 + l + sovRepository(uint64(l)) } } - if len(m.ValueFiles) > 0 { - for _, s := range m.ValueFiles { - l = len(s) - n += 1 + l + sovRepository(uint64(l)) - } - } l = len(m.Namespace) if l > 0 { n += 1 + l + sovRepository(uint64(l)) } - l = len(m.NamePrefix) - if l > 0 { + if m.ApplicationSource != nil { + l = m.ApplicationSource.Size() n += 1 + l + sovRepository(uint64(l)) } if m.XXX_unrecognized != nil { @@ -1169,64 +1108,6 @@ func (m *ManifestRequest) Unmarshal(dAtA []byte) error { } m.Revision = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRepository - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRepository - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRepository - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRepository - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Environment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppLabel", wireType) @@ -1287,35 +1168,6 @@ func (m *ManifestRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValueFiles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRepository - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRepository - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValueFiles = append(m.ValueFiles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) @@ -1345,11 +1197,11 @@ func (m *ManifestRequest) Unmarshal(dAtA []byte) error { } m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ApplicationSource", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowRepository @@ -1359,20 +1211,24 @@ func (m *ManifestRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthRepository } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.NamePrefix = string(dAtA[iNdEx:postIndex]) + if m.ApplicationSource == nil { + m.ApplicationSource = &v1alpha1.ApplicationSource{} + } + if err := m.ApplicationSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2146,47 +2002,45 @@ var ( ) func init() { - proto.RegisterFile("reposerver/repository/repository.proto", fileDescriptor_repository_bbb9ca7fa4202717) + proto.RegisterFile("reposerver/repository/repository.proto", fileDescriptor_repository_a8022d4991c5d6a5) } -var fileDescriptor_repository_bbb9ca7fa4202717 = []byte{ - // 597 bytes of a gzipped FileDescriptorProto +var fileDescriptor_repository_a8022d4991c5d6a5 = []byte{ + // 576 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xae, 0x9b, 0x34, 0x6d, 0xb6, 0x3f, 0xfd, 0x5a, 0x56, 0x15, 0xb2, 0xdc, 0x2a, 0xb2, 0x2c, - 0x81, 0x72, 0xc1, 0x56, 0xc2, 0x85, 0x0b, 0x42, 0x82, 0x42, 0x85, 0xd4, 0xaa, 0x95, 0x39, 0xc1, - 0x05, 0x6d, 0x9c, 0xa9, 0xb3, 0xc4, 0xde, 0x5d, 0x76, 0x37, 0x16, 0x3c, 0x05, 0x0f, 0xc0, 0x0b, - 0x21, 0x4e, 0x3c, 0x02, 0xca, 0xad, 0x6f, 0x81, 0x76, 0x63, 0xc7, 0x4e, 0x1a, 0xf5, 0x82, 0x90, - 0x7a, 0x9b, 0xf9, 0x66, 0xfd, 0x7d, 0xf3, 0x4f, 0x63, 0xf4, 0x58, 0x82, 0xe0, 0x0a, 0x64, 0x01, - 0x32, 0xb2, 0x26, 0xd5, 0x5c, 0x7e, 0x6d, 0x98, 0xa1, 0x90, 0x5c, 0x73, 0x8c, 0x6a, 0xc4, 0x3b, - 0x4a, 0x79, 0xca, 0x2d, 0x1c, 0x19, 0x6b, 0xf1, 0xc2, 0x3b, 0x49, 0x39, 0x4f, 0x33, 0x88, 0x88, - 0xa0, 0x11, 0x61, 0x8c, 0x6b, 0xa2, 0x29, 0x67, 0xaa, 0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x6b, 0xc1, 0xd9, 0x8a, 0xeb, 0x1a, 0x65, 0xca, 0x42, 0x24, + 0x57, 0x70, 0x7a, 0x91, 0x1f, 0x9b, 0x62, 0x1b, 0x49, 0xd3, 0x2b, 0xdd, 0xcb, 0x8d, 0xb3, 0xe3, + 0xb4, 0x76, 0x83, 0x0b, 0x62, 0x77, 0x8f, 0x3c, 0x83, 0xc3, 0x7c, 0xd4, 0xc4, 0x29, 0x87, 0xae, + 0xcf, 0xdf, 0x69, 0x94, 0xb1, 0xa2, 0xfd, 0xee, 0x1e, 0x39, 0x87, 0xc3, 0xbc, 0x98, 0xf5, 0xcf, + 0xd7, 0xdb, 0xef, 0x34, 0x77, 0x62, 0x85, 0x88, 0x97, 0xcf, 0x7f, 0xce, 0xdb, 0xd6, 0xcd, 0xbc, + 0x6d, 0xfd, 0x9a, 0xb7, 0xad, 0x0f, 0xbd, 0xbb, 0x0e, 0xf1, 0xce, 0x1f, 0xc6, 0xb0, 0x66, 0xee, + 0xee, 0x93, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, 0x6b, 0xe9, 0x55, 0x50, 0x06, 0x00, 0x00, } diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index a8ba6b1381..9515a8a29c 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -12,13 +12,10 @@ import "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1/generated.prot message ManifestRequest { github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository repo = 1; string revision = 2; - string path = 3; - string environment = 4; string appLabel = 5; repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ComponentParameter componentParameterOverrides = 6; - repeated string valueFiles = 7; string namespace = 8; - string namePrefix = 9; + github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSource applicationSource = 10; } message ManifestResponse { diff --git a/reposerver/repository/repository_test.go b/reposerver/repository/repository_test.go index 7d63acec7a..361510b5ab 100644 --- a/reposerver/repository/repository_test.go +++ b/reposerver/repository/repository_test.go @@ -4,13 +4,17 @@ import ( "testing" "github.com/stretchr/testify/assert" + + argoappv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" ) func TestGenerateYamlManifestInDir(t *testing.T) { // update this value if we add/remove manifests const countOfManifests = 23 - q := ManifestRequest{} + q := ManifestRequest{ + ApplicationSource: &argoappv1.ApplicationSource{}, + } res1, err := generateManifests("../../manifests/base", &q) assert.Nil(t, err) assert.Equal(t, len(res1.Manifests), countOfManifests) @@ -22,7 +26,9 @@ func TestGenerateYamlManifestInDir(t *testing.T) { } func TestGenerateJsonnetManifestInDir(t *testing.T) { - q := ManifestRequest{} + q := ManifestRequest{ + ApplicationSource: &argoappv1.ApplicationSource{}, + } res1, err := generateManifests("./testdata/jsonnet", &q) assert.Nil(t, err) assert.Equal(t, len(res1.Manifests), 2) diff --git a/server/account/account.pb.go b/server/account/account.pb.go index 17aef183e7..116230533b 100644 --- a/server/account/account.pb.go +++ b/server/account/account.pb.go @@ -37,7 +37,7 @@ func (m *UpdatePasswordRequest) Reset() { *m = UpdatePasswordRequest{} } func (m *UpdatePasswordRequest) String() string { return proto.CompactTextString(m) } func (*UpdatePasswordRequest) ProtoMessage() {} func (*UpdatePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_account_3e64cf795478a98b, []int{0} + return fileDescriptor_account_c12a236fbb4926f3, []int{0} } func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -90,7 +90,7 @@ func (m *UpdatePasswordResponse) Reset() { *m = UpdatePasswordResponse{} func (m *UpdatePasswordResponse) String() string { return proto.CompactTextString(m) } func (*UpdatePasswordResponse) ProtoMessage() {} func (*UpdatePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_account_3e64cf795478a98b, []int{1} + return fileDescriptor_account_c12a236fbb4926f3, []int{1} } func (m *UpdatePasswordResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -566,10 +566,10 @@ var ( ) func init() { - proto.RegisterFile("server/account/account.proto", fileDescriptor_account_3e64cf795478a98b) + proto.RegisterFile("server/account/account.proto", fileDescriptor_account_c12a236fbb4926f3) } -var fileDescriptor_account_3e64cf795478a98b = []byte{ +var fileDescriptor_account_c12a236fbb4926f3 = []byte{ // 268 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x81, 0xd1, 0x7a, 0x05, 0x45, 0xf9, diff --git a/server/application/application.go b/server/application/application.go index 4f1779fb4d..0f6f5dccca 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -179,14 +179,11 @@ func (s *Server) GetManifests(ctx context.Context, q *ApplicationManifestQuery) } manifestInfo, err := repoClient.GenerateManifest(context.Background(), &repository.ManifestRequest{ Repo: repo, - Environment: a.Spec.Source.Environment, - Path: a.Spec.Source.Path, Revision: revision, ComponentParameterOverrides: overrides, AppLabel: a.Name, - ValueFiles: a.Spec.Source.ValuesFiles, Namespace: a.Spec.Destination.Namespace, - NamePrefix: a.Spec.Source.NamePrefix, + ApplicationSource: &a.Spec.Source, }) if err != nil { return nil, err @@ -291,7 +288,7 @@ func (s *Server) Update(ctx context.Context, q *ApplicationUpdateRequest) (*appv // throws an error is passed override is invalid // if passed override and old overrides are invalid, throws error, old overrides not dropped func (s *Server) removeInvalidOverrides(a *appv1.Application, q *ApplicationUpdateSpecRequest) (*ApplicationUpdateSpecRequest, error) { - if a.Spec.Source.Environment == "" { + if appv1.KsonnetEnv(&a.Spec.Source) == "" { // this method is only valid for ksonnet apps return q, nil } diff --git a/server/application/application.pb.go b/server/application/application.pb.go index 655e3fcc5a..2ea537958c 100644 --- a/server/application/application.pb.go +++ b/server/application/application.pb.go @@ -52,7 +52,7 @@ func (m *ApplicationQuery) Reset() { *m = ApplicationQuery{} } func (m *ApplicationQuery) String() string { return proto.CompactTextString(m) } func (*ApplicationQuery) ProtoMessage() {} func (*ApplicationQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{0} + return fileDescriptor_application_dd8073928224ef68, []int{0} } func (m *ApplicationQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -116,7 +116,7 @@ func (m *ApplicationResourceEventsQuery) Reset() { *m = ApplicationResou func (m *ApplicationResourceEventsQuery) String() string { return proto.CompactTextString(m) } func (*ApplicationResourceEventsQuery) ProtoMessage() {} func (*ApplicationResourceEventsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{1} + return fileDescriptor_application_dd8073928224ef68, []int{1} } func (m *ApplicationResourceEventsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -179,7 +179,7 @@ func (m *ApplicationManifestQuery) Reset() { *m = ApplicationManifestQue func (m *ApplicationManifestQuery) String() string { return proto.CompactTextString(m) } func (*ApplicationManifestQuery) ProtoMessage() {} func (*ApplicationManifestQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{2} + return fileDescriptor_application_dd8073928224ef68, []int{2} } func (m *ApplicationManifestQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -232,7 +232,7 @@ func (m *ApplicationResponse) Reset() { *m = ApplicationResponse{} } func (m *ApplicationResponse) String() string { return proto.CompactTextString(m) } func (*ApplicationResponse) ProtoMessage() {} func (*ApplicationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{3} + return fileDescriptor_application_dd8073928224ef68, []int{3} } func (m *ApplicationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +273,7 @@ func (m *ApplicationCreateRequest) Reset() { *m = ApplicationCreateReque func (m *ApplicationCreateRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationCreateRequest) ProtoMessage() {} func (*ApplicationCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{4} + return fileDescriptor_application_dd8073928224ef68, []int{4} } func (m *ApplicationCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +327,7 @@ func (m *ApplicationUpdateRequest) Reset() { *m = ApplicationUpdateReque func (m *ApplicationUpdateRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationUpdateRequest) ProtoMessage() {} func (*ApplicationUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{5} + return fileDescriptor_application_dd8073928224ef68, []int{5} } func (m *ApplicationUpdateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -375,7 +375,7 @@ func (m *ApplicationDeleteRequest) Reset() { *m = ApplicationDeleteReque func (m *ApplicationDeleteRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationDeleteRequest) ProtoMessage() {} func (*ApplicationDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{6} + return fileDescriptor_application_dd8073928224ef68, []int{6} } func (m *ApplicationDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -436,7 +436,7 @@ func (m *ApplicationSyncRequest) Reset() { *m = ApplicationSyncRequest{} func (m *ApplicationSyncRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationSyncRequest) ProtoMessage() {} func (*ApplicationSyncRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{7} + return fileDescriptor_application_dd8073928224ef68, []int{7} } func (m *ApplicationSyncRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -527,7 +527,7 @@ func (m *ParameterOverrides) Reset() { *m = ParameterOverrides{} } func (m *ParameterOverrides) String() string { return proto.CompactTextString(m) } func (*ParameterOverrides) ProtoMessage() {} func (*ParameterOverrides) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{8} + return fileDescriptor_application_dd8073928224ef68, []int{8} } func (m *ParameterOverrides) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -576,7 +576,7 @@ func (m *Parameter) Reset() { *m = Parameter{} } func (m *Parameter) String() string { return proto.CompactTextString(m) } func (*Parameter) ProtoMessage() {} func (*Parameter) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{9} + return fileDescriptor_application_dd8073928224ef68, []int{9} } func (m *Parameter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -639,7 +639,7 @@ func (m *ApplicationUpdateSpecRequest) Reset() { *m = ApplicationUpdateS func (m *ApplicationUpdateSpecRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationUpdateSpecRequest) ProtoMessage() {} func (*ApplicationUpdateSpecRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{10} + return fileDescriptor_application_dd8073928224ef68, []int{10} } func (m *ApplicationUpdateSpecRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ func (m *ApplicationRollbackRequest) Reset() { *m = ApplicationRollbackR func (m *ApplicationRollbackRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationRollbackRequest) ProtoMessage() {} func (*ApplicationRollbackRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{11} + return fileDescriptor_application_dd8073928224ef68, []int{11} } func (m *ApplicationRollbackRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -767,7 +767,7 @@ func (m *ApplicationDeleteResourceRequest) Reset() { *m = ApplicationDel func (m *ApplicationDeleteResourceRequest) String() string { return proto.CompactTextString(m) } func (*ApplicationDeleteResourceRequest) ProtoMessage() {} func (*ApplicationDeleteResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{12} + return fileDescriptor_application_dd8073928224ef68, []int{12} } func (m *ApplicationDeleteResourceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -841,7 +841,7 @@ func (m *ApplicationPodLogsQuery) Reset() { *m = ApplicationPodLogsQuery func (m *ApplicationPodLogsQuery) String() string { return proto.CompactTextString(m) } func (*ApplicationPodLogsQuery) ProtoMessage() {} func (*ApplicationPodLogsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{13} + return fileDescriptor_application_dd8073928224ef68, []int{13} } func (m *ApplicationPodLogsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -931,7 +931,7 @@ func (m *LogEntry) Reset() { *m = LogEntry{} } func (m *LogEntry) String() string { return proto.CompactTextString(m) } func (*LogEntry) ProtoMessage() {} func (*LogEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{14} + return fileDescriptor_application_dd8073928224ef68, []int{14} } func (m *LogEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -985,7 +985,7 @@ func (m *OperationTerminateRequest) Reset() { *m = OperationTerminateReq func (m *OperationTerminateRequest) String() string { return proto.CompactTextString(m) } func (*OperationTerminateRequest) ProtoMessage() {} func (*OperationTerminateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{15} + return fileDescriptor_application_dd8073928224ef68, []int{15} } func (m *OperationTerminateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1031,7 +1031,7 @@ func (m *OperationTerminateResponse) Reset() { *m = OperationTerminateRe func (m *OperationTerminateResponse) String() string { return proto.CompactTextString(m) } func (*OperationTerminateResponse) ProtoMessage() {} func (*OperationTerminateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_application_bd7d6e09af32e4fb, []int{16} + return fileDescriptor_application_dd8073928224ef68, []int{16} } func (m *OperationTerminateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -4968,10 +4968,10 @@ var ( ) func init() { - proto.RegisterFile("server/application/application.proto", fileDescriptor_application_bd7d6e09af32e4fb) + proto.RegisterFile("server/application/application.proto", fileDescriptor_application_dd8073928224ef68) } -var fileDescriptor_application_bd7d6e09af32e4fb = []byte{ +var fileDescriptor_application_dd8073928224ef68 = []byte{ // 1488 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1c, 0x45, 0x16, 0xdf, 0x9a, 0xf1, 0xd7, 0x3c, 0x47, 0xab, 0x55, 0x6d, 0xe2, 0xed, 0x6d, 0x1c, 0x7b, 0xd4, diff --git a/server/cluster/cluster.pb.go b/server/cluster/cluster.pb.go index fa4c2ba9eb..3b955688ba 100644 --- a/server/cluster/cluster.pb.go +++ b/server/cluster/cluster.pb.go @@ -45,7 +45,7 @@ func (m *ClusterQuery) Reset() { *m = ClusterQuery{} } func (m *ClusterQuery) String() string { return proto.CompactTextString(m) } func (*ClusterQuery) ProtoMessage() {} func (*ClusterQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_cluster_bf8d7367dfc95a3e, []int{0} + return fileDescriptor_cluster_0875510a34378ea0, []int{0} } func (m *ClusterQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -91,7 +91,7 @@ func (m *ClusterResponse) Reset() { *m = ClusterResponse{} } func (m *ClusterResponse) String() string { return proto.CompactTextString(m) } func (*ClusterResponse) ProtoMessage() {} func (*ClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cluster_bf8d7367dfc95a3e, []int{1} + return fileDescriptor_cluster_0875510a34378ea0, []int{1} } func (m *ClusterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ func (m *ClusterCreateRequest) Reset() { *m = ClusterCreateRequest{} } func (m *ClusterCreateRequest) String() string { return proto.CompactTextString(m) } func (*ClusterCreateRequest) ProtoMessage() {} func (*ClusterCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cluster_bf8d7367dfc95a3e, []int{2} + return fileDescriptor_cluster_0875510a34378ea0, []int{2} } func (m *ClusterCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,7 +189,7 @@ func (m *ClusterCreateFromKubeConfigRequest) Reset() { *m = ClusterCreat func (m *ClusterCreateFromKubeConfigRequest) String() string { return proto.CompactTextString(m) } func (*ClusterCreateFromKubeConfigRequest) ProtoMessage() {} func (*ClusterCreateFromKubeConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cluster_bf8d7367dfc95a3e, []int{3} + return fileDescriptor_cluster_0875510a34378ea0, []int{3} } func (m *ClusterCreateFromKubeConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -257,7 +257,7 @@ func (m *ClusterUpdateRequest) Reset() { *m = ClusterUpdateRequest{} } func (m *ClusterUpdateRequest) String() string { return proto.CompactTextString(m) } func (*ClusterUpdateRequest) ProtoMessage() {} func (*ClusterUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cluster_bf8d7367dfc95a3e, []int{4} + return fileDescriptor_cluster_0875510a34378ea0, []int{4} } func (m *ClusterUpdateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1393,10 +1393,10 @@ var ( ) func init() { - proto.RegisterFile("server/cluster/cluster.proto", fileDescriptor_cluster_bf8d7367dfc95a3e) + proto.RegisterFile("server/cluster/cluster.proto", fileDescriptor_cluster_0875510a34378ea0) } -var fileDescriptor_cluster_bf8d7367dfc95a3e = []byte{ +var fileDescriptor_cluster_0875510a34378ea0 = []byte{ // 564 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xcd, 0x6e, 0x13, 0x31, 0x10, 0xc7, 0xe5, 0xb6, 0xda, 0x12, 0x83, 0xf8, 0xb0, 0x0a, 0x5a, 0xd2, 0x10, 0xa5, 0x3e, 0x54, diff --git a/server/project/project.pb.go b/server/project/project.pb.go index cb59249682..492ce08be4 100644 --- a/server/project/project.pb.go +++ b/server/project/project.pb.go @@ -46,7 +46,7 @@ func (m *ProjectCreateRequest) Reset() { *m = ProjectCreateRequest{} } func (m *ProjectCreateRequest) String() string { return proto.CompactTextString(m) } func (*ProjectCreateRequest) ProtoMessage() {} func (*ProjectCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{0} + return fileDescriptor_project_082822b5d17b8c4e, []int{0} } func (m *ProjectCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -96,7 +96,7 @@ func (m *ProjectTokenDeleteRequest) Reset() { *m = ProjectTokenDeleteReq func (m *ProjectTokenDeleteRequest) String() string { return proto.CompactTextString(m) } func (*ProjectTokenDeleteRequest) ProtoMessage() {} func (*ProjectTokenDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{1} + return fileDescriptor_project_082822b5d17b8c4e, []int{1} } func (m *ProjectTokenDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ func (m *ProjectTokenCreateRequest) Reset() { *m = ProjectTokenCreateReq func (m *ProjectTokenCreateRequest) String() string { return proto.CompactTextString(m) } func (*ProjectTokenCreateRequest) ProtoMessage() {} func (*ProjectTokenCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{2} + return fileDescriptor_project_082822b5d17b8c4e, []int{2} } func (m *ProjectTokenCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,7 +231,7 @@ func (m *ProjectTokenResponse) Reset() { *m = ProjectTokenResponse{} } func (m *ProjectTokenResponse) String() string { return proto.CompactTextString(m) } func (*ProjectTokenResponse) ProtoMessage() {} func (*ProjectTokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{3} + return fileDescriptor_project_082822b5d17b8c4e, []int{3} } func (m *ProjectTokenResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -279,7 +279,7 @@ func (m *ProjectQuery) Reset() { *m = ProjectQuery{} } func (m *ProjectQuery) String() string { return proto.CompactTextString(m) } func (*ProjectQuery) ProtoMessage() {} func (*ProjectQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{4} + return fileDescriptor_project_082822b5d17b8c4e, []int{4} } func (m *ProjectQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -326,7 +326,7 @@ func (m *ProjectUpdateRequest) Reset() { *m = ProjectUpdateRequest{} } func (m *ProjectUpdateRequest) String() string { return proto.CompactTextString(m) } func (*ProjectUpdateRequest) ProtoMessage() {} func (*ProjectUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{5} + return fileDescriptor_project_082822b5d17b8c4e, []int{5} } func (m *ProjectUpdateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -372,7 +372,7 @@ func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } func (m *EmptyResponse) String() string { return proto.CompactTextString(m) } func (*EmptyResponse) ProtoMessage() {} func (*EmptyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_project_8d94583ca767d5b3, []int{6} + return fileDescriptor_project_082822b5d17b8c4e, []int{6} } func (m *EmptyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1846,10 +1846,10 @@ var ( ) func init() { - proto.RegisterFile("server/project/project.proto", fileDescriptor_project_8d94583ca767d5b3) + proto.RegisterFile("server/project/project.proto", fileDescriptor_project_082822b5d17b8c4e) } -var fileDescriptor_project_8d94583ca767d5b3 = []byte{ +var fileDescriptor_project_082822b5d17b8c4e = []byte{ // 697 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x5d, 0x6b, 0x13, 0x4d, 0x14, 0x66, 0x9a, 0xbe, 0x79, 0xdf, 0x4e, 0x5e, 0xb5, 0x0c, 0xad, 0xa6, 0xb1, 0x8d, 0x61, 0x2e, diff --git a/server/repository/repository.go b/server/repository/repository.go index 681c8cf06a..4082e406fe 100644 --- a/server/repository/repository.go +++ b/server/repository/repository.go @@ -157,16 +157,16 @@ func (s *Server) ListApps(ctx context.Context, q *RepoAppsQuery) (*RepoAppsRespo for _, i := range ksonnetRes.Items { d := filepath.Dir(i) if _, ok := componentDirs[d]; ok { - items = append(items, &AppInfo{Type: string(repository.AppSourceKsonnet), Path: i}) + items = append(items, &AppInfo{Type: string(appsv1.ApplicationSourceTypeKsonnet), Path: i}) } } for i := range helmRes.Items { - items = append(items, &AppInfo{Type: string(repository.AppSourceHelm), Path: helmRes.Items[i]}) + items = append(items, &AppInfo{Type: string(appsv1.ApplicationSourceTypeHelm), Path: helmRes.Items[i]}) } for i := range kustomizationRes.Items { - items = append(items, &AppInfo{Type: string(repository.AppSourceKustomize), Path: kustomizationRes.Items[i]}) + items = append(items, &AppInfo{Type: string(appsv1.ApplicationSourceTypeKustomize), Path: kustomizationRes.Items[i]}) } return &RepoAppsResponse{Items: items}, nil @@ -210,7 +210,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *RepoAppDetailsQuery) (*Re appSourceType := repository.IdentifyAppSourceTypeByAppPath(q.Path) switch appSourceType { - case repository.AppSourceKsonnet: + case appsv1.ApplicationSourceTypeKsonnet: var appSpec KsonnetAppSpec appSpec.Path = q.Path err = yaml.Unmarshal(appSpecRes.Data, &appSpec) @@ -221,7 +221,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *RepoAppDetailsQuery) (*Re Type: string(appSourceType), Ksonnet: &appSpec, }, nil - case repository.AppSourceHelm: + case appsv1.ApplicationSourceTypeHelm: var appSpec HelmAppSpec appSpec.Path = q.Path err = yaml.Unmarshal(appSpecRes.Data, &appSpec) @@ -249,7 +249,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *RepoAppDetailsQuery) (*Re Type: string(appSourceType), Helm: &appSpec, }, nil - case repository.AppSourceKustomize: + case appsv1.ApplicationSourceTypeKustomize: appSpec := KustomizeAppSpec{ Path: q.Path, } diff --git a/server/repository/repository.pb.go b/server/repository/repository.pb.go index 4a46ef444f..5c3a4c080e 100644 --- a/server/repository/repository.pb.go +++ b/server/repository/repository.pb.go @@ -46,7 +46,7 @@ func (m *RepoAppsQuery) Reset() { *m = RepoAppsQuery{} } func (m *RepoAppsQuery) String() string { return proto.CompactTextString(m) } func (*RepoAppsQuery) ProtoMessage() {} func (*RepoAppsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{0} + return fileDescriptor_repository_324bad698d34f88e, []int{0} } func (m *RepoAppsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ func (m *AppInfo) Reset() { *m = AppInfo{} } func (m *AppInfo) String() string { return proto.CompactTextString(m) } func (*AppInfo) ProtoMessage() {} func (*AppInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{1} + return fileDescriptor_repository_324bad698d34f88e, []int{1} } func (m *AppInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ func (m *RepoAppDetailsQuery) Reset() { *m = RepoAppDetailsQuery{} } func (m *RepoAppDetailsQuery) String() string { return proto.CompactTextString(m) } func (*RepoAppDetailsQuery) ProtoMessage() {} func (*RepoAppDetailsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{2} + return fileDescriptor_repository_324bad698d34f88e, []int{2} } func (m *RepoAppDetailsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -224,7 +224,7 @@ func (m *RepoAppDetailsResponse) Reset() { *m = RepoAppDetailsResponse{} func (m *RepoAppDetailsResponse) String() string { return proto.CompactTextString(m) } func (*RepoAppDetailsResponse) ProtoMessage() {} func (*RepoAppDetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{3} + return fileDescriptor_repository_324bad698d34f88e, []int{3} } func (m *RepoAppDetailsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -293,7 +293,7 @@ func (m *RepoAppsResponse) Reset() { *m = RepoAppsResponse{} } func (m *RepoAppsResponse) String() string { return proto.CompactTextString(m) } func (*RepoAppsResponse) ProtoMessage() {} func (*RepoAppsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{4} + return fileDescriptor_repository_324bad698d34f88e, []int{4} } func (m *RepoAppsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -344,7 +344,7 @@ func (m *KsonnetAppSpec) Reset() { *m = KsonnetAppSpec{} } func (m *KsonnetAppSpec) String() string { return proto.CompactTextString(m) } func (*KsonnetAppSpec) ProtoMessage() {} func (*KsonnetAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{5} + return fileDescriptor_repository_324bad698d34f88e, []int{5} } func (m *KsonnetAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -408,7 +408,7 @@ func (m *HelmAppSpec) Reset() { *m = HelmAppSpec{} } func (m *HelmAppSpec) String() string { return proto.CompactTextString(m) } func (*HelmAppSpec) ProtoMessage() {} func (*HelmAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{6} + return fileDescriptor_repository_324bad698d34f88e, []int{6} } func (m *HelmAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ func (m *KustomizeAppSpec) Reset() { *m = KustomizeAppSpec{} } func (m *KustomizeAppSpec) String() string { return proto.CompactTextString(m) } func (*KustomizeAppSpec) ProtoMessage() {} func (*KustomizeAppSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{7} + return fileDescriptor_repository_324bad698d34f88e, []int{7} } func (m *KustomizeAppSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -524,7 +524,7 @@ func (m *KsonnetEnvironment) Reset() { *m = KsonnetEnvironment{} } func (m *KsonnetEnvironment) String() string { return proto.CompactTextString(m) } func (*KsonnetEnvironment) ProtoMessage() {} func (*KsonnetEnvironment) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{8} + return fileDescriptor_repository_324bad698d34f88e, []int{8} } func (m *KsonnetEnvironment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -595,7 +595,7 @@ func (m *KsonnetEnvironmentDestination) Reset() { *m = KsonnetEnvironmen func (m *KsonnetEnvironmentDestination) String() string { return proto.CompactTextString(m) } func (*KsonnetEnvironmentDestination) ProtoMessage() {} func (*KsonnetEnvironmentDestination) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{9} + return fileDescriptor_repository_324bad698d34f88e, []int{9} } func (m *KsonnetEnvironmentDestination) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -650,7 +650,7 @@ func (m *RepoQuery) Reset() { *m = RepoQuery{} } func (m *RepoQuery) String() string { return proto.CompactTextString(m) } func (*RepoQuery) ProtoMessage() {} func (*RepoQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{10} + return fileDescriptor_repository_324bad698d34f88e, []int{10} } func (m *RepoQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -696,7 +696,7 @@ func (m *RepoResponse) Reset() { *m = RepoResponse{} } func (m *RepoResponse) String() string { return proto.CompactTextString(m) } func (*RepoResponse) ProtoMessage() {} func (*RepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{11} + return fileDescriptor_repository_324bad698d34f88e, []int{11} } func (m *RepoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -737,7 +737,7 @@ func (m *RepoCreateRequest) Reset() { *m = RepoCreateRequest{} } func (m *RepoCreateRequest) String() string { return proto.CompactTextString(m) } func (*RepoCreateRequest) ProtoMessage() {} func (*RepoCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{12} + return fileDescriptor_repository_324bad698d34f88e, []int{12} } func (m *RepoCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -791,7 +791,7 @@ func (m *RepoUpdateRequest) Reset() { *m = RepoUpdateRequest{} } func (m *RepoUpdateRequest) String() string { return proto.CompactTextString(m) } func (*RepoUpdateRequest) ProtoMessage() {} func (*RepoUpdateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_repository_3c54adc3c349824a, []int{13} + return fileDescriptor_repository_324bad698d34f88e, []int{13} } func (m *RepoUpdateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -3675,10 +3675,10 @@ var ( ) func init() { - proto.RegisterFile("server/repository/repository.proto", fileDescriptor_repository_3c54adc3c349824a) + proto.RegisterFile("server/repository/repository.proto", fileDescriptor_repository_324bad698d34f88e) } -var fileDescriptor_repository_3c54adc3c349824a = []byte{ +var fileDescriptor_repository_324bad698d34f88e = []byte{ // 893 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x6f, 0x1b, 0x45, 0x10, 0xd7, 0x25, 0xa9, 0x1b, 0x8f, 0xdb, 0x2a, 0xdd, 0x96, 0x60, 0x0e, 0xc7, 0x8d, 0x16, 0x09, diff --git a/server/session/session.pb.go b/server/session/session.pb.go index f594a9a3f7..e3db19fa81 100644 --- a/server/session/session.pb.go +++ b/server/session/session.pb.go @@ -47,7 +47,7 @@ func (m *SessionCreateRequest) Reset() { *m = SessionCreateRequest{} } func (m *SessionCreateRequest) String() string { return proto.CompactTextString(m) } func (*SessionCreateRequest) ProtoMessage() {} func (*SessionCreateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_session_217b926c109d1cc2, []int{0} + return fileDescriptor_session_8e535ce77fc5e082, []int{0} } func (m *SessionCreateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -108,7 +108,7 @@ func (m *SessionDeleteRequest) Reset() { *m = SessionDeleteRequest{} } func (m *SessionDeleteRequest) String() string { return proto.CompactTextString(m) } func (*SessionDeleteRequest) ProtoMessage() {} func (*SessionDeleteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_session_217b926c109d1cc2, []int{1} + return fileDescriptor_session_8e535ce77fc5e082, []int{1} } func (m *SessionDeleteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -149,7 +149,7 @@ func (m *SessionResponse) Reset() { *m = SessionResponse{} } func (m *SessionResponse) String() string { return proto.CompactTextString(m) } func (*SessionResponse) ProtoMessage() {} func (*SessionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_session_217b926c109d1cc2, []int{2} + return fileDescriptor_session_8e535ce77fc5e082, []int{2} } func (m *SessionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -827,10 +827,10 @@ var ( ) func init() { - proto.RegisterFile("server/session/session.proto", fileDescriptor_session_217b926c109d1cc2) + proto.RegisterFile("server/session/session.proto", fileDescriptor_session_8e535ce77fc5e082) } -var fileDescriptor_session_217b926c109d1cc2 = []byte{ +var fileDescriptor_session_8e535ce77fc5e082 = []byte{ // 356 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xb1, 0x4e, 0xeb, 0x30, 0x14, 0x86, 0xe5, 0x5e, 0xdd, 0xde, 0x7b, 0x3d, 0xdc, 0x8a, 0x28, 0x82, 0x28, 0x2a, 0x15, 0xca, diff --git a/server/settings/settings.pb.go b/server/settings/settings.pb.go index 59132481e3..ebbeec9f90 100644 --- a/server/settings/settings.pb.go +++ b/server/settings/settings.pb.go @@ -42,7 +42,7 @@ func (m *SettingsQuery) Reset() { *m = SettingsQuery{} } func (m *SettingsQuery) String() string { return proto.CompactTextString(m) } func (*SettingsQuery) ProtoMessage() {} func (*SettingsQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_settings_90d4947f5a5e2583, []int{0} + return fileDescriptor_settings_902e174a76eb35c2, []int{0} } func (m *SettingsQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -84,7 +84,7 @@ func (m *Settings) Reset() { *m = Settings{} } func (m *Settings) String() string { return proto.CompactTextString(m) } func (*Settings) ProtoMessage() {} func (*Settings) Descriptor() ([]byte, []int) { - return fileDescriptor_settings_90d4947f5a5e2583, []int{1} + return fileDescriptor_settings_902e174a76eb35c2, []int{1} } func (m *Settings) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -145,7 +145,7 @@ func (m *DexConfig) Reset() { *m = DexConfig{} } func (m *DexConfig) String() string { return proto.CompactTextString(m) } func (*DexConfig) ProtoMessage() {} func (*DexConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_settings_90d4947f5a5e2583, []int{2} + return fileDescriptor_settings_902e174a76eb35c2, []int{2} } func (m *DexConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -193,7 +193,7 @@ func (m *Connector) Reset() { *m = Connector{} } func (m *Connector) String() string { return proto.CompactTextString(m) } func (*Connector) ProtoMessage() {} func (*Connector) Descriptor() ([]byte, []int) { - return fileDescriptor_settings_90d4947f5a5e2583, []int{3} + return fileDescriptor_settings_902e174a76eb35c2, []int{3} } func (m *Connector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -249,7 +249,7 @@ func (m *OIDCConfig) Reset() { *m = OIDCConfig{} } func (m *OIDCConfig) String() string { return proto.CompactTextString(m) } func (*OIDCConfig) ProtoMessage() {} func (*OIDCConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_settings_90d4947f5a5e2583, []int{4} + return fileDescriptor_settings_902e174a76eb35c2, []int{4} } func (m *OIDCConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1291,10 +1291,10 @@ var ( ) func init() { - proto.RegisterFile("server/settings/settings.proto", fileDescriptor_settings_90d4947f5a5e2583) + proto.RegisterFile("server/settings/settings.proto", fileDescriptor_settings_902e174a76eb35c2) } -var fileDescriptor_settings_90d4947f5a5e2583 = []byte{ +var fileDescriptor_settings_902e174a76eb35c2 = []byte{ // 397 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcd, 0x8a, 0xdb, 0x30, 0x18, 0x44, 0x71, 0x49, 0xe2, 0xaf, 0x3f, 0x69, 0xd5, 0x12, 0xdc, 0x50, 0x9c, 0xe0, 0x53, 0xa0, diff --git a/server/swagger.json b/server/swagger.json index 9af7bfb72c..a9a310a6d0 100644 --- a/server/swagger.json +++ b/server/swagger.json @@ -2209,11 +2209,16 @@ }, "environment": { "type": "string", - "title": "Environment is a ksonnet application environment name" + "title": "Environment is a ksonnet application environment name\nDEPRECATED: specify environment in ksonnet.environment instead" }, - "namePrefix": { - "type": "string", - "title": "NamePrefix is a prefix appended to resources for helm and kustomize apps" + "helm": { + "$ref": "#/definitions/v1alpha1ApplicationSourceHelm" + }, + "ksonnet": { + "$ref": "#/definitions/v1alpha1ApplicationSourceKsonnet" + }, + "kustomize": { + "$ref": "#/definitions/v1alpha1ApplicationSourceKustomize" }, "path": { "type": "string", @@ -2229,13 +2234,50 @@ }, "valuesFiles": { "type": "array", - "title": "ValuesFiles is a list of Helm values files to use when generating a template", + "title": "ValuesFiles is a list of Helm values files to use when generating a template\nDEPRECATED: specify values in helm.valueFiles instead", "items": { "type": "string" } } } }, + "v1alpha1ApplicationSourceHelm": { + "type": "object", + "title": "ApplicationSourceHelm holds helm specific options", + "properties": { + "releaseName": { + "type": "string", + "title": "The Helm release name. If omitted will use the application name" + }, + "valueFiles": { + "type": "array", + "title": "ValuesFiles is a list of Helm value files to use when generating a template", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1ApplicationSourceKsonnet": { + "type": "object", + "title": "ApplicationSourceKsonnet holds ksonnet specific options", + "properties": { + "environment": { + "type": "string", + "title": "Environment is a ksonnet application environment name" + } + } + }, + "v1alpha1ApplicationSourceKustomize": { + "type": "object", + "title": "ApplicationSourceKustomize holds kustomize specific options", + "properties": { + "namePrefix": { + "type": "string", + "title": "NamePrefix is a prefix appended to resources for kustomize apps" + } + } + }, "v1alpha1ApplicationSpec": { "description": "ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision.", "type": "object", diff --git a/server/version/version.pb.go b/server/version/version.pb.go index 9a055c4938..24be96b970 100644 --- a/server/version/version.pb.go +++ b/server/version/version.pb.go @@ -51,7 +51,7 @@ func (m *VersionMessage) Reset() { *m = VersionMessage{} } func (m *VersionMessage) String() string { return proto.CompactTextString(m) } func (*VersionMessage) ProtoMessage() {} func (*VersionMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_version_301443c925f6e1d7, []int{0} + return fileDescriptor_version_9a67e1897074bbcc, []int{0} } func (m *VersionMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -781,10 +781,10 @@ var ( ) func init() { - proto.RegisterFile("server/version/version.proto", fileDescriptor_version_301443c925f6e1d7) + proto.RegisterFile("server/version/version.proto", fileDescriptor_version_9a67e1897074bbcc) } -var fileDescriptor_version_301443c925f6e1d7 = []byte{ +var fileDescriptor_version_9a67e1897074bbcc = []byte{ // 343 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xcf, 0x4a, 0xc3, 0x40, 0x10, 0xc6, 0x49, 0xd5, 0xfe, 0x59, 0x4a, 0x0f, 0x8b, 0xd4, 0x25, 0x96, 0x22, 0x3d, 0x88, 0x08, diff --git a/test/e2e/app_management_test.go b/test/e2e/app_management_test.go index ff1cbd6d1f..6621814740 100644 --- a/test/e2e/app_management_test.go +++ b/test/e2e/app_management_test.go @@ -71,7 +71,7 @@ func TestAppManagement(t *testing.T) { } assert.Equal(t, appName, app.Name) assert.Equal(t, "https://github.com/argoproj/argo-cd.git", app.Spec.Source.RepoURL) - assert.Equal(t, "minikube", app.Spec.Source.Environment) + assert.Equal(t, "minikube", v1alpha1.KsonnetEnv(&app.Spec.Source)) assert.Equal(t, ".", app.Spec.Source.Path) assert.Equal(t, fixture.Namespace, app.Spec.Destination.Namespace) assert.Equal(t, fixture.Config.Host, app.Spec.Destination.Server) diff --git a/util/argo/argo.go b/util/argo/argo.go index 43b0c576ce..02bcd5b82b 100644 --- a/util/argo/argo.go +++ b/util/argo/argo.go @@ -10,14 +10,13 @@ import ( "strings" "time" - "k8s.io/apimachinery/pkg/runtime/schema" - log "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" apierr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" @@ -181,23 +180,34 @@ func WaitForRefresh(appIf v1alpha1.ApplicationInterface, name string, timeout *t // GetSpecErrors returns list of conditions which indicates that app spec is invalid. Following is checked: // * the git repository is accessible -// * the git path contains a valid app.yaml -// * the specified environment exists +// * the git path contains valid manifests // * the referenced cluster has been added to Argo CD // * the app source repo and destination namespace/cluster are permitted in app project +// * there are parameters of only one app source type +// * ksonnet: the specified environment exists func GetSpecErrors( - ctx context.Context, spec *argoappv1.ApplicationSpec, proj *argoappv1.AppProject, repoClientset reposerver.Clientset, db db.ArgoDB) ([]argoappv1.ApplicationCondition, error) { - + ctx context.Context, + spec *argoappv1.ApplicationSpec, + proj *argoappv1.AppProject, + repoClientset reposerver.Clientset, + db db.ArgoDB, +) ([]argoappv1.ApplicationCondition, error) { conditions := make([]argoappv1.ApplicationCondition, 0) + if spec.Source.RepoURL == "" || spec.Source.Path == "" { + conditions = append(conditions, argoappv1.ApplicationCondition{ + Type: argoappv1.ApplicationConditionInvalidSpecError, + Message: "spec.source.repoURL and spec.source.path are required", + }) + return conditions, nil + } // Test the repo conn, repoClient, err := repoClientset.NewRepositoryClient() if err != nil { return nil, err } - - repoAccessable := false defer util.Close(conn) + repoAccessable := false repoRes, err := db.GetRepository(ctx, spec.Source.RepoURL) if err != nil { if errStatus, ok := status.FromError(err); ok && errStatus.Code() == codes.NotFound { @@ -220,6 +230,11 @@ func GetSpecErrors( repoAccessable = true } + // Verify only one source type is defined + if multiSourceErr := verifyOneSourceType(&spec.Source); multiSourceErr != nil { + conditions = append(conditions, *multiSourceErr) + } + if repoAccessable { appSourceType, err := queryAppSourceType(ctx, spec, repoRes, repoClient) if err != nil { @@ -229,27 +244,25 @@ func GetSpecErrors( }) } else { switch appSourceType { - case repository.AppSourceKsonnet: + case argoappv1.ApplicationSourceTypeKsonnet: err := verifyAppYAML(ctx, repoRes, spec, repoClient) if err != nil { conditions = append(conditions, argoappv1.ApplicationCondition{ Type: argoappv1.ApplicationConditionInvalidSpecError, Message: err.Error(), }) - } - case repository.AppSourceHelm: + case argoappv1.ApplicationSourceTypeHelm: helmConditions := verifyHelmChart(ctx, repoRes, spec, repoClient) if len(helmConditions) > 0 { conditions = append(conditions, helmConditions...) } - case repository.AppSourceDirectory, repository.AppSourceKustomize: + case argoappv1.ApplicationSourceTypeDirectory, argoappv1.ApplicationSourceTypeKustomize: maniDirConditions := verifyGenerateManifests(ctx, repoRes, spec, repoClient) if len(maniDirConditions) > 0 { conditions = append(conditions, maniDirConditions...) } } - } } @@ -287,6 +300,26 @@ func GetSpecErrors( return conditions, nil } +func verifyOneSourceType(source *argoappv1.ApplicationSource) *argoappv1.ApplicationCondition { + var appTypes []string + if source.Kustomize != nil { + appTypes = append(appTypes, string(argoappv1.ApplicationSourceTypeKustomize)) + } + if source.Helm != nil { + appTypes = append(appTypes, string(argoappv1.ApplicationSourceTypeHelm)) + } + if source.Ksonnet != nil { + appTypes = append(appTypes, string(argoappv1.ApplicationSourceTypeKsonnet)) + } + if len(appTypes) > 1 { + return &argoappv1.ApplicationCondition{ + Type: argoappv1.ApplicationConditionInvalidSpecError, + Message: fmt.Sprintf("multiple application sources defined: %s", strings.Join(appTypes, ",")), + } + } + return nil +} + // GetAppProject returns a project from an application func GetAppProject(spec *argoappv1.ApplicationSpec, appclientset appclientset.Interface, ns string) (*argoappv1.AppProject, error) { if spec.BelongsToDefaultProject() { @@ -297,7 +330,7 @@ func GetAppProject(spec *argoappv1.ApplicationSpec, appclientset appclientset.In // queryAppSourceType queries repo server for yaml files in a directory, and determines its // application source type based on the files in the directory. -func queryAppSourceType(ctx context.Context, spec *argoappv1.ApplicationSpec, repoRes *argoappv1.Repository, repoClient repository.RepositoryServiceClient) (repository.AppSourceType, error) { +func queryAppSourceType(ctx context.Context, spec *argoappv1.ApplicationSpec, repoRes *argoappv1.Repository, repoClient repository.RepositoryServiceClient) (argoappv1.ApplicationSourceType, error) { req := repository.ListDirRequest{ Repo: &argoappv1.Repository{ Repo: spec.Source.RepoURL, @@ -319,16 +352,16 @@ func queryAppSourceType(ctx context.Context, spec *argoappv1.ApplicationSpec, re trimmedPath := strings.TrimPrefix(gitPath, filepath.Clean(spec.Source.Path)) trimmedPath = strings.TrimPrefix(trimmedPath, "/") if trimmedPath == "app.yaml" { - return repository.AppSourceKsonnet, nil + return argoappv1.ApplicationSourceTypeKsonnet, nil } if trimmedPath == "Chart.yaml" { - return repository.AppSourceHelm, nil + return argoappv1.ApplicationSourceTypeHelm, nil } if trimmedPath == "kustomization.yaml" { - return repository.AppSourceKustomize, nil + return argoappv1.ApplicationSourceTypeKustomize, nil } } - return repository.AppSourceDirectory, nil + return argoappv1.ApplicationSourceTypeDirectory, nil } // verifyAppYAML verifies that a ksonnet app.yaml is functional @@ -356,7 +389,7 @@ func verifyAppYAML(ctx context.Context, repoRes *argoappv1.Repository, spec *arg } // Verify the specified environment is defined in the app spec - dest, err := ksonnet.Destination(getRes.Data, spec.Source.Environment) + dest, err := ksonnet.Destination(getRes.Data, argoappv1.KsonnetEnv(&spec.Source)) if err != nil { return err } @@ -416,9 +449,9 @@ func verifyGenerateManifests(ctx context.Context, repoRes *argoappv1.Repository, Repo: &argoappv1.Repository{ Repo: spec.Source.RepoURL, }, - Revision: spec.Source.TargetRevision, - Path: spec.Source.Path, - Namespace: spec.Destination.Namespace, + Revision: spec.Source.TargetRevision, + Namespace: spec.Destination.Namespace, + ApplicationSource: &spec.Source, } if repoRes != nil { req.Repo.Username = repoRes.Username diff --git a/util/argo/argo_test.go b/util/argo/argo_test.go index c1282fdb29..f438b40990 100644 --- a/util/argo/argo_test.go +++ b/util/argo/argo_test.go @@ -118,3 +118,24 @@ func TestContainsSyncResource(t *testing.T) { } } } + +func TestVerifyOneSourceType(t *testing.T) { + src := argoappv1.ApplicationSource{ + Ksonnet: &argoappv1.ApplicationSourceKsonnet{ + Environment: "foo", + }, + Kustomize: &argoappv1.ApplicationSourceKustomize{ + NamePrefix: "foo", + }, + Helm: &argoappv1.ApplicationSourceHelm{ + ReleaseName: "foo", + }, + } + assert.NotNil(t, verifyOneSourceType(&src)) + src = argoappv1.ApplicationSource{ + Helm: &argoappv1.ApplicationSourceHelm{ + ReleaseName: "foo", + }, + } + assert.Nil(t, verifyOneSourceType(&src)) +} diff --git a/util/hash/hash.go b/util/hash/hash.go new file mode 100644 index 0000000000..2c31b0c997 --- /dev/null +++ b/util/hash/hash.go @@ -0,0 +1,12 @@ +package hash + +import ( + "hash/fnv" +) + +// FNVa computes a FNVa hash on a string +func FNVa(s string) uint32 { + h := fnv.New32a() + _, _ = h.Write([]byte(s)) + return h.Sum32() +} diff --git a/util/helm/helm.go b/util/helm/helm.go index 3e12ced6cc..a6e179b24a 100644 --- a/util/helm/helm.go +++ b/util/helm/helm.go @@ -20,7 +20,7 @@ import ( // Helm provides wrapper functionality around the `helm` command. type Helm interface { // Template returns a list of unstructured objects from a `helm template` command - Template(name, namespace string, valuesFiles []string, overrides []*argoappv1.ComponentParameter) ([]*unstructured.Unstructured, error) + Template(appName string, opts HelmTemplateOpts, overrides []*argoappv1.ComponentParameter) ([]*unstructured.Unstructured, error) // GetParameters returns a list of chart parameters taking into account values in provided YAML files. GetParameters(valuesFiles []string) ([]*argoappv1.ComponentParameter, error) // DependencyBuild runs `helm dependency build` to download a chart's dependencies @@ -31,6 +31,16 @@ type Helm interface { Init() error } +// HelmTemplateOpts are various options to send to a `helm template` command +type HelmTemplateOpts struct { + // Values is list of multiple --values flag + ValueFiles []string + // Namespace maps to the --namespace flag + Namespace string + // ReleaseName maps to the --name flag + ReleaseName string +} + // NewHelmApp create a new wrapper to run commands on the `helm` command-line tool. func NewHelmApp(path string) Helm { return &helm{path: path} @@ -41,14 +51,19 @@ type helm struct { home string } -func (h *helm) Template(name, namespace string, valuesFiles []string, overrides []*argoappv1.ComponentParameter) ([]*unstructured.Unstructured, error) { +func (h *helm) Template(appName string, opts HelmTemplateOpts, overrides []*argoappv1.ComponentParameter) ([]*unstructured.Unstructured, error) { args := []string{ - "template", ".", "--name", name, + "template", ".", } - if namespace != "" { - args = append(args, "--namespace", namespace) + if opts.ReleaseName != "" { + args = append(args, "--name", appName) + } else { + args = append(args, "--name", appName) } - for _, valuesFile := range valuesFiles { + if opts.Namespace != "" { + args = append(args, "--namespace", opts.Namespace) + } + for _, valuesFile := range opts.ValueFiles { args = append(args, "-f", valuesFile) } for _, p := range overrides { diff --git a/util/helm/helm_test.go b/util/helm/helm_test.go index c3520526c0..104f083ba3 100644 --- a/util/helm/helm_test.go +++ b/util/helm/helm_test.go @@ -34,7 +34,7 @@ func TestHelmTemplateParams(t *testing.T) { Value: "1234", }, } - objs, err := h.Template("test", "", nil, overrides) + objs, err := h.Template("test", HelmTemplateOpts{}, overrides) assert.Nil(t, err) assert.Equal(t, 5, len(objs)) @@ -52,7 +52,7 @@ func TestHelmTemplateParams(t *testing.T) { func TestHelmTemplateValues(t *testing.T) { h := NewHelmApp("./testdata/redis") valuesFiles := []string{"values-production.yaml"} - objs, err := h.Template("test", "", valuesFiles, nil) + objs, err := h.Template("test", HelmTemplateOpts{ValueFiles: valuesFiles}, nil) assert.Nil(t, err) assert.Equal(t, 8, len(objs)) @@ -69,7 +69,7 @@ func TestHelmTemplateValues(t *testing.T) { func TestHelmTemplateValuesURL(t *testing.T) { h := NewHelmApp("./testdata/redis") valuesFiles := []string{"https://raw.githubusercontent.com/argoproj/argo-cd/master/util/helm/testdata/redis/values-production.yaml"} - objs, err := h.Template("test", "", valuesFiles, nil) + objs, err := h.Template("test", HelmTemplateOpts{ValueFiles: valuesFiles}, nil) assert.Nil(t, err) assert.Equal(t, 8, len(objs)) params, err := h.GetParameters(valuesFiles) @@ -110,10 +110,10 @@ func TestHelmDependencyBuild(t *testing.T) { h.SetHome(helmHome) err = h.Init() assert.NoError(t, err) - _, err = h.Template("wordpress", "", nil, nil) + _, err = h.Template("wordpress", HelmTemplateOpts{}, nil) assert.Error(t, err) err = h.DependencyBuild() assert.NoError(t, err) - _, err = h.Template("wordpress", "", nil, nil) + _, err = h.Template("wordpress", HelmTemplateOpts{}, nil) assert.NoError(t, err) } diff --git a/util/kustomize/kustomize.go b/util/kustomize/kustomize.go index aa72e39975..e2518201d0 100644 --- a/util/kustomize/kustomize.go +++ b/util/kustomize/kustomize.go @@ -14,7 +14,7 @@ import ( // Kustomize provides wrapper functionality around the `kustomize` command. type Kustomize interface { // Build returns a list of unstructured objects from a `kustomize build` command and extract supported parameters - Build(namespace string, namePrefix string, overrides []*v1alpha1.ComponentParameter) ([]*unstructured.Unstructured, []*v1alpha1.ComponentParameter, error) + Build(opts KustomizeBuildOpts, overrides []*v1alpha1.ComponentParameter) ([]*unstructured.Unstructured, []*v1alpha1.ComponentParameter, error) } // NewKustomizeApp create a new wrapper to run commands on the `kustomize` command-line tool. @@ -26,9 +26,17 @@ type kustomize struct { path string } -func (k *kustomize) Build(namespace string, namePrefix string, overrides []*v1alpha1.ComponentParameter) ([]*unstructured.Unstructured, []*v1alpha1.ComponentParameter, error) { - if namespace != "" { - cmd := exec.Command("kustomize", "edit", "set", "namespace", namespace) +// KustomizeBuildOpts are options to a `kustomize build` command +type KustomizeBuildOpts struct { + // Namespace will run `kustomize edit set namespace` during manifest generation + Namespace string + // NamePrefix will run `kustomize edit set nameprefix` during manifest generation + NamePrefix string +} + +func (k *kustomize) Build(opts KustomizeBuildOpts, overrides []*v1alpha1.ComponentParameter) ([]*unstructured.Unstructured, []*v1alpha1.ComponentParameter, error) { + if opts.Namespace != "" { + cmd := exec.Command("kustomize", "edit", "set", "namespace", opts.Namespace) cmd.Dir = k.path _, err := argoexec.RunCommandExt(cmd) if err != nil { @@ -36,8 +44,8 @@ func (k *kustomize) Build(namespace string, namePrefix string, overrides []*v1al } } - if namePrefix != "" { - cmd := exec.Command("kustomize", "edit", "set", "nameprefix", namePrefix) + if opts.NamePrefix != "" { + cmd := exec.Command("kustomize", "edit", "set", "nameprefix", opts.NamePrefix) cmd.Dir = k.path _, err := argoexec.RunCommandExt(cmd) if err != nil { diff --git a/util/kustomize/kustomize_test.go b/util/kustomize/kustomize_test.go index aea8f447aa..634da5100f 100644 --- a/util/kustomize/kustomize_test.go +++ b/util/kustomize/kustomize_test.go @@ -5,10 +5,10 @@ import ( "path" "testing" - "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" - - "github.com/argoproj/pkg/exec" "github.com/stretchr/testify/assert" + + "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" + "github.com/argoproj/pkg/exec" ) func testDataDir() (string, error) { @@ -28,7 +28,11 @@ func TestKustomizeBuild(t *testing.T) { assert.Nil(t, err) namePrefix := "namePrefix-" kustomize := NewKustomizeApp(appPath) - objs, params, err := kustomize.Build("mynamespace", namePrefix, []*v1alpha1.ComponentParameter{{ + opts := KustomizeBuildOpts{ + Namespace: "mynamespace", + NamePrefix: namePrefix, + } + objs, params, err := kustomize.Build(opts, []*v1alpha1.ComponentParameter{{ Component: "imagetag", Name: "k8s.gcr.io/nginx-slim", Value: "latest",