Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Can't use cilium if the networkPlugin is not defined or not present in the config file. #3255

Closed
dcasati opened this issue Jun 12, 2018 · 3 comments · Fixed by #3271
Closed
Assignees

Comments

@dcasati
Copy link
Contributor

dcasati commented Jun 12, 2018

Is this a request for help?: No


Is this an ISSUE or FEATURE REQUEST? (choose one): ISSUE


What version of acs-engine?: v0.18.3


Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm)

Kubernetes 1.10

What happened:

Can't use cilium if the networkPlugin if either:

  1. Not specified
  2. Is blank ("networkPlugin": "")

The following error is thrown when either situation is met - for instance, when you only have networkPolicy as cilium:

DEBU[0004] Already registered for "Microsoft.Compute"
DEBU[0004] Already registered for "Microsoft.Storage"
DEBU[0004] Already registered for "Microsoft.Network"
WARN[0004] apimodel: missing masterProfile.dnsPrefix will use "dcasati-cilium-test-empty_networkplugin"
WARN[0004] --resource-group was not specified. Using the DNS prefix from the apimodel as the resource group name: dcasati-cilium-test-empty_networkplugin
INFO[0005] Error returned by LoadContainerService: networkPolicy 'cilium' is not supported with networkPlugin 'azure'
FATA[0005] failed to load apimodel: %s Failed to validate the apimodel after populating values: networkPolicy 'cilium' is not supported with networkPlugin 'azure'```
**What you expected to happen**:


**How to reproduce it** (as minimally and precisely as possible):

Run `acs-engine` against the `kubernetes-cilium.json`:

```bin/acs-engine deploy \
        --debug \
        --api-model ./examples/networkpolicy/kubernetes-cilium.json \
        --location westus2 \
        --subscription-id $SUBCRIPTION \
        --dns-prefix dcasati-cilium-test-empty-networkplugin -f ```

**Anything else we need to know**:

It does work when specifying both, `"networkPolicy"` and `networkPlugin` as  `cilium`.  According to `validate.go` the following combinations should also work:

		networkPlugin: "cilium",
		networkPolicy: "",
	},
	{
		networkPlugin: "cilium",
		networkPolicy: "cilium",
	},
	{
		networkPlugin: "",
		networkPolicy: "cilium",

Question to @jessfraz: Trying to validate is what I'm seeing is expected or if I should send a diff with an update for the `kubernetes-cilium.json` with accompanying update to the doc as well ? 

@dcasati dcasati changed the title cilium Can't use cilium if the networkPlugin is not defined or not present in the config file. Jun 12, 2018
@dcasati
Copy link
Contributor Author

dcasati commented Jun 12, 2018

Something else to note. When using the vlabs api, and not specifying the NetworkPlugin (either empty or non existent in the config), the value for the NetworkPlugin will be azure (DefaultNetworkPlugin) as defined at const.go

const (
	// DefaultNetworkPlugin defines the network plugin to use by default
	DefaultNetworkPlugin = "azure"
	// DefaultNetworkPluginWindows defines the network plugin to use by default for clusters with Windows agent pools
	DefaultNetworkPluginWindows = "azure"
	// DefaultNetworkPolicy defines the network policy to use by default
	DefaultNetworkPolicy = ""

@jackfrancis
Copy link
Member

Note to self: the last good test for cilium cluster creation is d97a176

@jackfrancis
Copy link
Member

Sorry for the late response here @dcasati! The example api model kubernetes-cilium.json is working (say our regular E2E tests) in the latest release of acs-engine. If there any particular bugs/edge-cases please feel free to re-open!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants