Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Gasch embano1

View GitHub Profile
@embano1
embano1 / create.sh
Last active Sep 9, 2021
HTTP CloudEvents function always returning 500 (for failure tests, retries, etc.)
View create.sh
export KIND_CLUSTER_NAME=knative-0.24
export KO_DOCKER_REPO=kind.local
ko apply -f .
@embano1
embano1 / README.md
Created Jul 26, 2021
VMware Horizon Events API
View README.md

Authenticate

Note: Access token is valid for 8min.

TOKEN=$(echo -n '{"domain":"corp","username":"administrator","password":"VMware1!"}'| curl -s -d@- -H "content-type: application/json" -k https://10.153.252.17:15443/rest/login | jq -r '.access_token')

Filter to URL-encoded

@embano1
embano1 / README.md
Last active Nov 23, 2021
End-to-End Installation of VMware Event Router with kind
View README.md

End-to-End Installation of VMware Event Router with kind

The following steps describe the installation of the VMware Event Router (also part of the VEBA project) in a local Kubernetes and Knative environment.

The steps assume a Mac OSX environment but the links provide resources to install the components for other platforms.

@embano1
embano1 / README.md
Last active Jul 7, 2021
etcd Deep Dive at Golang Leipzig Meetup
View README.md

Setup

Prepare the etcd server:

docker pull bitnami/etcd:latest
docker network create app-tier --driver bridge
docker run -d --name etcd-server \
    --network app-tier \
    --publish 2379:2379 \
View README.md

Manually trigger Github Action Workflow from CLI

Motivation: the Github UI by default won't let you specify tags as input when triggering a workflow enabled with the on: workflow_dispatch event type.

Get Workflow ID

@embano1
embano1 / README.md
Created May 6, 2021
Configure Event Router with custom certs
View README.md

Configure Event Router with Custom (self-signed) Certificates

  1. Convert Cert to PEM
$ openssl x509 -inform der -in ~/Downloads/ca.cer > vc-ca.crt
  1. Create cert as ConfigMap
@embano1
embano1 / README.md
Last active May 6, 2021
Comment on first Github Issue
View README.md

About

Send greetings to your contributors, e.g. when an issue is created:

Greeting in Issue

Credits: Based on one of Peter Evans' fantastic Github Actions contributions: Create or Update Comment

@embano1
embano1 / README-K8s.md
Last active May 3, 2021
Extract self-signed PEM certificate from vCenter
View README-K8s.md

Make CA Certificate available to a pod

Create a ConfigMap:

$ kubectl create cm ca-cert --from-file ca-cert.pem

Example how to use custom CA cert in govmomi:

@embano1
embano1 / README.md
Last active May 3, 2021
Run govmomi events example
View README.md

Requirements

  • Access to vCenter (network connection, account to read events)
  • git (to clone the repository)
  • go +v1.13 (to build the example binary)

Steps

Check out the repository