Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7 backports 2020-06-30 #12354

Merged
merged 9 commits into from Jul 1, 2020
Merged

v1.7 backports 2020-06-30 #12354

merged 9 commits into from Jul 1, 2020

Conversation

christarazi
Copy link
Member

@christarazi christarazi commented Jul 1, 2020

Once this PR is merged, you can update the PR labels via:

$ for pr in 12180 12117 11132 12198 12106; do contrib/backporting/set-labels.py $pr done 1.7; done

@christarazi christarazi requested a review from a team as a code owner July 1, 2020 03:04
@christarazi christarazi added backport/1.7 kind/backports This PR provides functionality previously merged into master. labels Jul 1, 2020
@christarazi
Copy link
Member Author

test-backport-1.7

@christarazi christarazi force-pushed the pr/v1.7-backport-2020-06-30-2 branch from 93b5f17 to 35235ff Compare July 1, 2020 03:18
@christarazi
Copy link
Member Author

test-backport-1.7

@christarazi christarazi force-pushed the pr/v1.7-backport-2020-06-30-2 branch from 35235ff to ee658f2 Compare July 1, 2020 03:32
@christarazi
Copy link
Member Author

test-backport-1.7

@aanm aanm self-assigned this Jul 1, 2020
zbindenren and others added 8 commits July 1, 2020 10:40
[ upstream commit 606736c ]

Signed-off-by: Rene Zbinden <rene.zbinden@postfinance.ch>
Signed-off-by: André Martins <andre@cilium.io>
[ upstream commit e7d4f5c ]

Signed-off-by: Rene Zbinden <rene.zbinden@postfinance.ch>
Signed-off-by: André Martins <andre@cilium.io>
[ upstream commit 93d32dd ]

Otherwise, when running with IPv6-only the agent fails with the
following:

    level=fatal msg="Error while creating daemon" error="invalid daemon
    configuration: native routing cidr must be configured with option
    --native-routing-cidr in combination with --masquerade --tunnel=disabled
    --ipam=hostscope-legacy" subsys=daemon

Also, we currently do not masquerade IPv6.

Fixes: e7d4f5c ("daemon: validate IPv4NativeRoutingCIDR value in DaemonConfig")
Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: André Martins <andre@cilium.io>
…fail

[ upstream commit 03c39a0 ]

Fixes: e7d4f5c ("daemon: validate IPv4NativeRoutingCIDR value in DaemonConfig")
Signed-off-by: André Martins <andre@cilium.io>
[ upstream commit 658f9db ]

Fixes: c496e25 ("eni: Support masquerading")
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
[ upstream commit fc94aa1 ]

As we are currently running our CI with a CIDR from the Cilium-Operator,
which is "10.0.0.0/16", we should set it as part of our
'nativeRoutingCIDR'.

Fixes: ace902d ("helm: Enable BPF masquerading by default")
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
[ upstream commit ae19a9d ]

Having a init function to initialize all structures does not initialize
the different fields of 'CNPCRV' in case this variable is accessed
outside the 'v2/client' package. Replacing the 'init' function with
dedicated functions that initialize those fields allows 'CNPCRV' to have
the fields rightfully initialized.

Signed-off-by: André Martins <andre@cilium.io>
[ upstream commit 35501c7 ]

The CCNP validation is different from the CNP validation so we need to
validate the CCNP with the right schema validation.

Fixes: 9b0ae85 ("k8s: Fix CCNP for host policies")
Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/v1.7-backport-2020-06-30-2 branch from ee658f2 to 282bec9 Compare July 1, 2020 09:12
@aanm
Copy link
Member

aanm commented Jul 1, 2020

test-backport-1.7

@aanm
Copy link
Member

aanm commented Jul 1, 2020

I have a fix for the unit test failures locally. Will repush once all other tests finish.

@aanm
Copy link
Member

aanm commented Jul 1, 2020

test-upstream-k8s

@aanm
Copy link
Member

aanm commented Jul 1, 2020

all tests have passed, I'll re-push the PR with the unit tests fixed, once the unit tests have passed we can merge this PR

[ upstream commit f5b1887 ]

From now on, the validation schema for MatchLabels will only allow at
maximum of 63 characters with the regex
'^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$' similar to what is used
in k8s structures:

"Valid label values must be 63 characters or less and must be empty or
begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes
(-), underscores (_), dots (.), and alphanumerics between."

Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

This fixes an issue where a user could create a badly defined CNP
which wouldn't have a map[string]string in the matchLabels field. This
CNP would then be accepted by the kube-apiserver and make Cilium error
out and possibly crashing. Unfortunately not all k8s version support
this fix and we can only backport it to Cilium versions that have a
minimum support for k8s >= 1.11.

Signed-off-by: André Martins <andre@cilium.io>
@aanm aanm force-pushed the pr/v1.7-backport-2020-06-30-2 branch from 282bec9 to 4f9355a Compare July 1, 2020 12:49
@aanm aanm merged commit 8f51abc into v1.7 Jul 1, 2020
@aanm aanm deleted the pr/v1.7-backport-2020-06-30-2 branch July 1, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants