mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-23 17:28:44 +00:00
Remove obsolete pods api
This commit is contained in:
parent
19c5ecdbfa
commit
820b4bac1a
4 changed files with 42 additions and 151 deletions
|
|
@ -18,7 +18,6 @@ import (
|
|||
"github.com/argoproj/argo-cd/util/kube"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/context"
|
||||
apiv1 "k8s.io/api/core/v1"
|
||||
apierr "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
|
|
@ -111,12 +110,6 @@ func (s *Server) Delete(ctx context.Context, q *DeleteApplicationRequest) (*Appl
|
|||
return &ApplicationResponse{}, nil
|
||||
}
|
||||
|
||||
// ListPods returns pods in a application
|
||||
func (s *Server) ListPods(ctx context.Context, q *ApplicationQuery) (*apiv1.PodList, error) {
|
||||
// TODO: filter by the app label
|
||||
return s.kubeclientset.CoreV1().Pods(s.ns).List(metav1.ListOptions{})
|
||||
}
|
||||
|
||||
func (s *Server) Watch(q *ApplicationQuery, ws ApplicationService_WatchServer) error {
|
||||
w, err := s.appclientset.ArgoprojV1alpha1().Applications(s.ns).Watch(metav1.ListOptions{})
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import fmt "fmt"
|
|||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
import _ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
import k8s_io_api_core_v1 "k8s.io/api/core/v1"
|
||||
import _ "k8s.io/api/core/v1"
|
||||
import github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1 "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1"
|
||||
|
||||
import (
|
||||
|
|
@ -232,8 +232,6 @@ type ApplicationServiceClient interface {
|
|||
Update(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)
|
||||
// Delete deletes an application
|
||||
Delete(ctx context.Context, in *DeleteApplicationRequest, opts ...grpc.CallOption) (*ApplicationResponse, error)
|
||||
// ListPods returns pods in an application
|
||||
ListPods(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*k8s_io_api_core_v1.PodList, error)
|
||||
// Sync syncs an application to its target state
|
||||
Sync(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*ApplicationSyncResult, error)
|
||||
}
|
||||
|
|
@ -323,15 +321,6 @@ func (c *applicationServiceClient) Delete(ctx context.Context, in *DeleteApplica
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *applicationServiceClient) ListPods(ctx context.Context, in *ApplicationQuery, opts ...grpc.CallOption) (*k8s_io_api_core_v1.PodList, error) {
|
||||
out := new(k8s_io_api_core_v1.PodList)
|
||||
err := grpc.Invoke(ctx, "/application.ApplicationService/ListPods", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *applicationServiceClient) Sync(ctx context.Context, in *ApplicationSyncRequest, opts ...grpc.CallOption) (*ApplicationSyncResult, error) {
|
||||
out := new(ApplicationSyncResult)
|
||||
err := grpc.Invoke(ctx, "/application.ApplicationService/Sync", in, out, c.cc, opts...)
|
||||
|
|
@ -356,8 +345,6 @@ type ApplicationServiceServer interface {
|
|||
Update(context.Context, *github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application) (*github_com_argoproj_argo_cd_pkg_apis_application_v1alpha1.Application, error)
|
||||
// Delete deletes an application
|
||||
Delete(context.Context, *DeleteApplicationRequest) (*ApplicationResponse, error)
|
||||
// ListPods returns pods in an application
|
||||
ListPods(context.Context, *ApplicationQuery) (*k8s_io_api_core_v1.PodList, error)
|
||||
// Sync syncs an application to its target state
|
||||
Sync(context.Context, *ApplicationSyncRequest) (*ApplicationSyncResult, error)
|
||||
}
|
||||
|
|
@ -477,24 +464,6 @@ func _ApplicationService_Delete_Handler(srv interface{}, ctx context.Context, de
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ApplicationService_ListPods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ApplicationQuery)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ApplicationServiceServer).ListPods(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/application.ApplicationService/ListPods",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApplicationServiceServer).ListPods(ctx, req.(*ApplicationQuery))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ApplicationService_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ApplicationSyncRequest)
|
||||
if err := dec(in); err != nil {
|
||||
|
|
@ -537,10 +506,6 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{
|
|||
MethodName: "Delete",
|
||||
Handler: _ApplicationService_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListPods",
|
||||
Handler: _ApplicationService_ListPods_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Sync",
|
||||
Handler: _ApplicationService_Sync_Handler,
|
||||
|
|
@ -559,47 +524,45 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{
|
|||
func init() { proto.RegisterFile("server/application/application.proto", fileDescriptor0) }
|
||||
|
||||
var fileDescriptor0 = []byte{
|
||||
// 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, 0xe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0c, 0x8b, 0x98, 0x61, 0xd4,
|
||||
0x15, 0x62, 0xf5, 0x4d, 0x51, 0x6d, 0x34, 0x10, 0xf1, 0x4e, 0x21, 0xfb, 0x65, 0x53, 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,
|
||||
// 628 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcf, 0x6e, 0xd3, 0x4e,
|
||||
0x10, 0x96, 0x9b, 0xfc, 0xf2, 0x6b, 0xb6, 0x07, 0xd0, 0xd2, 0x46, 0xc6, 0xa4, 0x22, 0xda, 0xb6,
|
||||
0xa8, 0x04, 0x61, 0x37, 0xe5, 0x82, 0x72, 0x03, 0x0a, 0x08, 0xc4, 0x01, 0x8c, 0x10, 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xa5, 0x3a, 0x17, 0x64,
|
||||
0xc2, 0x99, 0x04, 0xe2, 0x23, 0xf3, 0x04, 0x22, 0x50, 0x50, 0x49, 0x9e, 0xa5, 0x20, 0xd5, 0xa2,
|
||||
0x36, 0xb8, 0x8d, 0x9a, 0xf9, 0xaf, 0x4c, 0xa8, 0x07, 0xe6, 0x86, 0x4e, 0x4c, 0x2f, 0x70, 0x0b,
|
||||
0x35, 0xc6, 0x22, 0x9b, 0x35, 0x9d, 0x2a, 0x4e, 0xe4, 0x1d, 0x6a, 0x95, 0xfa, 0xbf, 0x1c, 0x31,
|
||||
0x6f, 0x15, 0x86, 0x85, 0x36, 0x05, 0x64, 0xa1, 0x0c, 0x39, 0x2b, 0x20, 0xce, 0xcf, 0x39, 0x82,
|
||||
0x2f, 0x46, 0x6e, 0xca, 0x34, 0xc2, 0xa6, 0x5b, 0x9c, 0x48, 0x8c, 0x76, 0xe6, 0x10, 0x64, 0x1a,
|
||||
0x29, 0x6c, 0xa2, 0xff, 0x63, 0x90, 0x92, 0x06, 0x13, 0x8c, 0xc9, 0x11, 0xf7, 0x51, 0x53, 0x80,
|
||||
0xe4, 0xa9, 0xf0, 0x40, 0x9a, 0x1b, 0x9d, 0xda, 0xe1, 0xd6, 0x71, 0xdb, 0x2e, 0x1b, 0xc2, 0x2d,
|
||||
0xb2, 0x27, 0xa0, 0x68, 0x18, 0x49, 0x77, 0x5a, 0x4e, 0xce, 0xd0, 0xa5, 0x99, 0xec, 0xc2, 0x49,
|
||||
0x30, 0xaa, 0x0f, 0x43, 0xe6, 0x17, 0x53, 0xe8, 0xb8, 0xaa, 0x60, 0x6d, 0x56, 0xc1, 0x12, 0xdd,
|
||||
0x7a, 0x85, 0xee, 0xf1, 0xef, 0x4d, 0x84, 0xcb, 0x23, 0x82, 0xc8, 0x42, 0x0f, 0xf0, 0x17, 0x03,
|
||||
0xd5, 0x9f, 0x85, 0x52, 0xe1, 0xdd, 0x0a, 0xf7, 0x59, 0x4f, 0x58, 0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bb, 0x52, 0xc3, 0x8f, 0xa8, 0x9e, 0x6f, 0x2d, 0xbc, 0xb7, 0xac,
|
||||
0x5d, 0x69, 0x6b, 0x5a, 0x64, 0x75, 0x51, 0xbe, 0xf8, 0xc8, 0x2d, 0x8d, 0x7a, 0x40, 0x3a, 0x2b,
|
||||
0x50, 0x1d, 0x39, 0x62, 0x5e, 0xdf, 0xe8, 0xde, 0x3f, 0x7a, 0x63, 0xaf, 0x7a, 0x92, 0xe6, 0x5f,
|
||||
0xce, 0xd3, 0x86, 0x7e, 0x7e, 0xee, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x64, 0x8b, 0x57, 0xe4,
|
||||
0x56, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,33 +177,6 @@ func request_ApplicationService_Delete_0(ctx context.Context, marshaler runtime.
|
|||
|
||||
}
|
||||
|
||||
func request_ApplicationService_ListPods_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
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := client.ListPods(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ApplicationSyncRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
|
@ -447,35 +420,6 @@ func RegisterApplicationServiceHandlerClient(ctx context.Context, mux *runtime.S
|
|||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_ApplicationService_ListPods_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_ListPods_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_ListPods_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_ApplicationService_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
|
|
@ -521,8 +465,6 @@ var (
|
|||
|
||||
pattern_ApplicationService_Delete_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_ListPods_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "pods"}, ""))
|
||||
|
||||
pattern_ApplicationService_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "applications", "name", "sync"}, ""))
|
||||
)
|
||||
|
||||
|
|
@ -539,7 +481,5 @@ var (
|
|||
|
||||
forward_ApplicationService_Delete_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_ApplicationService_ListPods_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_ApplicationService_Sync_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
|
|
|||
|
|
@ -84,11 +84,6 @@ service ApplicationService {
|
|||
option (google.api.http).delete = "/api/v1/applications/{name}";
|
||||
}
|
||||
|
||||
// ListPods returns pods in an application
|
||||
rpc ListPods(ApplicationQuery) returns (k8s.io.api.core.v1.PodList) {
|
||||
option (google.api.http).get = "/api/v1/applications/{name}/pods";
|
||||
}
|
||||
|
||||
// Sync syncs an application to its target state
|
||||
rpc Sync(ApplicationSyncRequest) returns (ApplicationSyncResult) {
|
||||
option (google.api.http) = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue