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

Use deployment for CCM in example yaml #1252

Merged

Conversation

lzhecheng
Copy link
Contributor

Signed-off-by: Zhecheng Li [email protected]

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Use deployment for CCM in example yaml

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 15, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 15, 2022
@coveralls
Copy link

coveralls commented Mar 15, 2022

Coverage Status

Coverage remained the same at 80.095% when pulling c2a84b2 on lzhecheng:ccm-yaml-in-deployment into 6d49847 on kubernetes-sigs:master.

- name: etc-ssl
mountPath: /etc/ssl
readOnly: true
hostPath:
Copy link
Contributor

Choose a reason for hiding this comment

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

These files can not be found..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't change this part. Do you mean there's some problem with the original yaml file about these files?

Copy link
Contributor

Choose a reason for hiding this comment

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

These are ca certs used by apiserver and other component. These files are located on master.

Copy link
Contributor Author

@lzhecheng lzhecheng Mar 15, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's add a nodeSelector for master

- "--configure-cloud-routes=true" # "false" for Azure CNI and "true" for other network plugins
- "--leader-elect=true"
- "--route-reconciliation-period=10s"
- "--v=2"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make v=4?

Copy link
Contributor

Choose a reason for hiding this comment

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

v=5 by default.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think 4 is enough for debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's use 4 for now and update in the future if needed.

- name: etc-kubernetes
mountPath: /etc/kubernetes
hostPath:
path: /etc/kubernetes
Copy link
Member

Choose a reason for hiding this comment

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

could we add a secret with azure.json and mount the secret for authz?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean we are going to put key-value pairs from azure.json directly into this yaml file of a Secret object? Like:

apiVersion: v1
kind: Secret
metadata:
  name: azure-cloud-config
type: Opaque
stringData:
  azure.json: |-
    tenantId: <tenant-id>
    subscriptionId: <subscription-id>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline. Updated.

@@ -39,6 +39,8 @@ Do not set flag `--cloud-provider`.

### azure-cloud-controller-manager

azure-cloud-controller-manager should be run as Deployment.
Copy link
Member

Choose a reason for hiding this comment

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

run as Deployment with multiple replicas or Kubelet static Pods on each master node.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@feiskyer
Copy link
Member

could you update https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/tests/k8s-azure/manifest/cluster-api/vmss-multi-nodepool.yaml#L457 to deployment as well?

@lzhecheng lzhecheng force-pushed the ccm-yaml-in-deployment branch 7 times, most recently from fdf3f7a to a1970a7 Compare March 16, 2022 03:19
@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 Mar 16, 2022
@lzhecheng lzhecheng force-pushed the ccm-yaml-in-deployment branch 2 times, most recently from 5b46837 to 4436e44 Compare March 16, 2022 03:39
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 16, 2022
path: /var/lib/waagent/ManagedIdentity-Settings
---
apiVersion: v1
kind: Secret
Copy link
Member

Choose a reason for hiding this comment

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

I think capz should already create a secret, so we don't need to add it here? @nilo19 do you know the secret name, or host path should be used instead just for capz?

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need a secret here in this template, and host path either. The capz will create a default one and the volume is defined in L533.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline. Since this yaml file is for capz, then keep it as it was.

apiVersion: v1
kind: Pod
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloud-controller-manager
namespace: kube-system
labels:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to keep the Deployment labels? I think defining pod labels (via spec.template.metadata.labels) should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is not a must but I think maybe we can keep it. It does no harm, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, keeping the deployment labels are not harmful

@lzhecheng
Copy link
Contributor Author

/retest

Copy link
Member

@feiskyer feiskyer left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 18, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer, lzhecheng

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 18, 2022
@k8s-ci-robot
Copy link
Contributor

@lzhecheng: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cloud-provider-azure-e2e-ccm-vmss-basic-lb c2a84b2 link unknown /test pull-cloud-provider-azure-e2e-ccm-vmss-basic-lb

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.

@MartinForReal
Copy link
Contributor

/retest

@k8s-ci-robot k8s-ci-robot merged commit 92ffde3 into kubernetes-sigs:master Mar 18, 2022
@lzhecheng lzhecheng deleted the ccm-yaml-in-deployment branch March 18, 2022 12:52
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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants