-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
122 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# machine-api-provider-cloudscale | ||
|
||
Provider for cloudscale.ch for the OpenShift machine-api. | ||
|
||
## Testing on a local non-OCP cluster | ||
|
||
```bash | ||
# Apply required upstream CRDs | ||
kubectl apply -k config/crds | ||
|
||
make run | ||
|
||
# Apply a generic machine object that will not join a cluster | ||
kubectl apply -f config/samples/machine-cloudscale-generic.yml | ||
``` | ||
|
||
## Testing on a Project Syn managed OCP cluster | ||
|
||
```bash | ||
# Deploy nodelink-controller if not already deployed | ||
kubectl apply -f config/deploy/nodelink-controller.yml | ||
|
||
# Generate the userData secret from the main.tf.json in the cluster catalog | ||
./pkg/machine/userdata/userdata-secret-from-maintfjson.sh manifests/openshift4-terraform/main.tf.json | k apply -f- | ||
|
||
make run | ||
|
||
# Apply a known working machine object | ||
# This will join the cluster and become a worker node | ||
# You want to update: | ||
# - metadata.labels["machine.openshift.io/cluster-api-cluster"] | ||
# - spec.providerSpec.value.zone | ||
# - spec.providerSpec.value.baseDomain | ||
# - spec.providerSpec.value.image | ||
# - spec.providerSpec.value.interfaces[0].networkUUID | ||
kubectl apply -f config/samples/machine-cloudscale-known-working.yml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resources: | ||
- machine.openshift.io.crd.yaml | ||
- machinehealthcheck.openshift.io.crd.yaml | ||
- machineset.openshift.io.crd.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nodelink-controller | ||
namespace: openshift-machine-api | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
app: nodelink-controller | ||
template: | ||
metadata: | ||
labels: | ||
app: nodelink-controller | ||
spec: | ||
containers: | ||
- args: | ||
- --logtostderr=true | ||
- --v=3 | ||
- --leader-elect=true | ||
- --leader-elect-lease-duration=120s | ||
- --namespace=openshift-machine-api | ||
command: | ||
- /nodelink-controller | ||
image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ad0bb293968c38d282e3d348872007ce780bc1be1407bce62528cae0f4814161 | ||
imagePullPolicy: IfNotPresent | ||
name: nodelink-controller | ||
resources: | ||
requests: | ||
cpu: 10m | ||
memory: 20Mi | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
restartPolicy: Always | ||
serviceAccountName: machine-api-controllers | ||
status: {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Minimal generic config that will not join any node but just creating a machine | ||
apiVersion: machine.openshift.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
|
@@ -14,13 +15,12 @@ spec: | |
providerSpec: | ||
value: | ||
zone: lpg1 | ||
baseDomain: cluster-1.appuio.cloud | ||
baseDomain: cluster-1.appuio.io | ||
flavor: flex-4-1 | ||
image: debian-12 | ||
rootVolumeSizeGB: 50 | ||
antiAffinityKey: app | ||
sshKeys: | ||
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII/HGW/GXvDRliE36QJJgYigs7+UfJFf/fkLotIDOl8z [email protected] | ||
sshKeys: [] | ||
interfaces: | ||
- type: Public | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Known working config creating a node that will join a OCP cluster. | ||
# Create the userDataSecret with | ||
# $ ./pkg/machine/userdata/userdata-secret-from-maintfjson.sh c-appuio-lab-cloudscale-rma-0/manifests/openshift4-terraform/main.tf.json | ||
# | ||
# Created from this config: | ||
# $ k get machine,node app-7ws9q | ||
# NAME PHASE TYPE REGION ZONE AGE | ||
# machine.machine.openshift.io/app-7ws9q Running flex-16-4 rma rma1 3m38s | ||
# | ||
# NAME STATUS ROLES AGE VERSION | ||
# node/app-7ws9q Ready app,worker 59s v1.28.13+2ca1a23 | ||
apiVersion: machine.openshift.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
annotations: {} | ||
generateName: app- | ||
labels: | ||
machine.openshift.io/cluster-api-cluster: c-appuio-lab-cloudscale-rma-0 | ||
spec: | ||
lifecycleHooks: {} | ||
metadata: | ||
labels: | ||
node-role.kubernetes.io/app: "" | ||
node-role.kubernetes.io/worker: "" | ||
providerSpec: | ||
value: | ||
zone: rma1 | ||
baseDomain: lab-cloudscale-rma-0.appuio.cloud | ||
flavor: flex-16-4 | ||
image: custom:rhcos-4.15 | ||
rootVolumeSizeGB: 100 | ||
antiAffinityKey: app | ||
interfaces: | ||
- type: Private | ||
networkUUID: fd2b132d-f5d0-4024-b99f-68e5321ab4d1 | ||
userDataSecret: | ||
name: cloudscale-user-data | ||
tokenSecret: | ||
name: cloudscale-rw-token | ||
status: {} |