Skip to content

Instantly share code, notes, and snippets.

View jspaleta's full-sized avatar
🥌
🥌 🥌 🥌 🥌

Jef Spaleta jspaleta

🥌
🥌 🥌 🥌 🥌
View GitHub Profile
@jspaleta
jspaleta / Setup Notes
Created January 22, 2026 05:03
Local Flatpak repo tests
# First let's follow the hello world flatpak tutorial
# https://docs.flatpak.org/en/latest/first-build.html
# Create flatpak-test-repo in location you can write to:
$ export REPO_BASE=${HOME}/scratch/
$ mkdir -p ${REPO_BASE}/flatpak-test-repo
# create a directory to hold test flatpak applications
@jspaleta
jspaleta / K8s 1.27.3 w\o Cilium: CoreDNS on Node Restart Works
Last active September 7, 2023 19:56
Cilium 1.4.1 CoreDNS On restart Disfunction Example Using Kind
[jspaleta@msi ~]$ cat kind-cluster.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- role: worker
image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- role: worker
image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
@jspaleta
jspaleta / Kind-Node-Instructions.md
Last active May 10, 2024 19:18
Kind Cluster with WireGuard Enabled Node

Kind node container customizations

First drop into the kind-worker container

podman exec -ti kind-worker /bin/bash

install the wireguard-tools package without any of the additional recommended packages

root@kind-worker# apt-get install --no-install-recommends wireguard-tools 
@jspaleta
jspaleta / Testing Egress Policy with dummy service.md
Last active May 10, 2024 19:21
K3s HomeLab Setup for CiliumEgresssGatewayPolicy testing

Testing egress policy using dummy service

Assumes you have private network dummy service setup on workstation, and have confirmed that worker-node/workstation wg tunnel is working

Prepare k3s node with custom labels for egress gateway use

kubectl get nodes 
NAME STATUS ROLES AGE VERSION
@jspaleta
jspaleta / cilium-observability.yaml
Last active July 28, 2023 06:12
Enanble Hubble Policy Metrics
---
apiVersion: v1
kind: Namespace
metadata:
name: cilium-observability
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-k8s
@jspaleta
jspaleta / check.yaml
Created September 28, 2022 23:18
Ansible Tower Nginx Remediation
type: CheckConfig
api_version: core/v2
metadata:
name: nginx-http-service-healthcheck
annotations:
# Required key: io.sensu.ansible.config.actions
# Value: stringified json array of Job Template Requests
# all request attributes are optional
# Each Job Template Request may consist of:
# Either template_name and/or template_id, with template_id taking precedence
@jspaleta
jspaleta / sensu_go_loadbalancer.conf
Created January 23, 2020 17:18
Basic Sensu Go Cluster LoadBalancer
# Example of Basic Sensu Go Load Balancer
# Load balancer for backend api
# Default port is 8080
upstream sensu_api {
# Clients with the same IP are redirected to the same backend
ip_hash;
# Available backend servers
@jspaleta
jspaleta / system-profile-linux-dashboard.json
Created November 4, 2019 06:00
Linux System Profile Metrics Example Dashboard
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "InfluxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
@jspaleta
jspaleta / exec_start_pre.conf
Created October 11, 2019 22:13
Populate Sensu Agent Name from EC2 metadata
# Extend the sensu-agent service init to call the update_name.sh script
# place this file in: /etc/systemd/system/sensu-agent.service.d
# With systemd you don't have to edit the vendor provided service init script.
# local admins can extend/override vendor settings by using correctly named extension directory structures
# Ex: /etc/systemd/system/sensu-agent.service.d/
# This .d directory will be parsed for systemd directives to extend/override the vendor supplied sensu-agent.service
# For now all we want to do is add an ExecStartPre directive,
@jspaleta
jspaleta / check_status_as_metric.sh
Created August 29, 2019 00:08
Sensu Check Status to Metric Mutator
#!/bin/sh
#
# check_status_as_metric.sh
# optionally set measurement, field
# Ex:
# check_status_as_metric.sh measurement="${entity_name}" field="${check_name}.status"
#
event=$(cat /dev/stdin)