Skip to content
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

implemented correct k8s validation #20

Merged
merged 1 commit into from
Jun 6, 2024
Merged

implemented correct k8s validation #20

merged 1 commit into from
Jun 6, 2024

Conversation

zvonkok
Copy link
Contributor

@zvonkok zvonkok commented Jun 5, 2024

No description provided.

serde_json = "1.0"
jsonschema = "0.18.0"
once_cell = "1.8.0"
notify = "6.1.1"
serde = "1.0.131"
serde_derive = "1.0.131"
libc = "0.2.112"
nix = "0.29.0"
nix = "0.24.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downgrade for kata-agent build

lazy_static = "1.2"
path-clean = "1.0.1"
serde_yaml = "0.9.33"
semver = "1.0.23"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downgrade for kata-agent build

assert!(parse_annotations(cdi_devices.clone()).is_ok());
let (keys, devices) = parse_annotations(cdi_devices).unwrap();
assert!(parse_annotations(&cdi_devices).is_ok());
let (keys, devices) = parse_annotations(&cdi_devices).unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference for using in kata-agent we do not need to own the annotations.

assert!(validate_annotations(&large_annotations, path).is_err());

let mut invalid_annotations = BTreeMap::new();
invalid_annotations.insert("inv$$alid_CDIKEY".to_string(), "inv$$alid_CDIVAL".to_string());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid_CDIKEY is actually a valid name, added $$ which is not valid

Copy link
Contributor

@Apokleos Apokleos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Zvonko, this PR almost is fine, but two debug info need to be removed and we need do cargo fmt&clippy

@Apokleos Apokleos merged commit 1cefc1a into main Jun 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants