sigs.k8s.io/cluster-api-provider-azure@v1.14.3/templates/test/ci/patches/windows-collect-hns-crashes.yaml (about)

     1  - op: add
     2    path: /spec/template/spec/files/-
     3    value:
     4      content: |
     5        mkdir -Force c:/localdumps
     6        reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
     7        reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpType /t REG_DWORD /d 2 /f
     8        reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpFolder /t REG_EXPAND_SZ /d "c:/LocalDumps" /f
     9        # Enable sftp so we can copy crash dump files during log collection of stfp
    10        $sshd_config = "$env:ProgramData\ssh\sshd_config"
    11        if (-not (Test-Path $sshd_config)) { mkdir -Force $sshd_config }
    12        Add-Content -Path $sshd_config "Subsystem sftp              sftp-server.exe"
    13        sc.exe stop sshd
    14        sc.exe start sshd
    15      path: C:/collect-hns-crashes.ps1
    16      permissions: "0744"
    17  - op: add
    18    path: /spec/template/spec/preKubeadmCommands/-
    19    value:
    20      powershell C:/collect-hns-crashes.ps1