-
Notifications
You must be signed in to change notification settings - Fork 1
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
adding bugfix and test for persistent volume template #76
base: main
Are you sure you want to change the base?
Conversation
Copilot
AI
left a comment
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 suggestions.
} | ||
vct_spec = case_insensitive_dict_get(volume_claim_template, "spec") | ||
if vct_spec: | ||
vct_access_modes = case_insensitive_dict_get(vct_spec, "accessModes") |
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.
Add a null check for vct_access_modes before checking its contents to avoid potential errors.
vct_access_modes = case_insensitive_dict_get(vct_spec, "accessModes") | |
if vct_access_modes and config.VIRTUAL_NODE_YAML_READ_ONLY_MANY in vct_access_modes: |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -1104,45 +1106,63 @@ def load_policy_from_virtual_node_yaml_str( | |||
envs += config.VIRTUAL_NODE_ENV_RULES_WORKLOAD_IDENTITY | |||
|
|||
# command | |||
command = case_insensitive_dict_get(container, "command") or [] | |||
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_LIFECYCLE_COMMAND) or [] |
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.
The command field should refer to the container's command, not the lifecycle command. Use the correct config field for the container's command.
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_LIFECYCLE_COMMAND) or [] | |
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_COMMAND) or [] |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Andrea found a bug where implicit volumes with volumeClaimTemplates were not being recognized. This adds them as an option and marks them as readonly if "ReadOnlyMany" is used when declaring.