Skip to content

503 Error on Readiness Probe Due to Empty Rules Array in Oathkeeper Helm Chart #1225

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

Open
5 tasks done
Jorgagu opened this issue Apr 4, 2025 · 0 comments
Open
5 tasks done
Labels
bug Something is not working.

Comments

@Jorgagu
Copy link

Jorgagu commented Apr 4, 2025

Preflight checklist

Ory Network Project

No response

Describe the bug

When installing the Oathkeeper Helm Chart using the default configuration, the Oathkeeper pod fails its readiness probe and returns a 503 error. This happens because Oathkeeper expects a non-empty access rules configuration at startup. An empty rules array is treated as an error state, causing the pod to fail even though rules may be added later via CRDs.
Original issue: ory/k8s#595

Discussion

  • Empty Rules Issue:
    Oathkeeper is designed to treat an empty rules array as an error state. This behavior causes the readiness probe to fail if no rules are present at startup.

Proposed Solution

Add a flag or configuration option (allow-empty-rules) that permits Oathkeeper to start without any rules, thereby preventing the error. This solution has already been approved by @zepatrik here.

Reproducing the bug

Install the Helm chart:

helm install oathkeeper ory/oathkeeper

Observe the pod logs:
The logs will show errors similar to:

time=2023-04-21T17:39:55Z level=error msg=An error occurred while handling a request ... status_code:503 ...

Or something like this

Screenshot by @sabinayakc in ory/k8s#595
Screenshot by @sabinayakc in ory/k8s#595

This indicates that the readiness probe is failing because the system could not find any rules.

Note the behavior with demo mode:
When deploying with demo: true, sample rules are provided, and the pod starts without errors.

Version

0.40.2 or later versions

On which operating system are you observing this issue?

Other

In which environment are you deploying?

Kubernetes with Helm

Additional Context

@Jorgagu Jorgagu added the bug Something is not working. label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant