Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile
@cmwylie19
cmwylie19 / Logs.json
Created April 30, 2024 16:06
PeprLogs
This file has been truncated, but you can view the full file.
{"level":30,"time":1714492261239,"pid":1,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","msg":"Pepr Controller (v0.0.0-development)"}
{"level":30,"time":1714492261239,"pid":1,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","msg":"Applying the Pepr Store CRD if it doesn't exist"}
{"level":30,"time":1714492261337,"pid":1,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","msg":"Loading module /app/load/module-3926db80dd60926d3b7fe38f0adb14dd112588c84609489b0903cdfbb0080e62.js.gz"}
{"level":30,"time":1714492261338,"pid":1,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","msg":"File hash matches, running module"}
{"level":30,"time":1714492262143,"pid":16,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","msg":"Capability istio registered"}
{"level":20,"time":1714492262144,"pid":16,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg","name":"istio","description":"UDS Core Capability for Istio service mesh."}
{"level":20,"time":1714492262144,"pid":16,"hostname":"pepr-uds-core-watcher-7bfc9f4688-mgvdg"
@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

Certificates

Generate a new private key and certificate signing request

openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key

Generate a self-signed certificate