Skip to content

Instantly share code, notes, and snippets.

View jcpowermac's full-sized avatar

Joseph Callen jcpowermac

View GitHub Profile
@jcpowermac
jcpowermac / main.py
Created September 20, 2021 21:09
random-vsphere-release-ci
import random
import ruamel.yaml
from crontab import CronTab
supported_versions = ["4.6", "4.7", "4.8", "4.9", "4.10"]
job_variants = ["e2e-vsphere-upi", "e2e-vsphere-upi-serial", "e2e-vsphere", "e2e-vsphere-serial", "e2e-vsphere-techpreview", "e2e-vsphere-techpreview-serial"]
min_apart = 10
def main():
@jcpowermac
jcpowermac / a_README.md
Created March 3, 2021 20:53
Running kubectl-trace in openshift

kubectl trace in openshift

trace runs as a Job, if there are problems look there: oc get jobs.

oc trace run  --serviceaccount=kubectltrace pod/machine-api-controllers-56db5fcc9c-n9f4d -c machine-controller -f vsphere-session.bt 
@jcpowermac
jcpowermac / create-existing-folder-permissions.sh
Created January 13, 2021 17:29
openshift vsphere permissions with govc
#!/bin/bash
set -e
set -x
declare -A roles
VCENTER="Cns.Searchable InventoryService.Tagging.AttachTag InventoryService.Tagging.CreateCategory InventoryService.Tagging.CreateTag InventoryService.Tagging.DeleteCategory InventoryService.Tagging.DeleteTag InventoryService.Tagging.EditCategory InventoryService.Tagging.EditTag Sessions.ValidateSession StorageProfile.View"
VCENTER_ROLE_NAME="openshift-vcenter-level"
@jcpowermac
jcpowermac / create-existing-folder-permissions.sh
Created January 13, 2021 14:36
openshift vsphere permissions with govc
#!/bin/bash
set -e
set -x
declare -A roles
VCENTER="Cns.Searchable InventoryService.Tagging.AttachTag InventoryService.Tagging.CreateCategory InventoryService.Tagging.CreateTag InventoryService.Tagging.DeleteCategory InventoryService.Tagging.DeleteTag InventoryService.Tagging.EditCategory InventoryService.Tagging.EditTag Sessions.ValidateSession StorageProfile.View"
VCENTER_ROLE_NAME="openshift-vcenter-level"
@jcpowermac
jcpowermac / README.md
Last active January 8, 2021 22:18
openshift serverless with VMware event broker
@jcpowermac
jcpowermac / ServiceMonitoring.yaml
Created December 18, 2020 19:34
vsphere exporter in openshift (will submit pr)
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: vmware-exporter
name: vmware-exporter-monitor
namespace: openshift-vsphere-infra
spec:
endpoints:
- interval: 30s
@jcpowermac
jcpowermac / README.md
Created December 8, 2020 18:23
vCenter: role, privileges, permissions - mitmproxy

There is a proxy already running on vCenter - assuming this proxies the various services running on vCenter via the single port (TCP 443 - https):

Modify /sdk changing the port to 28085.

root@ip-172-31-250-99 [ /etc/vmware-rhttpproxy/endpoints.conf.d ]# cat vpxd-rhttpproxy-endpoint.conf 
/sdk local 28085 redirect allow
@jcpowermac
jcpowermac / main.go
Last active November 12, 2020 15:41
vsphere permissions
package main
import (
"context"
"fmt"
"net/url"
"strings"
"time"
"github.com/davecgh/go-spew/spew"
#!/bin/bash
export KUBECONFIG=/projects/installer-testing/vsphere-ipi/auth/kubeconfig
SECRET_PATH=/tmp
oc extract secret/vsphere-creds -n kube-system --to=${SECRET_PATH}
WORKSPACE="$(oc get cm cloud-provider-config -n openshift-config -o jsonpath='{.data.config}' | head -n 10 | tomljson | jq '.Workspace')"
@jcpowermac
jcpowermac / devfile.yaml
Created August 18, 2020 18:18
openshift installer devfile
metadata:
name: installer
projects:
- name: openshift-installer
source:
location: 'https://github.com/openshift/installer.git'
type: git
branch: release-4.5
clonePath: src/github.com/openshift/installer
components: