Skip to content

Instantly share code, notes, and snippets.

@siegy22
Last active October 17, 2025 14:28
Show Gist options
  • Select an option

  • Save siegy22/632d4601e66f414607eb988de64663e7 to your computer and use it in GitHub Desktop.

Select an option

Save siegy22/632d4601e66f414607eb988de64663e7 to your computer and use it in GitHub Desktop.
Deploying Cisco ISE on OpenShift Virtualization/Kubevirt

Cisco ISE on OpenShift Virtualization

Ref.

Installation

Enable the Sidecar Feature gate:

apiVersion: hco.kubevirt.io/v1beta1
kind: HyperConverged
metadata:
  name: kubevirt-hyperconverged
  namespace: openshift-cnv
  annotations:
    kubevirt.kubevirt.io/jsonpatch: >-
      [{"op": "add", "path": "/spec/configuration/developerConfiguration/featureGates/-", "value": "Sidecar"}] # <- Add this 
spec:
  # ...

Add the configmap with the script to replace the product in the SMBIOS xml:

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
  name: my-config-map
  namespace: ise
data:
  my_script.sh: |
    #!/bin/sh
    tempFile=`mktemp --dry-run`
    echo $4 > $tempFile
    sed -i "s|OpenShift Virtualization|KVM|" $tempFile
    cat $tempFile
EOF

Add the hook annotation in your VM under spec.template.metadata.annotations:

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  name: ise
  namespace: ise
spec:
  running: true
  template:
    metadata:
      labels:
        kubevirt.io/domain: ise
      annotations:
        # Add the following annotation:
        hooks.kubevirt.io/hookSidecars: >
            [
              {
                "args": ["--version", "v1alpha2"],
                "configMap": {"name": "my-config-map", "key": "my_script.sh", "hookPath": "/usr/bin/onDefineDomain"}
              }
            ]
    spec:
      # ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment