Skip to content

Instantly share code, notes, and snippets.

View adamancini's full-sized avatar

ada mancini adamancini

View GitHub Profile

Zsh Opinionated - A Guide to Best Practices

  • Abstract: This guide provides best practices for writing clear, maintainable, and robust Zsh scripts. Aimed at helping developers transition from Bash to Zsh, particularly on macOS, this guide offers practical advice and examples for creating standardized and efficient scripts.

  • Copyright This text of this guide is Copyright ©️2024 by Christopher Allen, and is shared under spdx:CC-BY-SA-4.0 open-source license. All the example code is relenquished to the public domain under spx:CC0-1.0.

  • Tags: #zsh #scripting #cli #opinionated

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netshoot
labels:
app: netshoot
spec:
updateStrategy:
type: RollingUpdate
selector:
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: csi-driver-nfs
namespace: flux-system
spec:
interval: 24h
url: https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
---
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cluster-wildcard-cert
namespace: default
spec:
secretName: cluster-wildcard-cert
issuerRef:
name: <issuer-name>
kubectl get rolebindings,clusterrolebindings \
--all-namespaces \
-o custom-columns='KIND:kind,NAMESPACE:metadata.namespace,NAME:metadata.name,SERVICE_ACCOUNTS:subjects[?(@.kind=="ServiceAccount")].name'
FROM golang:alpine AS build-stage
WORKDIR /app
COPY * /app
RUN go build .
FROM golang:alpine AS run-stage
COPY --from=build-stage /app/fedilogger /app/fedilogger
CMD ["/app/fedilogger"]
...
spec:
contatiners:
- env:
- name: REQUESTS_CA_BUNDLE
value: /opt/cert/bundle.pem
volumeMounts:
- mountPath: /opt/cert
name: custom-cert
subPath: cert
apiVersion: v1
kind: Deployment
metadata:
name: my-pod
spec:
containers:
- name: my-app
image: my-image
volumeMounts:
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: netshoot
labels:
app: netshoot
spec:
updateStrategy:
type: RollingUpdate
@adamancini
adamancini / tcpdump-calico.md
Last active October 10, 2024 14:28
Instrumented Calico VXLAN test procedure

Instrumented Calico VXLAN test procedure 

Prerequisites

  • root access is required
  • make sure you are using a sufficiently new tcpdump version that supports the -T flag.  This is the version I used for testing:
root@ada-ec-1:/home/ada# tcpdump --version
tcpdump version 4.99.1
libpcap version 1.10.1 (with TPACKET_V3)