Skip to content

Commit

Permalink
update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed Oct 16, 2024
1 parent 9e996fc commit c0390e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,41 +52,28 @@ spec:
name: ${CLUSTER_NAME}-control-plane
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
- ./wait-signal.sh "${TOKEN}" "${SERVER}" "${NAMESPACE}"
channel: "1.31-classic/edge"
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
- path: /wait-signal.sh
content: |
#!/bin/bash
set -o errexit
set -o pipefail
echo "Waiting for signal..."
TOKEN=$1
SERVER=$2
NAMESPACE=$3
while true;
do
sleep 1s
signal=$(curl -k -s --header "Authorization: Bearer $TOKEN" $SERVER/api/v1/namespaces/$NAMESPACE/configmaps/mhc-test | jq -r .data.signal?)
echo "signal $signal"
if [ "$signal" == "pass" ]; then
curl -k -s --header "Authorization: Bearer $TOKEN" -XPATCH -H "Content-Type: application/strategic-merge-patch+json" --data '{"data": {"signal": "ack-pass"}}' $SERVER/api/v1/namespaces/$NAMESPACE/configmaps/mhc-test
exit 0
Expand Down Expand Up @@ -163,19 +150,7 @@ spec:
template:
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
channel: "1.31-classic/edge"
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,7 @@ spec:
name: ${CLUSTER_NAME}-control-plane
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
channel: "1.31-classic/edge"
controlPlane:
cloudProvider: external
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
Expand Down Expand Up @@ -139,19 +127,7 @@ spec:
template:
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
channel: "1.31-classic/edge"
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
Expand Down
32 changes: 4 additions & 28 deletions test/e2e/data/infrastructure-aws/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.1.0.0/16
- 10.1.0.0/16
services:
cidrBlocks:
- 10.152.183.0/24
- 10.152.183.0/24
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
kind: CK8sControlPlane
Expand Down Expand Up @@ -52,19 +52,7 @@ spec:
name: ${CLUSTER_NAME}-control-plane
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
channel: "1.31-classic/edge"
controlPlane:
cloudProvider: external
replicas: ${CONTROL_PLANE_MACHINE_COUNT}
Expand Down Expand Up @@ -134,19 +122,7 @@ spec:
template:
spec:
nodeName: "{{ ds.meta_data.local_hostname }}"
preRunCommands:
- systemctl stop kubelet || true
- systemctl disable kubelet || true
- systemctl stop containerd || true
- systemctl disable containerd || true
files:
# note(ben): This is only required as long as k8s does not have a stable release.
- path: /capi/scripts/install.sh
permissions: "0500"
owner: "root:root"
content: |
#!/bin/bash -xe
snap install k8s --classic --channel=latest/edge/etienne-delete-me
channel: "1.31-classic/edge"
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
Expand Down

0 comments on commit c0390e3

Please sign in to comment.