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

Advanced Policy Demo changes for v2.6 policy changes #1133

Merged
merged 1 commit into from
Sep 26, 2017

Conversation

tmjd
Copy link
Member

@tmjd tmjd commented Sep 25, 2017

  • Now default deny is enabled for egress when egress policy selects a
    pod, had to adjust policies to reflect that change
  • Removed Tags from example profile output from calicoctl

Description

Addresses #1128
Addresses #1129

Todos

  • Release note

Release Note

Calico no longer inserts a default egress "allow" for all pods selected by a Kubernetes NetworkPolicy. If you have created policies with `calicoctl` that select pods and you would like to maintain the same behavior, you must ensure that all desired egress traffic is allowed by an explicit rule before upgrading to Calico v2.6.0.
Calico no longer configures deprecated `tags` in the profiles created for Kubernetes Namespaces. Any rules created via calicoctl which reference these tags will no longer work.

@caseydavenport caseydavenport added the release-note-required Change has user-facing impact (no matter how small) label Sep 25, 2017
@caseydavenport caseydavenport added this to the Calico v2.6.0 milestone Sep 25, 2017
@caseydavenport
Copy link
Member

LGTM technically, over to @emanic for docs review.

@caseydavenport
Copy link
Member

I also added some draft release notes.

@@ -178,33 +178,34 @@ PING google.com (216.58.219.206): 56 data bytes
### Prevent outgoing connections from pods

Kubernetes NetworkPolicy does not provide a way to prevent outgoing connections from pods. However,
Calico does. In this section we'll create a Policy using `calicoctl` which prevents all outgoing
connections from Kubernetes pods in the advanced-policy-demo Namespace.
Calico does. In this section we'll create egress Policies using `calicoctl`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Policies" --> "policies" (not a proper noun)

Calico does. In this section we'll create a Policy using `calicoctl` which prevents all outgoing
connections from Kubernetes pods in the advanced-policy-demo Namespace.
Calico does. In this section we'll create egress Policies using `calicoctl`
which allow the outgoing connections in the advanced-policy-demo Namespace we
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"which" --> "that"

backticks around "advanced-policy-demo" : advanced-policy-demo

"Namespace" --> "namespace" (not a proper noun)

connections from Kubernetes pods in the advanced-policy-demo Namespace.
Calico does. In this section we'll create egress Policies using `calicoctl`
which allow the outgoing connections in the advanced-policy-demo Namespace we
want, all other egress traffic will be denied.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"," --> ";" OR even "want, all" --> "want. All"

To do this, we'll need to create a Policy which selects all pods in the Namespace, and denies
traffic that doesn't match another Pod in the Namespace.
To do this, we'll need to create a Policy which selects all pods in the Namespace, and allows
egress traffic to other Pods in the Namespace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted previously, these are not proper nouns and should be lowercased: "Policy" --> "policy"; "Pods" --> "pods"; "Namespace" --> "namespace"

EOF
```

Notice that we've specified an order of 500. This means that this policy will be applied before any
of the Kubernetes policies.

We also need to create a policy which allows traffic to access kube-dns. Let's create one now in the kube-system Namespace.
We'll specify an order of 400 so that it takes precendent over other policies.
We'll specify an order of 500 so that it takes precendent over the Kubernetes policies also.
Copy link
Contributor

@emanic emanic Sep 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"precendent" is not a word :) .... "precendent" --> "precedence"

I would suggest moving "also" before takes. Otherwise, it's confusing as to just what the also refers to.

@tmjd
Copy link
Member Author

tmjd commented Sep 26, 2017

@casey thanks for adding the release notes
@emanic PTAL again, I tried to keep the doc consistent in the capitalization of the words you suggested.

@caseydavenport
Copy link
Member

@tmjd don't forget we need to port these changes to v2.6 when they're ready.

@emanic
Copy link
Contributor

emanic commented Sep 26, 2017

LGTM thanks @tmjd !

Calico API using `calicoctl`.

We can see that the Namespace has a corresponding [Profile]({{site.baseurl}}/{{page.version}}/reference/calicoctl/resources/profile).
We can see that the namespace has a corresponding [profile]({{site.baseurl}}/{{page.version}}/reference/calicoctl/resources/profile).

```shell
$ calicoctl get profile -o wide
NAME TAGS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh @tmjd one more thing I wanted to mention and maybe you are already aware of this but we still see TAGS in the heading. Maybe that heading still shows up in the output and just has nothing beneath it...I am not sure. Just wanted to make sure you were aware of this detail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for checking but yeah that is how it looks with the TAGS heading and nothing in that column.

@tmjd
Copy link
Member Author

tmjd commented Sep 26, 2017

Please don't merge until I squash and apply these to the v2.6 folder also.

- Now default deny is enabled for egress when egress policy selects a
  pod, had to adjust policies to reflect that change
- Removed Tags from example profile output from calicoctl
- Made policy, pod, namespace capitalization consistent
@tmjd tmjd force-pushed the update-adv-pol-demo-for-2-6 branch from c2282f3 to 5217cde Compare September 26, 2017 17:28
@tmjd tmjd merged commit d92b76c into projectcalico:master Sep 26, 2017
@tmjd tmjd deleted the update-adv-pol-demo-for-2-6 branch October 27, 2017 20:01
caseydavenport added a commit that referenced this pull request Dec 14, 2021
…3-upstream-release-v3.20

Automated cherry pick of #1133: Fix release target
caseydavenport pushed a commit that referenced this pull request Dec 14, 2021
Send logs both to file and kubectl logs
(cherry picked from commit 880b367)
caseydavenport pushed a commit that referenced this pull request Dec 14, 2021
Merge pull request #1133 from song-jiang/song-felix-log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants