diff --git a/.gitignore b/.gitignore index 6a48a88f2..f94e511db 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ testbin test build hack/manifests + +hack/vars.rst diff --git a/Makefile b/Makefile index 2ee629874..9f2354561 100644 --- a/Makefile +++ b/Makefile @@ -413,6 +413,11 @@ release-build: cd hack && $(GO) run release.go --templateDir ./templates/values/ --outputDir ../deployment/network-operator/ cd hack && $(GO) run release.go --templateDir ./templates/config/manager --outputDir ../config/manager/ +.PHONY: generate-docs-versions-var +generate-docs-versions-var: + cd hack && $(GO) run release.go --templateDir ./templates/docs-versions-var/ --outputDir . + mv hack/vars.yaml hack/vars.rst + # dev environment MINIKUBE_CLUSTER_NAME = net-op-dev diff --git a/hack/release.go b/hack/release.go index 13ee86ff3..74aa2f5d7 100644 --- a/hack/release.go +++ b/hack/release.go @@ -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]) + 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 diff --git a/hack/release.yaml b/hack/release.yaml index 2be8cc1b0..d6349d32b 100644 --- a/hack/release.yaml +++ b/hack/release.yaml @@ -1,6 +1,7 @@ NetworkOperator: image: network-operator repository: nvcr.io/nvstaging/mellanox + version: v24.7.0-beta.2 NetworkOperatorInitContainer: image: network-operator-init-container repository: ghcr.io/mellanox @@ -77,3 +78,5 @@ rdmaCni: image: rdma-cni repository: ghcr.io/k8snetworkplumbingwg version: v1.2.0 +Nfd: + version: v0.15.6 diff --git a/hack/templates/docs-versions-var/vars.template b/hack/templates/docs-versions-var/vars.template new file mode 100644 index 000000000..116c02c68 --- /dev/null +++ b/hack/templates/docs-versions-var/vars.template @@ -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 }} +