From a4f6909aeb45e0b53df990d0df41980703c579be Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Tue, 26 Mar 2024 02:59:49 -0400 Subject: [PATCH 1/9] Add support for multiple source to manifests --revision command Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 61 ++- go.mod | 2 +- pkg/apiclient/application/application.pb.go | 503 +++++++++++++------- server/application/application.go | 131 ++--- server/application/application.proto | 1 + 5 files changed, 459 insertions(+), 239 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 3c0f1e7ad672b..05ade9bc159be 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1125,6 +1125,8 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co serverSideGenerate bool localIncludes []string appNamespace string + revisions []string + sourceIndexes []int64 ) shortDesc := "Perform a diff against the target and live state." var command = &cobra.Command{ @@ -1156,7 +1158,30 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co argoSettings, err := settingsIf.Get(ctx, &settings.SettingsQuery{}) errors.CheckError(err) diffOption := &DifferenceOption{} - if revision != "" { + if app.HasMultipleSources() && len(revisions) > 0 && len(sourceIndexes) > 0 { + fmt.Printf("Revisions: %s \n", strings.Join(revisions, ", ")) + fmt.Printf("Source Indexes: %d \n", sourceIndexes) + + revisionSourceMappings := make(map[int64]string, 0) + for i, index := range sourceIndexes { + revisionSourceMappings[index] = revisions[i] + } + + q := application.ApplicationManifestQuery{ + Name: &appName, + AppNamespace: &appNs, + Revision: pointer.String(revision), + RevisionSourceMappings: revisionSourceMappings, + } + res, err := appIf.GetManifests(ctx, &q) + errors.CheckError(err) + + for _, mfst := range res.Manifests { + obj, err := argoappv1.UnmarshalToUnstructured(mfst) + errors.CheckError(err) + unstructureds = append(unstructureds, obj) + } + } else if revision != "" { q := application.ApplicationManifestQuery{ Name: &appName, Revision: &revision, @@ -1206,6 +1231,8 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co command.Flags().BoolVar(&serverSideGenerate, "server-side-generate", false, "Used with --local, this will send your manifests to the server for diffing") command.Flags().StringArrayVar(&localIncludes, "local-include", []string{"*.yaml", "*.yml", "*.json"}, "Used with --server-side-generate, specify patterns of filenames to send. Matching is based on filename and not path.") command.Flags().StringVarP(&appNamespace, "app-namespace", "N", "", "Only render the difference in namespace") + command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes") + command.Flags().Int64SliceVar(&sourceIndexes, "source-indexes", []int64{}, "List of source indexes. Default is empty array. Indexes start at 1.") return command } @@ -2708,6 +2735,8 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob var ( source string revision string + revisions []string + sourceIndexes []int64 local string localRepoRoot string ) @@ -2721,6 +2750,11 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob c.HelpFunc()(c, args) os.Exit(1) } + + if len(revisions) != len(sourceIndexes) { + errors.CheckError(fmt.Errorf("While using revisions and source-indexes, length of values for both flags should be same.")) + } + appName, appNs := argo.ParseFromQualifiedName(args[0], "") clientset := headless.NewClientOrDie(clientOpts, c) conn, appIf := clientset.NewApplicationClientOrDie() @@ -2759,6 +2793,29 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob res, err := appIf.GetManifests(ctx, &q) errors.CheckError(err) + for _, mfst := range res.Manifests { + obj, err := argoappv1.UnmarshalToUnstructured(mfst) + errors.CheckError(err) + unstructureds = append(unstructureds, obj) + } + } else if len(revisions) > 0 && len(sourceIndexes) > 0 { + fmt.Printf("Revisions: %s \n", strings.Join(revisions, ", ")) + fmt.Printf("Source Indexes: %d \n", sourceIndexes) + + revisionSourceMappings := make(map[int64]string, 0) + for i, index := range sourceIndexes { + revisionSourceMappings[index] = revisions[i] + } + + q := application.ApplicationManifestQuery{ + Name: &appName, + AppNamespace: &appNs, + Revision: pointer.String(revision), + RevisionSourceMappings: revisionSourceMappings, + } + res, err := appIf.GetManifests(ctx, &q) + errors.CheckError(err) + for _, mfst := range res.Manifests { obj, err := argoappv1.UnmarshalToUnstructured(mfst) errors.CheckError(err) @@ -2787,6 +2844,8 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob } command.Flags().StringVar(&source, "source", "git", "Source of manifests. One of: live|git") command.Flags().StringVar(&revision, "revision", "", "Show manifests at a specific revision") + command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes") + command.Flags().Int64SliceVar(&sourceIndexes, "source-indexes", []int64{}, "List of source indexes. Default is empty array. Indexes start at 1.") command.Flags().StringVar(&local, "local", "", "If set, show locally-generated manifests. Value is the absolute path to app manifests within the manifest repo. Example: '/home/username/apps/env/app-1'.") command.Flags().StringVar(&localRepoRoot, "local-repo-root", ".", "Path to the local repository root. Used together with --local allows setting the repository root. Example: '/home/username/apps'.") return command diff --git a/go.mod b/go.mod index dfa17e1ce0d7d..eb875e4af047a 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.11 k8s.io/apiextensions-apiserver v0.26.10 - k8s.io/apimachinery v0.26.11 + k8s.io/apimachinery v0.29.3 k8s.io/apiserver v0.26.11 k8s.io/client-go v0.26.11 k8s.io/code-generator v0.26.11 diff --git a/pkg/apiclient/application/application.pb.go b/pkg/apiclient/application/application.pb.go index 70c63c36bc333..6619e9325e736 100644 --- a/pkg/apiclient/application/application.pb.go +++ b/pkg/apiclient/application/application.pb.go @@ -372,13 +372,14 @@ func (m *ApplicationResourceEventsQuery) GetProject() string { // ManifestQuery is a query for manifest resources type ApplicationManifestQuery struct { - Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` - Revision *string `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"` - AppNamespace *string `protobuf:"bytes,3,opt,name=appNamespace" json:"appNamespace,omitempty"` - Project *string `protobuf:"bytes,4,opt,name=project" json:"project,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Revision *string `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"` + AppNamespace *string `protobuf:"bytes,3,opt,name=appNamespace" json:"appNamespace,omitempty"` + Project *string `protobuf:"bytes,4,opt,name=project" json:"project,omitempty"` + RevisionSourceMappings map[int64]string `protobuf:"bytes,5,rep,name=revisionSourceMappings" json:"revisionSourceMappings,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ApplicationManifestQuery) Reset() { *m = ApplicationManifestQuery{} } @@ -442,6 +443,13 @@ func (m *ApplicationManifestQuery) GetProject() string { return "" } +func (m *ApplicationManifestQuery) GetRevisionSourceMappings() map[int64]string { + if m != nil { + return m.RevisionSourceMappings + } + return nil +} + type FileChunk struct { Chunk []byte `protobuf:"bytes,1,req,name=chunk" json:"chunk,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -2755,6 +2763,7 @@ func init() { proto.RegisterType((*RevisionMetadataQuery)(nil), "application.RevisionMetadataQuery") proto.RegisterType((*ApplicationResourceEventsQuery)(nil), "application.ApplicationResourceEventsQuery") proto.RegisterType((*ApplicationManifestQuery)(nil), "application.ApplicationManifestQuery") + proto.RegisterMapType((map[int64]string)(nil), "application.ApplicationManifestQuery.RevisionSourceMappingsEntry") proto.RegisterType((*FileChunk)(nil), "application.FileChunk") proto.RegisterType((*ApplicationManifestQueryWithFiles)(nil), "application.ApplicationManifestQueryWithFiles") proto.RegisterType((*ApplicationManifestQueryWithFilesWrapper)(nil), "application.ApplicationManifestQueryWithFilesWrapper") @@ -2792,175 +2801,179 @@ func init() { } var fileDescriptor_df6e82b174b5eaec = []byte{ - // 2673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x8f, 0x1c, 0x47, - 0x15, 0xa7, 0x66, 0xbf, 0x66, 0xde, 0xec, 0xfa, 0xa3, 0x12, 0x2f, 0x9d, 0xf6, 0xc6, 0x6c, 0xda, - 0x76, 0xbc, 0x59, 0x7b, 0x67, 0xec, 0xc1, 0x20, 0x67, 0x93, 0x08, 0xec, 0xf5, 0x27, 0xac, 0x1d, - 0xd3, 0x6b, 0x63, 0x14, 0x0e, 0x50, 0xe9, 0xae, 0x9d, 0x6d, 0xb6, 0xa7, 0xbb, 0xdd, 0xdd, 0x33, - 0xd6, 0xca, 0xf8, 0x12, 0x64, 0x09, 0xa1, 0x08, 0x04, 0xe4, 0x80, 0x10, 0x02, 0x14, 0x14, 0x09, - 0x21, 0x10, 0x17, 0x14, 0x21, 0x21, 0x24, 0xb8, 0x20, 0x38, 0x20, 0x21, 0x38, 0x72, 0x41, 0x16, - 0xe2, 0x08, 0x97, 0xfc, 0x01, 0xa8, 0xaa, 0xab, 0xba, 0xab, 0xe7, 0xa3, 0x67, 0x96, 0x19, 0x14, - 0xdf, 0xfa, 0xd5, 0x54, 0xbd, 0xf7, 0xab, 0x57, 0xbf, 0x7a, 0xaf, 0xea, 0xd5, 0xc0, 0x89, 0x88, - 0x86, 0x1d, 0x1a, 0xd6, 0x49, 0x10, 0xb8, 0x8e, 0x45, 0x62, 0xc7, 0xf7, 0xd4, 0xef, 0x5a, 0x10, - 0xfa, 0xb1, 0x8f, 0xab, 0x4a, 0x93, 0xbe, 0xd4, 0xf4, 0xfd, 0xa6, 0x4b, 0xeb, 0x24, 0x70, 0xea, - 0xc4, 0xf3, 0xfc, 0x98, 0x37, 0x47, 0x49, 0x57, 0xdd, 0xd8, 0xbd, 0x10, 0xd5, 0x1c, 0x9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, 0xc1, 0x51, 0x41, 0x29, - 0xf7, 0xeb, 0x5d, 0x35, 0x0e, 0x51, 0x0c, 0x36, 0xbe, 0xc8, 0xcd, 0xde, 0xc5, 0xf5, 0x22, 0xb3, - 0x81, 0x6f, 0x47, 0xf5, 0x87, 0xa2, 0x12, 0xfb, 0xa8, 0xee, 0xfa, 0xcd, 0xe8, 0x0d, 0x03, 0x17, - 0x26, 0x44, 0xd6, 0xe7, 0x2c, 0xc2, 0x31, 0x54, 0x18, 0x39, 0x78, 0xe1, 0x04, 0x2f, 0x77, 0x95, - 0x59, 0x7a, 0x6a, 0x2a, 0xba, 0xde, 0x53, 0x88, 0xc9, 0x32, 0xa0, 0xb8, 0xc6, 0xe2, 0x17, 0x0a, - 0xcd, 0x72, 0x43, 0x6f, 0x23, 0x38, 0xac, 0xb2, 0x3d, 0x31, 0x3f, 0x32, 0xd7, 0x8b, 0x50, 0x88, - 0x43, 0x35, 0x5e, 0x1d, 0x89, 0x48, 0x1c, 0xce, 0xa5, 0xab, 0x7f, 0x7c, 0x72, 0x0c, 0xfd, 0xe5, - 0xc9, 0x31, 0xf4, 0x8f, 0x27, 0xc7, 0xd0, 0x1b, 0x17, 0x46, 0xfb, 0x4f, 0xad, 0xe5, 0x3a, 0xd4, - 0x8b, 0x55, 0xf5, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x30, 0xc0, 0x40, 0x7a, 0x39, 0x2c, 0x00, - 0x00, + // 2738 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xcd, 0x8f, 0x1b, 0x49, + 0x15, 0xa7, 0xec, 0xf9, 0xb0, 0x9f, 0x67, 0x92, 0x49, 0xed, 0x66, 0xe8, 0xed, 0x4c, 0xc2, 0xa4, + 0xf3, 0x35, 0x99, 0x64, 0xec, 0xc4, 0x04, 0x94, 0x9d, 0xdd, 0x15, 0x24, 0x93, 0x4f, 0x98, 0xc9, + 0x86, 0x9e, 0x84, 0xa0, 0xe5, 0x00, 0xb5, 0xed, 0x1a, 0x4f, 0x33, 0xed, 0xee, 0x4e, 0x77, 0xdb, + 0x91, 0x15, 0x72, 0x59, 0x94, 0x0b, 0x5a, 0x81, 0x80, 0x3d, 0x20, 0x84, 0x00, 0x2d, 0x5a, 0x09, + 0x21, 0x10, 0x17, 0xb4, 0x42, 0x42, 0x48, 0x70, 0x41, 0x70, 0x00, 0x21, 0x38, 0x72, 0x41, 0x11, + 0xe2, 0x08, 0x97, 0xfd, 0x03, 0x50, 0x55, 0x57, 0xb5, 0xab, 0xfd, 0xd1, 0xf6, 0x60, 0xa3, 0xcd, + 0xad, 0x5f, 0xb9, 0xea, 0xbd, 0xdf, 0x7b, 0xf5, 0xea, 0xbd, 0x57, 0xaf, 0x0c, 0x27, 0x43, 0x1a, + 0xb4, 0x68, 0x50, 0x21, 0xbe, 0xef, 0xd8, 0x16, 0x89, 0x6c, 0xcf, 0x55, 0xbf, 0xcb, 0x7e, 0xe0, + 0x45, 0x1e, 0x2e, 0x29, 0x43, 0xfa, 0x52, 0xdd, 0xf3, 0xea, 0x0e, 0xad, 0x10, 0xdf, 0xae, 0x10, + 0xd7, 0xf5, 0x22, 0x3e, 0x1c, 0xc6, 0x53, 0x75, 0x63, 0xef, 0x72, 0x58, 0xb6, 0x3d, 0xfe, 0xab, + 0xe5, 0x05, 0xb4, 0xd2, 0xba, 0x58, 0xa9, 0x53, 0x97, 0x06, 0x24, 0xa2, 0x35, 0x31, 0xe7, 0x52, + 0x67, 0x4e, 0x83, 0x58, 0xbb, 0xb6, 0x4b, 0x83, 0x76, 0xc5, 0xdf, 0xab, 0xb3, 0x81, 0xb0, 0xd2, + 0xa0, 0x11, 0xe9, 0xb7, 0x6a, 0xb3, 0x6e, 0x47, 0xbb, 0xcd, 0x37, 0xcb, 0x96, 0xd7, 0xa8, 0x90, + 0xa0, 0xee, 0xf9, 0x81, 0xf7, 0x15, 0xfe, 0x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d5, 0xd1, 0xdc, 0xed, 0x3d, 0x04, 0xb3, 0xa2, 0x9b, 0x9f, 0x51, 0x2a, 0x28, + 0xed, 0x7e, 0xbd, 0xab, 0xc7, 0x21, 0x9a, 0xc1, 0xc6, 0x17, 0xb9, 0xd8, 0xfb, 0xb8, 0x92, 0x25, + 0xd6, 0xf7, 0x6a, 0x61, 0xe5, 0xb1, 0xe8, 0xc4, 0x3e, 0xa9, 0x38, 0x5e, 0x3d, 0x7c, 0xc3, 0xc0, + 0x99, 0x09, 0x91, 0xcd, 0xb9, 0x80, 0x70, 0x04, 0x45, 0xe6, 0x1c, 0xbc, 0x71, 0x82, 0x97, 0xbb, + 0xda, 0x2c, 0x3d, 0x3d, 0x15, 0x5d, 0xef, 0x69, 0xc4, 0x74, 0x32, 0xa0, 0xb8, 0xc6, 0xe2, 0xe3, + 0x99, 0x62, 0xb9, 0xa0, 0xb7, 0x11, 0x1c, 0x52, 0xbd, 0x3d, 0x16, 0x3f, 0xb2, 0xaf, 0x67, 0xa1, + 0x10, 0x45, 0x35, 0x5e, 0x1d, 0xc9, 0x91, 0x38, 0x9c, 0xab, 0x37, 0xfe, 0xf0, 0xec, 0x18, 0xfa, + 0xcb, 0xb3, 0x63, 0xe8, 0x1f, 0xcf, 0x8e, 0xa1, 0x37, 0x2e, 0x8f, 0xf6, 0xcf, 0x60, 0xcb, 0xb1, + 0xa9, 0x1b, 0xa9, 0xec, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x21, 0x6e, 0x60, 0xff, 0x2c, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4469,6 +4482,23 @@ func (m *ApplicationManifestQuery) MarshalToSizedBuffer(dAtA []byte) (int, error i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.RevisionSourceMappings) > 0 { + for k := range m.RevisionSourceMappings { + v := m.RevisionSourceMappings[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintApplication(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i = encodeVarintApplication(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintApplication(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } if m.Project != nil { i -= len(*m.Project) copy(dAtA[i:], *m.Project) @@ -6712,6 +6742,14 @@ func (m *ApplicationManifestQuery) Size() (n int) { l = len(*m.Project) n += 1 + l + sovApplication(uint64(l)) } + if len(m.RevisionSourceMappings) > 0 { + for k, v := range m.RevisionSourceMappings { + _ = k + _ = v + mapEntrySize := 1 + sovApplication(uint64(k)) + 1 + len(v) + sovApplication(uint64(len(v))) + n += mapEntrySize + 1 + sovApplication(uint64(mapEntrySize)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -8689,6 +8727,119 @@ func (m *ApplicationManifestQuery) Unmarshal(dAtA []byte) error { s := string(dAtA[iNdEx:postIndex]) m.Project = &s iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevisionSourceMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApplication + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApplication + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApplication + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RevisionSourceMappings == nil { + m.RevisionSourceMappings = make(map[int64]string) + } + var mapkey int64 + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApplication + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApplication + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApplication + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthApplication + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthApplication + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipApplication(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApplication + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.RevisionSourceMappings[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApplication(dAtA[iNdEx:]) diff --git a/server/application/application.go b/server/application/application.go index ec0db45a11f22..603fc6c69b27c 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -451,64 +451,70 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan return nil, err } - source := a.Spec.GetSource() - if !s.isNamespaceEnabled(a.Namespace) { return nil, security.NamespaceNotPermittedError(a.Namespace) } - var manifestInfo *apiclient.ManifestResponse + manifestInfos := make([]*apiclient.ManifestResponse, 0) err = s.queryRepoServer(ctx, a, func( client apiclient.RepoServerServiceClient, repo *appv1.Repository, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, kustomizeOptions *appv1.KustomizeOptions, enableGenerateManifests map[string]bool) error { - revision := source.TargetRevision - if q.GetRevision() != "" { - revision = q.GetRevision() - } - appInstanceLabelKey, err := s.settingsMgr.GetAppInstanceLabelKey() - if err != nil { - return fmt.Errorf("error getting app instance label key from settings: %w", err) - } + for i, source := range a.Spec.GetSources() { + revision := source.TargetRevision + if q.GetRevisionSourceMappings() != nil && len(q.GetRevisionSourceMappings()) > 0 { + if val, ok := q.GetRevisionSourceMappings()[int64(i)]; ok { + revision = val + } + } else if q.GetRevision() != "" { + revision = q.GetRevision() + } + appInstanceLabelKey, err := s.settingsMgr.GetAppInstanceLabelKey() + if err != nil { + return fmt.Errorf("error getting app instance label key from settings: %w", err) + } - config, err := s.getApplicationClusterConfig(ctx, a) - if err != nil { - return fmt.Errorf("error getting application cluster config: %w", err) - } + config, err := s.getApplicationClusterConfig(ctx, a) + if err != nil { + return fmt.Errorf("error getting application cluster config: %w", err) + } - serverVersion, err := s.kubectl.GetServerVersion(config) - if err != nil { - return fmt.Errorf("error getting server version: %w", err) - } + serverVersion, err := s.kubectl.GetServerVersion(config) + if err != nil { + return fmt.Errorf("error getting server version: %w", err) + } - apiResources, err := s.kubectl.GetAPIResources(config, false, kubecache.NewNoopSettings()) - if err != nil { - return fmt.Errorf("error getting API resources: %w", err) - } + apiResources, err := s.kubectl.GetAPIResources(config, false, kubecache.NewNoopSettings()) + if err != nil { + return fmt.Errorf("error getting API resources: %w", err) + } - proj, err := argo.GetAppProject(a, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr, s.db, ctx) - if err != nil { - return fmt.Errorf("error getting app project: %w", err) - } + proj, err := argo.GetAppProject(a, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr, s.db, ctx) + if err != nil { + return fmt.Errorf("error getting app project: %w", err) + } - manifestInfo, err = client.GenerateManifest(ctx, &apiclient.ManifestRequest{ - Repo: repo, - Revision: revision, - AppLabelKey: appInstanceLabelKey, - AppName: a.InstanceName(s.ns), - Namespace: a.Spec.Destination.Namespace, - ApplicationSource: &source, - Repos: helmRepos, - KustomizeOptions: kustomizeOptions, - KubeVersion: serverVersion, - ApiVersions: argo.APIResourcesToStrings(apiResources, true), - HelmRepoCreds: helmCreds, - HelmOptions: helmOptions, - TrackingMethod: string(argoutil.GetTrackingMethod(s.settingsMgr)), - EnabledSourceTypes: enableGenerateManifests, - ProjectName: proj.Name, - ProjectSourceRepos: proj.Spec.SourceRepos, - }) - if err != nil { - return fmt.Errorf("error generating manifests: %w", err) + manifestInfo, err := client.GenerateManifest(ctx, &apiclient.ManifestRequest{ + Repo: repo, + Revision: revision, + AppLabelKey: appInstanceLabelKey, + AppName: a.InstanceName(s.ns), + Namespace: a.Spec.Destination.Namespace, + ApplicationSource: &source, + Repos: helmRepos, + KustomizeOptions: kustomizeOptions, + KubeVersion: serverVersion, + ApiVersions: argo.APIResourcesToStrings(apiResources, true), + HelmRepoCreds: helmCreds, + HelmOptions: helmOptions, + TrackingMethod: string(argoutil.GetTrackingMethod(s.settingsMgr)), + EnabledSourceTypes: enableGenerateManifests, + ProjectName: proj.Name, + ProjectSourceRepos: proj.Spec.SourceRepos, + }) + if err != nil { + return fmt.Errorf("error generating manifests: %w", err) + } + + manifestInfos = append(manifestInfos, manifestInfo) } return nil }) @@ -517,26 +523,29 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan return nil, err } - for i, manifest := range manifestInfo.Manifests { - obj := &unstructured.Unstructured{} - err = json.Unmarshal([]byte(manifest), obj) - if err != nil { - return nil, fmt.Errorf("error unmarshaling manifest into unstructured: %w", err) - } - if obj.GetKind() == kube.SecretKind && obj.GroupVersionKind().Group == "" { - obj, _, err = diff.HideSecretData(obj, nil) + manifests := &apiclient.ManifestResponse{} + for _, manifestInfo := range manifestInfos { + for i, manifest := range manifestInfo.Manifests { + obj := &unstructured.Unstructured{} + err = json.Unmarshal([]byte(manifest), obj) if err != nil { - return nil, fmt.Errorf("error hiding secret data: %w", err) + return nil, fmt.Errorf("error unmarshaling manifest into unstructured: %w", err) } - data, err := json.Marshal(obj) - if err != nil { - return nil, fmt.Errorf("error marshaling manifest: %w", err) + if obj.GetKind() == kube.SecretKind && obj.GroupVersionKind().Group == "" { + obj, _, err = diff.HideSecretData(obj, nil) + if err != nil { + return nil, fmt.Errorf("error hiding secret data: %w", err) + } + data, err := json.Marshal(obj) + if err != nil { + return nil, fmt.Errorf("error marshaling manifest: %w", err) + } + manifests.Manifests[i] = string(data) } - manifestInfo.Manifests[i] = string(data) } } - return manifestInfo, nil + return manifests, nil } func (s *Server) GetManifestsWithFiles(stream application.ApplicationService_GetManifestsWithFilesServer) error { diff --git a/server/application/application.proto b/server/application/application.proto index 4736219cb4594..56d4bcc00cc02 100644 --- a/server/application/application.proto +++ b/server/application/application.proto @@ -69,6 +69,7 @@ message ApplicationManifestQuery { optional string revision = 2; optional string appNamespace = 3; optional string project = 4; + map revisionSourceMappings = 5; } message FileChunk { From 34698c6d2e221ea02dc5758b52ccd9e0ebd0a970 Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Wed, 27 Mar 2024 22:32:04 -0400 Subject: [PATCH 2/9] Update GetManifests to support multiple sources Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 35 ++++--- reposerver/repository/repository.go | 2 + server/application/application.go | 137 +++++++++++++++++++--------- 3 files changed, 116 insertions(+), 58 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 05ade9bc159be..db8a1062ac334 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1158,7 +1158,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co argoSettings, err := settingsIf.Get(ctx, &settings.SettingsQuery{}) errors.CheckError(err) diffOption := &DifferenceOption{} - if app.HasMultipleSources() && len(revisions) > 0 && len(sourceIndexes) > 0 { + if app.Spec.HasMultipleSources() && len(revisions) > 0 && len(sourceIndexes) > 0 { fmt.Printf("Revisions: %s \n", strings.Join(revisions, ", ")) fmt.Printf("Source Indexes: %d \n", sourceIndexes) @@ -1170,17 +1170,13 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co q := application.ApplicationManifestQuery{ Name: &appName, AppNamespace: &appNs, - Revision: pointer.String(revision), RevisionSourceMappings: revisionSourceMappings, } res, err := appIf.GetManifests(ctx, &q) - errors.CheckError(err) - for _, mfst := range res.Manifests { - obj, err := argoappv1.UnmarshalToUnstructured(mfst) - errors.CheckError(err) - unstructureds = append(unstructureds, obj) - } + errors.CheckError(err) + diffOption.res = res + diffOption.revisionSourceMappings = &revisionSourceMappings } else if revision != "" { q := application.ApplicationManifestQuery{ Name: &appName, @@ -1238,12 +1234,13 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co // DifferenceOption struct to store diff options type DifferenceOption struct { - local string - localRepoRoot string - revision string - cluster *argoappv1.Cluster - res *repoapiclient.ManifestResponse - serversideRes *repoapiclient.ManifestResponse + local string + localRepoRoot string + revision string + cluster *argoappv1.Cluster + res *repoapiclient.ManifestResponse + serversideRes *repoapiclient.ManifestResponse + revisionSourceMappings *map[int64]string } // findandPrintDiff ... Prints difference between application current state and state stored in git or locally, returns boolean as true if difference is found else returns false @@ -1255,7 +1252,7 @@ func findandPrintDiff(ctx context.Context, app *argoappv1.Application, proj *arg if diffOptions.local != "" { localObjs := groupObjsByKey(getLocalObjects(ctx, app, proj, diffOptions.local, diffOptions.localRepoRoot, argoSettings.AppLabelKey, diffOptions.cluster.Info.ServerVersion, diffOptions.cluster.Info.APIVersions, argoSettings.KustomizeOptions, argoSettings.TrackingMethod), liveObjs, app.Spec.Destination.Namespace) items = groupObjsForDiff(resources, localObjs, items, argoSettings, app.InstanceName(argoSettings.ControllerNamespace), app.Spec.Destination.Namespace) - } else if diffOptions.revision != "" { + } else if diffOptions.revision != "" || (diffOptions.revisionSourceMappings != nil) { var unstructureds []*unstructured.Unstructured for _, mfst := range diffOptions.res.Manifests { obj, err := argoappv1.UnmarshalToUnstructured(mfst) @@ -2755,16 +2752,22 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob errors.CheckError(fmt.Errorf("While using revisions and source-indexes, length of values for both flags should be same.")) } + log.Info("Reached") + appName, appNs := argo.ParseFromQualifiedName(args[0], "") clientset := headless.NewClientOrDie(clientOpts, c) conn, appIf := clientset.NewApplicationClientOrDie() defer argoio.Close(conn) + + log.Info("Reached 1") resources, err := appIf.ManagedResources(ctx, &application.ResourcesQuery{ ApplicationName: &appName, AppNamespace: &appNs, }) errors.CheckError(err) + log.Info("Reached 2") + var unstructureds []*unstructured.Unstructured switch source { case "git": @@ -2816,6 +2819,7 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob res, err := appIf.GetManifests(ctx, &q) errors.CheckError(err) + fmt.Println(res) for _, mfst := range res.Manifests { obj, err := argoappv1.UnmarshalToUnstructured(mfst) errors.CheckError(err) @@ -2834,6 +2838,7 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob log.Fatalf("Unknown source type '%s'", source) } + log.Info("Reached 3") for _, obj := range unstructureds { fmt.Println("---") yamlBytes, err := yaml.Marshal(obj) diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index e962e811ee2b5..49cb13f84481c 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -295,6 +295,8 @@ func (s *Service) runRepoOperation( hasMultipleSources bool, refSources map[string]*v1alpha1.RefTarget) error { + fmt.Println(repo.Repo) + fmt.Println(revision) if sanitizer, ok := grpc.SanitizerFromContext(ctx); ok { // make sure a randomized path replaced with '.' in the error message sanitizer.AddRegexReplacement(getRepoSanitizerRegex(s.rootDir), "") diff --git a/server/application/application.go b/server/application/application.go index 603fc6c69b27c..dcdacc260c335 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -380,11 +380,9 @@ func (s *Server) Create(ctx context.Context, q *application.ApplicationCreateReq func (s *Server) queryRepoServer(ctx context.Context, a *appv1.Application, action func( client apiclient.RepoServerServiceClient, - repo *appv1.Repository, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, - kustomizeOptions *appv1.KustomizeOptions, enabledSourceTypes map[string]bool, ) error) error { @@ -393,18 +391,7 @@ func (s *Server) queryRepoServer(ctx context.Context, a *appv1.Application, acti return fmt.Errorf("error creating repo server client: %w", err) } defer ioutil.Close(closer) - repo, err := s.db.GetRepository(ctx, a.Spec.GetSource().RepoURL) - if err != nil { - return fmt.Errorf("error getting repository: %w", err) - } - kustomizeSettings, err := s.settingsMgr.GetKustomizeSettings() - if err != nil { - return fmt.Errorf("error getting kustomize settings: %w", err) - } - kustomizeOptions, err := kustomizeSettings.GetOptions(a.Spec.GetSource()) - if err != nil { - return fmt.Errorf("error getting kustomize settings options: %w", err) - } + proj, err := argo.GetAppProject(a, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr, s.db, ctx) if err != nil { if apierr.IsNotFound(err) { @@ -438,7 +425,7 @@ func (s *Server) queryRepoServer(ctx context.Context, a *appv1.Application, acti if err != nil { return fmt.Errorf("error getting settings enabled source types: %w", err) } - return action(client, repo, permittedHelmRepos, permittedHelmCredentials, helmOptions, kustomizeOptions, enabledSourceTypes) + return action(client, permittedHelmRepos, permittedHelmCredentials, helmOptions, enabledSourceTypes) } // GetManifests returns application manifests @@ -455,46 +442,84 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan return nil, security.NamespaceNotPermittedError(a.Namespace) } + log.Info("---------------------------Here 1-------------------------------------") manifestInfos := make([]*apiclient.ManifestResponse, 0) err = s.queryRepoServer(ctx, a, func( - client apiclient.RepoServerServiceClient, repo *appv1.Repository, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, kustomizeOptions *appv1.KustomizeOptions, enableGenerateManifests map[string]bool) error { - for i, source := range a.Spec.GetSources() { - revision := source.TargetRevision - if q.GetRevisionSourceMappings() != nil && len(q.GetRevisionSourceMappings()) > 0 { - if val, ok := q.GetRevisionSourceMappings()[int64(i)]; ok { - revision = val + client apiclient.RepoServerServiceClient, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, enableGenerateManifests map[string]bool) error { + + appInstanceLabelKey, err := s.settingsMgr.GetAppInstanceLabelKey() + if err != nil { + return fmt.Errorf("error getting app instance label key from settings: %w", err) + } + + config, err := s.getApplicationClusterConfig(ctx, a) + if err != nil { + return fmt.Errorf("error getting application cluster config: %w", err) + } + + serverVersion, err := s.kubectl.GetServerVersion(config) + if err != nil { + return fmt.Errorf("error getting server version: %w", err) + } + + apiResources, err := s.kubectl.GetAPIResources(config, false, kubecache.NewNoopSettings()) + if err != nil { + return fmt.Errorf("error getting API resources: %w", err) + } + + proj, err := argo.GetAppProject(a, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr, s.db, ctx) + if err != nil { + return fmt.Errorf("error getting app project: %w", err) + } + + sources := make([]appv1.ApplicationSource, 0) + if a.Spec.HasMultipleSources() { + fmt.Println(q.GetRevisionSourceMappings()) + for i, _ := range a.Spec.GetSources() { + source := a.Spec.GetSources()[i] + fmt.Println(i, "source: ", source.RepoURL) + if q.GetRevisionSourceMappings() != nil && len(q.GetRevisionSourceMappings()) > 0 { + if val, ok := q.GetRevisionSourceMappings()[int64(i+1)]; ok { + source.TargetRevision = val + log.Infof("Found in GetRevisionSourceMappings %d:%s", i, source.TargetRevision) + a.Spec.GetSources()[i] = source + } } - } else if q.GetRevision() != "" { - revision = q.GetRevision() } - appInstanceLabelKey, err := s.settingsMgr.GetAppInstanceLabelKey() - if err != nil { - return fmt.Errorf("error getting app instance label key from settings: %w", err) + sources = a.Spec.GetSources() + } else { + source := a.Spec.GetSource() + if q.GetRevision() != "" { + source.TargetRevision = q.GetRevision() } + sources = append(sources, source) + } - config, err := s.getApplicationClusterConfig(ctx, a) - if err != nil { - return fmt.Errorf("error getting application cluster config: %w", err) - } + // Store the map of all sources having ref field into a map for applications with sources field + refSources, err := argo.GetRefSources(context.Background(), a.Spec, s.db) + if err != nil { + return fmt.Errorf("failed to get ref sources: %v", err) + } - serverVersion, err := s.kubectl.GetServerVersion(config) + for _, source := range sources { + repo, err := s.db.GetRepository(ctx, source.RepoURL) if err != nil { - return fmt.Errorf("error getting server version: %w", err) + return fmt.Errorf("error getting repository: %w", err) } - apiResources, err := s.kubectl.GetAPIResources(config, false, kubecache.NewNoopSettings()) + kustomizeSettings, err := s.settingsMgr.GetKustomizeSettings() if err != nil { - return fmt.Errorf("error getting API resources: %w", err) + return fmt.Errorf("error getting kustomize settings: %w", err) } - proj, err := argo.GetAppProject(a, applisters.NewAppProjectLister(s.projInformer.GetIndexer()), s.ns, s.settingsMgr, s.db, ctx) + kustomizeOptions, err := kustomizeSettings.GetOptions(source) if err != nil { - return fmt.Errorf("error getting app project: %w", err) + return fmt.Errorf("error getting kustomize settings options: %w", err) } manifestInfo, err := client.GenerateManifest(ctx, &apiclient.ManifestRequest{ Repo: repo, - Revision: revision, + Revision: source.TargetRevision, AppLabelKey: appInstanceLabelKey, AppName: a.InstanceName(s.ns), Namespace: a.Spec.Destination.Namespace, @@ -509,11 +534,12 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan EnabledSourceTypes: enableGenerateManifests, ProjectName: proj.Name, ProjectSourceRepos: proj.Spec.SourceRepos, + HasMultipleSources: a.Spec.HasMultipleSources(), + RefSources: refSources, }) if err != nil { return fmt.Errorf("error generating manifests: %w", err) } - manifestInfos = append(manifestInfos, manifestInfo) } return nil @@ -540,9 +566,10 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan if err != nil { return nil, fmt.Errorf("error marshaling manifest: %w", err) } - manifests.Manifests[i] = string(data) + manifestInfo.Manifests[i] = string(data) } } + manifests.Manifests = manifestInfo.Manifests } return manifests, nil @@ -567,7 +594,7 @@ func (s *Server) GetManifestsWithFiles(stream application.ApplicationService_Get var manifestInfo *apiclient.ManifestResponse err = s.queryRepoServer(ctx, a, func( - client apiclient.RepoServerServiceClient, repo *appv1.Repository, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, kustomizeOptions *appv1.KustomizeOptions, enableGenerateManifests map[string]bool) error { + client apiclient.RepoServerServiceClient, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, enableGenerateManifests map[string]bool) error { appInstanceLabelKey, err := s.settingsMgr.GetAppInstanceLabelKey() if err != nil { @@ -596,6 +623,20 @@ func (s *Server) GetManifestsWithFiles(stream application.ApplicationService_Get return fmt.Errorf("error getting app project: %w", err) } + repo, err := s.db.GetRepository(ctx, a.Spec.GetSource().RepoURL) + if err != nil { + return fmt.Errorf("error getting repository: %w", err) + } + + kustomizeSettings, err := s.settingsMgr.GetKustomizeSettings() + if err != nil { + return fmt.Errorf("error getting kustomize settings: %w", err) + } + kustomizeOptions, err := kustomizeSettings.GetOptions(a.Spec.GetSource()) + if err != nil { + return fmt.Errorf("error getting kustomize settings options: %w", err) + } + req := &apiclient.ManifestRequest{ Repo: repo, Revision: source.TargetRevision, @@ -710,15 +751,25 @@ func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*app // force refresh cached application details if err := s.queryRepoServer(ctx, a, func( client apiclient.RepoServerServiceClient, - repo *appv1.Repository, helmRepos []*appv1.Repository, _ []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, - kustomizeOptions *appv1.KustomizeOptions, enabledSourceTypes map[string]bool, ) error { source := app.Spec.GetSource() - _, err := client.GetAppDetails(ctx, &apiclient.RepoServerAppDetailsQuery{ + repo, err := s.db.GetRepository(ctx, a.Spec.GetSource().RepoURL) + if err != nil { + return fmt.Errorf("error getting repository: %w", err) + } + kustomizeSettings, err := s.settingsMgr.GetKustomizeSettings() + if err != nil { + return fmt.Errorf("error getting kustomize settings: %w", err) + } + kustomizeOptions, err := kustomizeSettings.GetOptions(a.Spec.GetSource()) + if err != nil { + return fmt.Errorf("error getting kustomize settings options: %w", err) + } + _, err = client.GetAppDetails(ctx, &apiclient.RepoServerAppDetailsQuery{ Repo: repo, Source: &source, AppName: appName, From 01d4a82e6eddc5b370cd81ac1cb54fab7e8f1361 Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Wed, 27 Mar 2024 23:03:04 -0400 Subject: [PATCH 3/9] remove testing logs Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 47 +++++++++++++---------------- reposerver/repository/repository.go | 2 -- server/application/application.go | 4 --- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index db8a1062ac334..4b95cd159da78 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1159,11 +1159,12 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co errors.CheckError(err) diffOption := &DifferenceOption{} if app.Spec.HasMultipleSources() && len(revisions) > 0 && len(sourceIndexes) > 0 { - fmt.Printf("Revisions: %s \n", strings.Join(revisions, ", ")) - fmt.Printf("Source Indexes: %d \n", sourceIndexes) revisionSourceMappings := make(map[int64]string, 0) for i, index := range sourceIndexes { + if index < 0 { + errors.CheckError(fmt.Errorf("source-index cannot be less than or equal to 0. Index starts at 1.")) + } revisionSourceMappings[index] = revisions[i] } @@ -1173,8 +1174,8 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co RevisionSourceMappings: revisionSourceMappings, } res, err := appIf.GetManifests(ctx, &q) - errors.CheckError(err) + diffOption.res = res diffOption.revisionSourceMappings = &revisionSourceMappings } else if revision != "" { @@ -2752,22 +2753,17 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob errors.CheckError(fmt.Errorf("While using revisions and source-indexes, length of values for both flags should be same.")) } - log.Info("Reached") - appName, appNs := argo.ParseFromQualifiedName(args[0], "") clientset := headless.NewClientOrDie(clientOpts, c) conn, appIf := clientset.NewApplicationClientOrDie() defer argoio.Close(conn) - log.Info("Reached 1") resources, err := appIf.ManagedResources(ctx, &application.ResourcesQuery{ ApplicationName: &appName, AppNamespace: &appNs, }) errors.CheckError(err) - log.Info("Reached 2") - var unstructureds []*unstructured.Unstructured switch source { case "git": @@ -2787,26 +2783,13 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob proj := getProject(c, clientOpts, ctx, app.Spec.Project) unstructureds = getLocalObjects(context.Background(), app, proj.Project, local, localRepoRoot, argoSettings.AppLabelKey, cluster.ServerVersion, cluster.Info.APIVersions, argoSettings.KustomizeOptions, argoSettings.TrackingMethod) - } else if revision != "" { - q := application.ApplicationManifestQuery{ - Name: &appName, - AppNamespace: &appNs, - Revision: pointer.String(revision), - } - res, err := appIf.GetManifests(ctx, &q) - errors.CheckError(err) - - for _, mfst := range res.Manifests { - obj, err := argoappv1.UnmarshalToUnstructured(mfst) - errors.CheckError(err) - unstructureds = append(unstructureds, obj) - } } else if len(revisions) > 0 && len(sourceIndexes) > 0 { - fmt.Printf("Revisions: %s \n", strings.Join(revisions, ", ")) - fmt.Printf("Source Indexes: %d \n", sourceIndexes) revisionSourceMappings := make(map[int64]string, 0) for i, index := range sourceIndexes { + if index < 0 { + errors.CheckError(fmt.Errorf("source-index cannot be less than or equal to 0, Index starts at 1")) + } revisionSourceMappings[index] = revisions[i] } @@ -2819,7 +2802,20 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob res, err := appIf.GetManifests(ctx, &q) errors.CheckError(err) - fmt.Println(res) + for _, mfst := range res.Manifests { + obj, err := argoappv1.UnmarshalToUnstructured(mfst) + errors.CheckError(err) + unstructureds = append(unstructureds, obj) + } + } else if revision != "" { + q := application.ApplicationManifestQuery{ + Name: &appName, + AppNamespace: &appNs, + Revision: pointer.String(revision), + } + res, err := appIf.GetManifests(ctx, &q) + errors.CheckError(err) + for _, mfst := range res.Manifests { obj, err := argoappv1.UnmarshalToUnstructured(mfst) errors.CheckError(err) @@ -2838,7 +2834,6 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob log.Fatalf("Unknown source type '%s'", source) } - log.Info("Reached 3") for _, obj := range unstructureds { fmt.Println("---") yamlBytes, err := yaml.Marshal(obj) diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 49cb13f84481c..e962e811ee2b5 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -295,8 +295,6 @@ func (s *Service) runRepoOperation( hasMultipleSources bool, refSources map[string]*v1alpha1.RefTarget) error { - fmt.Println(repo.Repo) - fmt.Println(revision) if sanitizer, ok := grpc.SanitizerFromContext(ctx); ok { // make sure a randomized path replaced with '.' in the error message sanitizer.AddRegexReplacement(getRepoSanitizerRegex(s.rootDir), "") diff --git a/server/application/application.go b/server/application/application.go index dcdacc260c335..80f8e6171472f 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -442,7 +442,6 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan return nil, security.NamespaceNotPermittedError(a.Namespace) } - log.Info("---------------------------Here 1-------------------------------------") manifestInfos := make([]*apiclient.ManifestResponse, 0) err = s.queryRepoServer(ctx, a, func( client apiclient.RepoServerServiceClient, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, enableGenerateManifests map[string]bool) error { @@ -474,14 +473,11 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan sources := make([]appv1.ApplicationSource, 0) if a.Spec.HasMultipleSources() { - fmt.Println(q.GetRevisionSourceMappings()) for i, _ := range a.Spec.GetSources() { source := a.Spec.GetSources()[i] - fmt.Println(i, "source: ", source.RepoURL) if q.GetRevisionSourceMappings() != nil && len(q.GetRevisionSourceMappings()) > 0 { if val, ok := q.GetRevisionSourceMappings()[int64(i+1)]; ok { source.TargetRevision = val - log.Infof("Found in GetRevisionSourceMappings %d:%s", i, source.TargetRevision) a.Spec.GetSources()[i] = source } } From 9f1e95a6d4270cafb248b75b783b02f47af2107f Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Wed, 27 Mar 2024 23:36:37 -0400 Subject: [PATCH 4/9] update cli docs Signed-off-by: ishitasequeira --- docs/user-guide/commands/argocd_app_diff.md | 2 ++ docs/user-guide/commands/argocd_app_manifests.md | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/user-guide/commands/argocd_app_diff.md b/docs/user-guide/commands/argocd_app_diff.md index b352c30123eca..e00b1f2feeca0 100644 --- a/docs/user-guide/commands/argocd_app_diff.md +++ b/docs/user-guide/commands/argocd_app_diff.md @@ -27,7 +27,9 @@ argocd app diff APPNAME [flags] --local-repo-root string Path to the repository root. Used together with --local allows setting the repository root (default "/") --refresh Refresh application data when retrieving --revision string Compare live app to a particular revision + --revisions stringArray Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes --server-side-generate Used with --local, this will send your manifests to the server for diffing + --source-indexes int64Slice List of source indexes. Default is empty array. Indexes start at 1. (default []) ``` ### Options inherited from parent commands diff --git a/docs/user-guide/commands/argocd_app_manifests.md b/docs/user-guide/commands/argocd_app_manifests.md index d3b91756cbe04..7681f864f06fd 100644 --- a/docs/user-guide/commands/argocd_app_manifests.md +++ b/docs/user-guide/commands/argocd_app_manifests.md @@ -11,11 +11,13 @@ argocd app manifests APPNAME [flags] ### Options ``` - -h, --help help for manifests - --local string If set, show locally-generated manifests. Value is the absolute path to app manifests within the manifest repo. Example: '/home/username/apps/env/app-1'. - --local-repo-root string Path to the local repository root. Used together with --local allows setting the repository root. Example: '/home/username/apps'. (default ".") - --revision string Show manifests at a specific revision - --source string Source of manifests. One of: live|git (default "git") + -h, --help help for manifests + --local string If set, show locally-generated manifests. Value is the absolute path to app manifests within the manifest repo. Example: '/home/username/apps/env/app-1'. + --local-repo-root string Path to the local repository root. Used together with --local allows setting the repository root. Example: '/home/username/apps'. (default ".") + --revision string Show manifests at a specific revision + --revisions stringArray Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes + --source string Source of manifests. One of: live|git (default "git") + --source-indexes int64Slice List of source indexes. Default is empty array. Indexes start at 1. (default []) ``` ### Options inherited from parent commands From e9579c28c606630f30b0fdf7bf58bf03c1f270f4 Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Wed, 27 Mar 2024 23:42:54 -0400 Subject: [PATCH 5/9] add extra validation for diff command Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 4b95cd159da78..845d9c298394c 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1140,6 +1140,11 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co c.HelpFunc()(c, args) os.Exit(2) } + + if len(revisions) != len(sourceIndexes) { + errors.CheckError(fmt.Errorf("While using revisions and source-indexes, length of values for both flags should be same.")) + } + clientset := headless.NewClientOrDie(clientOpts, c) conn, appIf := clientset.NewApplicationClientOrDie() defer argoio.Close(conn) From 27f37002558c8b2dbbd6251a6033688df2534d89 Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Thu, 28 Mar 2024 00:15:13 -0400 Subject: [PATCH 6/9] fix lint Signed-off-by: ishitasequeira --- server/application/application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/application/application.go b/server/application/application.go index 80f8e6171472f..56faf5c57256d 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -473,7 +473,7 @@ func (s *Server) GetManifests(ctx context.Context, q *application.ApplicationMan sources := make([]appv1.ApplicationSource, 0) if a.Spec.HasMultipleSources() { - for i, _ := range a.Spec.GetSources() { + for i := range a.Spec.GetSources() { source := a.Spec.GetSources()[i] if q.GetRevisionSourceMappings() != nil && len(q.GetRevisionSourceMappings()) > 0 { if val, ok := q.GetRevisionSourceMappings()[int64(i+1)]; ok { From edef6f056ebcd24107f34bec2ca96734fed5d33d Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Thu, 28 Mar 2024 12:31:58 -0400 Subject: [PATCH 7/9] Empty-Commit Signed-off-by: ishitasequeira From 014c93c316388e2d03fb14fe5ed3351788031f7b Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Mon, 1 Apr 2024 17:51:21 -0400 Subject: [PATCH 8/9] revert apimachinery version Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 4 ++-- go.mod | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 845d9c298394c..0d6bdff7f1f86 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1167,7 +1167,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co revisionSourceMappings := make(map[int64]string, 0) for i, index := range sourceIndexes { - if index < 0 { + if index <= 0 { errors.CheckError(fmt.Errorf("source-index cannot be less than or equal to 0. Index starts at 1.")) } revisionSourceMappings[index] = revisions[i] @@ -2792,7 +2792,7 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob revisionSourceMappings := make(map[int64]string, 0) for i, index := range sourceIndexes { - if index < 0 { + if index <= 0 { errors.CheckError(fmt.Errorf("source-index cannot be less than or equal to 0, Index starts at 1")) } revisionSourceMappings[index] = revisions[i] diff --git a/go.mod b/go.mod index eb875e4af047a..dfa17e1ce0d7d 100644 --- a/go.mod +++ b/go.mod @@ -94,7 +94,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.11 k8s.io/apiextensions-apiserver v0.26.10 - k8s.io/apimachinery v0.29.3 + k8s.io/apimachinery v0.26.11 k8s.io/apiserver v0.26.11 k8s.io/client-go v0.26.11 k8s.io/code-generator v0.26.11 From 9bbe20c5ef0167be80ba398354957452b9faa136 Mon Sep 17 00:00:00 2001 From: ishitasequeira Date: Wed, 3 Apr 2024 13:36:04 -0400 Subject: [PATCH 9/9] Update docs based on comments Signed-off-by: ishitasequeira --- cmd/argocd/commands/app.go | 14 ++++++++++++-- docs/user-guide/commands/argocd_app_diff.md | 2 +- docs/user-guide/commands/argocd_app_manifests.md | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 0d6bdff7f1f86..fb9d7657186eb 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -1233,7 +1233,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co command.Flags().BoolVar(&serverSideGenerate, "server-side-generate", false, "Used with --local, this will send your manifests to the server for diffing") command.Flags().StringArrayVar(&localIncludes, "local-include", []string{"*.yaml", "*.yml", "*.json"}, "Used with --server-side-generate, specify patterns of filenames to send. Matching is based on filename and not path.") command.Flags().StringVarP(&appNamespace, "app-namespace", "N", "", "Only render the difference in namespace") - command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes") + command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions for the index of sources in source-indexes") command.Flags().Int64SliceVar(&sourceIndexes, "source-indexes", []int64{}, "List of source indexes. Default is empty array. Indexes start at 1.") return command } @@ -2746,6 +2746,16 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob var command = &cobra.Command{ Use: "manifests APPNAME", Short: "Print manifests of an application", + Example: templates.Examples(` + # Get manifests for an application + argocd app manifests my-app + + # Get manifests for an application at a specific revision + argocd app manifests my-app --revision 0.0.1 + + # Get manifests for a multi-source application at specific revisions for specific sources + argocd app manifests my-app --revisions 0.0.1 --source-indexes 1 --revisions 0.0.2 --source-indexes 2 + `), Run: func(c *cobra.Command, args []string) { ctx := c.Context() @@ -2849,7 +2859,7 @@ func NewApplicationManifestsCommand(clientOpts *argocdclient.ClientOptions) *cob } command.Flags().StringVar(&source, "source", "git", "Source of manifests. One of: live|git") command.Flags().StringVar(&revision, "revision", "", "Show manifests at a specific revision") - command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes") + command.Flags().StringArrayVar(&revisions, "revisions", []string{}, "Show manifests at specific revisions for the index of sources in source-indexes") command.Flags().Int64SliceVar(&sourceIndexes, "source-indexes", []int64{}, "List of source indexes. Default is empty array. Indexes start at 1.") command.Flags().StringVar(&local, "local", "", "If set, show locally-generated manifests. Value is the absolute path to app manifests within the manifest repo. Example: '/home/username/apps/env/app-1'.") command.Flags().StringVar(&localRepoRoot, "local-repo-root", ".", "Path to the local repository root. Used together with --local allows setting the repository root. Example: '/home/username/apps'.") diff --git a/docs/user-guide/commands/argocd_app_diff.md b/docs/user-guide/commands/argocd_app_diff.md index e00b1f2feeca0..930bc4ced9eed 100644 --- a/docs/user-guide/commands/argocd_app_diff.md +++ b/docs/user-guide/commands/argocd_app_diff.md @@ -27,7 +27,7 @@ argocd app diff APPNAME [flags] --local-repo-root string Path to the repository root. Used together with --local allows setting the repository root (default "/") --refresh Refresh application data when retrieving --revision string Compare live app to a particular revision - --revisions stringArray Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes + --revisions stringArray Show manifests at specific revisions for the index of sources in source-indexes --server-side-generate Used with --local, this will send your manifests to the server for diffing --source-indexes int64Slice List of source indexes. Default is empty array. Indexes start at 1. (default []) ``` diff --git a/docs/user-guide/commands/argocd_app_manifests.md b/docs/user-guide/commands/argocd_app_manifests.md index 7681f864f06fd..45b0fa58f24c1 100644 --- a/docs/user-guide/commands/argocd_app_manifests.md +++ b/docs/user-guide/commands/argocd_app_manifests.md @@ -8,6 +8,19 @@ Print manifests of an application argocd app manifests APPNAME [flags] ``` +### Examples + +``` + # Get manifests for an application + argocd app manifests my-app + + # Get manifests for an application at a specific revision + argocd app manifests my-app --revision 0.0.1 + + # Get manifests for a multi-source application at specific revisions for specific sources + argocd app manifests my-app --revisions 0.0.1 --source-indexes 1 --revisions 0.0.2 --source-indexes 2 +``` + ### Options ``` @@ -15,7 +28,7 @@ argocd app manifests APPNAME [flags] --local string If set, show locally-generated manifests. Value is the absolute path to app manifests within the manifest repo. Example: '/home/username/apps/env/app-1'. --local-repo-root string Path to the local repository root. Used together with --local allows setting the repository root. Example: '/home/username/apps'. (default ".") --revision string Show manifests at a specific revision - --revisions stringArray Show manifests at specific revisions (comma-separated) for the index of sources in source-indexes + --revisions stringArray Show manifests at specific revisions for the index of sources in source-indexes --source string Source of manifests. One of: live|git (default "git") --source-indexes int64Slice List of source indexes. Default is empty array. Indexes start at 1. (default []) ```