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

Improve SubnetDHCPConfig validation rule #976

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yanjunz97
Copy link
Contributor

Subnet controller will update the SubnetSpec as the following when
either accessMode or ipv4SubnetSize is not provided.

spec:
  accessMode: Public
  ipv4SubnetSize: 64
  subnetDHCPConfig:{}

Thus we need another validation rule on subnetDHCPConfig to prevent
subnetDHCPConfig being updated from no mode specified to
DHCPServer/DHCPRelay mode.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.37%. Comparing base (86c0d65) to head (82d0f44).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #976   +/-   ##
=======================================
  Coverage   73.37%   73.37%           
=======================================
  Files         118      118           
  Lines       16394    16394           
=======================================
  Hits        12029    12029           
  Misses       3581     3581           
  Partials      784      784           
Flag Coverage Δ
unit-tests 73.37% <ø> (ø)
Files with missing lines Coverage Δ
pkg/apis/vpc/v1alpha1/subnet_types.go 100.00% <ø> (ø)
pkg/apis/vpc/v1alpha1/subnetset_types.go 100.00% <ø> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants