mirror of https://github.com/kubernetes/kops.git
Merge pull request #6660 from gordonbondon/flannes-0.11.0
Updated Flannel manifest to 0.11.0
This commit is contained in:
commit
080b2fb01f
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2413,6 +2413,7 @@ func Convert_kops_FileAssetSpec_To_v1alpha1_FileAssetSpec(in *kops.FileAssetSpec
|
|||
|
||||
func autoConvert_v1alpha1_FlannelNetworkingSpec_To_kops_FlannelNetworkingSpec(in *FlannelNetworkingSpec, out *kops.FlannelNetworkingSpec, s conversion.Scope) error {
|
||||
out.Backend = in.Backend
|
||||
out.IptablesResyncSeconds = in.IptablesResyncSeconds
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2423,6 +2424,7 @@ func Convert_v1alpha1_FlannelNetworkingSpec_To_kops_FlannelNetworkingSpec(in *Fl
|
|||
|
||||
func autoConvert_kops_FlannelNetworkingSpec_To_v1alpha1_FlannelNetworkingSpec(in *kops.FlannelNetworkingSpec, out *FlannelNetworkingSpec, s conversion.Scope) error {
|
||||
out.Backend = in.Backend
|
||||
out.IptablesResyncSeconds = in.IptablesResyncSeconds
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1207,6 +1207,11 @@ func (in *FileAssetSpec) DeepCopy() *FileAssetSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FlannelNetworkingSpec) DeepCopyInto(out *FlannelNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.IptablesResyncSeconds != nil {
|
||||
in, out := &in.IptablesResyncSeconds, &out.IptablesResyncSeconds
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -2503,7 +2508,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.Flannel != nil {
|
||||
in, out := &in.Flannel, &out.Flannel
|
||||
*out = new(FlannelNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Calico != nil {
|
||||
in, out := &in.Calico, &out.Calico
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2530,6 +2530,7 @@ func Convert_kops_FileAssetSpec_To_v1alpha2_FileAssetSpec(in *kops.FileAssetSpec
|
|||
|
||||
func autoConvert_v1alpha2_FlannelNetworkingSpec_To_kops_FlannelNetworkingSpec(in *FlannelNetworkingSpec, out *kops.FlannelNetworkingSpec, s conversion.Scope) error {
|
||||
out.Backend = in.Backend
|
||||
out.IptablesResyncSeconds = in.IptablesResyncSeconds
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -2540,6 +2541,7 @@ func Convert_v1alpha2_FlannelNetworkingSpec_To_kops_FlannelNetworkingSpec(in *Fl
|
|||
|
||||
func autoConvert_kops_FlannelNetworkingSpec_To_v1alpha2_FlannelNetworkingSpec(in *kops.FlannelNetworkingSpec, out *FlannelNetworkingSpec, s conversion.Scope) error {
|
||||
out.Backend = in.Backend
|
||||
out.IptablesResyncSeconds = in.IptablesResyncSeconds
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1164,6 +1164,11 @@ func (in *FileAssetSpec) DeepCopy() *FileAssetSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FlannelNetworkingSpec) DeepCopyInto(out *FlannelNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.IptablesResyncSeconds != nil {
|
||||
in, out := &in.IptablesResyncSeconds, &out.IptablesResyncSeconds
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -2574,7 +2579,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.Flannel != nil {
|
||||
in, out := &in.Flannel, &out.Flannel
|
||||
*out = new(FlannelNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Calico != nil {
|
||||
in, out := &in.Calico, &out.Calico
|
||||
|
|
|
|||
|
|
@ -1330,6 +1330,11 @@ func (in *FileAssetSpec) DeepCopy() *FileAssetSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *FlannelNetworkingSpec) DeepCopyInto(out *FlannelNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.IptablesResyncSeconds != nil {
|
||||
in, out := &in.IptablesResyncSeconds, &out.IptablesResyncSeconds
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -2772,7 +2777,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) {
|
|||
if in.Flannel != nil {
|
||||
in, out := &in.Flannel, &out.Flannel
|
||||
*out = new(FlannelNetworkingSpec)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Calico != nil {
|
||||
in, out := &in.Calico, &out.Calico
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
@ -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:
|
||||
|
|
@ -102,4 +106,4 @@ spec:
|
|||
path: /etc/cni/net.d
|
||||
- name: flannel-cfg
|
||||
configMap:
|
||||
name: kube-flannel-cfg
|
||||
name: kube-flannel-cfg
|
||||
|
|
|
|||
Loading…
Reference in New Issue