Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile

Migration Test

This test is to ensure you can migrate test keys from one pepr version to the next and that the new version can read the old keys. It should work with multple capabilities like UDS Core.

MIG

Create a module using the existing Pepr Version with pepr and one capabilities.

pepr:

const fs = require('fs');
import { K8s } from "kubernetes-fluent-client"
import { GenericKind, RegisterKind } from "kubernetes-fluent-client";
class PeprStore extends GenericKind {
declare data: {
[key: string]: string;
};
}
@cmwylie19
cmwylie19 / UDS
Last active April 26, 2024 20:58
Create UDS Bundle
in UDS-Core
- packages
uds run create-standard-package
uds run create:k3d-standard-bundle
uds dev-setup
@cmwylie19
cmwylie19 / WatchWorkaround.yaml
Last active April 22, 2024 15:03
Runs every 30 mins. If watch connections are being dropped after some time, this is a workaround to reconnect every so often. NOTE: use --force at your own discretion.
apiVersion: v1
kind: ServiceAccount
metadata:
name: watch-recycle-sa
namespace: pepr-system
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: pepr-system
@cmwylie19
cmwylie19 / Pepr-Admission-Operator.md
Last active April 10, 2024 15:25
Workshop for DevopsDaysRaleigh 2024. Optimizing Kubernetes Operators and Admission Control with Pepr.
@cmwylie19
cmwylie19 / PeprDashboard.md
Last active January 24, 2024 21:45
Pepr Dashboard

Grafana Dashboard

Deploy the Grafana Operator and create a dashboard.

Demo

Deploy the Grafana helm chart

@cmwylie19
cmwylie19 / ScrapePepr.md
Last active December 11, 2023 19:33
Scrape Pepr quick n' dirty. Prometheus instance is not recommended for prod

Prometheus Operator and Pepr

This deploys the prometheus manifests to the default namespace and is not intended for production, just as a means to show how to quickly scrape Pepr metrics. The kube prometheus stack provides a more production suitable way of deploying Prometheus in prod.

Demo

Deploy Prometheus operator controller manager

@cmwylie19
cmwylie19 / uncheck.js
Last active October 2, 2023 13:46
uncheck
javascript:document.getElementsByName("viewed").forEach(ch => {if(ch.checked) {ch.click()}})
@cmwylie19
cmwylie19 / Get-WiFiProfiles.ps1
Created September 25, 2023 22:40 — forked from Noxsios/Get-WiFiProfiles.ps1
Get-WiFi-Profiles using netsh and store in a TOML file for easy reading.
if (!(Test-Path "./profiles.toml")) {
New-Item -ItemType File "./profiles.toml" | Out-Null
}
"#####`n[profiles]" | Out-File -Append -Encoding utf8 "./profiles.toml"
(netsh wlan show profiles) |
Select-String "\:(.+)$" |
ForEach-Object {
$name = $PSItem.Matches.Groups[1].Value.Trim()
@cmwylie19
cmwylie19 / Rebase.md
Last active June 12, 2023 18:07
Update fork with Git Rebase
git remote add upstream https://github.com/user/repo.git

git fetch upstream

git rebase upstream/main 1806 

git push origin main --force