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

Add RBAC, healthchecks, autoscalers and update Calico to v2.5.1 #51237

Merged
merged 1 commit into from Sep 3, 2017

Conversation

gunjan5
Copy link
Contributor

@gunjan5 gunjan5 commented Aug 24, 2017

What this PR does / why we need it:

  • Updates Calico to v2.5
    • Calico/node to v2.5.1
    • Calico CNI to v1.10.0
    • Typha to v0.4.1
  • Enable health check endpoints
    • Add Readiness probe for calico-node and Typha
    • Add Liveness probe for calico-node and Typha
  • Add RBAC manifest
    • With calico ClusterRole, ServiceAccount and ClusterRoleBinding
  • Add Calico CRDs in the Calico manifest (only works for k8s v1.7+)
  • Add vertical autoscaler for calico-node and Typha
  • Add horizontal autoscaler for Typha

Release note:

Calico has been updated to v2.5, RBAC added, and is now automatically scaled when GCE clusters are resized.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 24, 2017
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 24, 2017
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesn't merit a release note. labels Aug 24, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @gunjan5. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@@ -0,0 +1,87 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

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

rbac has updated to v1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xilabao we're planning to port this with k8s 1.7.x, so keeping it v1beta1 for this PR

@@ -136,3 +151,68 @@ spec:
tolerations:
- key: "CriticalAddonsOnly"
operator: "Exists"

# Create all the required CustomResourceDefinitions needed
Copy link
Member

Choose a reason for hiding this comment

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

Each CRD should be in its own yaml file in order to work with the add-on manager.

@dims
Copy link
Member

dims commented Aug 25, 2017

/ok-to-test
/release-note-none

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 25, 2017
@gunjan5
Copy link
Contributor Author

gunjan5 commented Aug 28, 2017

/test pull-kubernetes-e2e-gce-gpu

@gunjan5
Copy link
Contributor Author

gunjan5 commented Aug 29, 2017

/test pull-kubernetes-e2e-gce-gpu
/test pull-kubernetes-federation-e2e-gce

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 30, 2017
@gunjan5 gunjan5 force-pushed the calico-2.5-rbac branch 2 times, most recently from 5533dfe to 16dc434 Compare September 1, 2017 17:12
@gunjan5 gunjan5 changed the title Add RBAC, healthchecks, and update Calico to v2.5.0 Add RBAC, healthchecks, autoscalers and update Calico to v2.5.0 Sep 1, 2017
@gunjan5
Copy link
Contributor Author

gunjan5 commented Sep 1, 2017

/assign dnardo
/assign wojtek-t

@@ -103,7 +115,7 @@ spec:
{
"type": "portmap",
"capabilities": {"portMappings": true},
"snat": false
"snat": true
Copy link
Contributor

Choose a reason for hiding this comment

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

false right - ip-masq-agent will be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's because "snat": true only applies to local host traffic. See https://github.com/containernetworking/plugins/tree/master/plugins/meta/portmap#snat

@caseydavenport spotted that if we try to reach hostport from the same node as the hostport pod with localhost:<hostport> it won't work without snat: true

This shouldn't affect ip-masq-agent since this is only for the localhost traffic

Copy link
Member

Choose a reason for hiding this comment

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

Yep, this is just for the hostport plugin, not general masquerade (which will still be done by the ip-masq-agent).

The hostport plugin needs this setting in order to allow users to do curl localhost:hostport successfully.

@@ -1796,20 +1748,9 @@ function start-kube-addons {
if [[ "${NETWORK_POLICY_PROVIDER:-}" == "calico" ]]; then
setup-addon-manifests "addons" "calico-policy-controller"
Copy link
Contributor

Choose a reason for hiding this comment

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

should ENABLE_IP_MASQ_AGENT=true be added where network policy provider is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we are thinking of doing that in a separate PR later, since it might need more changes for example node labels, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I think I was confusing that with "ipMasq": true

@dnardo
Copy link
Contributor

dnardo commented Sep 1, 2017

/lgtm except for the comments on SNAT and ip-masq-agent

containers:
- image: calico/typha:v0.2.3
- image: calico/typha:v0.4.0
Copy link
Member

Choose a reason for hiding this comment

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

@gunjan5 this should be v0.4.1

@caseydavenport
Copy link
Member

/lgtm

@gunjan5 one comment re: the typha verison

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2017
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2017
@gunjan5 gunjan5 changed the title Add RBAC, healthchecks, autoscalers and update Calico to v2.5.0 Add RBAC, healthchecks, autoscalers and update Calico to v2.5.1 Sep 1, 2017
@caseydavenport
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 1, 2017
@caseydavenport
Copy link
Member

@dnardo @wojtek-t can we get this approved for cherry-pick into v1.7?

@caseydavenport
Copy link
Member

/lgtm
/approve no-issue

@thockin
Copy link
Member

thockin commented Sep 1, 2017

/approve no-issue

@thockin thockin added this to the v1.8 milestone Sep 1, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caseydavenport, dnardo, gunjan5, thockin

Associated issue requirement bypassed by: caseydavenport, thockin

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Sep 3, 2017

@gunjan5: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws 05661b6 link /test pull-kubernetes-e2e-kops-aws
pull-kubernetes-e2e-gce-bazel 05661b6 link /test pull-kubernetes-e2e-gce-bazel

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 47d0db0 into kubernetes:master Sep 3, 2017
@wojtek-t wojtek-t modified the milestones: v1.7, v1.8 Sep 4, 2017
@wojtek-t
Copy link
Member

wojtek-t commented Sep 4, 2017

@dnardo @wojtek-t can we get this approved for cherry-pick into v1.7?

@caseydavenport - it seems like bug-fixes, which I think should be fine to cherrypick. But I would like to see a user-friendly release-note on this PR first.

@gunjan5
Copy link
Contributor Author

gunjan5 commented Sep 4, 2017

@wojtek-t @caseydavenport I've added the release note, someone needs to add the label release-note to the PR

@wojtek-t wojtek-t added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Sep 5, 2017
@wojtek-t
Copy link
Member

wojtek-t commented Sep 5, 2017

@gunjan5 @caseydavenport - I changed the label. I tried doing automated cherrypick, but this generated conflict. Can one of you prepare the cherrypick then?

@gunjan5
Copy link
Contributor Author

gunjan5 commented Sep 5, 2017

@wojtek-t I've created this cherrypick PR #51967
PTAL

@wojtek-t wojtek-t added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Sep 6, 2017
k8s-github-robot pushed a commit that referenced this pull request Sep 6, 2017
…7-upstream-release-1.7

Automatic merge from submit-queue

Automated cherry pick of #51237

Cherry pick of #51237 on release-1.7.

#51237: Add RBAC, healthchecks, autoscaler and update Calico to
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.7" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet