diff --git a/docs/user-guide/helm.md b/docs/user-guide/helm.md index c3b6aa0c6e8fa..73b48b01c7fdb 100644 --- a/docs/user-guide/helm.md +++ b/docs/user-guide/helm.md @@ -47,6 +47,38 @@ spec: See [here](../operator-manual/declarative-setup.md#helm-chart-repositories) for more info about how to configure private Helm repositories. +## Repository alias + +You can use the repository alias, as you have named it inside the repositoriesn as a repoURL in the source: + +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: sealed-secrets + namespace: argocd +spec: + project: default + source: + chart: sealed-secrets + repoURL: @sealed-secrets # supports also the format alias:sealed-secrets + targetRevision: 1.16.1 + helm: + releaseName: sealed-secrets + destination: + server: "https://kubernetes.default.svc" + namespace: kubeseal +``` + +Do not forget to add the corresponding entry in the project source repositories whitelist, if needed. You have to specify both syntaxes to allow them to work. + +```yaml +spec: + sourceRepos: + - '@sealed-secrets' + - 'alias:sealed-secrets' +``` + ## Values Files Helm has the ability to use a different, or even multiple "values.yaml" files to derive its diff --git a/reposerver/apiclient/repository.pb.go b/reposerver/apiclient/repository.pb.go index 393c6699abf3c..0f0afc9c35fe3 100644 --- a/reposerver/apiclient/repository.pb.go +++ b/reposerver/apiclient/repository.pb.go @@ -554,12 +554,14 @@ func (m *TestRepositoryResponse) GetVerifiedRepository() bool { // ResolveRevisionRequest type ResolveRevisionRequest struct { - Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` - App *v1alpha1.Application `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"` - AmbiguousRevision string `protobuf:"bytes,3,opt,name=ambiguousRevision,proto3" json:"ambiguousRevision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` + App *v1alpha1.Application `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"` + AmbiguousRevision string `protobuf:"bytes,3,opt,name=ambiguousRevision,proto3" json:"ambiguousRevision,omitempty"` + Repos []*v1alpha1.Repository `protobuf:"bytes,4,rep,name=repos,proto3" json:"repos,omitempty"` + HelmRepoCreds []*v1alpha1.RepoCreds `protobuf:"bytes,5,rep,name=helmRepoCreds,proto3" json:"helmRepoCreds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ResolveRevisionRequest) Reset() { *m = ResolveRevisionRequest{} } @@ -616,6 +618,20 @@ func (m *ResolveRevisionRequest) GetAmbiguousRevision() string { return "" } +func (m *ResolveRevisionRequest) GetRepos() []*v1alpha1.Repository { + if m != nil { + return m.Repos + } + return nil +} + +func (m *ResolveRevisionRequest) GetHelmRepoCreds() []*v1alpha1.RepoCreds { + if m != nil { + return m.HelmRepoCreds + } + return nil +} + // ResolveRevisionResponse type ResolveRevisionResponse struct { // returns the resolved revision @@ -1352,10 +1368,12 @@ type RepoServerRevisionChartDetailsRequest struct { // the chart Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // the revision within the chart - Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"` + Repos []*v1alpha1.Repository `protobuf:"bytes,4,rep,name=repos,proto3" json:"repos,omitempty"` + HelmRepoCreds []*v1alpha1.RepoCreds `protobuf:"bytes,5,rep,name=helmRepoCreds,proto3" json:"helmRepoCreds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RepoServerRevisionChartDetailsRequest) Reset() { *m = RepoServerRevisionChartDetailsRequest{} } @@ -1412,6 +1430,20 @@ func (m *RepoServerRevisionChartDetailsRequest) GetRevision() string { return "" } +func (m *RepoServerRevisionChartDetailsRequest) GetRepos() []*v1alpha1.Repository { + if m != nil { + return m.Repos + } + return nil +} + +func (m *RepoServerRevisionChartDetailsRequest) GetHelmRepoCreds() []*v1alpha1.RepoCreds { + if m != nil { + return m.HelmRepoCreds + } + return nil +} + // HelmAppSpec contains helm app name in source repo type HelmAppSpec struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -2390,149 +2422,150 @@ func init() { } var fileDescriptor_dd8723cfcc820480 = []byte{ - // 2265 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x1a, 0x5d, 0x6f, 0x1b, 0xc7, - 0x51, 0x47, 0x52, 0x14, 0x39, 0x94, 0x25, 0x6a, 0x63, 0xcb, 0x67, 0xc6, 0x16, 0x94, 0x6b, 0x6d, - 0x38, 0x76, 0x42, 0xc2, 0x32, 0x12, 0xb7, 0x4e, 0x9a, 0x42, 0x71, 0x6c, 0xc9, 0xb1, 0x65, 0xab, - 0x67, 0xa7, 0x85, 0x5b, 0xb7, 0xc5, 0xf2, 0xb8, 0x24, 0x2f, 0x3c, 0xde, 0xad, 0xef, 0xf6, 0x14, - 0xd0, 0x40, 0x1f, 0x8a, 0x16, 0xfd, 0x09, 0x7d, 0xe8, 0xaf, 0x28, 0x50, 0x14, 0x7d, 0xec, 0x43, - 0xd1, 0x8f, 0xc7, 0xa2, 0x7f, 0xa0, 0x85, 0x5f, 0x0a, 0xf4, 0x57, 0x14, 0xfb, 0x71, 0x9f, 0x3c, - 0xd2, 0x4a, 0x69, 0x2b, 0x6d, 0x5f, 0xa4, 0xdb, 0xd9, 0xd9, 0x99, 0xd9, 0xd9, 0xf9, 0xdc, 0x25, - 0x5c, 0xf2, 0x09, 0xf5, 0x02, 0xe2, 0x1f, 0x11, 0xbf, 0x23, 0x3e, 0x6d, 0xe6, 0xf9, 0x93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, 0x18, 0x8d, 0xe1, 0xd4, 0x90, 0x38, - 0x63, 0xae, 0xf2, 0x5b, 0x3e, 0xe9, 0x05, 0xfa, 0x86, 0xd0, 0xef, 0xde, 0xe2, 0x27, 0x28, 0xc8, - 0x99, 0x59, 0xea, 0x5c, 0x30, 0xd7, 0x33, 0x95, 0xa7, 0x48, 0x1f, 0x41, 0x52, 0xb0, 0x1c, 0x18, - 0x5d, 0x82, 0x35, 0xe6, 0x63, 0x6b, 0x64, 0xbb, 0x83, 0x03, 0xc2, 0x86, 0x5e, 0x4f, 0x7f, 0x43, - 0x68, 0x22, 0x07, 0x45, 0x16, 0x20, 0xe2, 0xe2, 0xae, 0x43, 0x7a, 0xd2, 0x16, 0x1f, 0x4f, 0x28, - 0x09, 0xf4, 0xd3, 0x62, 0x17, 0xd7, 0xdb, 0xa9, 0x08, 0x95, 0x0b, 0x10, 0xed, 0xdb, 0x53, 0xab, - 0x6e, 0xbb, 0xcc, 0x9f, 0x98, 0x05, 0xe4, 0xd0, 0x08, 0x1a, 0x7c, 0x1f, 0x91, 0x29, 0x9c, 0x11, - 0xa6, 0x70, 0x77, 0x31, 0x1d, 0xed, 0x27, 0x04, 0xcd, 0x34, 0x75, 0xd4, 0x06, 0x34, 0xc4, 0xc1, - 0x41, 0xe8, 0x30, 0x9b, 0x3a, 0x44, 0x8a, 0x11, 0xe8, 0x9b, 0x42, 0x4d, 0x05, 0x33, 0xe8, 0x1e, - 0x80, 0x4f, 0xfa, 0x11, 0xde, 0x59, 0xb1, 0xf3, 0xab, 0xf3, 0x76, 0x6e, 0xc6, 0xd8, 0x72, 0xc7, - 0xa9, 0xe5, 0x9c, 0x39, 0xdf, 0x06, 0xb1, 0x98, 0xf2, 0x76, 0xe1, 0xd6, 0xba, 0x30, 0xb1, 0x82, - 0x19, 0x6e, 0x8b, 0x0a, 0x2a, 0x82, 0xd6, 0x39, 0x69, 0xad, 0x29, 0x50, 0xeb, 0x36, 0x9c, 0x9d, - 0xa1, 0x6a,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, 0x89, 0xae, - 0xcd, 0x17, 0xae, 0xa0, 0x09, 0x6d, 0x7d, 0xba, 0xe0, 0xaf, 0x06, 0x52, 0x24, 0x8d, 0x25, 0x74, - 0x28, 0xce, 0x24, 0xa9, 0x23, 0xd1, 0x85, 0xc2, 0x82, 0x31, 0xe6, 0xbe, 0x35, 0x6b, 0x3a, 0x3e, - 0x87, 0x4f, 0xa1, 0xb1, 0x47, 0x58, 0x54, 0xf4, 0x64, 0x2d, 0x2d, 0x57, 0x6b, 0x66, 0x5d, 0x35, - 0x5f, 0x27, 0x09, 0x8b, 0xd9, 0x90, 0xb4, 0x52, 0xc9, 0x3f, 0xeb, 0xab, 0x85, 0x15, 0x50, 0xd6, - 0x62, 0x8a, 0x6b, 0x07, 0x63, 0x09, 0x3d, 0x83, 0xcd, 0xe2, 0xa0, 0x87, 0xde, 0x3e, 0x76, 0xb2, - 0x6a, 0x5d, 0x39, 0x0e, 0x6a, 0xc4, 0xf2, 0xe3, 0xdd, 0xbf, 0xbc, 0xd8, 0xd2, 0xfe, 0xfa, 0x62, - 0x4b, 0xfb, 0xc7, 0x8b, 0x2d, 0xed, 0xfb, 0xd7, 0x5f, 0xf2, 0xeb, 0xa2, 0xd4, 0x0f, 0x96, 0x30, - 0xb5, 0x2d, 0xc7, 0x26, 0x2e, 0xeb, 0x56, 0x85, 0xbf, 0x5d, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x0e, 0xc8, 0x27, 0xc7, 0xcf, 0x24, 0x00, 0x00, + // 2281 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x1a, 0xdb, 0x6e, 0x1b, 0xc7, + 0x55, 0xbc, 0x8a, 0x3c, 0x94, 0x25, 0x6a, 0x6c, 0xcb, 0x6b, 0xc6, 0x16, 0x94, 0x6d, 0x6d, 0x38, + 0x76, 0x42, 0xc2, 0x32, 0x12, 0xb7, 0x4e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x0f, 0xc8, 0x98, 0x38, 0xec, 0x40, 0x10, 0x37, 0x42, 0x26, 0xe8, 0x05, 0x34, + 0x47, 0x81, 0xcf, 0xdc, 0xb1, 0xf5, 0x82, 0x3c, 0xa2, 0x7c, 0xad, 0xaf, 0x9d, 0x12, 0xda, 0x7c, + 0xb8, 0x18, 0xe3, 0xfb, 0x19, 0xaa, 0xc6, 0x14, 0x1f, 0x6e, 0x24, 0xa3, 0xa0, 0x4b, 0x7e, 0x4c, + 0x3c, 0x61, 0x5d, 0xab, 0xd2, 0x48, 0x12, 0x20, 0x69, 0x46, 0x96, 0x1a, 0xf9, 0xda, 0xda, 0x56, + 0x49, 0x9a, 0x51, 0x04, 0x42, 0x57, 0x60, 0xed, 0x90, 0x78, 0x56, 0x7f, 0xf2, 0xd8, 0x1a, 0x38, + 0x98, 0x05, 0x1e, 0xd1, 0x9a, 0xc2, 0x14, 0xb3, 0x60, 0x34, 0x86, 0x53, 0x43, 0x62, 0x8f, 0xb9, + 0xca, 0x6f, 0x7b, 0xa4, 0xe7, 0x6b, 0xeb, 0x42, 0xbf, 0xbb, 0x8b, 0x9f, 0xa0, 0x20, 0x67, 0xa4, + 0xa9, 0x73, 0xc1, 0x1c, 0xd7, 0x50, 0x9e, 0x22, 0x7d, 0x04, 0x49, 0xc1, 0x32, 0x60, 0x74, 0x19, + 0x56, 0x99, 0x87, 0xcd, 0x91, 0xe5, 0x0c, 0xf6, 0x09, 0x1b, 0xba, 0x3d, 0xed, 0xb4, 0xd0, 0x44, + 0x06, 0x8a, 0x4c, 0x40, 0xc4, 0xc1, 0x5d, 0x9b, 0xf4, 0xa4, 0x2d, 0x3e, 0x99, 0x50, 0xe2, 0x6b, + 0x67, 0xc4, 0x2e, 0x6e, 0xb4, 0x13, 0x11, 0x2a, 0x13, 0x20, 0xda, 0x77, 0xa6, 0x56, 0xdd, 0x71, + 0x98, 0x37, 0x31, 0x72, 0xc8, 0xa1, 0x11, 0x34, 0xf8, 0x3e, 0x42, 0x53, 0x38, 0x2b, 0x4c, 0xe1, + 0xde, 0x62, 0x3a, 0xda, 0x8b, 0x09, 0x1a, 0x49, 0xea, 0xa8, 0x0d, 0x68, 0x88, 0xfd, 0xfd, 0xc0, + 0x66, 0x16, 0xb5, 0x89, 0x14, 0xc3, 0xd7, 0x36, 0x84, 0x9a, 0x72, 0x66, 0xd0, 0x7d, 0x00, 0x8f, + 0xf4, 0x43, 0xbc, 0x73, 0x62, 0xe7, 0xd7, 0xe6, 0xed, 0xdc, 0x88, 0xb0, 0xe5, 0x8e, 0x13, 0xcb, + 0x39, 0x73, 0xbe, 0x0d, 0x62, 0x32, 0xe5, 0xed, 0xc2, 0xad, 0x35, 0x61, 0x62, 0x39, 0x33, 0xdc, + 0x16, 0x15, 0x54, 0x04, 0xad, 0xf3, 0xd2, 0x5a, 0x13, 0xa0, 0xd6, 0x1d, 0x38, 0x37, 0x43, 0xd5, + 0xa8, 0x09, 0xa5, 0x11, 0x99, 0x88, 0x10, 0x5d, 0x37, 0xf8, 0x27, 0x3a, 0x03, 0x95, 0x43, 0x6c, + 0x07, 0x44, 0x04, 0xd5, 0x9a, 0x21, 0x07, 0xb7, 0x8a, 0xdf, 0x2b, 0xb4, 0x7e, 0x53, 0x80, 0xb5, + 0x8c, 0xe0, 0x39, 0xeb, 0x7f, 0x9e, 0x5c, 0xff, 0x1a, 0xcc, 0xb8, 0xff, 0x04, 0x7b, 0x03, 0xc2, + 0x12, 0x82, 0xe8, 0xff, 0x28, 0x80, 0x96, 0xd1, 0xe8, 0x4f, 0x2c, 0x36, 0xbc, 0x6b, 0xd9, 0xc4, + 0x47, 0x37, 0x61, 0xd9, 0x93, 0x30, 0x95, 0x78, 0xde, 0x98, 0x73, 0x10, 0x7b, 0x4b, 0x46, 0x88, + 0x8d, 0x3e, 0x84, 0xda, 0x98, 0x30, 0xdc, 0xc3, 0x0c, 0x2b, 0xd9, 0xb7, 0xf2, 0x56, 0x72, 0x2e, + 0xfb, 0x0a, 0x6f, 0x6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0x8f, 0x82, 0x1a, 0xb2, 0xfc, 0x68, 0xe7, 0xef, 0x2f, 0x37, 0x0b, 0x5f, 0xbe, 0xdc, + 0x2c, 0xfc, 0xeb, 0xe5, 0x66, 0xe1, 0xa7, 0x37, 0x5e, 0xf1, 0xdb, 0xaf, 0xc4, 0xcf, 0xc9, 0x30, + 0xb5, 0x4c, 0xdb, 0x22, 0x0e, 0xeb, 0x56, 0x85, 0xbf, 0xdd, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x76, 0x3e, 0x3b, 0x2a, 0x6d, 0x26, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3710,6 +3743,34 @@ func (m *ResolveRevisionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.HelmRepoCreds) > 0 { + for iNdEx := len(m.HelmRepoCreds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HelmRepoCreds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Repos) > 0 { + for iNdEx := len(m.Repos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Repos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.AmbiguousRevision) > 0 { i -= len(m.AmbiguousRevision) copy(dAtA[i:], m.AmbiguousRevision) @@ -4462,6 +4523,34 @@ func (m *RepoServerRevisionChartDetailsRequest) MarshalToSizedBuffer(dAtA []byte i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.HelmRepoCreds) > 0 { + for iNdEx := len(m.HelmRepoCreds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HelmRepoCreds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Repos) > 0 { + for iNdEx := len(m.Repos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Repos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.Revision) > 0 { i -= len(m.Revision) copy(dAtA[i:], m.Revision) @@ -5582,6 +5671,18 @@ func (m *ResolveRevisionRequest) Size() (n int) { if l > 0 { n += 1 + l + sovRepository(uint64(l)) } + if len(m.Repos) > 0 { + for _, e := range m.Repos { + l = e.Size() + n += 1 + l + sovRepository(uint64(l)) + } + } + if len(m.HelmRepoCreds) > 0 { + for _, e := range m.HelmRepoCreds { + l = e.Size() + n += 1 + l + sovRepository(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -5910,6 +6011,18 @@ func (m *RepoServerRevisionChartDetailsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovRepository(uint64(l)) } + if len(m.Repos) > 0 { + for _, e := range m.Repos { + l = e.Size() + n += 1 + l + sovRepository(uint64(l)) + } + } + if len(m.HelmRepoCreds) > 0 { + for _, e := range m.HelmRepoCreds { + l = e.Size() + n += 1 + l + sovRepository(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -7849,6 +7962,74 @@ func (m *ResolveRevisionRequest) Unmarshal(dAtA []byte) error { } m.AmbiguousRevision = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Repos = append(m.Repos, &v1alpha1.Repository{}) + if err := m.Repos[len(m.Repos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HelmRepoCreds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HelmRepoCreds = append(m.HelmRepoCreds, &v1alpha1.RepoCreds{}) + if err := m.HelmRepoCreds[len(m.HelmRepoCreds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRepository(dAtA[iNdEx:]) @@ -10083,6 +10264,74 @@ func (m *RepoServerRevisionChartDetailsRequest) Unmarshal(dAtA []byte) error { } m.Revision = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Repos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Repos = append(m.Repos, &v1alpha1.Repository{}) + if err := m.Repos[len(m.Repos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HelmRepoCreds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HelmRepoCreds = append(m.HelmRepoCreds, &v1alpha1.RepoCreds{}) + if err := m.HelmRepoCreds[len(m.HelmRepoCreds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRepository(dAtA[iNdEx:]) diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 83cc149f68c8a..96684c7e8f41a 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -294,7 +294,9 @@ func (s *Service) runRepoOperation( operation func(repoRoot, commitSHA, cacheKey string, ctxSrc operationContextSrc) error, settings operationSettings, hasMultipleSources bool, - refSources map[string]*v1alpha1.RefTarget) error { + refSources map[string]*v1alpha1.RefTarget, + helmRepos []*v1alpha1.Repository, + helmRepoCreds []*v1alpha1.RepoCreds) error { if sanitizer, ok := grpc.SanitizerFromContext(ctx); ok { // make sure a randomized path replaced with '.' in the error message @@ -308,7 +310,7 @@ func (s *Service) runRepoOperation( revision = textutils.FirstNonEmpty(revision, source.TargetRevision) unresolvedRevision := revision if source.IsHelm() { - helmClient, revision, err = s.newHelmClientResolveRevision(repo, revision, source.Chart, settings.noCache || settings.noRevisionCache) + helmClient, revision, err = s.newHelmClientResolveRevision(repo, revision, source.Chart, settings.noCache || settings.noRevisionCache, helmRepos, helmRepoCreds) if err != nil { return err } @@ -561,7 +563,7 @@ func (s *Service) GenerateManifest(ctx context.Context, q *apiclient.ManifestReq } settings := operationSettings{sem: s.parallelismLimitSemaphore, noCache: q.NoCache, noRevisionCache: q.NoRevisionCache, allowConcurrent: q.ApplicationSource.AllowsConcurrentProcessing()} - err = s.runRepoOperation(ctx, q.Revision, q.Repo, q.ApplicationSource, q.VerifySignature, cacheFn, operation, settings, q.HasMultipleSources, q.RefSources) + err = s.runRepoOperation(ctx, q.Revision, q.Repo, q.ApplicationSource, q.VerifySignature, cacheFn, operation, settings, q.HasMultipleSources, q.RefSources, q.Repos, q.HelmRepoCreds) // if the tarDoneCh message is sent it means that the manifest // generation is being managed by the cmp-server. In this case @@ -978,18 +980,31 @@ func getHelmRepos(appPath string, repositories []*v1alpha1.Repository, helmRepoC reposByName[repo.Name] = repo } } + return toHelmRepo(retrieveRepoCredentials(dependencies, repositories, reposByName, reposByUrl, helmRepoCreds)), nil +} + +func toHelmRepo(repos []*v1alpha1.Repository) []helm.HelmRepository { + helmRepos := make([]helm.HelmRepository, 0) + for _, repo := range repos { + helmRepos = append(helmRepos, helm.HelmRepository{Name: repo.Name, Repo: repo.Repo, Creds: repo.GetHelmCreds(), EnableOci: repo.EnableOCI}) + } + return helmRepos +} + +func retrieveRepoCredentials(reposToComplete []*v1alpha1.Repository, completedRepos []*v1alpha1.Repository, reposByName map[string]*v1alpha1.Repository, reposByUrl map[string]*v1alpha1.Repository, + helmRepoCreds []*v1alpha1.RepoCreds) []*v1alpha1.Repository { - repos := make([]helm.HelmRepository, 0) - for _, dep := range dependencies { + repos := make([]*v1alpha1.Repository, 0) + for _, rep := range reposToComplete { // find matching repo credentials by URL or name - repo, ok := reposByUrl[dep.Repo] - if !ok && dep.Name != "" { - repo, ok = reposByName[dep.Name] + repo, ok := reposByUrl[rep.Repo] + if !ok && rep.Name != "" { + repo, ok = reposByName[rep.Name] } if !ok { // if no matching repo credentials found, use the repo creds from the credential list - repo = &v1alpha1.Repository{Repo: dep.Repo, Name: dep.Name, EnableOCI: dep.EnableOCI} - if repositoryCredential := getRepoCredential(helmRepoCreds, dep.Repo); repositoryCredential != nil { + repo = &v1alpha1.Repository{Repo: rep.Repo, Name: rep.Name, EnableOCI: rep.EnableOCI} + if repositoryCredential := getRepoCredential(helmRepoCreds, rep.Repo); repositoryCredential != nil { repo.EnableOCI = repositoryCredential.EnableOCI repo.Password = repositoryCredential.Password repo.Username = repositoryCredential.Username @@ -999,8 +1014,8 @@ func getHelmRepos(appPath string, repositories []*v1alpha1.Repository, helmRepoC } else if repo.EnableOCI { // finally if repo is OCI and no credentials found, use the first OCI credential matching by hostname // see https://github.com/argoproj/argo-cd/issues/14636 - for _, cred := range repositories { - if depURL, err := url.Parse("oci://" + dep.Repo); err == nil && cred.EnableOCI && depURL.Host == cred.Repo { + for _, cred := range completedRepos { + if depURL, err := url.Parse("oci://" + rep.Repo); err == nil && cred.EnableOCI && depURL.Host == cred.Repo { repo.Username = cred.Username repo.Password = cred.Password break @@ -1008,9 +1023,21 @@ func getHelmRepos(appPath string, repositories []*v1alpha1.Repository, helmRepoC } } } - repos = append(repos, helm.HelmRepository{Name: repo.Name, Repo: repo.Repo, Creds: repo.GetHelmCreds(), EnableOci: repo.EnableOCI}) + // Only add it once in the list + if !isRepoInRepoList(repo, repos) { + repos = append(repos, repo) + } } - return repos, nil + return repos +} + +func isRepoInRepoList(repo *v1alpha1.Repository, repos []*v1alpha1.Repository) bool { + for _, r := range repos { + if r.Repo == repo.Repo { + return true + } + } + return false } type dependencies struct { @@ -2007,7 +2034,7 @@ func (s *Service) GetAppDetails(ctx context.Context, q *apiclient.RepoServerAppD } settings := operationSettings{allowConcurrent: q.Source.AllowsConcurrentProcessing(), noCache: q.NoCache, noRevisionCache: q.NoCache || q.NoRevisionCache} - err := s.runRepoOperation(ctx, q.Source.TargetRevision, q.Repo, q.Source, false, cacheFn, operation, settings, false, nil) + err := s.runRepoOperation(ctx, q.Source.TargetRevision, q.Repo, q.Source, false, cacheFn, operation, settings, false, nil, nil, nil) return res, err } @@ -2294,7 +2321,7 @@ func (s *Service) GetRevisionChartDetails(ctx context.Context, q *apiclient.Repo log.Warnf("revision metadata cache error %s/%s/%s: %v", q.Repo.Repo, q.Name, q.Revision, err) } } - helmClient, revision, err := s.newHelmClientResolveRevision(q.Repo, q.Revision, q.Name, true) + helmClient, revision, err := s.newHelmClientResolveRevision(q.Repo, q.Revision, q.Name, true, q.Repos, q.HelmRepoCreds) if err != nil { return nil, fmt.Errorf("helm client error: %v", err) } @@ -2350,9 +2377,39 @@ func (s *Service) newClientResolveRevision(repo *v1alpha1.Repository, revision s return gitClient, commitSHA, nil } -func (s *Service) newHelmClientResolveRevision(repo *v1alpha1.Repository, revision string, chart string, noRevisionCache bool) (helm.Client, string, error) { - enableOCI := repo.EnableOCI || helm.IsHelmOciRepo(repo.Repo) - helmClient := s.newHelmClient(repo.Repo, repo.GetHelmCreds(), enableOCI, repo.Proxy, helm.WithIndexCache(s.cache), helm.WithChartPaths(s.chartPaths)) +func (s *Service) newHelmClientResolveRevision(repo *v1alpha1.Repository, revision string, chart string, noRevisionCache bool, repositories []*v1alpha1.Repository, helmRepoCreds []*v1alpha1.RepoCreds) (helm.Client, string, error) { + + var completedRepo *v1alpha1.Repository + reposByName := make(map[string]*v1alpha1.Repository) + reposByUrl := make(map[string]*v1alpha1.Repository) + for _, repo := range repositories { + reposByUrl[repo.Repo] = repo + if repo.Name != "" { + reposByName[repo.Name] = repo + } + } + if strings.HasPrefix(repo.Repo, "@") { + repo.Name = repo.Repo[1:] + repo.Repo = "" + completedRepo = retrieveRepoCredentials([]*v1alpha1.Repository{repo}, []*v1alpha1.Repository{}, reposByName, reposByUrl, helmRepoCreds)[0] + if completedRepo.Repo == "" { + // URL could not be resolved from list of repo added + return nil, "", fmt.Errorf("repo %s not found, please add it to the repository list", repo.Name) + } + } else if strings.HasPrefix(repo.Repo, "alias:") { + repo.Name = strings.TrimPrefix(repo.Repo, "alias:") + repo.Repo = "" + completedRepo = retrieveRepoCredentials([]*v1alpha1.Repository{repo}, []*v1alpha1.Repository{}, reposByName, reposByUrl, helmRepoCreds)[0] + if completedRepo.Repo == "" { + // URL could not be resolved from list of repo added + return nil, "", fmt.Errorf("repo %s not found, please add it to the repository list", repo.Name) + } + } else { + completedRepo = repo + } + + enableOCI := completedRepo.EnableOCI || helm.IsHelmOciRepo(completedRepo.Repo) + helmClient := s.newHelmClient(completedRepo.Repo, completedRepo.GetHelmCreds(), enableOCI, completedRepo.Proxy, helm.WithIndexCache(s.cache), helm.WithChartPaths(s.chartPaths)) if helm.IsVersion(revision) { return helmClient, revision, nil } @@ -2514,7 +2571,7 @@ func (s *Service) ResolveRevision(ctx context.Context, q *apiclient.ResolveRevis var revision string var source = app.Spec.GetSource() if source.IsHelm() { - _, revision, err := s.newHelmClientResolveRevision(repo, ambiguousRevision, source.Chart, true) + _, revision, err := s.newHelmClientResolveRevision(repo, ambiguousRevision, source.Chart, true, q.Repos, q.HelmRepoCreds) if err != nil { return &apiclient.ResolveRevisionResponse{Revision: "", AmbiguousRevision: ""}, err diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index 253714a72bd50..3e6b635e1717f 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -73,6 +73,8 @@ message ResolveRevisionRequest { github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Repository repo = 1; github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Application app = 2; string ambiguousRevision = 3; + repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Repository repos = 4; + repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.RepoCreds helmRepoCreds = 5; } // ResolveRevisionResponse @@ -164,6 +166,8 @@ message RepoServerRevisionChartDetailsRequest { string name = 2; // the revision within the chart string revision = 3; + repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Repository repos = 4; + repeated github.com.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.RepoCreds helmRepoCreds = 5; } // HelmAppSpec contains helm app name in source repo diff --git a/reposerver/repository/repository_test.go b/reposerver/repository/repository_test.go index f99ce611777c2..b7eb04c4f925f 100644 --- a/reposerver/repository/repository_test.go +++ b/reposerver/repository/repository_test.go @@ -569,8 +569,106 @@ func TestHelmChartReferencingExternalValues_InvalidRefs(t *testing.T) { request = &apiclient.ManifestRequest{Repo: &argoappv1.Repository{}, ApplicationSource: &spec.Sources[0], NoCache: true, RefSources: refSources, HasMultipleSources: true, ProjectName: "something", ProjectSourceRepos: []string{"*"}} - response, err = service.GenerateManifest(context.Background(), request) + _, err = service.GenerateManifest(context.Background(), request) assert.Error(t, err) + +} + +func TestHelmChartFromRepoAlias(t *testing.T) { + service := newService(t, ".") + spec := argoappv1.ApplicationSpec{ + Sources: []argoappv1.ApplicationSource{ + { + RepoURL: "@custom-repo", + Chart: "my-chart", + TargetRevision: "1.1.0", + }, + }, + } + request := &apiclient.ManifestRequest{ + Repo: &argoappv1.Repository{ + Repo: "@custom-repo", + }, + Repos: []*argoappv1.Repository{ + { + Name: "custom-repo", + Repo: "https://helm.example.com", + }, + }, + ApplicationSource: &spec.Sources[0], NoCache: true, RefSources: make(map[string]*argoappv1.RefTarget), HasMultipleSources: true, ProjectName: "something", + ProjectSourceRepos: []string{"*"}, + HelmRepoCreds: []*argoappv1.RepoCreds{ + {URL: "https://helm.example.com", Username: "test", Password: "test", EnableOCI: true}, + }, + } + response, err := service.GenerateManifest(context.Background(), request) + assert.NoError(t, err) + assert.NotNil(t, response) + assert.Equal(t, &apiclient.ManifestResponse{ + Manifests: []string{"{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"my-map\"}}"}, + Namespace: "", + Server: "", + Revision: "1.1.0", + SourceType: "Helm", + }, response) +} + +func TestHelmChartFromRepoAliasWithOtherSyntax(t *testing.T) { + service := newService(t, ".") + spec := argoappv1.ApplicationSpec{ + Sources: []argoappv1.ApplicationSource{ + { + RepoURL: "alias:custom-repo", + Chart: "my-chart", + TargetRevision: "1.1.0", + }, + }, + } + request := &apiclient.ManifestRequest{ + Repo: &argoappv1.Repository{ + Repo: "alias:custom-repo", + }, + Repos: []*argoappv1.Repository{ + { + Name: "custom-repo", + Repo: "https://helm.example.com", + }, + }, + ApplicationSource: &spec.Sources[0], NoCache: true, RefSources: make(map[string]*argoappv1.RefTarget), HasMultipleSources: true, ProjectName: "something", + ProjectSourceRepos: []string{"*"}, + } + response, err := service.GenerateManifest(context.Background(), request) + assert.NoError(t, err) + assert.NotNil(t, response) + assert.Equal(t, &apiclient.ManifestResponse{ + Manifests: []string{"{\"apiVersion\":\"v1\",\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"my-map\"}}"}, + Namespace: "", + Server: "", + Revision: "1.1.0", + SourceType: "Helm", + }, response) +} + +func TestHelmChartFromRepoAliasWithoutRepositoryAdded(t *testing.T) { + service := newService(t, ".") + spec := argoappv1.ApplicationSpec{ + Sources: []argoappv1.ApplicationSource{ + { + RepoURL: "alias:custom-repo", + Chart: "my-chart", + TargetRevision: "1.1.0", + }, + }, + } + request := &apiclient.ManifestRequest{ + Repo: &argoappv1.Repository{ + Repo: "alias:custom-repo", + }, + ApplicationSource: &spec.Sources[0], NoCache: true, RefSources: make(map[string]*argoappv1.RefTarget), HasMultipleSources: true, ProjectName: "something", + ProjectSourceRepos: []string{"*"}, + } + response, err := service.GenerateManifest(context.Background(), request) + assert.Error(t, err, "repo custom-repo not found, please add it to the repository list") assert.Nil(t, response) } @@ -1798,11 +1896,11 @@ func TestService_newHelmClientResolveRevision(t *testing.T) { service := newService(t, ".") t.Run("EmptyRevision", func(t *testing.T) { - _, _, err := service.newHelmClientResolveRevision(&argoappv1.Repository{}, "", "", true) + _, _, err := service.newHelmClientResolveRevision(&argoappv1.Repository{}, "", "", true, []*v1alpha1.Repository{}, []*argoappv1.RepoCreds{}) assert.EqualError(t, err, "invalid revision '': improper constraint: ") }) t.Run("InvalidRevision", func(t *testing.T) { - _, _, err := service.newHelmClientResolveRevision(&argoappv1.Repository{}, "???", "", true) + _, _, err := service.newHelmClientResolveRevision(&argoappv1.Repository{}, "???", "", true, []*v1alpha1.Repository{}, []*argoappv1.RepoCreds{}) assert.EqualError(t, err, "invalid revision '???': improper constraint: ???", true) }) } @@ -3078,9 +3176,9 @@ func TestGetHelmRepo_NamedReposAlias(t *testing.T) { helmRepos, err := getHelmRepos("./testdata/helm-with-dependencies-alias", q.Repos, q.HelmRepoCreds) assert.Nil(t, err) - assert.Equal(t, len(helmRepos), 1) - assert.Equal(t, helmRepos[0].Username, "test-alias") - assert.Equal(t, helmRepos[0].Repo, "https://example.com") + assert.Equal(t, 1, len(helmRepos)) + assert.Equal(t, "test-alias", helmRepos[0].Username) + assert.Equal(t, "https://example.com", helmRepos[0].Repo) } func Test_getResolvedValueFiles(t *testing.T) { diff --git a/reposerver/repository/testdata/helm-with-dependencies-alias/Chart.yaml b/reposerver/repository/testdata/helm-with-dependencies-alias/Chart.yaml index 8a38d551070c7..cf01bcc2c3958 100644 --- a/reposerver/repository/testdata/helm-with-dependencies-alias/Chart.yaml +++ b/reposerver/repository/testdata/helm-with-dependencies-alias/Chart.yaml @@ -5,3 +5,7 @@ dependencies: - name: helm repository: "alias:custom-repo-alias" version: v1.0.0 + - name: helm-2 + repository: "@custom-repo-alias" + version: v1.0.0 + diff --git a/server/application/application.go b/server/application/application.go index 77c74783018c2..ee57f485e6366 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -1511,7 +1511,7 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe // RevisionChartDetails returns the helm chart metadata, as fetched from the reposerver func (s *Server) RevisionChartDetails(ctx context.Context, q *application.RevisionMetadataQuery) (*appv1.ChartDetails, error) { - a, _, err := s.getApplicationEnforceRBACInformer(ctx, rbacpolicy.ActionGet, q.GetProject(), q.GetAppNamespace(), q.GetName()) + a, proj, err := s.getApplicationEnforceRBACInformer(ctx, rbacpolicy.ActionGet, q.GetProject(), q.GetAppNamespace(), q.GetName()) if err != nil { return nil, err } @@ -1527,11 +1527,25 @@ func (s *Server) RevisionChartDetails(ctx context.Context, q *application.Revisi return nil, fmt.Errorf("error creating repo server client: %w", err) } defer ioutil.Close(conn) - return repoClient.GetRevisionChartDetails(ctx, &apiclient.RepoServerRevisionChartDetailsRequest{ - Repo: repo, - Name: a.Spec.Source.Chart, - Revision: q.GetRevision(), + + var chartDetails *appv1.ChartDetails + err = s.queryRepoServer(ctx, proj, func( + client apiclient.RepoServerServiceClient, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, enableGenerateManifests map[string]bool) error { + + chartDetails, err = repoClient.GetRevisionChartDetails(ctx, &apiclient.RepoServerRevisionChartDetailsRequest{ + Repo: repo, + Name: a.Spec.Source.Chart, + Revision: q.GetRevision(), + Repos: helmRepos, + HelmRepoCreds: helmCreds, + }) + + return err }) + if err != nil { + return nil, fmt.Errorf("error resolving chart details revision: %w", err) + } + return chartDetails, nil } func isMatchingResource(q *application.ResourcesQuery, key kube.ResourceKey) bool { @@ -2096,10 +2110,24 @@ func (s *Server) resolveRevision(ctx context.Context, app *appv1.Application, sy } } - resolveRevisionResponse, err := repoClient.ResolveRevision(ctx, &apiclient.ResolveRevisionRequest{ - Repo: repo, - App: app, - AmbiguousRevision: ambiguousRevision, + _, proj, err := s.getApplicationEnforceRBACInformer(ctx, rbacpolicy.ActionGet, app.Spec.GetProject(), app.GetNamespace(), app.GetName()) + if err != nil { + return "", "", err + } + + var resolveRevisionResponse *apiclient.ResolveRevisionResponse + err = s.queryRepoServer(ctx, proj, func( + client apiclient.RepoServerServiceClient, helmRepos []*appv1.Repository, helmCreds []*appv1.RepoCreds, helmOptions *appv1.HelmOptions, enableGenerateManifests map[string]bool) error { + + resolveRevisionResponse, err = repoClient.ResolveRevision(ctx, &apiclient.ResolveRevisionRequest{ + Repo: repo, + App: app, + AmbiguousRevision: ambiguousRevision, + Repos: helmRepos, + HelmRepoCreds: helmCreds, + }) + + return err }) if err != nil { return "", "", fmt.Errorf("error resolving repo revision: %w", err) diff --git a/server/repository/repository.go b/server/repository/repository.go index 417a41ee306ef..aec681dec790e 100644 --- a/server/repository/repository.go +++ b/server/repository/repository.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "reflect" + "strings" "github.com/argoproj/gitops-engine/pkg/utils/kube" "github.com/argoproj/gitops-engine/pkg/utils/text" @@ -127,7 +128,7 @@ func (s *Server) List(ctx context.Context, q *repositorypkg.RepoQuery) (*appsv1. // Get return the requested configured repository by URL and the state of its connections. func (s *Server) Get(ctx context.Context, q *repositorypkg.RepoQuery) (*appsv1.Repository, error) { - repo, err := s.getRepo(ctx, q.Repo) + repo, err := s.getRepoFromAlias(ctx, q.Repo, q.ForceRefresh) if err != nil { return nil, err } @@ -137,12 +138,12 @@ func (s *Server) Get(ctx context.Context, q *repositorypkg.RepoQuery) (*appsv1.R } // getRepo does not return an error for unconfigured repositories, so we are checking here - exists, err := s.db.RepositoryExists(ctx, q.Repo) + exists, err := s.db.RepositoryExists(ctx, repo.Repo) if err != nil { return nil, err } if !exists { - return nil, status.Errorf(codes.NotFound, "repo '%s' not found", q.Repo) + return nil, status.Errorf(codes.NotFound, "repo '%s' not found", repo.Repo) } // For backwards compatibility, if we have no repo type set assume a default @@ -212,7 +213,7 @@ func (s *Server) ListRepositories(ctx context.Context, q *repositorypkg.RepoQuer } func (s *Server) ListRefs(ctx context.Context, q *repositorypkg.RepoQuery) (*apiclient.Refs, error) { - repo, err := s.getRepo(ctx, q.Repo) + repo, err := s.getRepoFromAlias(ctx, q.Repo, q.ForceRefresh) if err != nil { return nil, err } @@ -235,7 +236,7 @@ func (s *Server) ListRefs(ctx context.Context, q *repositorypkg.RepoQuery) (*api // ListApps performs discovery of a git repository for potential sources of applications. Used // as a convenience to the UI for auto-complete. func (s *Server) ListApps(ctx context.Context, q *repositorypkg.RepoAppsQuery) (*repositorypkg.RepoAppsResponse, error) { - repo, err := s.getRepo(ctx, q.Repo) + repo, err := s.getRepoFromAlias(ctx, q.Repo, false) if err != nil { return nil, err } @@ -254,7 +255,7 @@ func (s *Server) ListApps(ctx context.Context, q *repositorypkg.RepoAppsQuery) ( return nil, errPermissionDenied } // Also ensure the repo is actually allowed in the project in question - if err := s.isRepoPermittedInProject(ctx, q.Repo, q.AppProject); err != nil { + if err := s.isRepoPermittedInProject(ctx, repo.Repo, q.AppProject); err != nil { return nil, err } @@ -286,7 +287,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *repositorypkg.RepoAppDeta if q.Source == nil { return nil, status.Errorf(codes.InvalidArgument, "missing payload in request") } - repo, err := s.getRepo(ctx, q.Source.RepoURL) + repo, err := s.getRepoFromAlias(ctx, q.Source.RepoURL, false) if err != nil { return nil, err } @@ -318,7 +319,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *repositorypkg.RepoAppDeta } } // Ensure the repo is actually allowed in the project in question - if err := s.isRepoPermittedInProject(ctx, q.Source.RepoURL, q.AppProject); err != nil { + if err := s.isRepoPermittedInProject(ctx, repo.Repo, q.AppProject); err != nil { return nil, err } @@ -355,7 +356,7 @@ func (s *Server) GetAppDetails(ctx context.Context, q *repositorypkg.RepoAppDeta // GetHelmCharts returns list of helm charts in the specified repository func (s *Server) GetHelmCharts(ctx context.Context, q *repositorypkg.RepoQuery) (*apiclient.HelmChartsResponse, error) { - repo, err := s.getRepo(ctx, q.Repo) + repo, err := s.getRepoFromAlias(ctx, q.Repo, q.ForceRefresh) if err != nil { return nil, err } @@ -370,6 +371,35 @@ func (s *Server) GetHelmCharts(ctx context.Context, q *repositorypkg.RepoQuery) return repoClient.GetHelmCharts(ctx, &apiclient.HelmChartsRequest{Repo: repo}) } +// getRepoFromAlias returns the corresponding repo URL if an alias is provided, or the original URL if not +func (s *Server) getRepoFromAlias(ctx context.Context, repo string, forceRefresh bool) (*appsv1.Repository, error) { + var repoUrl string + if strings.HasPrefix(repo, "@") { + repoName := repo[1:] + return s.findRepositoryByName(ctx, repoName, forceRefresh) + } else if strings.HasPrefix(repo, "alias:") { + repoName := strings.TrimPrefix(repo, "alias:") + return s.findRepositoryByName(ctx, repoName, forceRefresh) + } else { + repoUrl = repo + } + + return s.getRepo(ctx, repoUrl) +} + +func (s *Server) findRepositoryByName(ctx context.Context, repoName string, forceRefresh bool) (*appsv1.Repository, error) { + repos, err := s.ListRepositories(ctx, &repositorypkg.RepoQuery{ForceRefresh: forceRefresh}) + if err != nil { + return nil, err + } + for _, repo := range repos.Items { + if repo.Name == repoName { + return repo, nil + } + } + return nil, status.Errorf(codes.NotFound, "repository with name '%s' not found", repoName) +} + // Create creates a repository or repository credential set // Deprecated: Use CreateRepository() instead func (s *Server) Create(ctx context.Context, q *repositorypkg.RepoCreateRequest) (*appsv1.Repository, error) { @@ -471,7 +501,7 @@ func (s *Server) Delete(ctx context.Context, q *repositorypkg.RepoQuery) (*repos // DeleteRepository removes a repository from the configuration func (s *Server) DeleteRepository(ctx context.Context, q *repositorypkg.RepoQuery) (*repositorypkg.RepoResponse, error) { - repo, err := s.getRepo(ctx, q.Repo) + repo, err := s.getRepoFromAlias(ctx, q.Repo, q.ForceRefresh) if err != nil { return nil, err } diff --git a/server/repository/repository_test.go b/server/repository/repository_test.go index 55bf7ab7220ac..4e25ba611466d 100644 --- a/server/repository/repository_test.go +++ b/server/repository/repository_test.go @@ -299,6 +299,63 @@ func TestRepositoryServer(t *testing.T) { assert.Equal(t, repo.Repo, url) }) + t.Run("Test_Get_FromAliasWith@", func(t *testing.T) { + repoServerClient := mocks.RepoServerServiceClient{} + repoServerClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) + repoServerClientset := mocks.Clientset{RepoServerServiceClient: &repoServerClient} + + alias := "@test" + db := &dbmocks.ArgoDB{} + db.On("ListRepositories", context.TODO()).Return([]*appsv1.Repository{&fakeRepo, &fakeRepo}, nil) + db.On("GetRepository", context.TODO(), fakeRepo.Repo).Return(&appsv1.Repository{Repo: fakeRepo.Repo}, nil) + db.On("RepositoryExists", context.TODO(), fakeRepo.Repo).Return(true, nil) + + s := NewServer(&repoServerClientset, db, enforcer, newFixtures().Cache, appLister, projInformer, testNamespace, settingsMgr) + repo, err := s.Get(context.TODO(), &repository.RepoQuery{ + Repo: alias, + }) + assert.Nil(t, err) + assert.Equal(t, repo.Repo, fakeRepo.Repo) + }) + + t.Run("Test_Get_FromAliasWithAlias:", func(t *testing.T) { + repoServerClient := mocks.RepoServerServiceClient{} + repoServerClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) + repoServerClientset := mocks.Clientset{RepoServerServiceClient: &repoServerClient} + + alias := "alias:test" + db := &dbmocks.ArgoDB{} + db.On("ListRepositories", context.TODO()).Return([]*appsv1.Repository{&fakeRepo, &fakeRepo}, nil) + db.On("GetRepository", context.TODO(), fakeRepo.Repo).Return(&appsv1.Repository{Repo: fakeRepo.Repo}, nil) + db.On("RepositoryExists", context.TODO(), fakeRepo.Repo).Return(true, nil) + + s := NewServer(&repoServerClientset, db, enforcer, newFixtures().Cache, appLister, projInformer, testNamespace, settingsMgr) + repo, err := s.Get(context.TODO(), &repository.RepoQuery{ + Repo: alias, + }) + assert.Nil(t, err) + assert.Equal(t, repo.Repo, fakeRepo.Repo) + }) + + t.Run("Test_Get_FromAliasNotFoundShouldReturnError", func(t *testing.T) { + repoServerClient := mocks.RepoServerServiceClient{} + repoServerClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) + repoServerClientset := mocks.Clientset{RepoServerServiceClient: &repoServerClient} + + alias := "alias:test-not-found" + db := &dbmocks.ArgoDB{} + db.On("ListRepositories", context.TODO()).Return([]*appsv1.Repository{&fakeRepo, &fakeRepo}, nil) + db.On("GetRepository", context.TODO(), fakeRepo.Repo).Return(&appsv1.Repository{Repo: fakeRepo.Repo}, nil) + db.On("RepositoryExists", context.TODO(), fakeRepo.Repo).Return(true, nil) + + s := NewServer(&repoServerClientset, db, enforcer, newFixtures().Cache, appLister, projInformer, testNamespace, settingsMgr) + repo, err := s.Get(context.TODO(), &repository.RepoQuery{ + Repo: alias, + }) + assert.Error(t, err, "rpc error: code = NotFound desc = repo 'test-not-found' not found") + assert.Nil(t, repo) + }) + t.Run("Test_GetInherited", func(t *testing.T) { repoServerClient := mocks.RepoServerServiceClient{} repoServerClient.On("TestRepository", mock.Anything, mock.Anything).Return(&apiclient.TestRepositoryResponse{}, nil) diff --git a/test/e2e/fixture/fixture.go b/test/e2e/fixture/fixture.go index f8dd60cb74974..2004cd5be07f8 100644 --- a/test/e2e/fixture/fixture.go +++ b/test/e2e/fixture/fixture.go @@ -115,12 +115,16 @@ const ( RepoURLTypeHelm = "helm" RepoURLTypeHelmParent = "helm-par" RepoURLTypeHelmOCI = "helm-oci" + RepoURLTypeHelmAlias = "helm-alias" + RepoURLTypeHelmOtherAlias = "helm-other-alias" GitUsername = "admin" GitPassword = "password" GithubAppID = "2978632978" GithubAppInstallationID = "7893789433789" GpgGoodKeyID = "D56C4FCA57A46444" HelmOCIRegistryURL = "localhost:5000/myrepo" + HelmRepoAlias = "@custom-repo" + HelmRepoOtherAlias = "alias:custom-repo" ) // TestNamespace returns the namespace where Argo CD E2E test instance will be @@ -327,6 +331,10 @@ func RepoURL(urlType RepoURLType) string { return GetEnvWithDefault(EnvRepoURLTypeHelm, "https://localhost:9444/argo-e2e/testdata.git/helm-repo") case RepoURLTypeHelmOCI: return HelmOCIRegistryURL + case RepoURLTypeHelmAlias: + return HelmRepoAlias + case RepoURLTypeHelmOtherAlias: + return HelmRepoOtherAlias default: return GetEnvWithDefault(EnvRepoURLDefault, fmt.Sprintf("file://%s", repoDirectory())) } diff --git a/test/e2e/helm_test.go b/test/e2e/helm_test.go index 5fd774ea0c46d..60c4635c06ce3 100644 --- a/test/e2e/helm_test.go +++ b/test/e2e/helm_test.go @@ -617,3 +617,55 @@ func TestTemplatesHelmOCIWithDependencies(t *testing.T) { Expect(HealthIs(health.HealthStatusHealthy)). Expect(SyncStatusIs(SyncStatusCodeSynced)) } + +func TestHelmRepoFromAliasWithAtSyntax(t *testing.T) { + SkipOnEnv(t, "HELM") + Given(t). + CustomCACertAdded(). + HelmRepoAdded("custom-repo"). + RepoURLType(RepoURLTypeHelmAlias). + Chart("helm"). + Revision("1.0.0"). + When(). + CreateApp(). + Then(). + When(). + Sync(). + Then(). + Expect(OperationPhaseIs(OperationSucceeded)). + Expect(HealthIs(health.HealthStatusHealthy)). + Expect(SyncStatusIs(SyncStatusCodeSynced)) +} + +func TestHelmRepoFromAliasWithAliasSyntax(t *testing.T) { + SkipOnEnv(t, "HELM") + Given(t). + CustomCACertAdded(). + HelmRepoAdded("custom-repo"). + RepoURLType(RepoURLTypeHelmOtherAlias). + Chart("helm"). + Revision("1.0.0"). + When(). + CreateApp(). + Then(). + When(). + Sync(). + Then(). + Expect(OperationPhaseIs(OperationSucceeded)). + Expect(HealthIs(health.HealthStatusHealthy)). + Expect(SyncStatusIs(SyncStatusCodeSynced)) +} + +func TestHelmRepoFromAliasWithSyntaxShouldFailWhenRepoIsNotAdded(t *testing.T) { + SkipOnEnv(t, "HELM") + Given(t). + CustomCACertAdded(). + RepoURLType(RepoURLTypeHelmAlias). + Chart("helm"). + Revision("1.0.0"). + When(). + IgnoreErrors(). + CreateApp(). + Then(). + Expect(Error("", "repo custom-repo not found, please add it to the repository list")) +} diff --git a/test/e2e/testdata/helm-oci-with-dependencies/Chart.lock b/test/e2e/testdata/helm-oci-with-dependencies/Chart.lock new file mode 100644 index 0000000000000..000fac97c6f26 --- /dev/null +++ b/test/e2e/testdata/helm-oci-with-dependencies/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: helm-values + repository: oci://localhost:5000/myrepo + version: 1.0.0 +digest: sha256:6b4a0c3fe7c2ccd93900024e009fbcfebc483079a15917e9f21306720edd5bab +generated: "2024-04-17T21:42:47.95449288+02:00"