Skip to content

Commit

Permalink
Merge pull request #5157 from AndiDog/align-flatcar-template
Browse files Browse the repository at this point in the history
🌱 Align `cluster-template.yaml` and `cluster-template-flatcar.yaml`
  • Loading branch information
k8s-ci-robot authored Oct 23, 2024
2 parents b99a49c + 477631e commit fd04773
Showing 1 changed file with 78 additions and 35 deletions.
113 changes: 78 additions & 35 deletions templates/cluster-template-flatcar.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
labels:
ccm: external
csi: external
name: ${CLUSTER_NAME}
name: "${CLUSTER_NAME}"
spec:
clusterNetwork:
pods:
cidrBlocks: ["192.168.0.0/16"]
cidrBlocks:
- 192.168.0.0/16
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
name: "${CLUSTER_NAME}-control-plane"
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSCluster
name: "${CLUSTER_NAME}"
controlPlaneRef:
kind: KubeadmControlPlane
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
name: "${CLUSTER_NAME}-control-plane"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSCluster
Expand All @@ -35,27 +35,21 @@ spec:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
metadata:
name: ${CLUSTER_NAME}-control-plane
name: "${CLUSTER_NAME}-control-plane"
spec:
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
machineTemplate:
infrastructureRef:
kind: AWSMachineTemplate
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
name: "${CLUSTER_NAME}-control-plane"
kubeadmConfigSpec:
initConfiguration:
nodeRegistration:
name: $${COREOS_EC2_HOSTNAME}
kubeletExtraArgs:
cloud-provider: external
clusterConfiguration:
apiServer:
extraArgs:
cloud-provider: external
controllerManager:
extraArgs:
cloud-provider: external
initConfiguration:
nodeRegistration:
kubeletExtraArgs:
cloud-provider: external
name: $${COREOS_EC2_HOSTNAME}
joinConfiguration:
nodeRegistration:
name: $${COREOS_EC2_HOSTNAME}
Expand Down Expand Up @@ -84,59 +78,65 @@ spec:
preKubeadmCommands:
- envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp
- mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml
version: ${KUBERNETES_VERSION}
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSMachineTemplate
name: "${CLUSTER_NAME}-control-plane"
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
version: "${KUBERNETES_VERSION}"
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSMachineTemplate
metadata:
name: ${CLUSTER_NAME}-control-plane
name: "${CLUSTER_NAME}-control-plane"
spec:
template:
spec:
instanceType: ${AWS_CONTROL_PLANE_MACHINE_TYPE}
iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io
iamInstanceProfile: "control-plane.cluster-api-provider-aws.sigs.k8s.io"
instanceType: "${AWS_CONTROL_PLANE_MACHINE_TYPE}"
imageLookupBaseOS: flatcar-stable
sshKeyName: ${AWS_SSH_KEY_NAME}
sshKeyName: "${AWS_SSH_KEY_NAME}"
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: ${CLUSTER_NAME}-md-0
name: "${CLUSTER_NAME}-md-0"
spec:
clusterName: ${CLUSTER_NAME}
clusterName: "${CLUSTER_NAME}"
replicas: ${WORKER_MACHINE_COUNT}
selector:
matchLabels:
matchLabels: null
template:
spec:
clusterName: ${CLUSTER_NAME}
version: ${KUBERNETES_VERSION}
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: ${CLUSTER_NAME}-md-0
name: "${CLUSTER_NAME}-md-0"
clusterName: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSMachineTemplate
name: ${CLUSTER_NAME}-md-0
name: "${CLUSTER_NAME}-md-0"
version: ${KUBERNETES_VERSION}
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
kind: AWSMachineTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
name: "${CLUSTER_NAME}-md-0"
spec:
template:
spec:
instanceType: ${AWS_NODE_MACHINE_TYPE}
iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io
instanceType: "${AWS_NODE_MACHINE_TYPE}"
imageLookupBaseOS: flatcar-stable
sshKeyName: ${AWS_SSH_KEY_NAME}
sshKeyName: "${AWS_SSH_KEY_NAME}"
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: ${CLUSTER_NAME}-md-0
name: "${CLUSTER_NAME}-md-0"
spec:
template:
spec:
Expand Down Expand Up @@ -328,6 +328,13 @@ data:
- list
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -456,6 +463,27 @@ data:
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
name: ebs-csi-node
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- patch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
Expand Down Expand Up @@ -717,6 +745,21 @@ data:
name: ebs-csi-controller-sa
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
name: ebs-csi-node-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ebs-csi-node
subjects:
- kind: ServiceAccount
name: ebs-csi-node-sa
namespace: kube-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down

0 comments on commit fd04773

Please sign in to comment.