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

fix: use labels instead of hardcoded indexes #140

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions operator/src/labels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,15 @@ pub fn managed_labels() -> Option<BTreeMap<String, String>> {
"keramik".to_owned(),
)]))
}
/// Labels that indicate the resource is managed by the keramik operator extend with custom labels.
pub fn managed_labels_extend(
extend_labels: Option<BTreeMap<String, String>>,
) -> Option<BTreeMap<String, String>> {
if let Some(extend_labels) = extend_labels {
let mut labels = managed_labels().unwrap();
labels.extend(extend_labels);
Some(labels)
} else {
managed_labels()
}
}
Loading
Loading