Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

update default pod/service cidr to be within carrier-nat shared IP block #904

Merged
merged 4 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions lib/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,16 @@ const (
ReportTarball = "report.tar.gz"

// ServiceSubnet is a subnet dedicated to the services in cluster
ServiceSubnet = "10.100.0.0/16"
// Notes on 100.64.0.0/10 - https://tools.ietf.org/html/rfc6598
//
// We're sort of abusing rfc6598 here, since the intended purpose of this range is specifically for carrier grade NAT.
// However, because this range has many shared properties with normal private IP space, it should be less likely to
// conflict than picking addresses in RFC1918 private space. Some other kubernetes distributions also appear to use
// 100.64.0.0/10 by default. Since the majority of our installs are in networks where this range is likely not used
// this seems like a sensible default. The setting can also be overridden at installation time.
ServiceSubnet = "100.100.0.0/16"
// PodSubnet is a subnet dedicated to the pods in the cluster
PodSubnet = "10.244.0.0/16"
PodSubnet = "100.96.0.0/16"

// MaxRouterIdleConnsPerHost defines tha maximum number of idle connections for "opsroute" transport
MaxRouterIdleConnsPerHost = 5
Expand Down
4 changes: 2 additions & 2 deletions lib/schema/v1/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ const AWSTerraformSchema = `{
"terraform_spec": {"type": "string"},
"instance_spec": {"type": "string"},
"vpc_id": {"type": "string"},
"vpc_cidr": {"type": "string", "default": "10.100.0.0/16"},
"vpc_cidr": {"type": "string", "default": "100.100.0.0/16"},
"subnet_id": {"type": "string"},
"subnet_cidr": {"type": "string", "default": "10.100.0.0/24"},
"subnet_cidr": {"type": "string", "default": "100.100.0.0/24"},
"internet_gateway_id": {"type": "string"},
"docker": {
"type": "object",
Expand Down
732 changes: 366 additions & 366 deletions web/src/installer/components/Installer.story.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Subnets({ onChange, podSubnet, serviceSubnet, ...styles}
label="Service Subnet"
mr="3"
onChange={onChangeServiceSubnet}
placeholder="10.0.0.0/16"
placeholder="100.100.0.0/16"
rule={validCidr}
value={serviceSubnet}
/>
Expand All @@ -49,7 +49,7 @@ export default function Subnets({ onChange, podSubnet, serviceSubnet, ...styles}
autoComplete="off"
label="Pod Subnet"
onChange={onChangePodnet}
placeholder="10.0.0.0/16"
placeholder="100.96.0.0/16"
rule={validPod}
value={podSubnet}
/>
Expand Down Expand Up @@ -77,4 +77,4 @@ const validPod = value => () => {
valid: result !== null,
message: INVALID_SUBNET
}
}
}
4 changes: 2 additions & 2 deletions web/src/installer/components/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export const StepEnum = {
USER: 'user',
}

const defaultServiceSubnet = '10.100.0.0/16';
const defaultPodSubnet = '10.244.0.0/16';
const defaultServiceSubnet = '100.100.0.0/16';
const defaultPodSubnet = '100.96.0.0/16';
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also update the docs as well?

https://github.com/gravitational/gravity/blob/master/docs/6.x/installation.md#L115

Must be a minimum of /16 so Kubernetes is able to allocate /24 to each node. Defaults to 10.244.0.0/16

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't planning on backporting this, so until we separate out the 7.x docs I don't think we should change them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I guess what I was trying to say that it needs to be updated in the docs too. I would create an issue so we do not forget to make this change in docs before 7.0 release.


export default class InstallerStore extends Store {

Expand Down