Skip to content

Commit

Permalink
fix rke2 templates
Browse files Browse the repository at this point in the history
  • Loading branch information
eljohnson92 committed May 29, 2024
1 parent b722c4c commit 9c7fcf6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 37 deletions.
2 changes: 1 addition & 1 deletion docs/src/developers/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ This can then be used with `clusterctl` by adding the following to `~/.cluster-a
```
providers:
- name: local-linode
url: ${PWD}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
url: ${HOME}/cluster-api-provider-linode/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The e2e tests use the `local-linode` infrastructure provider, this is registered
```
providers:
- name: local-linode
url: ${PWD}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
url: ${HOME}/cluster-api-provider-linode/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
--flavor k3s --kubernetes-version v1.29.1+k3s2 \
--infrastructure local-linode:v0.0.0 \
--control-plane-machine-count 1 --worker-machine-count 1 \
--config $CLUSTERCTL_CONFIG > k3s-cluster.yaml
--config ${CLUSTERCTL_CONFIG:${HOME}/.cluster-api/clusterctl.yaml} > k3s-cluster.yaml
check:
($error == null): true
- name: Apply generated cluster yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
--kubernetes-version v1.29.1 \
--infrastructure local-linode:v0.0.0 \
--control-plane-machine-count 1 --worker-machine-count 1 \
--config $CLUSTERCTL_CONFIG > default-cluster.yaml
--config ${CLUSTERCTL_CONFIG:${HOME}/.cluster-api/clusterctl.yaml} > default-cluster.yaml
check:
($error == null): true
- name: Apply generated cluster yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
--flavor rke2 --kubernetes-version v1.29.1+rke2r1 \
--infrastructure local-linode:v0.0.0 \
--control-plane-machine-count 1 --worker-machine-count 1 \
--config $CLUSTERCTL_CONFIG> rke2-cluster.yaml
--config ${CLUSTERCTL_CONFIG:${HOME}/.cluster-api/clusterctl.yaml} > rke2-cluster.yaml
check:
($error == null): true
- name: Apply generated cluster yaml
Expand Down
2 changes: 1 addition & 1 deletion e2e/gha-clusterctl-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
providers:
- name: local-linode
url: /home/runner/work/cluster-api-provider-linode/cluster-api-provider-linode/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
url: ${GITHUB_WORKSPACE}/infrastructure-local-linode/v0.0.0/infrastructure-components.yaml
type: InfrastructureProvider
- name: "k3s"
url: https://github.com/k3s-io/cluster-api-k3s/releases/latest/bootstrap-components.yaml
Expand Down
8 changes: 7 additions & 1 deletion templates/flavors/rke2/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ resources:
- secret.yaml
- ../../../addons/cilium
- ../../../addons/cilium-network-policies
- ../../../addons/csi-driver-linode
- ../../../addons/ccm-linode
- ../../../addons/cluster-resource-set
patches:
- target:
group: cluster.x-k8s.io
Expand All @@ -26,7 +29,10 @@ patches:
metadata:
name: ${CLUSTER_NAME}
labels:
cni: ${CLUSTER_NAME}-cilium
cni: ${CLUSTER_NAME}-cilium
ccm: ${CLUSTER_NAME}-linode
csi: ${CLUSTER_NAME}-linode
crs: ${CLUSTER_NAME}-crs
- target:
group: cluster.x-k8s.io
version: v1beta1
Expand Down
30 changes: 0 additions & 30 deletions templates/flavors/rke2/default/rke2ControlPlane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,6 @@ spec:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: LinodeMachineTemplate
name: ${CLUSTER_NAME}-control-plane
files:
- path: /var/lib/rancher/rke2/server/manifests/ccm-linode.yaml
owner: root:root
content: |-
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
namespace: kube-system
name: ccm-linode
spec:
targetNamespace: kube-system
version: ${LINODE_CCM_VERSION:=v0.4.4}
chart: ccm-linode
repo: https://linode.github.io/linode-cloud-controller-manager/
bootstrap: true
valuesContent: |-
routeController:
vpcName: ${VPC_NAME:=${CLUSTER_NAME}}
clusterCIDR: 10.0.0.0/8
configureCloudRoutes: true
secretRef:
name: "linode-token-region"
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
- contentFrom:
secret:
key: linode-token-region.yaml
name: linode-${CLUSTER_NAME}-crs-0
owner: root:root
path: /var/lib/rancher/rke2/server/manifests/linode-token-region.yaml
registrationMethod: internal-only-ips
serverConfig:
cni: none
Expand Down

0 comments on commit 9c7fcf6

Please sign in to comment.