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

Commit

Permalink
docs: confirm flannel + docker is not supported (#3886)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Oct 2, 2020
1 parent a78f07a commit 0074c24
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/topics/clusterdefinitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ $ 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. If `networkPlugin` is set to `"flannel"` this addon will be enabled automatically. Not compatible with any other `networkPlugin` or `networkPolicy`. |
| [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
3 changes: 3 additions & 0 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,9 @@ func (a *Properties) validateAddons() error {
return errors.Errorf("%s addon is not supported with networkPlugin=%s, please use networkPlugin=%s", common.FlannelAddonName, networkPlugin, NetworkPluginFlannel)
}
}
if a.OrchestratorProfile.KubernetesConfig.ContainerRuntime != Containerd {
return errors.Errorf("%s addon is only supported with containerRuntime=%s", common.FlannelAddonName, Containerd)
}
case "azure-policy":
isValidVersion, err := common.IsValidMinVersion(a.OrchestratorProfile.OrchestratorType, a.OrchestratorProfile.OrchestratorRelease, a.OrchestratorProfile.OrchestratorVersion, "1.14.0")
if err != nil {
Expand Down
46 changes: 42 additions & 4 deletions pkg/api/vlabs/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,7 @@ func TestValidateAddons(t *testing.T) {
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
ContainerRuntime: Containerd,
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Expand All @@ -2077,12 +2078,46 @@ func TestValidateAddons(t *testing.T) {
},
expectedErr: nil,
},
{
name: "flannel addon enabled but no containerRuntime",
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Enabled: to.BoolPtr(true),
},
},
},
},
},
expectedErr: errors.Errorf("%s addon is only supported with containerRuntime=%s", common.FlannelAddonName, Containerd),
},
{
name: "flannel addon enabled with docker",
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
ContainerRuntime: Docker,
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Enabled: to.BoolPtr(true),
},
},
},
},
},
expectedErr: errors.Errorf("%s addon is only supported with containerRuntime=%s", common.FlannelAddonName, Containerd),
},
{
name: "flannel addon enabled w/ NetworkPlugin=flannel",
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
NetworkPlugin: NetworkPluginFlannel,
ContainerRuntime: Containerd,
NetworkPlugin: NetworkPluginFlannel,
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Expand All @@ -2099,7 +2134,8 @@ func TestValidateAddons(t *testing.T) {
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
NetworkPlugin: DefaultNetworkPlugin,
ContainerRuntime: Containerd,
NetworkPlugin: DefaultNetworkPlugin,
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Expand All @@ -2116,7 +2152,8 @@ func TestValidateAddons(t *testing.T) {
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
NetworkPlugin: "kubenet",
ContainerRuntime: Containerd,
NetworkPlugin: "kubenet",
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Expand All @@ -2133,7 +2170,8 @@ func TestValidateAddons(t *testing.T) {
p: &Properties{
OrchestratorProfile: &OrchestratorProfile{
KubernetesConfig: &KubernetesConfig{
NetworkPolicy: "calico",
ContainerRuntime: Containerd,
NetworkPolicy: "calico",
Addons: []KubernetesAddon{
{
Name: common.FlannelAddonName,
Expand Down

0 comments on commit 0074c24

Please sign in to comment.