diff --git a/controller/controller.go b/controller/controller.go index 679762447e45e..65e8f88040dfd 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -144,13 +144,21 @@ func (ctrl *ApplicationController) tryRefreshAppStatus(app *appv1.Application) ( Password: "", } } + overrides := make([]*appv1.ComponentParameterOverride, len(app.Spec.Source.ComponentParameterOverrides)) + if app.Spec.Source.ComponentParameterOverrides != nil { + for i := range app.Spec.Source.ComponentParameterOverrides { + item := app.Spec.Source.ComponentParameterOverrides[i] + overrides[i] = &item + } + } revision := app.Spec.Source.TargetRevision manifestInfo, err := client.GenerateManifest(context.Background(), &repository.ManifestRequest{ - Repo: repo, - Revision: revision, - Path: app.Spec.Source.Path, - Environment: app.Spec.Source.Environment, - AppLabel: app.Name, + Repo: repo, + Revision: revision, + Path: app.Spec.Source.Path, + Environment: app.Spec.Source.Environment, + AppLabel: app.Name, + ComponentParameterOverrides: overrides, }) if err != nil { log.Errorf("Failed to load application manifest %v", err) diff --git a/pkg/apis/application/v1alpha1/generated.pb.go b/pkg/apis/application/v1alpha1/generated.pb.go index 96657caa7eb75..430a974537e27 100644 --- a/pkg/apis/application/v1alpha1/generated.pb.go +++ b/pkg/apis/application/v1alpha1/generated.pb.go @@ -19,6 +19,7 @@ ClusterConfig ClusterList ComparisonResult + ComponentParameterOverride DeploymentInfo Repository RepositoryList @@ -95,25 +96,31 @@ func (m *ComparisonResult) Reset() { *m = ComparisonResult{} func (*ComparisonResult) ProtoMessage() {} func (*ComparisonResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (m *ComponentParameterOverride) Reset() { *m = ComponentParameterOverride{} } +func (*ComponentParameterOverride) ProtoMessage() {} +func (*ComponentParameterOverride) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{11} +} + func (m *DeploymentInfo) Reset() { *m = DeploymentInfo{} } func (*DeploymentInfo) ProtoMessage() {} -func (*DeploymentInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*DeploymentInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *Repository) Reset() { *m = Repository{} } func (*Repository) ProtoMessage() {} -func (*Repository) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*Repository) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *RepositoryList) Reset() { *m = RepositoryList{} } func (*RepositoryList) ProtoMessage() {} -func (*RepositoryList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*RepositoryList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *ResourceState) Reset() { *m = ResourceState{} } func (*ResourceState) ProtoMessage() {} -func (*ResourceState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*ResourceState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *TLSClientConfig) Reset() { *m = TLSClientConfig{} } func (*TLSClientConfig) ProtoMessage() {} -func (*TLSClientConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*TLSClientConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func init() { proto.RegisterType((*Application)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application") @@ -127,6 +134,7 @@ func init() { proto.RegisterType((*ClusterConfig)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterConfig") proto.RegisterType((*ClusterList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ClusterList") proto.RegisterType((*ComparisonResult)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ComparisonResult") + proto.RegisterType((*ComponentParameterOverride)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ComponentParameterOverride") proto.RegisterType((*DeploymentInfo)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.DeploymentInfo") proto.RegisterType((*Repository)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Repository") proto.RegisterType((*RepositoryList)(nil), "github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.RepositoryList") @@ -270,6 +278,18 @@ func (m *ApplicationSource) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.TargetRevision))) i += copy(dAtA[i:], m.TargetRevision) + if len(m.ComponentParameterOverrides) > 0 { + for _, msg := range m.ComponentParameterOverrides { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -545,6 +565,36 @@ func (m *ComparisonResult) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ComponentParameterOverride) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ComponentParameterOverride) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Component))) + i += copy(dAtA[i:], m.Component) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + func (m *DeploymentInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -791,6 +841,12 @@ func (m *ApplicationSource) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.TargetRevision) n += 1 + l + sovGenerated(uint64(l)) + if len(m.ComponentParameterOverrides) > 0 { + for _, e := range m.ComponentParameterOverrides { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -890,6 +946,18 @@ func (m *ComparisonResult) Size() (n int) { return n } +func (m *ComponentParameterOverride) Size() (n int) { + var l int + _ = l + l = len(m.Component) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Value) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *DeploymentInfo) Size() (n int) { var l int _ = l @@ -1021,6 +1089,7 @@ func (this *ApplicationSource) String() string { `Path:` + fmt.Sprintf("%v", this.Path) + `,`, `Environment:` + fmt.Sprintf("%v", this.Environment) + `,`, `TargetRevision:` + fmt.Sprintf("%v", this.TargetRevision) + `,`, + `ComponentParameterOverrides:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ComponentParameterOverrides), "ComponentParameterOverride", "ComponentParameterOverride", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -1110,6 +1179,18 @@ func (this *ComparisonResult) String() string { }, "") return s } +func (this *ComponentParameterOverride) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ComponentParameterOverride{`, + `Component:` + fmt.Sprintf("%v", this.Component) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} func (this *DeploymentInfo) String() string { if this == nil { return "nil" @@ -1692,6 +1773,37 @@ func (m *ApplicationSource) Unmarshal(dAtA []byte) error { } m.TargetRevision = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ComponentParameterOverrides", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ComponentParameterOverrides = append(m.ComponentParameterOverrides, ComponentParameterOverride{}) + if err := m.ComponentParameterOverrides[len(m.ComponentParameterOverrides)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2718,6 +2830,143 @@ func (m *ComparisonResult) Unmarshal(dAtA []byte) error { } return nil } +func (m *ComponentParameterOverride) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ComponentParameterOverride: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComponentParameterOverride: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Component", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Component = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *DeploymentInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3602,91 +3851,96 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x3a, 0x8e, 0x93, 0x3c, 0x37, 0x7f, 0x3a, 0xd0, 0x62, 0xe5, 0xe0, 0x46, 0x8b, 0x80, - 0x82, 0xe8, 0x9a, 0x96, 0x7f, 0x6d, 0x91, 0x90, 0xba, 0x69, 0x50, 0x43, 0x42, 0x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0xdc, 0xed, 0x51, 0xd5, 0xba, 0x33, 0xaa, - 0x5a, 0x77, 0x47, 0x55, 0xeb, 0xde, 0xa8, 0x6a, 0xfd, 0x33, 0xaa, 0x5a, 0xdf, 0x3d, 0xac, 0xce, - 0x7d, 0xb2, 0x94, 0x9c, 0xf8, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x98, 0x93, 0x8a, 0xc3, 0x80, - 0x11, 0x00, 0x00, + // 1444 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x3a, 0x8e, 0x93, 0x3c, 0x37, 0x3f, 0x3a, 0xd0, 0x62, 0xa5, 0x92, 0x1b, 0x6d, 0x05, + 0x14, 0x44, 0xd7, 0xb4, 0xfc, 0x6a, 0x8b, 0x84, 0xd4, 0x4d, 0x83, 0x1a, 0x12, 0xda, 0x30, 0x71, + 0x41, 0x42, 0x08, 0x98, 0xac, 0xa7, 0xf6, 0xd6, 0xf6, 0xee, 0x32, 0x33, 0x76, 0xe5, 0x43, 0xa5, + 0x1e, 0xb8, 0x21, 0x10, 0x48, 0x88, 0x3f, 0x82, 0x23, 0x88, 0x1b, 0x57, 0x44, 0xc5, 0xa9, 0x12, + 0x1c, 0x2a, 0x84, 0x2a, 0x9a, 0x5e, 0xf8, 0x1b, 0x7a, 0x42, 0x33, 0x3b, 0xbb, 0x3b, 0x6b, 0xcb, + 0x34, 0xc5, 0x51, 0x6f, 0x3b, 0xef, 0x7d, 0xf3, 0xbd, 0x37, 0x6f, 0x66, 0xbe, 0x37, 0x0b, 0x1b, + 0x4d, 0x5f, 0xb4, 0x7a, 0xbb, 0x8e, 0x17, 0x76, 0x6b, 0x84, 0x35, 0xc3, 0x88, 0x85, 0xd7, 0xd5, + 0xc7, 0x29, 0xaf, 0x51, 0x8b, 0xda, 0xcd, 0x1a, 0x89, 0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x55, 0xad, 0xbb, 0x7b, 0x55, 0xeb, 0xef, 0xbd, 0xaa, 0xf5, 0xf5, 0x83, + 0xea, 0xd4, 0x87, 0x73, 0xc9, 0x8e, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x77, 0xf0, 0xfc, + 0xd6, 0x12, 0x00, 0x00, } diff --git a/pkg/apis/application/v1alpha1/generated.proto b/pkg/apis/application/v1alpha1/generated.proto index 1722ad706f4a9..9ed1818896512 100644 --- a/pkg/apis/application/v1alpha1/generated.proto +++ b/pkg/apis/application/v1alpha1/generated.proto @@ -56,6 +56,9 @@ message ApplicationSource { // TargetRevision defines the commit, tag, or branch in which to sync the application to. // If omitted, will sync to HEAD optional string targetRevision = 4; + + // Environment parameter override values + repeated ComponentParameterOverride componentParameterOverrides = 5; } // ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. @@ -140,6 +143,15 @@ message ComparisonResult { optional string error = 7; } +// ComponentParameterOverride defines overriding value for component parameter +message ComponentParameterOverride { + optional string component = 1; + + optional string name = 2; + + optional string value = 3; +} + // DeploymentInfo contains information relevant to an application deployment message DeploymentInfo { map params = 1; diff --git a/pkg/apis/application/v1alpha1/types.go b/pkg/apis/application/v1alpha1/types.go index f1f564eba9389..2b03fceecfe0c 100644 --- a/pkg/apis/application/v1alpha1/types.go +++ b/pkg/apis/application/v1alpha1/types.go @@ -56,6 +56,13 @@ type ApplicationSpec struct { Destination *ApplicationDestination `json:"destination,omitempty" protobuf:"bytes,2,opt,name=destination"` } +// ComponentParameterOverride defines overriding value for component parameter +type ComponentParameterOverride struct { + Component string `json:"component" protobuf:"bytes,1,opt,name=component"` + Name string `json:"name" protobuf:"bytes,2,opt,name=name"` + Value string `json:"value" protobuf:"bytes,3,opt,name=value"` +} + // ApplicationSource contains information about github repository, path within repository and target application environment. type ApplicationSource struct { // RepoURL is the repository URL containing the ksonnet application. @@ -67,6 +74,8 @@ type ApplicationSource struct { // TargetRevision defines the commit, tag, or branch in which to sync the application to. // If omitted, will sync to HEAD TargetRevision string `json:"targetRevision,omitempty" protobuf:"bytes,4,opt,name=targetRevision"` + // Environment parameter override values + ComponentParameterOverrides []ComponentParameterOverride `json:"componentParameterOverrides,omitempty" protobuf:"bytes,5,opt,name=componentParameterOverrides"` } // ApplicationDestination contains deployment destination information diff --git a/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go index 3fc80b637ea18..cfe21fbdf39af 100644 --- a/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/application/v1alpha1/zz_generated.deepcopy.go @@ -88,6 +88,11 @@ func (in *ApplicationList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplicationSource) DeepCopyInto(out *ApplicationSource) { *out = *in + if in.ComponentParameterOverrides != nil { + in, out := &in.ComponentParameterOverrides, &out.ComponentParameterOverrides + *out = make([]ComponentParameterOverride, len(*in)) + copy(*out, *in) + } return } @@ -104,7 +109,7 @@ func (in *ApplicationSource) DeepCopy() *ApplicationSource { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplicationSpec) DeepCopyInto(out *ApplicationSpec) { *out = *in - out.Source = in.Source + in.Source.DeepCopyInto(&out.Source) if in.Destination != nil { in, out := &in.Destination, &out.Destination if *in == nil { @@ -224,7 +229,7 @@ func (in *ClusterList) DeepCopy() *ClusterList { func (in *ComparisonResult) DeepCopyInto(out *ComparisonResult) { *out = *in in.ComparedAt.DeepCopyInto(&out.ComparedAt) - out.ComparedTo = in.ComparedTo + in.ComparedTo.DeepCopyInto(&out.ComparedTo) if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]ResourceState, len(*in)) @@ -243,6 +248,22 @@ func (in *ComparisonResult) DeepCopy() *ComparisonResult { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ComponentParameterOverride) DeepCopyInto(out *ComponentParameterOverride) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameterOverride. +func (in *ComponentParameterOverride) DeepCopy() *ComponentParameterOverride { + if in == nil { + return nil + } + out := new(ComponentParameterOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentInfo) DeepCopyInto(out *DeploymentInfo) { *out = *in diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index 741ff0091fe4f..e305a0f36064e 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -3,9 +3,7 @@ package repository import ( "encoding/json" "fmt" - "io/ioutil" "os" - "os/exec" "path" "strings" @@ -36,29 +34,16 @@ func NewService(namespace string, kubeClient kubernetes.Interface, gitClient git } } -func (s *Service) createTempRepo(appRepoPath string, appPath string, sourceEnv string, files map[string]string) (string, error) { - tmpRepoPath, err := ioutil.TempDir("", "") - if err != nil { - return "", err - } - _, err = exec.Command("cp", "-r", appRepoPath, tmpRepoPath).Output() - if err != nil { - return "", err - } - tmpRepoPath = path.Join(tmpRepoPath, path.Base(appRepoPath)) - for file, content := range files { - err = ioutil.WriteFile(path.Join(tmpRepoPath, appPath, "environments", sourceEnv, file), []byte(content), 0644) - if err != nil { - return "", err - } - } - return tmpRepoPath, nil -} - func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*ManifestResponse, error) { appRepoPath := path.Join(os.TempDir(), strings.Replace(q.Repo.Repo, "/", "_", -1)) s.repoLock.Lock(appRepoPath) - defer s.repoLock.Unlock(appRepoPath) + defer func() { + err := s.gitClient.Reset(appRepoPath) + if err != nil { + log.Warn(err) + } + s.repoLock.Unlock(appRepoPath) + }() err := s.gitClient.CloneOrFetch(q.Repo.Repo, q.Repo.Username, q.Repo.Password, q.Repo.SSHPrivateKey, appRepoPath) if err != nil { @@ -70,23 +55,20 @@ func (s *Service) GenerateManifest(c context.Context, q *ManifestRequest) (*Mani return nil, err } appPath := path.Join(appRepoPath, q.Path) - if q.InputFiles != nil && len(q.InputFiles) > 0 { - tempRepoPath, err := s.createTempRepo(appRepoPath, q.Path, q.Environment, q.InputFiles) - if err != nil { - return nil, err - } - appPath = path.Join(tempRepoPath, q.Path) - defer func() { - err := os.RemoveAll(tempRepoPath) - if err != nil { - log.Warningf("Unable to cleanup temp directory: %v", err) - } - }() - } ksApp, err := ksutil.NewKsonnetApp(appPath) if err != nil { return nil, fmt.Errorf("unable to load application from %s: %v", appPath, err) } + + if q.ComponentParameterOverrides != nil { + for _, override := range q.ComponentParameterOverrides { + err = ksApp.SetComponentParams(q.Environment, override.Component, override.Name, override.Value) + if err != nil { + return nil, err + } + } + } + appSpec := ksApp.App() env, err := appSpec.Environment(q.Environment) if err != nil { diff --git a/reposerver/repository/repository.pb.go b/reposerver/repository/repository.pb.go index 3ba7018220c47..a672e8646fca2 100644 --- a/reposerver/repository/repository.pb.go +++ b/reposerver/repository/repository.pb.go @@ -41,12 +41,12 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // ManifestRequest is a query for manifest generation. type ManifestRequest struct { - Repo *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"` - Revision string `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"` - Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` - Environment string `protobuf:"bytes,4,opt,name=environment" json:"environment,omitempty"` - AppLabel string `protobuf:"bytes,5,opt,name=appLabel" json:"appLabel,omitempty"` - InputFiles map[string]string `protobuf:"bytes,6,rep,name=inputFiles" json:"inputFiles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Repo *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo" json:"repo,omitempty"` + Revision string `protobuf:"bytes,2,opt,name=revision" json:"revision,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` + Environment string `protobuf:"bytes,4,opt,name=environment" json:"environment,omitempty"` + AppLabel string `protobuf:"bytes,5,opt,name=appLabel" json:"appLabel,omitempty"` + ComponentParameterOverrides []*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ComponentParameterOverride `protobuf:"bytes,6,rep,name=componentParameterOverrides" json:"componentParameterOverrides,omitempty"` } func (m *ManifestRequest) Reset() { *m = ManifestRequest{} } @@ -89,9 +89,9 @@ func (m *ManifestRequest) GetAppLabel() string { return "" } -func (m *ManifestRequest) GetInputFiles() map[string]string { +func (m *ManifestRequest) GetComponentParameterOverrides() []*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ComponentParameterOverride { if m != nil { - return m.InputFiles + return m.ComponentParameterOverrides } return nil } @@ -303,38 +303,38 @@ var _RepositoryService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("reposerver/repository/repository.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 527 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xd1, 0x8a, 0xd3, 0x4c, - 0x14, 0xde, 0xb4, 0xdd, 0xf2, 0xf7, 0xf4, 0x87, 0xed, 0x0e, 0x8b, 0x84, 0x58, 0xa1, 0xe4, 0x42, - 0x2a, 0xe2, 0x84, 0x76, 0x6f, 0x56, 0xc1, 0x0b, 0x85, 0xba, 0x2c, 0xba, 0x28, 0xf1, 0x4a, 0x6f, - 0x64, 0x9a, 0x9e, 0x4d, 0xc7, 0xa6, 0x33, 0xe3, 0xcc, 0x34, 0xd0, 0xc7, 0xf0, 0x59, 0x7c, 0x00, - 0xdf, 0xc6, 0xe7, 0x90, 0x4c, 0xd2, 0x26, 0xec, 0xae, 0x05, 0x2f, 0xbd, 0x3b, 0xe7, 0x3b, 0x67, - 0xbe, 0x2f, 0xdf, 0x39, 0x93, 0x81, 0xc7, 0x1a, 0x95, 0x34, 0xa8, 0x73, 0xd4, 0x91, 0x0b, 0xb9, - 0x95, 0x7a, 0xdb, 0x08, 0xa9, 0xd2, 0xd2, 0x4a, 0x02, 0x35, 0x12, 0x9c, 0xa5, 0x32, 0x95, 0x0e, - 0x8e, 0x8a, 0xa8, 0xec, 0x08, 0x86, 0xa9, 0x94, 0x69, 0x86, 0x11, 0x53, 0x3c, 0x62, 0x42, 0x48, - 0xcb, 0x2c, 0x97, 0xc2, 0x54, 0xd5, 0x70, 0x75, 0x61, 0x28, 0x97, 0xae, 0x9a, 0x48, 0x8d, 0x51, - 0x3e, 0x89, 0x52, 0x14, 0xa8, 0x99, 0xc5, 0x45, 0xd5, 0x73, 0x95, 0x72, 0xbb, 0xdc, 0xcc, 0x69, - 0x22, 0xd7, 0x11, 0xd3, 0x4e, 0xe2, 0xab, 0x0b, 0x9e, 0x25, 0x8b, 0x48, 0xad, 0xd2, 0xe2, 0xb0, - 0x89, 0x98, 0x52, 0x19, 0x4f, 0x1c, 0x79, 0x94, 0x4f, 0x58, 0xa6, 0x96, 0xec, 0x0e, 0x55, 0xf8, - 0xab, 0x05, 0x27, 0xd7, 0x4c, 0xf0, 0x1b, 0x34, 0x36, 0xc6, 0x6f, 0x1b, 0x34, 0x96, 0x7c, 0x82, - 0x4e, 0x61, 0xc2, 0xf7, 0x46, 0xde, 0xb8, 0x3f, 0x9d, 0xd1, 0x5a, 0x8d, 0xee, 0xd4, 0x5c, 0xf0, - 0x25, 0x59, 0x50, 0xb5, 0x4a, 0x69, 0xa1, 0x46, 0x1b, 0x6a, 0x74, 0xa7, 0x46, 0xe3, 0xfd, 0x2c, - 0x62, 0x47, 0x49, 0x02, 0xf8, 0x4f, 0x63, 0xce, 0x0d, 0x97, 0xc2, 0x6f, 0x8d, 0xbc, 0x71, 0x2f, - 0xde, 0xe7, 0x84, 0x40, 0x47, 0x31, 0xbb, 0xf4, 0xdb, 0x0e, 0x77,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 0x9c, 0xd6, 0xd6, 0x3f, 0xa2, 0xce, 0x79, 0x82, 0xe4, 0x3d, 0x0c, 0x2e, 0xab, 0xff, - 0x69, 0xb7, 0x5b, 0xf2, 0xf0, 0xc0, 0xfd, 0x0a, 0x86, 0xf7, 0x17, 0xcb, 0x6f, 0x0e, 0x8f, 0xc8, - 0x35, 0xfc, 0x7f, 0x89, 0x76, 0xef, 0x86, 0x0c, 0xff, 0x60, 0xb2, 0x64, 0x7b, 0x74, 0x70, 0x04, - 0xe1, 0xd1, 0xeb, 0xf3, 0xcf, 0x93, 0x43, 0x2f, 0xc5, 0xbd, 0x2f, 0xda, 0xbc, 0xeb, 0x1e, 0x86, - 0xf3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xc2, 0xcc, 0xf4, 0xf1, 0x04, 0x00, 0x00, + // 528 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x41, 0x8e, 0xd3, 0x30, + 0x14, 0x9d, 0xb4, 0x9d, 0x8a, 0xfe, 0x22, 0xd1, 0xb1, 0x46, 0x28, 0xea, 0x14, 0xa9, 0xca, 0x02, + 0x95, 0x05, 0x8e, 0xda, 0xd9, 0x0c, 0xec, 0x00, 0x55, 0x23, 0x24, 0x46, 0x83, 0x82, 0x58, 0xc0, + 0x06, 0xb9, 0xe9, 0x9f, 0xd4, 0xb4, 0xb1, 0x8d, 0xed, 0x46, 0xea, 0x31, 0x58, 0x71, 0x10, 0x0e, + 0xc0, 0xa5, 0x38, 0x00, 0x8a, 0x93, 0x34, 0x11, 0x33, 0xd3, 0x0d, 0x2b, 0x76, 0xef, 0xbf, 0xef, + 0xbc, 0xe7, 0xff, 0x1c, 0x1b, 0x9e, 0x6a, 0x54, 0xd2, 0xa0, 0xce, 0x50, 0x87, 0x0e, 0x72, 0x2b, + 0xf5, 0xae, 0x01, 0xa9, 0xd2, 0xd2, 0x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 0x9c, 0x35, 0xf7, 0xf5, 0xd7, 0x3d, 0x1b, 0x8e, 0xee, 0x6e, 0x16, 0x7b, 0x0e, 0x8e, + 0xc8, 0x15, 0x3c, 0xbc, 0x44, 0xbb, 0x9f, 0x86, 0x8c, 0xee, 0x19, 0xb2, 0x50, 0x7b, 0x72, 0x30, + 0x82, 0xe0, 0xe8, 0xf5, 0xf9, 0xe7, 0xe9, 0xa1, 0x77, 0xe3, 0xce, 0xf7, 0x6d, 0xd1, 0x75, 0xcf, + 0xc4, 0xf9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x27, 0xe7, 0x4a, 0xc5, 0xff, 0x04, 0x00, 0x00, } diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index 2652520ba6e8e..9917941316e57 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -15,7 +15,7 @@ message ManifestRequest { string path = 3; string environment = 4; string appLabel = 5; - map inputFiles = 6; + repeated github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ComponentParameterOverride componentParameterOverrides = 6; } message ManifestResponse { diff --git a/server/application/application.go b/server/application/application.go index e3a905bedaab6..0e833b6276711 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -1,9 +1,7 @@ package application import ( - "encoding/json" "fmt" - "strings" "github.com/argoproj/argo-cd/common" appv1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" @@ -16,7 +14,6 @@ import ( argoutil "github.com/argoproj/argo-cd/util/argo" "github.com/argoproj/argo-cd/util/diff" "github.com/argoproj/argo-cd/util/kube" - "github.com/pborman/uuid" log "github.com/sirupsen/logrus" "golang.org/x/net/context" apiv1 "k8s.io/api/core/v1" @@ -132,27 +129,6 @@ func (s *Server) Watch(q *ApplicationQuery, ws ApplicationService_WatchServer) e return nil } -func (s *Server) DeployEphemeral(ctx context.Context, req *DeployEphemeralRequest) (*DeployEphemeralResponse, error) { - appName := "app-" + strings.ToLower(uuid.NewRandom().String()) - if req.InputFiles == nil { - req.InputFiles = make(map[string]string) - } - envFileData, err := json.Marshal(map[string]string{"id": appName}) - if err != nil { - return nil, err - } - req.InputFiles["env.libsonnet"] = string(envFileData) - deployResult, err := s.deploy(ctx, *req.Source, req.Destination, appName, req.InputFiles, req.DryRun) - if err != nil { - return nil, err - } - - return &DeployEphemeralResponse{ - AppName: appName, - DeployResult: deployResult, - }, nil -} - // Sync syncs an application to its target state func (s *Server) Sync(ctx context.Context, syncReq *ApplicationSyncRequest) (*ApplicationSyncResult, error) { log.Infof("Syncing application %s", syncReq.Name) @@ -185,7 +161,7 @@ func (s *Server) Sync(ctx context.Context, syncReq *ApplicationSyncRequest) (*Ap } log.Infof("Received deployment params: %s", deploymentInfo.Params) - res, err := s.deploy(ctx, app.Spec.Source, app.Spec.Destination, app.Name, nil, syncReq.DryRun) + res, err := s.deploy(ctx, app.Spec.Source, app.Spec.Destination, app.Name, syncReq.DryRun) if err == nil { // Persist app deployment info app.Status.RecentDeployment.Params = deploymentInfo.Params @@ -211,7 +187,6 @@ func (s *Server) deploy( source appv1.ApplicationSource, destination *appv1.ApplicationDestination, appLabel string, - inputFiles map[string]string, dryRun bool) (*ApplicationSyncResult, error) { repo := s.getRepo(ctx, source.RepoURL) @@ -220,14 +195,21 @@ func (s *Server) deploy( return nil, err } defer util.Close(conn) + overrides := make([]*appv1.ComponentParameterOverride, len(source.ComponentParameterOverrides)) + if source.ComponentParameterOverrides != nil { + for i := range source.ComponentParameterOverrides { + item := source.ComponentParameterOverrides[i] + overrides[i] = &item + } + } manifestInfo, err := repoClient.GenerateManifest(ctx, &repository.ManifestRequest{ - Repo: repo, - Environment: source.Environment, - Path: source.Path, - Revision: source.TargetRevision, - InputFiles: inputFiles, - AppLabel: appLabel, + Repo: repo, + Environment: source.Environment, + Path: source.Path, + Revision: source.TargetRevision, + ComponentParameterOverrides: overrides, + AppLabel: appLabel, }) if err != nil { return nil, err diff --git a/server/application/application.pb.go b/server/application/application.pb.go index b79f2de4c746f..17395990373f8 100644 --- a/server/application/application.pb.go +++ b/server/application/application.pb.go @@ -18,8 +18,6 @@ It has these top-level messages: ApplicationSyncRequest ApplicationSyncResult ResourceDetails - DeployEphemeralRequest - DeployEphemeralResponse */ package application @@ -202,70 +200,6 @@ func (m *ResourceDetails) GetMessage() string { return "" } -type DeployEphemeralRequest struct { - Source *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ApplicationSource `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"` - Destination *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ApplicationDestination `protobuf:"bytes,2,opt,name=destination" json:"destination,omitempty"` - DryRun bool `protobuf:"varint,3,opt,name=dryRun" json:"dryRun,omitempty"` - InputFiles map[string]string `protobuf:"bytes,4,rep,name=inputFiles" json:"inputFiles,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *DeployEphemeralRequest) Reset() { *m = DeployEphemeralRequest{} } -func (m *DeployEphemeralRequest) String() string { return proto.CompactTextString(m) } -func (*DeployEphemeralRequest) ProtoMessage() {} -func (*DeployEphemeralRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *DeployEphemeralRequest) GetSource() *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ApplicationSource { - if m != nil { - return m.Source - } - return nil -} - -func (m *DeployEphemeralRequest) GetDestination() *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.ApplicationDestination { - if m != nil { - return m.Destination - } - return nil -} - -func (m *DeployEphemeralRequest) GetDryRun() bool { - if m != nil { - return m.DryRun - } - return false -} - -func (m *DeployEphemeralRequest) GetInputFiles() map[string]string { - if m != nil { - return m.InputFiles - } - return nil -} - -type DeployEphemeralResponse struct { - AppName string `protobuf:"bytes,1,opt,name=appName" json:"appName,omitempty"` - DeployResult *ApplicationSyncResult `protobuf:"bytes,2,opt,name=deployResult" json:"deployResult,omitempty"` -} - -func (m *DeployEphemeralResponse) Reset() { *m = DeployEphemeralResponse{} } -func (m *DeployEphemeralResponse) String() string { return proto.CompactTextString(m) } -func (*DeployEphemeralResponse) ProtoMessage() {} -func (*DeployEphemeralResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *DeployEphemeralResponse) GetAppName() string { - if m != nil { - return m.AppName - } - return "" -} - -func (m *DeployEphemeralResponse) GetDeployResult() *ApplicationSyncResult { - if m != nil { - return m.DeployResult - } - return nil -} - func init() { proto.RegisterType((*ApplicationQuery)(nil), "application.ApplicationQuery") proto.RegisterType((*ApplicationResponse)(nil), "application.ApplicationResponse") @@ -273,8 +207,6 @@ func init() { proto.RegisterType((*ApplicationSyncRequest)(nil), "application.ApplicationSyncRequest") proto.RegisterType((*ApplicationSyncResult)(nil), "application.ApplicationSyncResult") proto.RegisterType((*ResourceDetails)(nil), "application.ResourceDetails") - proto.RegisterType((*DeployEphemeralRequest)(nil), "application.DeployEphemeralRequest") - proto.RegisterType((*DeployEphemeralResponse)(nil), "application.DeployEphemeralResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -294,8 +226,6 @@ type ApplicationServiceClient interface { Watch(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (ApplicationService_WatchClient, error) // Create creates an application Create(ctx context.Context, in *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error) - // DeployEphemeral deployes short living application - DeployEphemeral(ctx context.Context, in *DeployEphemeralRequest, opts ...grpc.CallOption) (*DeployEphemeralResponse, error) // Get returns an application by name Get(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error) // Update updates an application @@ -366,15 +296,6 @@ func (c *applicationServiceClient) Create(ctx context.Context, in *github_com_ar return out, nil } -func (c *applicationServiceClient) DeployEphemeral(ctx context.Context, in *DeployEphemeralRequest, opts ...grpc.CallOption) (*DeployEphemeralResponse, error) { - out := new(DeployEphemeralResponse) - err := grpc.Invoke(ctx, "/application.ApplicationService/DeployEphemeral", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *applicationServiceClient) Get(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error) { out := new(github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application) err := grpc.Invoke(ctx, "/application.ApplicationService/Get", in, out, c.cc, opts...) @@ -429,8 +350,6 @@ type ApplicationServiceServer interface { Watch(*ApplicationQuery, ApplicationService_WatchServer) error // Create creates an application Create(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error) - // DeployEphemeral deployes short living application - DeployEphemeral(context.Context, *DeployEphemeralRequest) (*DeployEphemeralResponse, error) // Get returns an application by name Get(context.Context, *ApplicationQuery) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error) // Update updates an application @@ -504,24 +423,6 @@ func _ApplicationService_Create_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _ApplicationService_DeployEphemeral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeployEphemeralRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ApplicationServiceServer).DeployEphemeral(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/application.ApplicationService/DeployEphemeral", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ApplicationServiceServer).DeployEphemeral(ctx, req.(*DeployEphemeralRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _ApplicationService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ApplicationQuery) if err := dec(in); err != nil { @@ -624,10 +525,6 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ MethodName: "Create", Handler: _ApplicationService_Create_Handler, }, - { - MethodName: "DeployEphemeral", - Handler: _ApplicationService_DeployEphemeral_Handler, - }, { MethodName: "Get", Handler: _ApplicationService_Get_Handler, @@ -662,59 +559,47 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("server/application/application.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0x96, 0xb3, 0xdb, 0x25, 0x79, 0x8b, 0x94, 0x6a, 0x48, 0xc3, 0xe2, 0xa6, 0x10, 0x4d, 0x52, - 0x94, 0x06, 0x31, 0x6e, 0xd2, 0x4b, 0x15, 0x89, 0x03, 0x90, 0x04, 0x15, 0x55, 0x28, 0x75, 0x85, - 0x90, 0xb8, 0xc0, 0xd4, 0x7e, 0x72, 0xcc, 0x7a, 0x3d, 0xd3, 0x99, 0x59, 0x4b, 0xab, 0xc2, 0x85, - 0x0b, 0x47, 0x84, 0xf8, 0x01, 0xfd, 0x1d, 0xfc, 0x04, 0xce, 0x48, 0xfc, 0x02, 0x7e, 0x08, 0x9a, - 0x59, 0x3b, 0x6b, 0xef, 0x3a, 0x9b, 0x1e, 0xf6, 0xd0, 0x93, 0x67, 0xfc, 0xde, 0xbc, 0xef, 0x7b, - 0xdf, 0x7b, 0x7e, 0x1e, 0xd8, 0xd7, 0xa8, 0x0a, 0x54, 0x01, 0x97, 0x32, 0x4b, 0x23, 0x6e, 0x52, - 0x91, 0xd7, 0xd7, 0x4c, 0x2a, 0x61, 0x04, 0xe9, 0xd7, 0x5e, 0xf9, 0x5b, 0x89, 0x48, 0x84, 0x7b, - 0x1f, 0xd8, 0xd5, 0xd4, 0xc5, 0xdf, 0x49, 0x84, 0x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a3, 0x1f, 0xb6, 0xe1, 0x07, 0x58, 0xf9, - 0x5b, 0x26, 0x7f, 0x78, 0xd0, 0xf9, 0x0a, 0x6f, 0x6c, 0xbc, 0x55, 0x29, 0xb3, 0x50, 0xdb, 0x06, - 0xb3, 0x57, 0x76, 0xc2, 0xfe, 0x42, 0xfe, 0xf6, 0xa0, 0xf7, 0xad, 0x8c, 0xdf, 0xc6, 0xca, 0x06, - 0x8e, 0xff, 0x03, 0x7f, 0xbf, 0x9d, 0xff, 0x08, 0x0d, 0x8f, 0xb9, 0xe1, 0xcc, 0x25, 0x62, 0xf5, - 0x2d, 0xa0, 0x37, 0xfd, 0x73, 0x93, 0xfb, 0x73, 0xa5, 0x6b, 0xff, 0x9d, 0xfb, 0xbb, 0xd7, 0x15, - 0xe2, 0xaa, 0xba, 0xa5, 0x86, 0x87, 0x4b, 0x35, 0x94, 0xb0, 0x6e, 0xbf, 0xf2, 0x0b, 0x11, 0xeb, - 0x9b, 0x6a, 0x7b, 0x97, 0x4d, 0xef, 0x42, 0x56, 0x02, 0x66, 0xef, 0x42, 0xac, 0x38, 0x62, 0x17, - 0x22, 0x76, 0x53, 0xe2, 0xc0, 0x81, 0x51, 0xb2, 0xbb, 0x04, 0x2c, 0x90, 0x16, 0xe5, 0x67, 0xe8, - 0xda, 0xb1, 0x37, 0xd7, 0xc7, 0xed, 0x17, 0x0a, 0xff, 0x0d, 0x26, 0x27, 0xfd, 0xc4, 0x41, 0xdf, - 0xa7, 0x4b, 0xa1, 0xf5, 0x24, 0x8f, 0x4e, 0xbc, 0xc3, 0x2f, 0x1e, 0x7e, 0xcf, 0x96, 0xdd, 0xd6, - 0x16, 0x2f, 0x95, 0x2f, 0x7a, 0xee, 0x66, 0xf6, 0xe8, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, - 0x38, 0x0e, 0x65, 0x71, 0x0a, 0x00, 0x00, + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xc1, 0x6e, 0x13, 0x3d, + 0x10, 0xd6, 0x36, 0xf9, 0xf3, 0x37, 0xee, 0x01, 0x64, 0xda, 0x2a, 0x6c, 0x53, 0x11, 0xb9, 0x2d, + 0x2a, 0x45, 0x78, 0x9b, 0x72, 0x41, 0xbd, 0x01, 0x05, 0x04, 0xe2, 0x50, 0x82, 0x10, 0x12, 0x17, + 0x70, 0x77, 0x47, 0xdb, 0x25, 0x89, 0xed, 0xda, 0xce, 0x4a, 0x11, 0x70, 0xe1, 0x05, 0x10, 0xe2, + 0x01, 0x78, 0x0e, 0x1e, 0x01, 0x89, 0x1b, 0xaf, 0xc0, 0x83, 0x20, 0x3b, 0x9b, 0x66, 0xb7, 0x49, + 0x37, 0x97, 0x1c, 0x38, 0x65, 0xec, 0x99, 0xcc, 0xf7, 0xcd, 0xe7, 0xd9, 0x19, 0xb4, 0xad, 0x41, + 0xa5, 0xa0, 0x02, 0x26, 0x65, 0x2f, 0x09, 0x99, 0x49, 0x04, 0xcf, 0xdb, 0x54, 0x2a, 0x61, 0x04, + 0x5e, 0xc9, 0x5d, 0xf9, 0xab, 0xb1, 0x88, 0x85, 0xbb, 0x0f, 0xac, 0x35, 0x0a, 0xf1, 0x9b, 0xb1, + 0x10, 0x71, 0x0f, 0x02, 0x26, 0x93, 0x80, 0x71, 0x2e, 0x8c, 0x0b, 0xd6, 0x99, 0x97, 0x74, 0xef, + 0x69, 0x9a, 0x08, 0xe7, 0x0d, 0x85, 0x82, 0x20, 0x6d, 0x07, 0x31, 0x70, 0x50, 0xcc, 0x40, 0x94, + 0xc5, 0x3c, 0x8d, 0x13, 0x73, 0x3a, 0x38, 0xa1, 0xa1, 0xe8, 0x07, 0x4c, 0x39, 0x88, 0xf7, 0xce, + 0xb8, 0x13, 0x46, 0x81, 0xec, 0xc6, 0xf6, 0xcf, 0xba, 0x40, 0x34, 0x6d, 0xb3, 0x9e, 0x3c, 0x65, + 0x53, 0xa9, 0xc8, 0x4d, 0x74, 0xf5, 0xfe, 0x24, 0xee, 0xc5, 0x00, 0xd4, 0x10, 0x63, 0x54, 0xe5, + 0xac, 0x0f, 0x0d, 0xaf, 0xe5, 0xed, 0xd6, 0x3b, 0xce, 0x26, 0x6b, 0xe8, 0x5a, 0x2e, 0xae, 0x03, + 0x5a, 0x0a, 0xae, 0x81, 0x44, 0xa8, 0x71, 0x04, 0x3d, 0x30, 0x50, 0x70, 0x9e, 0x0d, 0x40, 0x9b, + 0x59, 0x69, 0x70, 0x13, 0xd5, 0xed, 0xaf, 0x96, 0x2c, 0x84, 0xc6, 0x92, 0x73, 0x4c, 0x2e, 0xf0, + 0x3a, 0xaa, 0x8d, 0x44, 0x6e, 0x54, 0x9c, 0x2b, 0x3b, 0x91, 0x77, 0x68, 0x3d, 0x97, 0xff, 0xe5, + 0x90, 0x87, 0x65, 0x18, 0x3e, 0x5a, 0x56, 0x90, 0x26, 0x3a, 0x11, 0x3c, 0x83, 0x38, 0x3f, 0x5b, + 0x84, 0x48, 0x0d, 0x3b, 0x03, 0xee, 0x10, 0x96, 0x3b, 0xd9, 0x89, 0xf4, 0xd1, 0xda, 0x14, 0x82, + 0x1e, 0xf4, 0x0c, 0x6e, 0xa0, 0xff, 0xfb, 0xa0, 0x35, 0x8b, 0xc7, 0x18, 0xe3, 0x23, 0x3e, 0x44, + 0x75, 0x05, 0x5a, 0x0c, 0x54, 0x08, 0xba, 0xb1, 0xd4, 0xaa, 0xec, 0xae, 0x1c, 0x34, 0x69, 0xbe, + 0x21, 0x3a, 0x99, 0xf7, 0x08, 0x0c, 0x4b, 0x7a, 0xba, 0x33, 0x09, 0x27, 0x67, 0xe8, 0xca, 0x05, + 0xef, 0xcc, 0x4a, 0x30, 0xaa, 0x76, 0x13, 0x1e, 0x65, 0x55, 0x38, 0xbb, 0xa8, 0x60, 0xe5, 0xa2, + 0x82, 0x39, 0xba, 0xd5, 0x02, 0xdd, 0x83, 0x5f, 0x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x53, 0xd2, 0x6f, + 0x5d, 0xf6, 0x10, 0xe7, 0x33, 0x36, 0xd3, 0x70, 0xaf, 0x54, 0x43, 0x89, 0x96, 0xed, 0xb7, 0x75, + 0x2c, 0x22, 0x3d, 0xef, 0x6d, 0x37, 0xe8, 0x68, 0xc5, 0x58, 0x09, 0xa8, 0x5d, 0x31, 0x34, 0x6d, + 0xd3, 0x63, 0x11, 0xb9, 0x6f, 0x73, 0xd7, 0x81, 0x11, 0xdc, 0x2a, 0x01, 0x0b, 0xa4, 0x45, 0xf9, + 0x88, 0xaa, 0x76, 0x4e, 0xe2, 0xad, 0xcb, 0xd0, 0x72, 0x73, 0xda, 0x27, 0xe5, 0x41, 0x76, 0xd4, + 0x92, 0xdb, 0x0e, 0x7a, 0x87, 0x94, 0x42, 0xeb, 0x21, 0x0f, 0x0f, 0xbd, 0xbd, 0x07, 0xfb, 0x6f, + 0x68, 0xd9, 0x12, 0x9c, 0xde, 0xd5, 0x27, 0x35, 0xb7, 0xf0, 0xee, 0xfe, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x59, 0xc1, 0xed, 0x1e, 0xc8, 0x07, 0x00, 0x00, } diff --git a/server/application/application.pb.gw.go b/server/application/application.pb.gw.go index 5815f5b28f06d..007dd04ea7c7f 100644 --- a/server/application/application.pb.gw.go +++ b/server/application/application.pb.gw.go @@ -84,19 +84,6 @@ func request_ApplicationService_Create_0(ctx context.Context, marshaler runtime. } -func request_ApplicationService_DeployEphemeral_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeployEphemeralRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeployEphemeral(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - func request_ApplicationService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ApplicationQuery var metadata runtime.ServerMetadata @@ -373,35 +360,6 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S }) - mux.Handle("POST", pattern_ApplicationService_DeployEphemeral_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - if cn, ok := w.(http.CloseNotifier); ok { - go func(done <-chan struct{}, closed <-chan bool) { - select { - case <-done: - case <-closed: - cancel() - } - }(ctx.Done(), cn.CloseNotify()) - } - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ApplicationService_DeployEphemeral_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ApplicationService_DeployEphemeral_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_ApplicationService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -557,8 +515,6 @@ var ( pattern_ApplicationService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "applications"}, "")) - pattern_ApplicationService_DeployEphemeral_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "applications", "ephemeral"}, "")) - pattern_ApplicationService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "name"}, "")) pattern_ApplicationService_Update_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "applications", "metadata.name"}, "")) @@ -577,8 +533,6 @@ var ( forward_ApplicationService_Create_0 = runtime.ForwardResponseMessage - forward_ApplicationService_DeployEphemeral_0 = runtime.ForwardResponseMessage - forward_ApplicationService_Get_0 = runtime.ForwardResponseMessage forward_ApplicationService_Update_0 = runtime.ForwardResponseMessage diff --git a/server/application/application.proto b/server/application/application.proto index 5a77b648e2e44..4ee92cf731a32 100644 --- a/server/application/application.proto +++ b/server/application/application.proto @@ -45,18 +45,6 @@ message ResourceDetails { string message = 4; } -message DeployEphemeralRequest { - github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationSource source = 1; - github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.ApplicationDestination destination = 2; - bool dryRun = 3; - map inputFiles = 4; -} - -message DeployEphemeralResponse { - string appName = 1; - ApplicationSyncResult deployResult = 2; -} - // ApplicationService service ApplicationService { @@ -78,14 +66,6 @@ service ApplicationService { }; } - // DeployEphemeral deployes short living application - rpc DeployEphemeral(DeployEphemeralRequest) returns (DeployEphemeralResponse) { - option (google.api.http) = { - post: "/api/v1/applications/ephemeral" - body: "*" - }; - } - // Get returns an application by name rpc Get(ApplicationQuery) returns (github.com.argoproj.argo_cd.pkg.apis.application.v1alpha1.Application) { option (google.api.http).get = "/api/v1/applications/{name}"; diff --git a/test/e2e/fixture.go b/test/e2e/fixture.go index 0eb447fb1f8e0..d02edb116655d 100644 --- a/test/e2e/fixture.go +++ b/test/e2e/fixture.go @@ -198,3 +198,8 @@ func (c *FakeGitClient) Checkout(repoPath string, sha string) error { // do nothing return nil } + +func (c *FakeGitClient) Reset(repoPath string) error { + // do nothing + return nil +} diff --git a/util/git/client.go b/util/git/client.go index 06e6f8ec03e9b..942ef96666e19 100644 --- a/util/git/client.go +++ b/util/git/client.go @@ -13,6 +13,7 @@ import ( type Client interface { CloneOrFetch(url string, username string, password string, sshPrivateKey string, repoPath string) error Checkout(repoPath string, sha string) error + Reset(repoPath string) error } // NativeGitClient implements Client interface using git CLI @@ -72,6 +73,18 @@ func (m *NativeGitClient) CloneOrFetch(repo string, username string, password st return nil } +// Reset resets local changes +func (m *NativeGitClient) Reset(repoPath string) error { + cmd := exec.Command("sh", "-c", "git reset --hard HEAD && git clean -f") + cmd.Dir = repoPath + _, err := cmd.Output() + if err != nil { + return fmt.Errorf("unable to reset repository %s: %v", repoPath, err) + } + + return nil +} + // Checkout checkout specified git sha func (m *NativeGitClient) Checkout(repoPath string, sha string) error { if sha == "" { diff --git a/util/ksonnet/ksonnet.go b/util/ksonnet/ksonnet.go index 6b8ba58578410..680262dbc48d3 100644 --- a/util/ksonnet/ksonnet.go +++ b/util/ksonnet/ksonnet.go @@ -31,6 +31,9 @@ type KsonnetApp interface { // Show returns a list of unstructured objects that would be applied to an environment Show(environment string) ([]*unstructured.Unstructured, error) ListEnvParams(environment string) (map[string]string, error) + + // SetComponentParams updates component parameter in specified environment. + SetComponentParams(environment string, component string, param string, value string) error } type ksonnetApp struct { @@ -129,3 +132,9 @@ func (k *ksonnetApp) ListEnvParams(environment string) (params map[string]string } return } + +// SetComponentParams updates component parameter in specified environment. +func (k *ksonnetApp) SetComponentParams(environment string, component string, param string, value string) error { + _, err := k.ksCmd("param", "set", component, param, value, "--env", environment) + return err +}