-
Notifications
You must be signed in to change notification settings - Fork 56
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
chore: generate docs versions var #994
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,5 @@ testbin | |
test | ||
build | ||
hack/manifests | ||
|
||
hack/vars.rst |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,8 @@ type SHA256ImageRef struct { | |
|
||
// Release contains versions for operator release templates. | ||
type Release struct { | ||
OcpDefaulChannel string | ||
HelmChartVersion string | ||
NetworkOperator *ReleaseImageSpec | ||
NetworkOperatorInitContainer *ReleaseImageSpec | ||
SriovNetworkOperator *ReleaseImageSpec | ||
|
@@ -75,6 +77,7 @@ type Release struct { | |
DOCATelemetryService *ReleaseImageSpec | ||
OVSCni *ReleaseImageSpec | ||
RDMACni *ReleaseImageSpec | ||
Nfd *ReleaseImageSpec | ||
} | ||
|
||
func readDefaults(releaseDefaults string) Release { | ||
|
@@ -136,6 +139,10 @@ func main() { | |
if *retrieveSha { | ||
resolveImagesSha(&release) | ||
} | ||
parts := strings.Split(release.NetworkOperator.Version, ".") | ||
release.OcpDefaulChannel = fmt.Sprintf("%s.%s", parts[0], parts[1]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to generate OCP channels list (e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cant we always specify default here ? then install specific operator version ? |
||
release.HelmChartVersion = strings.TrimPrefix(release.NetworkOperator.Version, "v") | ||
|
||
var files []string | ||
err := filepath.Walk(*templateDir, func(path string, info os.FileInfo, err error) error { | ||
// Error during traversal | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. |network-operator-version| replace:: {{ .NetworkOperator.Version }} | ||
.. |helm-chart-version| replace:: {{ .HelmChartVersion }} | ||
.. |ocp-channel| replace:: {{ .OcpDefaulChannel }} | ||
.. |mofed-version| replace:: {{ .Mofed.Version }} | ||
.. |mofed-init-container-version| replace:: {{ .NetworkOperatorInitContainer.Version }} | ||
.. |sriov-device-plugin-version| replace:: {{ .SriovDevicePlugin.Version }} | ||
.. |k8s-rdma-shared-dev-plugin-version| replace:: {{ .RdmaSharedDevicePlugin.Version }} | ||
.. |ib-kubernetes-version| replace:: {{ .IbKubernetes.Version }} | ||
.. |cni-plugins-version| replace:: {{ .CniPlugins.Version }} | ||
.. |multus-version| replace:: {{ .Multus.Version }} | ||
.. |ipoib-cni-version| replace:: {{ .Ipoib.Version }} | ||
.. |whereabouts-version| replace:: {{ .IpamPlugin.Version }} | ||
.. |nvidia-ipam-version| replace:: {{ .NvIPAM.Version }} | ||
.. |nic-feature-discovery-version| replace:: {{ .NicFeatureDiscovery.Version }} | ||
.. |sriovnetop-version| replace:: {{ .SriovNetworkOperator.Version }} | ||
.. |sriovnetop-sriov-cni-version| replace:: {{ .SriovCni.Version }} | ||
.. |sriovnetop-ib-sriov-cni-version| replace:: {{ .SriovIbCni.Version }} | ||
.. |sriovnetop-sriov-device-plugin-version| replace:: {{ .SriovDevicePlugin.Version }} | ||
.. |doca-telemetry-version| replace:: {{ .DOCATelemetryService.Version }} | ||
.. |node-feature-discovery-version| replace:: {{ .Nfd.Version }} | ||
|
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.
do we want to add
hack/vars.rst
to.gitignore
?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.
Done