Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch HCP KubeVirt to use updated vm debugger pods #51418

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -89,7 +89,6 @@ fi
oc patch ingresscontroller -n openshift-ingress-operator default --type=json -p \
'[{ "op": "add", "path": "/spec/routeAdmission", "value": {wildcardPolicy: "WildcardsAllowed"}}]'


RELEASE_IMAGE="${RELEASE_IMAGE_LATEST}"

if [[ "${DISCONNECTED}" == "true" ]];
Expand Down Expand Up @@ -130,7 +129,6 @@ then

fi


echo "$(date) Creating HyperShift guest cluster ${CLUSTER_NAME}"
# shellcheck disable=SC2086
"${HCP_CLI}" create cluster kubevirt ${EXTRA_ARGS} ${ICSP_COMMAND} \
Expand All @@ -144,6 +142,38 @@ echo "$(date) Creating HyperShift guest cluster ${CLUSTER_NAME}"
--pull-secret "${PULL_SECRET_PATH}" \
--generate-ssh

# Set Console Password for NodePool VMs so we can easily debug them even if network failures occur
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: set-core-user-password
namespace: clusters
data:
config: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: set-core-user-password
spec:
config:
ignition:
version: 3.2.0
passwd:
users:
- name: core
# password is core
passwordHash: \$6\$jzPb4LOXbVSL5ZA.\$uvohJQPV7yej8aJ6aD.nmJifBTuQVpy5KyQkmIOt6YVdQhC2O2CXJE1TVKeRm.ie6VVVa9YZqIUToROr7qDmX0
EOF

oc patch nodepool -n clusters $CLUSTER_NAME --type=merge --patch-file=/dev/stdin <<-EOF
spec:
config:
- name: set-core-user-password
EOF

if [[ -n ${MCE} ]] ; then
if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" < 2.4)}') )); then
oc annotate hostedclusters -n "${CLUSTER_NAMESPACE_PREFIX}" "${CLUSTER_NAME}" "cluster.open-cluster-management.io/managedcluster-name=${CLUSTER_NAME}" --overwrite
Expand Down
Expand Up @@ -159,4 +159,4 @@ EOF
oc wait hyperconverged -n openshift-cnv kubevirt-hyperconverged --for=condition=Available --timeout=15m

echo "Installing VM console logger in order to aid debugging potential VM boot issues"
oc apply -f https://raw.githubusercontent.com/davidvossel/kubevirt-console-debugger/main/kubevirt-console-logger.yaml
oc apply -f https://raw.githubusercontent.com/davidvossel/kubevirt-console-debugger/main/rhcos-console-logger.yaml