Skip to content

Instantly share code, notes, and snippets.

@cclloyd
cclloyd / copy_certificates.bash
Created January 26, 2025 22:05
Copy LetsEncrypt ACME Certificates from OPNSense to Kubernetes
#!/usr/local/bin/bash
#
# This script takes any certificates found from the ACME client plugin in OPNSense and copies them to one or more namespaces in kubernetes.
# Useful for setting as an automation script in the ACME plugin.
#
# Required env variables: KUBE_TOKEN, KUBE_HOST
# Optional variables: KUBE_PORT, NAMESPACES (space separated string of namespaces)
#
# NOTE: This script requires you to install base64 and bash. Run `pkg install base64 bash`
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: foundry
labels:
app: foundry
spec:
replicas: 1
selector:
@cclloyd
cclloyd / deployment.yml
Created June 8, 2020 19:05
PeerTube Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: peertube
labels:
app: peertube
spec:
replicas: 1
selector:
matchLabels:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pihole
labels:
app: pihole
spec:
replicas: 1
selector:
@cclloyd
cclloyd / manifest.yml
Last active April 30, 2024 13:39
Paperless deployment on kubernetes
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: paperless
labels:
app: paperless
spec:
replicas: 1
selector:
@cclloyd
cclloyd / pihole.yml
Created January 30, 2020 01:04
pihole k8s
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pihole
namespace: wfs
labels:
app: pihole
spec:
replicas: 1
@cclloyd
cclloyd / example.py
Created January 24, 2020 06:06
Ceph librbd export-diff non-working example
'''
Issues:
- Size of written file not identical to size crated by `rbd export-diff` command.
- Total size of extents does not equal diff-size
'''
offsets = []
extents = []
def iter_cb(offset, length, exists):
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: archivewarrior
labels:
app: archivewarrior
spec:
replicas: 1
selector:
TASK [kubernetes/preinstall : Pre-upgrade | move data from old credential dir to new] ****************************************************************************************************************************************************
Wednesday 07 August 2019 20:26:29 -0400 (0:00:00.064) 0:00:25.751 ******
TASK [kubernetes/preinstall : set architecture_groups] ***********************************************************************************************************************************************************************************
Wednesday 07 August 2019 20:26:29 -0400 (0:00:00.055) 0:00:25.806 ******
ok: [kube2]
ok: [kube4]
TASK [kubernetes/preinstall : ansible_architecture_rename] *******************************************************************************************************************************************************************************
Wednesday 07 August 2019 20:26:29 -0400 (0:00:00.221) 0:00:26.027 ******
---
kind: Service
apiVersion: v1
metadata:
name: plex-udp
annotations:
metallb.universe.tf/address-pool: production-public-ips
metallb.universe.tf/allow-shared-ip: plex
spec:
selector: