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

[PERFSCALE-3398] Ocp virt version #51

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Changes from 1 commit
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 ocp-metadata/ocp-metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,15 @@ func toMap(str string) (map[string]interface{}, error) {
}
return config, nil
}

func (meta *Metadata) GetOCPVirtualizationVersion() (string, error) {
virtOp, err := meta.clientSet.AppsV1().Deployments("openshift-cnv").Get(context.TODO(), "virt-operator", metav1.GetOptions{})
if err != nil {
return "", err
}
if virtOpVers, ok := virtOp.Labels["app.kubernetes.io/verssion"]; ok {
rsevilla87 marked this conversation as resolved.
Show resolved Hide resolved
return virtOpVers, nil
} else {
return "", fmt.Errorf("label app.kubernetes.io/version not found in virt-operator deployment")
}
}
Loading