Skip to content

Commit

Permalink
Merge pull request #6660 from gordonbondon/flannes-0.11.0
Browse files Browse the repository at this point in the history
Updated Flannel manifest to 0.11.0
  • Loading branch information
justinsb authored Mar 25, 2019
2 parents d565706 + db6b29b commit 080b2fb
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 13 deletions.
13 changes: 13 additions & 0 deletions docs/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,19 @@ For support with Cilium Network Policies you can reach out on Slack or Github:
- [Cilium Github](https://github.com/cilium/cilium)
- [Cilium Slack](https://cilium.io/slack)

### Flannel Example for CNI

#### Configuraing Flannel iptables resync period

Flannel iptables resync option is configurable via editing a cluster and adding
`iptablesResyncSeconds` option to spec:

```
networking:
flannel:
iptablesResyncSeconds: 360
```

### Validating CNI Installation

You will notice that `kube-dns` fails to start properly until you deploy your CNI provider.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type WeaveNetworkingSpec struct {
type FlannelNetworkingSpec struct {
// Backend is the backend overlay type we want to use (vxlan or udp)
Backend string `json:"backend,omitempty"`
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
}

// CalicoNetworkingSpec declares that we want Calico networking
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type WeaveNetworkingSpec struct {
type FlannelNetworkingSpec struct {
// Backend is the backend overlay type we want to use (vxlan or udp)
Backend string `json:"backend,omitempty"`
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
}

// CalicoNetworkingSpec declares that we want Calico networking
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ type WeaveNetworkingSpec struct {
type FlannelNetworkingSpec struct {
// Backend is the backend overlay type we want to use (vxlan or udp)
Backend string `json:"backend,omitempty"`
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
}

// CalicoNetworkingSpec declares that we want Calico networking
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- operator: Exists
initContainers:
- name: install-cni
image: quay.io/coreos/flannel:v0.10.0-amd64
image: quay.io/coreos/flannel:v0.11.0-amd64
command:
- cp
args:
Expand All @@ -118,8 +118,12 @@ spec:
mountPath: /etc/kube-flannel/
containers:
- name: kube-flannel
image: quay.io/coreos/flannel:v0.10.0-amd64
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
image: quay.io/coreos/flannel:v0.11.0-amd64
command:
- "/opt/bin/flanneld"
- "--ip-masq"
- "--kube-subnet-mgr"
- "--iptables-resync={{- or .Networking.Flannel.IptablesResyncSeconds "5" }}"
securityContext:
privileged: true
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
- operator: Exists
initContainers:
- name: install-cni
image: quay.io/coreos/flannel:v0.10.0-amd64
image: quay.io/coreos/flannel:v0.11.0-amd64
command:
- cp
args:
Expand All @@ -113,8 +113,12 @@ spec:
mountPath: /etc/kube-flannel/
containers:
- name: kube-flannel
image: quay.io/coreos/flannel:v0.10.0-amd64
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
image: quay.io/coreos/flannel:v0.11.0-amd64
command:
- "/opt/bin/flanneld"
- "--ip-masq"
- "--kube-subnet-mgr"
- "--iptables-resync={{- or .Networking.Flannel.IptablesResyncSeconds "5" }}"
securityContext:
privileged: true
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ spec:
serviceAccountName: flannel
containers:
- name: kube-flannel
image: quay.io/coreos/flannel:v0.10.0-amd64
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
image: quay.io/coreos/flannel:v0.11.0-amd64
command:
- "/opt/bin/flanneld"
- "--ip-masq"
- "--kube-subnet-mgr"
- "--iptables-resync={{- or .Networking.Flannel.IptablesResyncSeconds "5" }}"
securityContext:
privileged: true
env:
Expand All @@ -79,7 +83,7 @@ spec:
- name: flannel-cfg
mountPath: /etc/kube-flannel/
- name: install-cni
image: quay.io/coreos/flannel:v0.10.0-amd64
image: quay.io/coreos/flannel:v0.11.0-amd64
command: [ "/bin/sh", "-c", "set -e -x; cp -f /etc/kube-flannel/cni-conf.json /etc/cni/net.d/10-flannel.conf; while true; do sleep 3600; done" ]
resources:
limits:
Expand All @@ -102,4 +106,4 @@ spec:
path: /etc/cni/net.d
- name: flannel-cfg
configMap:
name: kube-flannel-cfg
name: kube-flannel-cfg

0 comments on commit 080b2fb

Please sign in to comment.