Skip to content

Commit

Permalink
Merge pull request #230 from Nordix/update/examples-wgslr
Browse files Browse the repository at this point in the history
Use predefined BMH status in examples (master)
  • Loading branch information
metal3-io-bot committed Jun 24, 2021
2 parents 1e58f1f + 7801684 commit 87a68f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ deploy: generate-examples
kubectl apply -f examples/_out/provider-components.yaml

deploy-examples: generate-examples
# CRD for baremetalhosts in provider-components.yaml is not compatible
# with setting the status explicitly. Recreate it from metal3crds.yaml
kubectl delete -f examples/_out/metal3crds.yaml
kubectl apply -f examples/_out/metal3crds.yaml
kubectl apply -f ./examples/_out/metal3plane.yaml
kubectl apply -f ./examples/_out/cluster.yaml
kubectl apply -f ./examples/_out/machinedeployment.yaml
Expand Down
23 changes: 14 additions & 9 deletions docs/dev-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ In order to develop CAPM3 using Tilt, there is a requirement to have kind
and Tilt installed.

```sh
hack/ensure-kind.sh
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
hack/ensure-kind.sh
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
```

Once installed, you will need a tilt-settings.json. You can generate one using

```sh
make tilt-settings
make tilt-settings
```

This requires the following environment variables to be exported :
Expand All @@ -61,7 +61,7 @@ under `tilt.d` directory.
Then start Tilt:

```sh
make tilt-up
make tilt-up
```

Changes in the go code will trigger an update of the images running to run the
Expand Down Expand Up @@ -305,16 +305,16 @@ The following command will deploy the controllers from CAPI, CABPK and CAPM3 and
the requested CRDs.

```sh
make deploy
make deploy
```

### Run the Controller locally

You will first need to scale down the controller deployment :

```sh
kubectl scale -n capm3-system deployment.v1.apps/capm3-controller-manager \
--replicas 0
kubectl scale -n capm3-system deployment.v1.apps/capm3-baremetal-operator-controller-manager --replicas 0
kubectl scale -n capm3-system deployment.v1.apps/capm3-controller-manager --replicas 0
```

You can manually run the controller from outside of the cluster for development
Expand All @@ -331,11 +331,16 @@ controller is doing. You can also proceed to create/update/delete
### Deploy an example cluster

```sh
make deploy-examples
make deploy-examples
```

If you want to simulate the behavior of the metal3 baremetal operator, change
`provisioning.state` of BareMetalHost resources to `provisioned` after the
deployment of examples. Observe how a providerID is assigned to `machine` and
`metal3machine` resources.

### Delete the example cluster

```sh
make delete-examples
make delete-examples
```
2 changes: 1 addition & 1 deletion examples/controlplane/controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
nodeDrainTimeout: ${NODE_DRAIN_TIMEOUT:-"0s"}
replicas: 3
version: v1.17.0
version: v1.21.2
infrastructureTemplate:
kind: Metal3MachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha4
Expand Down

0 comments on commit 87a68f3

Please sign in to comment.