Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat: deprecate flannel addon (#4238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Feb 9, 2021
1 parent 9924649 commit b4f9c42
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 251 deletions.
5 changes: 0 additions & 5 deletions cmd/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,6 @@ func TestExampleAPIModels(t *testing.T) {
apiModelPath: "../examples/custom-shared-image.json",
setArgs: defaultSet,
},
{
name: "containerd",
apiModelPath: "../examples/kubernetes-containerd.json",
setArgs: defaultSet,
},
{
name: "Standard_D2",
apiModelPath: "../examples/kubernetes-D2.json",
Expand Down
3 changes: 1 addition & 2 deletions docs/topics/clusterdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $ aks-engine get-versions
| kubernetesImageBase | no | Specifies the default image base URL (everything preceding the actual image filename) to be used for all kubernetes-related containers such as hyperkube, cloud-controller-manager, kube-addon-manager, etc. e.g., `k8s.gcr.io/` |
| loadBalancerSku | no | Sku of Load Balancer and Public IP. Candidate values are: `basic` and `standard`. If not set, it will be default to "standard". NOTE: Because VMs behind standard SKU load balancer will not be able to access the internet without an outbound rule configured with at least one frontend IP, AKS Engine creates a Load Balancer with an outbound rule and with agent nodes added to the backend pool during cluster creation, as described in the [Outbound NAT for internal Standard Load Balancer scenarios doc](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-rules-overview#outbound-nat-for-internal-standard-load-balancer-scenarios) |
| loadBalancerOutboundIPs | no | Number of outbound IP addresses (e.g., 3) to use in Standard LoadBalancer configuration. If not set, AKS Engine will configure a single outbound IP address. You may want more than one outbound IP address if you are running a large cluster that is processing lots of connections. See [here](https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-outbound-connections#multifesnat) for more documentation about how adding more outbound IP addresses can increase the number of SNAT ports available for use by the Standard Load Balancer in your cluster. Note: this value is only configurable at cluster creation time, it can not be changed using `aks-engine upgrade`.|
| networkPlugin | no | Specifies the network plugin implementation for the cluster. Valid values are:<br>`"azure"` (default), which provides an Azure native networking experience <br>`"kubenet"` for k8s software networking implementation. <br> `"flannel"` for using CoreOS Flannel <br> `"cilium"` for using the default Cilium CNI IPAM (requires the `"cilium"` networkPolicy as well)<br> `"antrea"` for using the Antrea network plugin (requires the `"antrea"` networkPolicy as well) |
| networkPlugin | no | Specifies the network plugin implementation for the cluster. Valid values are:<br>`"azure"` (default), which provides an Azure native networking experience <br>`"kubenet"` for k8s software networking implementation. <br> `"cilium"` for using the default Cilium CNI IPAM (requires the `"cilium"` networkPolicy as well)<br> `"antrea"` for using the Antrea network plugin (requires the `"antrea"` networkPolicy as well) |
| networkPolicy | no | Specifies the network policy enforcement tool for the cluster (currently Linux-only). Valid values are:<br>`"calico"` for Calico network policy.<br>`"cilium"` for cilium network policy (uses the `"cilium"` networkPlugin exclusively).<br> `"antrea"` for Antrea network policy (uses the `"antrea"` networkPlugin exclusively).<br> `"azure"` (experimental) for Azure CNI-compliant network policy (note: Azure CNI-compliant network policy requires explicit `"networkPlugin": "azure"` configuration as well).<br>See [network policy examples](../../examples/networkpolicy) for more information. |
| privateCluster | no | Build a cluster without public addresses assigned. See `privateClusters` [below](#feat-private-cluster). |
| schedulerConfig | no | Configure various runtime configuration for scheduler. See `schedulerConfig` [below](#feat-scheduler-config) |
Expand Down Expand Up @@ -131,7 +131,6 @@ $ aks-engine get-versions
| aad | true if adminGroupID is specified in the aadProfile configuration | 0 | ClusterRoleBinding specification that adds an admin group matching the adminGroupID |
| [calico](https://docs.projectcalico.org/archive/v3.8/introduction/) | true if networkPolicy is "calico"; | 6 | A NetworkPolicy implementation by the Calico project (currently supports v3.8) |
| [cilium](https://docs.cilium.io/en/v1.4/kubernetes/policy/#ciliumnetworkpolicy) | true if networkPolicy is "cilium"; currently validated against Kubernetes v1.13, v1.14, and v1.15 | 0 | A NetworkPolicy CRD implementation by the Cilium project (currently supports v1.4) |
| [flannel](https://coreos.com/flannel/docs/0.8.0/index.html) | false | 0 | An addon that delivers flannel: a virtual network that gives a subnet to each host for use with container runtimes. The current implementation is v0.8.0. If `networkPlugin` is set to `"flannel"` this addon will be enabled automatically. Not compatible with any other `networkPlugin` or `networkPolicy`. This addon **requires** containerd (`"containerRuntime": "containerd"`)|
| [csi-secrets-store](../../examples/addons/csi-secrets-store/README.md) | true (for 1.16+ clusters) | as many as linux agent nodes | Integrates secrets stores (Azure keyvault) via a [Container Storage Interface (CSI)](https://kubernetes-csi.github.io/docs/) volume. |
| [azure-arc-onboarding](../../examples/addons/azure-arc-onboarding/README.md) | false | 7 | Attaches the cluster to Azure Arc enabled Kubernetes. |

Expand Down
45 changes: 0 additions & 45 deletions examples/kubernetes-containerd.json

This file was deleted.

1 change: 0 additions & 1 deletion examples/networkplugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ There are 5 different Network Plugin options :

- Azure Container Networking (default)
- Kubenet
- Flannel (docs are //TODO)
- Cilium (CNI IPAM implementation that pairs w/ cilium NetworkPolicy addon; only works w/ `"networkPolicy": "cilium"`)
- Antrea (CNI IPAM implementation that pairs w/ antrea NetworkPolicy addon; only works w/ `"networkPolicy": "antrea"`)

Expand Down
2 changes: 1 addition & 1 deletion pkg/api/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ func (cs *ContainerService) setAddonsConfig(isUpgrade bool) {

defaultFlannelAddonsConfig := KubernetesAddon{
Name: common.FlannelAddonName,
Enabled: to.BoolPtr(o.KubernetesConfig.NetworkPlugin == NetworkPluginFlannel),
Enabled: to.BoolPtr(false),
Containers: []KubernetesContainerSpec{
{
Name: common.KubeFlannelContainerName,
Expand Down
6 changes: 1 addition & 5 deletions pkg/api/convertertoapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,7 @@ func setVlabsKubernetesDefaults(vp *vlabs.Properties, api *OrchestratorProfile)
if vp.HasWindows() {
api.KubernetesConfig.NetworkPlugin = vlabs.DefaultNetworkPluginWindows
} else {
if vp.OrchestratorProfile.KubernetesConfig.IsAddonEnabled(common.FlannelAddonName) {
api.KubernetesConfig.NetworkPlugin = NetworkPluginFlannel
} else {
api.KubernetesConfig.NetworkPlugin = vlabs.DefaultNetworkPlugin
}
api.KubernetesConfig.NetworkPlugin = vlabs.DefaultNetworkPlugin
}
}
}
Expand Down
19 changes: 0 additions & 19 deletions pkg/api/convertertoapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package api
import (
"testing"

"github.com/Azure/aks-engine/pkg/api/common"
"github.com/Azure/go-autorest/autorest/to"

"github.com/davecgh/go-spew/spew"
Expand Down Expand Up @@ -1002,24 +1001,6 @@ func TestSetVlabsKubernetesDefaults(t *testing.T) {
expectedNetworkPlugin: "",
expectedNetworkPolicy: "antrea",
},
{
name: "flannel addon",
p: &vlabs.Properties{
OrchestratorProfile: &vlabs.OrchestratorProfile{
KubernetesConfig: &vlabs.KubernetesConfig{
NetworkPlugin: "",
Addons: []vlabs.KubernetesAddon{
{
Name: common.FlannelAddonName,
Enabled: to.BoolPtr(true),
},
},
},
},
},
expectedNetworkPlugin: NetworkPluginFlannel,
expectedNetworkPolicy: "",
},
}

for _, test := range tests {
Expand Down
6 changes: 1 addition & 5 deletions pkg/api/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ func (cs *ContainerService) setOrchestratorDefaults(isUpgrade, isScale bool) {
}
} else {
if o.KubernetesConfig.NetworkPlugin == "" {
if o.KubernetesConfig.IsAddonEnabled(common.FlannelAddonName) {
o.KubernetesConfig.NetworkPlugin = NetworkPluginFlannel
} else {
o.KubernetesConfig.NetworkPlugin = DefaultNetworkPlugin
}
o.KubernetesConfig.NetworkPlugin = DefaultNetworkPlugin
}
}

Expand Down
14 changes: 0 additions & 14 deletions pkg/api/defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,20 +1061,6 @@ func TestNetworkPluginDefaults(t *testing.T) {
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin, DefaultNetworkPlugin)
}

mockCS = getMockBaseContainerService("1.15.7")
properties = mockCS.Properties
properties.OrchestratorProfile.KubernetesConfig.Addons = []KubernetesAddon{
{
Name: common.FlannelAddonName,
Enabled: to.BoolPtr(true),
},
}
mockCS.setOrchestratorDefaults(true, true)
if properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin != NetworkPluginFlannel {
t.Fatalf("NetworkPlugin did not have the expected value, got %s, expected %s",
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin, NetworkPluginFlannel)
}

mockCS = getMockBaseContainerService("1.19.2")
properties = mockCS.Properties
properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = NetworkPluginAzure
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/vlabs/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ const (
NetworkPolicyAntrea = "antrea"
// NetworkPluginAntrea is the string expression for antrea network plugin config option
NetworkPluginAntrea = NetworkPolicyAntrea
// NetworkPluginFlannel is the string expression for flannel network plugin config option
NetworkPluginFlannel = "flannel"
// NetworkPluginFlannel is the string expression for flannel network plugin config option // Deprecated
NetworkPluginFlannel = "flannel" // Deprecated
// NetworkModeBridge is the string expression for bridge network mode config option
NetworkModeBridge = "bridge"
// NetworkModeTransparent is the string expression for transparent network mode config option
Expand Down
Loading

0 comments on commit b4f9c42

Please sign in to comment.