mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-23 17:28:44 +00:00
Change default connection state (#388)
This commit is contained in:
parent
f65859bc25
commit
4915490cbb
2 changed files with 3 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ func (s *Server) Create(ctx context.Context, q *ClusterCreateRequest) (*appv1.Cl
|
|||
return nil, err
|
||||
}
|
||||
|
||||
c.ConnectionState = appv1.ConnectionState{Status: appv1.ConnectionStatusSuccessful}
|
||||
clust, err := s.db.CreateCluster(ctx, c)
|
||||
if status.Convert(err).Code() == codes.AlreadyExists {
|
||||
// act idempotent if existing spec matches new spec
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ func (s *Server) Create(ctx context.Context, q *RepoCreateRequest) (*appsv1.Repo
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
r.ConnectionState = appsv1.ConnectionState{Status: appsv1.ConnectionStatusSuccessful}
|
||||
repo, err := s.db.CreateRepository(ctx, r)
|
||||
if status.Convert(err).Code() == codes.AlreadyExists {
|
||||
// act idempotent if existing spec matches new spec
|
||||
|
|
|
|||
Loading…
Reference in a new issue