Skip to content

Commit

Permalink
Update clusterapi
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <[email protected]>
  • Loading branch information
glazychev-art committed Mar 5, 2024
1 parent c40676d commit d1c7284
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Set envs
run: |
id=${{ matrix.CNI }}-${{ github.run_number }}
echo METRO=ny >> $GITHUB_ENV
echo METRO=da >> $GITHUB_ENV
if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then
id=calico-${{ github.run_number }}
echo METRO=at >> $GITHUB_ENV
Expand Down
10 changes: 5 additions & 5 deletions scripts/calico/config-vlan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ hostname=$2

# Get IDs
device_id=$(metal device get -p "${project_id}" -o json --filter hostname="${hostname}" | jq -r '.[0].id')
bond1_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="bond1") | .id')
bond0_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="bond0") | .id')
eth1_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="eth1") | .id')

# Unbond bond1
bonded=$(metal port get -i "${bond1_id}" -o json | jq -r '.data.bonded')
# Unbond bond0
bonded=$(metal port get -i "${bond0_id}" -o json | jq -r '.data.bonded')
if [[ "$bonded" == "true" ]]; then
yes | metal port convert -i "${bond1_id}" --layer2 --bonded=false
echo "bond1 was unbonded"
yes | metal port convert -i "${bond0_id}" --layer2 --bonded=false
echo "bond0 was unbonded"
fi
# Set VLAN for eth1
metal port vlans -i "${eth1_id}" -a 3000
2 changes: 1 addition & 1 deletion scripts/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ source scripts/include/wait-pids.sh
source scripts/include/wait-start.sh

## Run clusterctl
clusterctl init --infrastructure packet:v0.7.2 || exit 1
clusterctl init --infrastructure packet:v0.8.0 || exit 1
clusterctl generate cluster ${CLUSTER_NAME} \
--kubernetes-version ${KUBERNETES_VERSION} \
--control-plane-machine-count=1 \
Expand Down
10 changes: 5 additions & 5 deletions scripts/sriov/config-vlan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ enable8021q=$4

# Get IDs
device_id=$(metal device get -p "${project_id}" -o json --filter hostname="${node_name}" | jq -r '.[0].id')
bond1_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="bond1") | .id')
bond0_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="bond0") | .id')
eth3_id=$(metal device get -i "${device_id}" -o json | jq -r ' .network_ports[] | select(.name=="eth3") | .id')

# Unbond bond1
bonded=$(metal port get -i "${bond1_id}" -o json | jq -r '.data.bonded')
# Unbond bond0
bonded=$(metal port get -i "${bond0_id}" -o json | jq -r '.data.bonded')
if [[ "$bonded" == "true" ]]; then
yes | metal port convert -i "${bond1_id}" --layer2 --bonded=false
echo "bond1 was unbonded"
yes | metal port convert -i "${bond0_id}" --layer2 --bonded=false
echo "bond0 was unbonded"
fi

# Set VLANs for eth3
Expand Down

0 comments on commit d1c7284

Please sign in to comment.