Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GITOPS-3617 Create Job from Cronjob feature failing with error cannot create resource "jobs" #1219

Merged

Conversation

chengfang
Copy link
Contributor

@chengfang chengfang commented Feb 6, 2024

What type of PR is this?
/kind bug

What does this PR do / why we need it:
Add the necessary batch permissions to the policy rules for argocd server to support creating batch job

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:
https://issues.redhat.com/browse/GITOPS-3617

How to test changes / Special notes to the reviewer:
Successfully tested through manual verification in Argo CD UI:

  • build the argocd-operator images with the changes in this PR, and push to quay.io/username/argocd-operator
  • configure a new CustomCatalog in OpenShift, pointing to the above quay.io images
  • in OpenShift OperatorHub, search the modified custom argocd-operator, and install it
  • create an Argo CD instance under the installed custom argocd-operator
  • navigate to Argo CD UI, and create an Argo CD application that contains a batch job. For instance, https://github.com/chengfang/argocd-example-apps/tree/master/batch
  • in the application details page of the above application, try to create a batch job, and it should succeed. See the attached screenshot in GITOPS-3617
  • See the test result screenshot attached to the jira.

@jaideepr97
Copy link
Collaborator

@chengfang please take this out of draft state

@chengfang chengfang marked this pull request as ready for review February 7, 2024 13:36
… create resource "jobs"

Signed-off-by: Cheng Fang <cfang@redhat.com>
@chengfang
Copy link
Contributor Author

the ci job "Build and test the operator / Run e2e tests" failed this time, but they all passed yesterday.

In the log, I'm seeing errors like the following, which looks like a intermittent failure probably due to immature timeout:

Error:     case.go:256: resource ArgoCD:test-1-17-custom/example-argocd: .status.phase: value mismatch, expected: 
Available != actual: Pending

Copy link
Collaborator

@jaideepr97 jaideepr97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @chengfang

Copy link
Collaborator

@svghadi svghadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @chengfang

@svghadi svghadi merged commit 61e7020 into argoproj-labs:master Feb 9, 2024
7 checks passed
jaideepr97 pushed a commit to jaideepr97/argocd-operator that referenced this pull request Feb 13, 2024
… resource "jobs" (argoproj-labs#1219)

Signed-off-by: Cheng Fang <cfang@redhat.com>
@svghadi
Copy link
Collaborator

svghadi commented Feb 27, 2024

/cherry-pick release-0.9

@svghadi
Copy link
Collaborator

svghadi commented Feb 27, 2024

/cherry-pick release-0.9

@svghadi
Copy link
Collaborator

svghadi commented Feb 27, 2024

If we want to backport this, we will have to manually cherry-pick the change. Bot for some reason in creating PR with 0 files changed. - @chengfang

chengfang added a commit to chengfang/argocd-operator that referenced this pull request Feb 28, 2024
… resource "jobs" (argoproj-labs#1219)

Signed-off-by: Cheng Fang <cfang@redhat.com>
chengfang added a commit to chengfang/argocd-operator that referenced this pull request Feb 28, 2024
… resource "jobs" (argoproj-labs#1219)

Signed-off-by: Cheng Fang <cfang@redhat.com>
svghadi pushed a commit that referenced this pull request Feb 28, 2024
… resource "jobs" (#1219) (#1271)

Signed-off-by: Cheng Fang <cfang@redhat.com>
svghadi pushed a commit that referenced this pull request Feb 28, 2024
… resource "jobs" (#1219) (#1272)

Signed-off-by: Cheng Fang <cfang@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants