Skip to content

Instantly share code, notes, and snippets.

@jayunit100
jayunit100 / gist:8aaf0271dc64f3f023637bd417f331b7
Created January 17, 2022 17:05
some comments on the diff function, which will be increasingly the backbone for kpng
func (sl *ServicesListener) diff(prevSvc, currSvc *localnetv1.Service) {
// 0) make PortsListener calls by leveraging the SlicesLen iterator
// name, protoc, port, nodeport, targetport, targetportname
var prevPorts, currPorts []*localnetv1.PortMapping
if prevSvc != nil {
prevPorts = prevSvc.Ports
}
@rajaskakodkar
rajaskakodkar / deploy-prow-on-tce-aws.sh
Last active April 27, 2022 17:37
Deploy Prow on Tanzu Community Edition on AWS
#!/bin/sh
# Prerequisites:
# ~/env.sh exists with aws
export CLUSTER_NAME=mc-test
tanzu management-cluster create -f community-edition/test/aws/cluster-config.yaml
kubectl config use-context mc-test-admin@mc-test

Configure audit logging & troubleshooting containerd-based kubeadm

First, we'll need a VM. In one simple command, you can create a VM in azure and pass a cloud-init script that will install containerd and kubeadm, and will deploy a single node Kubernetes cluster:

wget https://gist.githubusercontent.com/ams0/0e57d15d53782c2c2259cce8545caa70/raw/d4e0686e4dc068ea146717af5d5a7be3dab97a4c/kubeadm-containerd.sh

az group create -n cks
az vm create -g cks -n cks --image  UbuntuLTS --ssh-key-values ~/.ssh/id_rsa.pub --admin-username cks --size Standard_B4ms --custom-data kubeadm-containerd.sh
@dims
dims / after.yaml
Last active September 22, 2023 00:57
Example of a CI job moving from using bootstrap to pod utils
# periodic job in config/jobs/kubernetes-sigs/cluster-api-provider-gcp/cluster-api-provider-gcp-ci.yaml
- name: ci-cluster-api-provider-gcp-make-conformance-stable-k8s-ci-artifacts
interval: 3h
labels:
preset-service-account: "true"
preset-bazel-scratch-dir: "true"
preset-bazel-remote-cache-enabled: "true"
preset-dind-enabled: "true"
preset-kind-volume-mounts: "true"
decorate: true