-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
141 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
ci-operator/step-registry/cucushift/installer/check/nutanix/os-image/OWNERS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
approvers: | ||
- jianlinliu | ||
- gpei | ||
- sgaoshang | ||
reviewers: | ||
- jianlinliu | ||
- gpei | ||
- sgaoshang |
27 changes: 27 additions & 0 deletions
27
...t/installer/check/nutanix/os-image/cucushift-installer-check-nutanix-os-image-commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
check_result=0 | ||
|
||
if [[ -z ${CLUSTER_OS_IMAGE} ]]; then | ||
echo "CLUSTER_OS_IMAGE is not set, skip checking os-image setting" | ||
exit "${check_result}" | ||
fi | ||
|
||
echo "CLUSTER_OS_IMAGE is set, check boot os-image setting" | ||
|
||
version_os_image=$(echo "$CLUSTER_OS_IMAGE" | cut -d / -f10) | ||
nodes_list=$(oc get nodes -ojson | jq -r '.items[].metadata.name') | ||
for node in $nodes_list; do | ||
if oc debug node/"$node" -n default -- chroot /host journalctl | grep "Booted osImageURL" | grep "$version_os_image"; then | ||
echo "Pass: passed to check node: $node boot os image $version_os_image" | ||
else | ||
echo "Fail: failed to check node: $node boot os image $version_os_image" | ||
check_result=$((check_result + 1)) | ||
fi | ||
done | ||
|
||
exit "${check_result}" |
15 changes: 15 additions & 0 deletions
15
...aller/check/nutanix/os-image/cucushift-installer-check-nutanix-os-image-ref.metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"path": "cucushift/installer/check/nutanix/os-image/cucushift-installer-check-nutanix-os-image-ref.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"jianlinliu", | ||
"gpei", | ||
"sgaoshang" | ||
], | ||
"reviewers": [ | ||
"jianlinliu", | ||
"gpei", | ||
"sgaoshang" | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...hift/installer/check/nutanix/os-image/cucushift-installer-check-nutanix-os-image-ref.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ref: | ||
as: cucushift-installer-check-nutanix-os-image | ||
from_image: | ||
namespace: ocp | ||
name: "4.14" | ||
tag: upi-installer | ||
commands: cucushift-installer-check-nutanix-os-image-commands.sh | ||
resources: | ||
requests: | ||
cpu: 10m | ||
memory: 100Mi | ||
env: | ||
- name: CLUSTER_OS_IMAGE | ||
default: "" | ||
documentation: |- | ||
Override the default OS image provided in rhcos.json | ||
documentation: |- | ||
Check nutanix os-image setting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
approvers: | ||
- jianlinliu | ||
- gpei | ||
- sgaoshang | ||
- jinyunma | ||
reviewers: | ||
- jianlinliu | ||
- gpei | ||
- sgaoshang | ||
- jinyunma |
20 changes: 20 additions & 0 deletions
20
ci-operator/step-registry/ipi/conf/osimage/nutanix/ipi-conf-osimage-nutanix-commands.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o pipefail | ||
|
||
if [[ -z ${CLUSTER_OS_IMAGE} ]]; then | ||
echo "CLUSTER_OS_IMAGE is not set, skip setting clusterOSImage" | ||
else | ||
CONFIG="${SHARED_DIR}/install-config.yaml" | ||
PATCH="${SHARED_DIR}/install-config-osimage.yaml.patch" | ||
|
||
cat >"${PATCH}" <<EOF | ||
platform: | ||
nutanix: | ||
clusterOSImage: ${CLUSTER_OS_IMAGE} | ||
EOF | ||
|
||
yq-go m -x -i "${CONFIG}" "${PATCH}" | ||
fi |
17 changes: 17 additions & 0 deletions
17
...perator/step-registry/ipi/conf/osimage/nutanix/ipi-conf-osimage-nutanix-ref.metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"path": "ipi/conf/osimage/nutanix/ipi-conf-osimage-nutanix-ref.yaml", | ||
"owners": { | ||
"approvers": [ | ||
"jianlinliu", | ||
"gpei", | ||
"sgaoshang", | ||
"jinyunma" | ||
], | ||
"reviewers": [ | ||
"jianlinliu", | ||
"gpei", | ||
"sgaoshang", | ||
"jinyunma" | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
ci-operator/step-registry/ipi/conf/osimage/nutanix/ipi-conf-osimage-nutanix-ref.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ref: | ||
as: ipi-conf-osimage-nutanix | ||
from_image: | ||
namespace: ocp | ||
name: "4.12" | ||
tag: upi-installer | ||
commands: ipi-conf-osimage-nutanix-commands.sh | ||
resources: | ||
requests: | ||
cpu: 10m | ||
memory: 100Mi | ||
env: | ||
- name: CLUSTER_OS_IMAGE | ||
default: "" | ||
documentation: |- | ||
Override the default OS image provided in rhcos.json | ||
documentation: |- | ||
Specify the url to get rhcos boot image |