File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
infra/gcp/terraform/k8s-infra-gcp-gcve/vsphere Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ resource "nsxt_policy_segment" "k8s-ci" {
4343
4444 subnet {
4545 cidr = " 192.168.32.1/21"
46- dhcp_ranges = [" 192.168.32.10-192.168.32 .255" ]
46+ dhcp_ranges = [" 192.168.32.10-192.168.33 .255" ]
4747
4848 dhcp_v4_config {
4949 server_address = " 192.168.32.2/21"
Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ # The network used is 192.168.0.32/21
18+ # Usable Host IP Range: 192.168.32.1 - 192.168.39.254:
19+ # DHCP Range: 192.168.32.10 - 192.168.33.255
20+ # Used IPPool for 40 Projects having 16 IPs each: 192.168.35.0 - 192.168.37.127
1721function printProjectUserData() {
1822 NR=" ${1} "
1923
20- S2=" $(( $(($((NR- 1 )) *16))))"
21- E2=" $(( $((NR* 16 )) -1))"
24+ IPS_PER_PROJECT=16
25+ # Starting at 192.168.35.0 and allowing usage up to 192.168.39.254
26+ # allows a maximum of 79 projects
27+ RANGE_START=35
2228
23- S1=" $(( S2 / 256 )) "
24- E1=" $(( E2 / 256 )) "
25- S2=" $(( S2 % 256 )) "
26- E2=" $(( E2 % 256 )) "
29+ S2=" $(( (NR - 1 ) * IPS_PER_PROJECT )) "
30+ E2=" $(( (NR * IPS_PER_PROJECT) - 1 )) "
2731
28- START=" 192.168.$(( 33 + S1 )) .${S2} "
29- END=" 192.168.$(( 33 + E1 )) .${E2} "
32+ S1=" $(( S2 / 256 )) "
33+ E1=" $(( E2 / 256 )) "
34+ S2=" $(( S2 % 256 )) "
35+ E2=" $(( E2 % 256 )) "
36+
37+ START=" 192.168.$(( RANGE_START + S1 )) .${S2} "
38+ END=" 192.168.$(( RANGE_START + E1 )) .${E2} "
3039
3140 printf " k8s-infra-e2e-gcp-gcve-project-%03d:\n" " ${NR} "
3241 printf " folder: /Datacenter/vm/prow/k8s-infra-e2e-gcp-gcve-project-%03d\n" " ${NR} "
You can’t perform that action at this time.
0 commit comments