-
Notifications
You must be signed in to change notification settings - Fork 47
chart, salt: Add annotations to fluent-bit pod #4834
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -702,6 +702,28 @@ get_object_digest: | |
| raises: True | ||
| result: 'Unable to find key "metadata:invalid:path" in the object' | ||
|
|
||
| # ignore_not_found = true and path points to an empty dict | ||
| - obj: | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: my_secret | ||
| data: {} | ||
| path: 'data' | ||
| ignore_not_found: True | ||
| result: '' | ||
|
|
||
| # ignore_not_found = true but there is a typo in the path | ||
| - obj: | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: my_secret | ||
| data: {} | ||
| path: 'daat' | ||
| ignore_not_found: True | ||
| result: '' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tests cover `ignore_not_found=True` when the path is empty or wrong, but there is no test for `ignore_not_found=True` when the object itself is `None` (`obj: null`). Adding one would document the current behavior (raises error) and protect against unintended changes. |
||
|
|
||
| check_object_ready: | ||
| # Simple Pod Ready | ||
| - obj: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`ignore_not_found` only guards against the path not being found within an existing object. If the Secret itself does not exist (`get_object` returns `None`), line 431 still raises `CommandExecutionError("Unable to find the object")` regardless of `ignore_not_found`.
This works today because Salt include ordering in `init.sls` ensures `.secret` runs before `.chart`. But the parameter name is misleading — consider either:
1. Also applying `ignore_not_found` to the object-level check (line 430-431), or
2. Renaming the parameter to something like `ignore_empty_path` to clarify its scope.
— Claude Code