https://github.com/tmax-cloud/workflow-mutating-webhook
mutating webhook for workflow
https://github.com/tmax-cloud/workflow-mutating-webhook
Last synced: 12 months ago
JSON representation
mutating webhook for workflow
- Host: GitHub
- URL: https://github.com/tmax-cloud/workflow-mutating-webhook
- Owner: tmax-cloud
- License: apache-2.0
- Created: 2020-11-09T02:48:40.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-30T11:41:10.000Z (about 5 years ago)
- Last Synced: 2025-04-19T10:10:10.890Z (over 1 year ago)
- Language: Go
- Size: 207 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audit/auditController.go
Awesome Lists containing this project
README
# workflow-mutating-webhook
argo-workflow 리소스에 적절한 ServiceAccount를 맵핑하기 위한 웹훅
- workflow / workflowtemplate 생성을 감지하다가, 생성요청이 오면 webhook하여 serviceaccount(sa) 항목이 있는지 확인
- workflow의 경우, workflowtemplateRef 항목에 값이 들어있으면 통과
- ref도 없고, sa도 없을 경우, workflow / workflowtemplate 생성 요청이 온 namespace의 sa 중 default-editor 가 있는지 확인
- default-editor가 없으면 생성 및 rbac 적용
- default-ediotr를 sa 항목에 적용
- 이때 templates 의 각 항목중에 sa가 없는 항목이 있을 경우, 비어있는 해당 항목에만 sa 적용
- workflow / workflowtemplate가 생성됨
# dependency
argo v2.12.11
cert-manager
issuer(cert-manager 동작을 위해)