Skip to content

Instantly share code, notes, and snippets.

View cmwylie19's full-sized avatar

Case Wylie cmwylie19

View GitHub Profile
@cmwylie19
cmwylie19 / Keybase.md
Created January 11, 2025 13:43
Proof for keybase

Keybase proof

I hereby claim:

  • I am cmwylie19 on github.
  • I am cmwylie19 (https://keybase.io/cmwylie19) on keybase.
  • I have a public key ASDGJ04T0MCyz9rzIMD6FmYjHh9Nc3vE_QFDgoKfXAXwjAo

To claim this, I am signing this object:

@cmwylie19
cmwylie19 / EnhancedNetworkMetrics.yaml
Created January 7, 2025 15:12
ConfigMap to see how Pepr is doing from a network prospective but includes other namespaces too
apiVersion: v1
data:
enhanced-metrics.json: |
{
"title": "Enhanced Network Metrics Dashboard",
"editable": true,
"refresh": "10s",
"time": { "from": "now-1h", "to": "now" },
"templating": {
"list": [
@cmwylie19
cmwylie19 / WebappCRD.yaml
Last active December 30, 2024 16:23
CRD for a WebApp
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: webapps.pepr.io
spec:
group: pepr.io
versions:
- name: v1alpha1
served: true
storage: true
@cmwylie19
cmwylie19 / SecurityContexts.md
Last active November 18, 2024 20:01
Pepr Project Cruising Session

Understanding SecurityContexts

Pods and Containers both have security contexts. These contexts dictate the behavior of what the object is allowed to do.

Demo

Create a cluster where we simulate UDS Core or a K8s offering from a major cloud provider (control plane off limits)

k3d cluster create security-context-demo --k3s-arg '--kube-apiserver-arg=enable-admission-plugins=PodSecurity@server:*'
@cmwylie19
cmwylie19 / Pepr-Prometheus-Scrape.md
Last active July 30, 2024 15:24
Scraping the Pepr metrics with the Prometheus Operator
@cmwylie19
cmwylie19 / Migration.md
Last active December 30, 2024 16:23
Test for migrating the PeprStore

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:

@cmwylie19
cmwylie19 / migrate.ts
Last active December 30, 2024 16:22
PeprStore migration local script
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.