Skip to content

Commit

Permalink
rke2 manifests fixes after upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amold1 committed May 30, 2024
1 parent 2a3e215 commit 66c824d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 86 deletions.
31 changes: 20 additions & 11 deletions templates/flavors/rke2/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ resources:
- ../../../infra
- rke2ControlPlane.yaml
- rke2ConfigTemplate.yaml
- 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 +28,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 All @@ -36,13 +41,17 @@ patches:
path: /spec/template/spec/bootstrap/configRef/kind
value: RKE2ConfigTemplate
- target:
group: cluster.x-k8s.io
version: v1beta1
kind: Cluster
kind: HelmChartProxy
name: .*-linode-cloud-controller-manager
patch: |-
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
cni: ${CLUSTER_NAME}-cilium
- op: replace
path: /spec/valuesTemplate
value: |
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"
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
17 changes: 0 additions & 17 deletions templates/flavors/rke2/default/secret.yaml

This file was deleted.

30 changes: 2 additions & 28 deletions templates/flavors/rke2/vpcless/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ patches:
name: "linode-token-region"
image:
pullPolicy: IfNotPresent
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
- target:
kind: LinodeVPC
patch: |-
Expand Down Expand Up @@ -83,34 +85,6 @@ patches:
- sed -i '/swap/d' /etc/fstab
- swapoff -a
- hostnamectl set-hostname '{{ ds.meta_data.label }}' && hostname -F /etc/hostname
- op: replace
path: /spec/files
value:
- 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: |-
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
- target:
group: cluster.x-k8s.io
version: v1beta1
Expand Down

0 comments on commit 66c824d

Please sign in to comment.