Skip to content

Commit 9cd2dee

Browse files
[v1.17] [GITOPS-7844]: GitOpsService controller creates default ArgoCD with v1alpha1 api version (#986)
* GitOpsService controller creates default ArgoCD with v1alpha1 api version Signed-off-by: akhil nittala <[email protected]> * GitOpsService controller creates default ArgoCD with v1alpha1 api version Signed-off-by: akhil nittala <[email protected]> --------- Signed-off-by: akhil nittala <[email protected]> Co-authored-by: akhil nittala <[email protected]>
1 parent 516cce4 commit 9cd2dee

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

controllers/argocd/argocd.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,7 @@ func NewCR(name, ns string) (*argoapp.ArgoCD, error) {
191191
if err != nil {
192192
return nil, err
193193
}
194-
195194
return &argoapp.ArgoCD{
196-
TypeMeta: metav1.TypeMeta{
197-
Kind: "ArgoCD",
198-
APIVersion: "argoproj.io/v1alpha1",
199-
},
200195
ObjectMeta: metav1.ObjectMeta{
201196
Name: name,
202197
Namespace: ns,

controllers/gitopsservice_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func (r *ReconcileGitopsService) Reconcile(ctx context.Context, request reconcil
262262
} else {
263263
// If installation of default Argo CD instance is disabled, make sure it doesn't exist,
264264
// deleting it if necessary
265-
if err := r.ensureDefaultArgoCDInstanceDoesntExist(instance, reqLogger); err != nil {
265+
if err := r.ensureDefaultArgoCDInstanceDoesntExist(); err != nil {
266266
return reconcile.Result{}, fmt.Errorf("unable to ensure non-existence of default Argo CD instance: %v", err)
267267
}
268268
}
@@ -307,7 +307,7 @@ func (r *ReconcileGitopsService) Reconcile(ctx context.Context, request reconcil
307307
}
308308
}
309309

310-
func (r *ReconcileGitopsService) ensureDefaultArgoCDInstanceDoesntExist(instance *pipelinesv1alpha1.GitopsService, reqLogger logr.Logger) error {
310+
func (r *ReconcileGitopsService) ensureDefaultArgoCDInstanceDoesntExist() error {
311311

312312
defaultArgoCDInstance, err := argocd.NewCR(common.ArgoCDInstanceName, serviceNamespace)
313313
if err != nil {

0 commit comments

Comments
 (0)