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

feat(executor): Support K8S JSON patch with resource template. Closes #4883 #4908

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

book987
Copy link
Contributor

@book987 book987 commented Jan 20, 2021

#4883

Checklist:

@alexec
Copy link
Contributor

alexec commented Jan 20, 2021

Failing test

   --- FAIL: TestFunctionalSuite/TestK8SJSONPatch (4.45s)
        functional_test.go:1028: 
            	Error Trace:	functional_test.go:1028
            	            				then.go:57
            	            				then.go:32
            	            				functional_test.go:1025
            	Error:      	Not equal: 
            	            	expected: ""
            	            	actual  : "Error from server (Forbidden): error when retrieving current configuration of:\nResource: \"/v1, Resource=serviceaccounts\", GroupVersionKind: \"/v1, Kind=ServiceAccount\"\nName: \"test-sa\", Namespace: \"argo\"\nfrom server for: \"/tmp/manifest.yaml\": serviceaccounts \"test-sa\" is forbidden: User \"system:serviceaccount:argo:default\" cannot get resource \"serviceaccounts\" in API group \"\" in the namespace \"argo\"\nError from server (Forbidden): error when retrieving current configuration of:\nResource: \"rbac.authorization.k8s.io/v1, Resource=roles\", GroupVersionKind: \"rbac.authorization.k8s.io/v1, Kind=Role\"\nName: \"test-role\", Namespace: \"argo\"\nfrom server for: \"/tmp/manifest.yaml\": roles.rbac.authorization.k8s.io \"test-role\" is forbidden: User \"system:serviceaccount:argo:default\" cannot get resource \"roles\" in API group \"rbac.authorization.k8s.io\" in the namespace \"argo\"\nError from server (Forbidden): error when retrieving current configuration of:\nResource: \"rbac.authorization.k8s.io/v1, Resource=rolebindings\", GroupVersionKind: \"rbac.authorization.k8s.io/v1, Kind=RoleBinding\"\nName: \"test-role-binding\", Namespace: \"argo\"\nfrom server for: \"/tmp/manifest.yaml\": rolebindings.rbac.authorization.k8s.io \"test-role-binding\" is forbidden: User \"system:serviceaccount:argo:default\" cannot get resource \"rolebindings\" in API group \"rbac.authorization.k8s.io\" in the namespace \"argo\""

I think you need to look at workflow-role.yaml to see what permissions you have. I suggest that you have pod patch so maybe change the resource to a pod.

@book987 book987 force-pushed the dev branch 2 times, most recently from c34593e to 8a59c5a Compare January 21, 2021 06:23
Signed-off-by: book987 <book78987book@gmail.com>
@book987
Copy link
Contributor Author

book987 commented Jan 21, 2021

I suggest that you have pod patch so maybe change the resource to a pod.

It works! Thanks!

Copy link
Contributor

@alexec alexec left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexec alexec changed the title feat: support K8S json patch feat(controller): Support K8S JSON patch with resource template. Closes #4883 Jan 21, 2021
@alexec alexec linked an issue Jan 21, 2021 that may be closed by this pull request
@alexec alexec merged commit 6e961ec into argoproj:master Jan 21, 2021
@alexec alexec added this to the v3.0 milestone Jan 21, 2021
This was referenced Jan 25, 2021
@wreed4
Copy link
Contributor

wreed4 commented May 27, 2021

🎉 yay merged!

@alexec Out of curiosity, just trying to understand the release Argo Workflows release process, when should I expect to see this make it's way into a released tag? We're waiting on it to adopt v3.x, but the main reason I'm asking isn't to rush, just to understand. it's a huge project with so many branches and commits coming in it's mind boggling!

Maybe a second question would be how would I know which tag it's in when it does get released? will it show up on this PR? or should I just keep an eye on the changelogs?

@terrytangyuan
Copy link
Member

You can see a list of tags in this commit 6e961ec

@wreed4
Copy link
Contributor

wreed4 commented May 27, 2021

perfect thanks @terrytangyuan

@wreed4
Copy link
Contributor

wreed4 commented May 27, 2021

ope, I meant to comment on #5951 I'm blind. But answer applies anyways! Thanks! :)

@agilgur5 agilgur5 changed the title feat(controller): Support K8S JSON patch with resource template. Closes #4883 feat(executor): Support K8S JSON patch with resource template. Closes #4883 Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support K8S json patch
5 participants