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

Implement basic cluster actuator #106

Closed
chrigl opened this issue Nov 19, 2018 · 6 comments · Fixed by #150
Closed

Implement basic cluster actuator #106

chrigl opened this issue Nov 19, 2018 · 6 comments · Fixed by #150
Assignees

Comments

@chrigl
Copy link

chrigl commented Nov 19, 2018

So far, the cluster actutor is not yet implemented, except for basic types.

I would like to see a way to set up Networks, SecrityGroups and Loadbalancers for the cluster. In a first step, a single subnet for all nodes (master and worker) would IMHO be enough. Created Machines should use the created infrastructure.

Todo:

  • Create Network with subnet with a configured CIDR
  • Create a router connected to a configured external network, as well as the just created subnet
  • Create SecurityGroups for master and nodes
  • Create a loadbalancer with floating IP

LB Floating IP and NetworkID must go to cluster status. SecurityGroups also somehow, but I am currently not sure yet how. Edit: Floating IP not needed because there is an APIEndpoint on ClusterStatus.

The loadbalancer should be used as the entry point for the apiserver, so we are able to create HA control planes.

If we are done with this, we can update the machine actuator to use the infrastructure.

See also: https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/master/pkg/cloud/aws/actuators/cluster/actuator.go

@chrigl
Copy link
Author

chrigl commented Nov 19, 2018

I will start working on it this week if there are no concerns.

@gdoctor
Copy link
Contributor

gdoctor commented Nov 19, 2018

@chrigl I am currently working on the security group aspect, very similar to the aws implementation if you want to keep that our of your scope for now. You could just let me know what you had in mind for security groups within the cluster actuator, because right now most of that logic exists in the machine actuator. Up to you

@chrigl
Copy link
Author

chrigl commented Nov 20, 2018

@gdoctor I definitely appreciate help on this. I think, all building blocks necessary for a cluster should go into the cluster actuator, because they are not tight to a specific machine. I count SecurityGroups also as building block, because it is created once (at cluster level) and then used individually in the machines.

I am starting with getting the types in apis/openstackproviderconfig/v1alpha1 to support a cluster config and status, and get this landed in master. I want to have as many small-ish PRs as possible. You could build on top of this, then... Does this sound legit?

@gdoctor
Copy link
Contributor

gdoctor commented Nov 29, 2018

@chrigl sorry this got lost for me during the holidays here in the US. So is your idea that the cluster actuator actually creates the Security Groups within OpenStack? And then the machine actuator would manage which security groups exist, are added, or are removed on a per machine/machineset basis? I see this working well

@chrigl
Copy link
Author

chrigl commented Nov 30, 2018

@gdoctor No problem. Hoping you had a great vacation :)

Yes this is the basic idea. I already have custom cluster actuator running, which creates network, subnet and external router. If successful, it writes it back to the ProviderStatus:
Example:

apiVersion: cluster.k8s.io/v1alpha1
kind: Cluster
[...]
status:
  apiEndpoints:
  - host: 185.116.245.190
    port: 443
  providerStatus:
    metadata:
      creationTimestamp: null
    network:
      id: acbeb99e-eee0-4ddd-9544-ab88406eff2b
      name: k8s-cluster-test1
      subnets:
      - cidr: 10.1.0.0/24
        id: 6bdad12c-6aa4-46b9-9671-fededafeece5
        name: k8s-cluster-test1

So the machine actuator can pick up the network, and there is no need to configure the network per node. The same I would do for SecurityGroups... so there will be a field securityGroups at the same level as subnets.
Maybe we create a map here. For securityGroups["master"] and securityGroups["node"]... at least the AWS provider does it this way. We also maybe provide a way to configure additional SecurityGroups by node (which the AWS provider does as well).

I'm currently waiting for #109 to continue here.

@chrigl chrigl changed the title Implement basic cluster actuator WIP Implement basic cluster actuator Nov 30, 2018
@chrigl chrigl changed the title WIP Implement basic cluster actuator Implement basic cluster actuator Nov 30, 2018
@chrigl
Copy link
Author

chrigl commented Dec 18, 2018

/assign @chrigl

iamemilio pushed a commit to iamemilio/cluster-api-provider-openstack that referenced this issue Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants