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

feat: add GCP ccm #4513

Merged
merged 1 commit into from
Nov 25, 2021
Merged

feat: add GCP ccm #4513

merged 1 commit into from
Nov 25, 2021

Conversation

frezbo
Copy link
Member

@frezbo frezbo commented Nov 10, 2021

Update docs to reflect deploying GCP Cloud Control Manager (CCM)

Signed-off-by: Noel Georgi [email protected]


This change is Reviewable

@frezbo
Copy link
Member Author

frezbo commented Nov 10, 2021

/approve

@frezbo frezbo force-pushed the feat/gcp-ccm branch 2 times, most recently from fa4c673 to 40670e5 Compare November 12, 2021 09:34
@frezbo
Copy link
Member Author

frezbo commented Nov 12, 2021

/m -ff

@smira
Copy link
Member

smira commented Nov 12, 2021

/m -ff

you need first some reviews on the PR

@smira smira added this to the v0.14 milestone Nov 12, 2021
@smira smira requested a review from rsmitty November 12, 2021 19:55
@smira
Copy link
Member

smira commented Nov 12, 2021

@rsmitty could be the best resource to review this one, I'm not familiar enough with this

@nberlee
Copy link
Contributor

nberlee commented Nov 13, 2021

@frezbo
You may also want to add the RBAC for the ILB to be able to write to events: (you will see an error if you create a loadbalancer with an internal ip) see https://raw.githubusercontent.com/on2itsecurity/secure-k8s/main/cluster/manifests/gce-provider-extra-rbac.yaml

Consider adding --port: 0 to the parameters (see warning in log)
And add a default gce.conf as this is where the GCP module mostly gets its config from.. .The paramaters in the cloud controller are limited...

@frezbo
Copy link
Member Author

frezbo commented Nov 13, 2021

@nberlee Thanks for the feedback.

  • I'll test out the internal load balancer and update if necessary.
  • --port=0 is not set as the apiserver-authentication-reader role binding is created. It;s a common role binding with ccm's
  • Do you have an example snippet of gce.conf, and what parameters are usually in there?. That would help in improving the docs

@nberlee
Copy link
Contributor

nberlee commented Nov 13, 2021

All possible settings are here: https://github.com/kubernetes/cloud-provider-gcp/blob/master/providers/gce/gce.go#L183
my gce.conf looks something like this, although, it really depends on your GCP environment if you want to have some of these features to be autodetected. The last two are the most important I think because that makes it behave way differently...

data:
  gce.conf: |-
    [global]
    project-id = my-prod-id
    network-project-id = my-prod-id
    network-name = vpc-workers-cluster2
    subnetwork-name = sn-vips-cluster2
    node-instance-prefix = vm-worker-node
    node-tags = talos-workers-cluster2
    multizone = true
    regional = true

I must have been wrong about --port=0 then I thought this was the nonsecure CCM api port... just like kube-apiserver/scheduler/controler-manager has this option

@sergelogvinov
Copy link
Contributor

cloud-provider-gcp does not have many features than gce-ccm.

If any one wants to run ccm without allocate-node-cidrs -- here fix sergelogvinov/cloud-provider-gcp@49216c9 (good for multi cloud setups)

in my case, I use only that params, (csi/autoscale work fine with that ccm)

          command:
            - /cloud-controller-manager
          args:
            - --bind-address=127.0.0.1
            - --cloud-provider=gce
            - --cloud-config=/etc/gce/gce.conf
            - --allocate-node-cidrs=false
            - --cluster-cidr=10.64.0.0/12
            - --controllers=cloud-node,cloud-node-lifecycle
            - --port=0
            - --use-service-account-credentials
            - -v=2
  gce.conf: |
    [global]
    project-id = 
    network-name =

@frezbo frezbo force-pushed the feat/gcp-ccm branch 4 times, most recently from 1e8e21e to 140f026 Compare November 24, 2021 11:08
Copy link
Member

@smira smira left a comment

Choose a reason for hiding this comment

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

not an expert, but this looks much more fun to me

Update docs to reflect deploying GCP Cloud Control Manager (CCM)

Signed-off-by: Noel Georgi <[email protected]>
@frezbo
Copy link
Member Author

frezbo commented Nov 25, 2021

/m -ff

@talos-bot talos-bot merged commit d5cbc36 into siderolabs:master Nov 25, 2021
@frezbo frezbo deleted the feat/gcp-ccm branch November 25, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants