Skip to content

Instantly share code, notes, and snippets.

View embano1's full-sized avatar

Michael Gasch embano1

View GitHub Profile
@embano1
embano1 / README.md
Last active July 7, 2021 10:11
etcd Deep Dive at Golang Leipzig Meetup

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 \

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 08:58
Configure Event Router with custom certs

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 10:12
Comment on first Github Issue

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 09:51
Extract self-signed PEM certificate from vCenter

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 09:01
Run govmomi events example

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

@embano1
embano1 / README.md
Last active April 20, 2021 13:40
List and disable Github Actions in accessible Github Repositories

⚠️ !!!WARNING!!! ⚠️

Use at your own risk and verify your input/output before performing any (potentially destructive) call against the Github API.

Retrieve Github Repositories

⚠️ These commands assume a working gh CLI environment, i.e. authenticated with at least repo-level permissions (see docs).

Retrieve accessible Github Repositories:

@embano1
embano1 / all-in-one.yaml
Last active April 16, 2021 20:08
Knative Trigger to Sequence to Parallel
# Trigger which fires off to a sequence
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
name: alarmsequence-trigger
spec:
broker: default
subscriber:
ref:
apiVersion: flows.knative.dev/v1
@embano1
embano1 / README.md
Created April 15, 2021 15:51
Delete git tags locally/remote
# delete all tags on remote
git tag -l | xargs -I {} git push origin :refs/tags/{}

# delete all tags locally
git tag -l | xargs git tag -d