Skip to content

Commit

Permalink
Use cluster name as default subnet tag for Lyft CNI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman committed Feb 16, 2020
1 parent 5b38b9d commit ff68fbe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ You can specify which subnets to use for allocating Pod IPs by specifying
networking:
lyftvpc:
subnetTags:
kubernetes_kubelet: true
KubernetesCluster: myclustername.mydns.io
```

In this example, new interfaces will be attached to subnets tagged with `kubernetes_kubelet = true`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"cniVersion": "0.3.1",
"name": "cni-ipvlan-vpc-k8s",
"plugins": [
{
"cniVersion": "0.3.1",
"name": "cni-ipvlan-vpc-k8s",
"plugins": [
{
"cniVersion": "0.3.1",
"type": "cni-ipvlan-vpc-k8s-ipam",
"interfaceIndex": 1,
"skipDeallocation" : true,
"subnetTags": {{ SubnetTags }},
"secGroupIds": {{ NodeSecurityGroups }}
},
{
"cniVersion": "0.3.1",
"type": "cni-ipvlan-vpc-k8s-ipvlan",
"mode": "l2"
},
{
"cniVersion": "0.3.1",
"type": "cni-ipvlan-vpc-k8s-unnumbered-ptp",
"hostInterface": "eth0",
"containerInterface": "veth0",
"ipMasq": true
}
]
}
"type": "cni-ipvlan-vpc-k8s-ipam",
"interfaceIndex": 1,
"skipDeallocation": true,
"subnetTags": {{ SubnetTags }},
"secGroupIds": {{ NodeSecurityGroups }}
},
{
"cniVersion": "0.3.1",
"type": "cni-ipvlan-vpc-k8s-ipvlan",
"mode": "l2"
},
{
"cniVersion": "0.3.1",
"type": "cni-ipvlan-vpc-k8s-unnumbered-ptp",
"hostInterface": "eth0",
"containerInterface": "veth0",
"ipMasq": true
}
]
}
2 changes: 1 addition & 1 deletion upup/pkg/fi/nodeup/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func (c *NodeUpCommand) Run(out io.Writer) error {

loader.TemplateFunctions["SubnetTags"] = func() (string, error) {
tags := map[string]string{
"Type": "pod",
"KubernetesCluster": c.cluster.Name,
}
if len(c.cluster.Spec.Networking.LyftVPC.SubnetTags) > 0 {
tags = c.cluster.Spec.Networking.LyftVPC.SubnetTags
Expand Down

0 comments on commit ff68fbe

Please sign in to comment.