Inconsistency in Volume Mounts Between oap-deployment.yaml and oap-job.yaml Causes Init Job to Fail#163
Merged
kezhenxu94 merged 2 commits intoapache:masterfrom Jul 31, 2025
Merged
Conversation
Make this consistent with oap-deployment.yaml
kezhenxu94
approved these changes
Jul 31, 2025
Member
kezhenxu94
left a comment
There was a problem hiding this comment.
Thanks, can you please move the volumes and volumes and volumeMounts sections to helper file and use it in both the init job and the deployment, this can avoid future issue when adding new volumes
Contributor
Author
Make sense, Let me do it! ^~^ |
Contributor
Author
I made it, pls review again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Description
We've encountered an issue where the OAP server fails to start in init mode when custom Kubernetes metrics are enabled. The same configuration works perfectly for the server in no-init mode (the standard deployment).
The root cause appears to be an inconsistency in how the custom metrics files are mounted between the init Job and the standard Deployment.
Steps to Reproduce:
Give a config like:
Install the helm.
Expected Behavior:
Both the init mode OAP server (Job) and the no-init mode OAP server (Deployment) start successfully.
Actual Behavior:
The standard OAP server pods (from oap-deployment.yaml) run successfully. However, the init-mode pod (from the Job template) fails with the following error, as it cannot find the mounted metric files:
Analysis:
Upon inspecting the Helm templates, I found that the volume mount configurations in the OAP Job template differ from those in the oap-deployment.yaml.
I believe these configurations should be made consistent to ensure that both the Job and the Deployment pods could run successful.