<#4050 [BUG] Flyte task "aborted" due to webhook c...
# flyte-github
c
#4050 [BUG] Flyte task "aborted" due to webhook certificate verification issue Issue created by rxraghu ### Describe the bug Workflow run on a Cron schedule via a launch plan, intermittently fails due to webhook certificate verification issue. The workflow contains tasks that need to access k8s secrets. Error:
Workflow[workflow_name] failed. RuntimeExecutionError: max number of system retry attempts [11/10] exhausted. Last known status message: failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [InternalError] failed to create resource, caused by: Internal error occurred: failed calling webhook "flyte-pod-webhook.flyte.org": failed to call webhook: Post "https://flyte-flyte-binary-webhook.flyte.svc:443/mutate--v1-pod?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "flyte.org")
Several of these errors (hundreds) are seen in the flyte-binary pod logs -
E0918 08:40:00.476756 7 workers.go:102] error syncing 'project-domain/f2e9a417488011754000': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [InternalError] failed to create resource, caused by: Internal error occurred: failed calling webhook "flyte-pod-webhook.flyte.org": failed to call webhook: Post "https://flyte-flyte-binary-webhook.flyte.svc:443/mutate--v1-pod?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "flyte.org") E0918 08:44:00.395162 7 workers.go:102] error syncing 'project-domain/f70603b7488f10f54000': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [InternalError] failed to create resource, caused by: Internal error occurred: failed calling webhook "flyte-pod-webhook.flyte.org": failed to call webhook: Post "https://flyte-flyte-binary-webhook.flyte.svc:443/mutate--v1-pod?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "flyte.org") E0918 09:06:00.438333 7 workers.go:102] error syncing 'project-domain/f7e13ef77882c4e5b000': failed at Node[n0]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [InternalError] failed to create resource, caused by: Internal error occurred: failed calling webhook "flyte-pod-webhook.flyte.org": failed to call webhook: Post "https://flyte-flyte-binary-webhook.flyte.svc:443/mutate--v1-pod?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "flyte.org")
Due to multiple retries only few of these surface up and cause a task to be "aborted". Additional setup info: • The flyte-binary pod has 3 replicas. • The flyte-binary pod runs in the "flyte" namespace. • Worker pods are created in the "project-domain" namespace. ### Expected behavior Tasks should not be aborted / workflow should not fail due to webhook self-signed certificate verification error. ### Additional context to reproduce This issue is not observed on one off workflow runs, but becomes apparent when running a workflow on a LaunchPlan with a CronSchedule to execute every 2 mins. Steps to reproduce: 1. Create a sample k8s secret 2. Create simple task / workflow to get the secret 3. Run the workflow on a CronSchedule of 2 mins. Version info pasted in screenshots section. ### Screenshots [Screenshot 2023-09-19 at 15 51 05](https://private-user-images.githubusercontent.com/144114275/268979430-076deaea-30ae-4be8-b9e4-58a27c05abaf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDkwODI0ODAsIm5iZiI6MTc0OTA4MjE4MCwicGF0aCI6Ii8xNDQxMTQyNzUvMjY4OTc5NDMwLTA3NmRlYWVhLTMwYWUtNGJlOC1iOWU0LTU4YTI3YzA1YWJhZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYwNVQwMDA5NDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zOTMyOWJmNDI5OGZmMzQ1MjBjYmNkMmVmODU1ZjI1NzZhMzllMWFjMzY4NDQ4YTkyZTVjMzI3OGYwY2I3NWZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Q7eejphgc6yl0twVZPtnqC-h_mTXt9KnGrcubPmjUO4) ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte