Skip to content

Commit

Permalink
Merge pull request #1275 from jichenjc/add_doc_update
Browse files Browse the repository at this point in the history
update doc to reflect latest version, add helm link
  • Loading branch information
k8s-ci-robot authored and jichenjc committed Jul 12, 2022
2 parents 7a8c2e8 + 0ab5543 commit 7a68599
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 8 additions & 4 deletions controllers/openstackmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,14 @@ func (r *OpenStackMachineReconciler) reconcileNormal(ctx context.Context, scope
handleUpdateMachineError(scope.Logger, openStackMachine, err)
return ctrl.Result{}, nil
}
err = networkingService.AssociateFloatingIP(openStackMachine, fp, port.ID)
if err != nil {
handleUpdateMachineError(scope.Logger, openStackMachine, errors.Errorf("Floating IP cannot be associated: %v", err))
return ctrl.Result{}, nil
if len(fp.PortID) != 0 {
scope.Logger.Info("Floating IP already associated to a port:", "id", fp.ID, "fixed ip", fp.FixedIP, "portID", port.ID)
} else {
err = networkingService.AssociateFloatingIP(openStackMachine, fp, port.ID)
if err != nil {
handleUpdateMachineError(scope.Logger, openStackMachine, errors.Errorf("Floating IP cannot be associated: %v", err))
return ctrl.Result{}, nil
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions docs/book/src/clusteropenstack/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ openstack floating ip create <public network>

Note: Only user with admin role can create a floating IP with specific IP.

Note: When associating a floating IP to a cluster with more than 1 controller node, the floatingIP will be
associated to the first controller node and the other controller nodes have no floating IP assigned. When
the controller node has the floating IP is down CAPO will NOT auto assign the floating IP address
to any other controller node. So we recommend to only set one controller node when floating ip is needed,
or please consider using loadbalancer instead, see [issue 1265](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/1265) for further information.

### Disabling the API server floating IP

It is possible to provision a cluster without a floating IP for the API server by setting
Expand Down
10 changes: 6 additions & 4 deletions docs/book/src/topics/external-cloud-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@

# External Cloud Provider

To deploy a cluster using [external cloud provider](https://github.com/kubernetes/cloud-provider-openstack), create a cluster configuration with the [external cloud provider template](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/templates/cluster-template-external-cloud-provider.yaml).
To deploy a cluster using [external cloud provider](https://github.com/kubernetes/cloud-provider-openstack), create a cluster configuration with the [external cloud provider template](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/templates/cluster-template-external-cloud-provider.yaml) or refer to [helm chart](https://github.com/kubernetes/cloud-provider-openstack/tree/master/charts/openstack-cloud-controller-manager).

## Steps
## Steps of using external cloud provider template

- After control plane is up and running, retrieve the workload cluster Kubeconfig:

```shell
clusterctl get kubeconfig ${CLUSTER_NAME} --namespace default > ./${CLUSTER_NAME}.kubeconfig
```

- Deploy a CNI solution
- Deploy a CNI solution (using Calico now)

Note: choose desired version by replace <v3.23> below

```shell
curl https://docs.projectcalico.org/v3.19/manifests/calico.yaml | sed "s/veth_mtu:.*/veth_mtu: \"1430\"/g" | kubectl --kubeconfig=./${CLUSTER_NAME}.kubeconfig apply -f -
kubectl --kubeconfig=./${CLUSTER_NAME}.kubeconfig apply -f https://docs.projectcalico.org/v3.23/manifests/calico.yaml
```

- Create a secret containing the cloud configuration
Expand Down

0 comments on commit 7a68599

Please sign in to comment.