Skip to content

Commit

Permalink
kbs: add default value for config deserialization
Browse files Browse the repository at this point in the history
Before this commit, if we do not explicitly specify the `dir_path` when
using localfs resource storage, the launch of kbs will fail. This commit
adds a default value when kbs tries to read config. If no value is given
it will use the default value.

Signed-off-by: Xynnn007 <[email protected]>
  • Loading branch information
Xynnn007 committed Nov 8, 2024
1 parent 43af64a commit c0b4710
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kbs/src/plugins/implementations/resource/local_fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub const DEFAULT_REPO_DIR_PATH: &str = "/opt/confidential-containers/kbs/reposi

#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct LocalFsRepoDesc {
#[serde(default)]
pub dir_path: String,
}

Expand Down

0 comments on commit c0b4710

Please sign in to comment.