Skip to content

Conversation

@csfmomo
Copy link
Contributor

@csfmomo csfmomo commented Oct 7, 2020

feat: add NC version in nnc CRD and populate it to NC request.

Reason for Change:
It's a prerequisite for IP classification feature. In IP classification feature, CNS will validate IPs through comparing NC version between its local file, nnc CRD and NMAgent to determine whether its available or still pending programming.

neaggarwMS
neaggarwMS previously approved these changes Oct 7, 2020
ncRequest.SecondaryIPConfigs = make(map[string]cns.SecondaryIPConfig)
ncRequest.NetworkContainerid = nc.ID
ncRequest.NetworkContainerType = cns.Docker
ncRequest.Version = nc.Version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous CRD definitions already deployed/running in our test clusters will not have this version field. @ramiro-gamarra or @thatmattlong, Shall we handle the update otherwise we will have to manually delete and re-create the CRD def again whenever we deploy this CNS. I would say lets handle the update

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good use-case for kubernetes api versioning. We should increment the version of this Kind. See https://kubebuilder.io/cronjob-tutorial/gvks.html for a description

ncRequest.SecondaryIPConfigs = make(map[string]cns.SecondaryIPConfig)
ncRequest.NetworkContainerid = nc.ID
ncRequest.NetworkContainerType = cns.Docker
ncRequest.Version = nc.Version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@csfmomo csfmomo merged commit 35e768e into Azure:master Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants