Skip to content

Commit

Permalink
Canal manifest updates for k8s v1.12+
Browse files Browse the repository at this point in the history
  • Loading branch information
KashifSaadat authored and mikesplain committed Apr 26, 2019
1 parent 6d841ef commit ac9fc1b
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 12 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/kops/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct {
// LogSeveritySys the severity to set for logs which are sent to syslog
// Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE)
LogSeveritySys string `json:"logSeveritySys,omitempty"`
// MTU to be set in the cni-network-config (default: 1500)
MTU *int32 `json:"mtu,omitempty"`
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
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 @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct {
// LogSeveritySys the severity to set for logs which are sent to syslog
// Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE)
LogSeveritySys string `json:"logSeveritySys,omitempty"`
// MTU to be set in the cni-network-config (default: 1500)
MTU *int32 `json:"mtu,omitempty"`
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
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 @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct {
// LogSeveritySys the severity to set for logs which are sent to syslog
// Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE)
LogSeveritySys string `json:"logSeveritySys,omitempty"`
// MTU to be set in the cni-network-config (default: 1500)
MTU *int32 `json:"mtu,omitempty"`
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
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.

1 change: 1 addition & 0 deletions pkg/model/openstackmodel/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
"k8s.io/kops/upup/pkg/fi/cloudup/openstacktasks"

//TODO: Replace with klog
"github.com/golang/glog"
"k8s.io/kops/pkg/dns"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Canal Version v3.5.0
# https://docs.projectcalico.org/v3.5/releases#v3.5.0
# Canal Version v3.6.1
# https://docs.projectcalico.org/v3.6/release-notes/#v361
# This manifest includes the following component versions:
# calico/node:v3.5.0
# calico/cni:v3.5.0
# calico/node:v3.6.1
# calico/cni:v3.6.1
# coreos/flannel:v0.11.0

# This ConfigMap is used to configure a self-hosted Canal installation.
Expand All @@ -23,6 +23,9 @@ data:
# the pod network.
masquerade: "true"

# MTU default is 1500, can be overridden
veth_mtu: "{{- or .Networking.Canal.MTU "1500" }}"

# The CNI network configuration to install on each node. The special
# values in this config will be automatically populated.
cni_network_config: |-
Expand All @@ -34,6 +37,7 @@ data:
"type": "calico",
"log_level": "info",
"datastore_type": "kubernetes",
"mtu": __CNI_MTU__,
"nodename": "__KUBERNETES_NODE_NAME__",
"ipam": {
"type": "host-local",
Expand Down Expand Up @@ -115,12 +119,18 @@ spec:
# This container installs the Calico CNI binaries
# and CNI network config file on each node.
- name: install-cni
image: calico/cni:v3.5.0
image: calico/cni:v3.6.1
command: ["/install-cni.sh"]
env:
# Name of the CNI config file to create.
- name: CNI_CONF_NAME
value: "10-canal.conflist"
# CNI MTU Config variable
- name: CNI_MTU
valueFrom:
configMapKeyRef:
name: canal-config
key: veth_mtu
# The CNI network config to install on each node.
- name: CNI_NETWORK_CONFIG
valueFrom:
Expand All @@ -145,7 +155,7 @@ spec:
# container programs network policy and routes on each
# host.
- name: calico-node
image: calico/node:v3.5.0
image: calico/node:v3.6.1
env:
# Use Kubernetes API as the backing datastore.
- name: DATASTORE_TYPE
Expand Down Expand Up @@ -173,6 +183,11 @@ spec:
# Disable file logging so `kubectl logs` works.
- name: CALICO_DISABLE_FILE_LOGGING
value: "true"
- name: FELIX_IPINIPMTU
valueFrom:
configMapKeyRef:
name: canal-config
key: veth_mtu
# Disable IPv6 on Kubernetes.
- name: FELIX_IPV6SUPPORT
value: "false"
Expand Down Expand Up @@ -367,6 +382,7 @@ rules:
- globalbgpconfigs
- bgpconfigurations
- ippools
- ipamblocks
- globalnetworkpolicies
- globalnetworksets
- networkpolicies
Expand Down
3 changes: 1 addition & 2 deletions upup/pkg/fi/cloudup/bootstrapchannelbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,13 +893,12 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri

if b.cluster.Spec.Networking.Canal != nil {
key := "networking.projectcalico.org.canal"
// 2.6.3-kops.1 = 2.6.2 with kops manifest tweaks. This should go away with the next version bump.
versions := map[string]string{
"pre-k8s-1.6": "2.4.2-kops.2",
"k8s-1.6": "2.4.2-kops.2",
"k8s-1.8": "2.6.7-kops.3",
"k8s-1.9": "3.2.3-kops.1",
"k8s-1.12": "3.5.0",
"k8s-1.12": "3.6.1",
}
{
id := "pre-k8s-1.6"
Expand Down
3 changes: 2 additions & 1 deletion upup/pkg/fi/cloudup/openstacktasks/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ package openstacktasks

import (
"fmt"
"github.com/gophercloud/gophercloud/openstack/networking/v2/ports"
"time"

"github.com/gophercloud/gophercloud/openstack/networking/v2/ports"

"github.com/golang/glog"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers"
Expand Down

0 comments on commit ac9fc1b

Please sign in to comment.