Skip to content

Instantly share code, notes, and snippets.

@Gentoli
Gentoli / .md
Created August 9, 2025 23:23
Rook + Ceph CSI Operator

Rook + Ceph CSI Operator

invalid value specified for ceph.dir.subvolume when creating volume

  • workaournd remove the subvolumeGroup key in config.json from the ceph-csi-config ConfigMap

not able to attach volume

  • set mon connection version: add ms_mode: prefer-secure
  • set right port for connection (3300)
@Gentoli
Gentoli / 50-nat66.sh
Last active March 7, 2025 02:00
Unifi NAT66
#!/bin/bash
# eth4 is the gateway
# br0 is a PD enabled subnet without ULA
ip6tables -t nat -A POSTROUTING -o eth4 -m set --match-set UBIOS6CUSTOM1_subnets src -m set \! --match-set UBIOS_ALL_NETv6_br0 dst -j MASQUERADE
@Gentoli
Gentoli / .md
Created May 16, 2024 06:38
IntelliJ AVD - The skin directory does not point to a valid skin.
@Gentoli
Gentoli / Ambient_Mesh_MicroK8s.md
Created July 21, 2023 06:02
Istio Ambient Mesh on MicroK8s
  • cni config folder is different
    • check existing cni for directory and volume mount and env var
@Gentoli
Gentoli / gcp_oci.tf
Created July 6, 2023 06:18
GCP to OCI VPN Terraform
locals {
bgp_subnets = [
for i in range(2) : cidrsubnet("169.254.125.0/24", 7, i + 1) # skip range 0 to avoid 169.254.125.0
]
bgp_ip_ranges = [
for net in local.bgp_subnets : {
net = net
addrs = [for i in range(2) : cidrhost(net, i)]
}
@Gentoli
Gentoli / OKE_CILIUM.md
Last active July 3, 2023 10:35
OKE VCN Native Cilium

OKE @ v1.26.2 have OKE CNI without ipvlan. Native veth chaining works.

  • CNI Config (merged from /etc/cni/net.d/10-oci.conflist on the OS):
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cni-configuration
      namespace: cilium # same namespace as cilium (e.g. kube-system)
    data:
@Gentoli
Gentoli / SSH-POD.md
Last active February 27, 2023 05:56
K8s SSH Pod

Allow inspecting host file system via ssh

Pod manifest (generated with ChatGPT, works)

apiVersion: v1
kind: Pod
metadata:
  name: alpine-ssh
spec:
  hostNetwork: true
@Gentoli
Gentoli / downgrade.logs
Created January 25, 2023 08:02
OKD 4.11.0-0.okd-2023-01-14 -> 4.11.0-0.okd-2022-12-02
$ sudo /run/bin/machine-config-daemon pivot quay.io/openshift/okd-content@sha256:fa1104b5fd668474d8787ddde8de9d9a1cad86ff3d6b478d988e32b61e43415a
...
Downgraded:
aardvark-dns 1.4.0-1.fc36 -> 1.3.0-1.fc36
amd-gpu-firmware 20221214-145.fc36 -> 20221109-144.fc36
bash 5.2.15-1.fc36 -> 5.2.9-2.fc36
btrfs-progs 6.1-2.fc36 -> 6.0.2-1.fc36
clevis 18-10.fc36 -> 18-9.fc36
clevis-dracut 18-10.fc36 -> 18-9.fc36
clevis-luks 18-10.fc36 -> 18-9.fc36
@Gentoli
Gentoli / README.md
Last active December 6, 2022 03:45
OKD Rook (ocs) Setup

mgr plugin fails with

1

debug 2022-12-06T03:08:59.856+0000 7f183006f700  0 [rook ERROR rook.rook_cluster] No storage class exists matching configured Rook orchestrator storage class which currently is <local>. This storage class can be set in ceph config (mgr/rook/storage_class)
debug 2022-12-06T03:08:59.857+0000 7f183006f700  0 [rook ERROR orchestrator._interface] No storage class exists matching name provided in ceph config at mgr/rook/storage_class
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 125, in wrapper
    return OrchResult(f(*args, **kwargs))
  File "/usr/share/ceph/mgr/rook/module.py", line 229, in get_inventory
@Gentoli
Gentoli / broken.md
Last active September 19, 2022 15:46
Things didn't work as expected

Golang

  • Generic with pointer/value receiver is ambiguous

Google Cloud Functions

Go

  • no doc/cannot have a package as entrypoint, only root
  • register with functions.CloudEvent for different entry point but all dependencies will be build