Skip to content

Commit

Permalink
pkey proper location
Browse files Browse the repository at this point in the history
  • Loading branch information
punkerpunker committed Jan 31, 2025
1 parent 668138b commit 3007040
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions api/v1/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,13 @@ func (cr *SriovIBNetwork) RenderNetAttDef() (*uns.Unstructured, error) {
data.Data["CapabilitiesConfigured"] = true
data.Data["SriovCniCapabilities"] = cr.Spec.Capabilities
}
logger.Info("Pkey: ", "pkey", cr.Spec.PKey)
if cr.Spec.PKey == "" {
data.Data["pKeyConfigured"] = false
} else {
data.Data["pKeyConfigured"] = true
data.Data["pKey"] = cr.Spec.PKey
logger.Info("Pkey set!")
}
if cr.Spec.IPAM != "" {
data.Data["SriovCniIpam"] = SriovCniIpam + ":" + strings.Join(strings.Fields(cr.Spec.IPAM), "")
Expand Down
6 changes: 3 additions & 3 deletions bindata/manifests/cni-config/sriov/sriov-cni-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ spec:
{{- if .MaxTxRateConfigured -}}
"max_tx_rate":{{.SriovCniMaxTxRate}},
{{- end -}}
{{- if .pKeyConfigured -}}
"pkey":{{.pKey}},
{{- end -}}
{{- end -}}
{{- if .CapabilitiesConfigured -}}
"capabilities":{{.SriovCniCapabilities}},
{{- end -}}
{{- if .pKeyConfigured -}}
"pkey":{{.pKey}},
{{- end -}}
{{- if .StateConfigured -}}
"link_state":"{{.SriovCniState}}",
{{- end -}}
Expand Down

0 comments on commit 3007040

Please sign in to comment.