Skip to content

Instantly share code, notes, and snippets.

View martezr's full-sized avatar

Martez Reed martezr

View GitHub Profile
@martezr
martezr / argoworkflow-install.yaml
Last active July 31, 2024 05:02
Argo Workflows
# This is an auto-generated file. DO NOT EDIT
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clusterworkflowtemplates.argoproj.io
spec:
group: argoproj.io
names:
kind: ClusterWorkflowTemplate
listKind: ClusterWorkflowTemplateList
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
name: ingress-nginx
---
apiVersion: v1
automountServiceAccountToken: true
alias kubectl="k0s kubectl"
kubectl create namespace argo
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.5.8/quick-start-minimal.yaml
kubectl patch deployment argo-server --namespace argo --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": ["server","--auth-mode=server"]}]'
kubectl patch svc argo-server -n argo -p '{"spec": {"type": "NodePort"}}'
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Install HELM
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
export kubeconfig=/etc/rancher/k3s/k3s.yaml
# Install Prometheus
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
#!/bin/sh
echo "http://mirrors.edge.kernel.org/alpine/v3.19/community" >> /etc/apk/repositories
apk update
# Install Open VM Tools
apk add open-vm-tools open-vm-tools-guestinfo open-vm-tools-deploypkg
rc-update add open-vm-tools boot
rc-service open-vm-tools start
---
apiVersion: v1
kind: Service
metadata:
name: mysql-service
labels:
app: mysql-service
spec:
ports:
- port: 3306
@martezr
martezr / demo.ign
Last active July 5, 2021 04:10
demo.ign
{
"ignition": {
"version": "3.2.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCsvDSUMdJu7KaECnb8nay1bhZn5n68aaPIgwE+DgJyP0vVzrPedXHqGXvQDbxfXiixG4qhr+AVBD4aOhBRvXfpGqVk4nvlO9+9wkHVtdGbyz9IDWoZqzzaBHprAbUUXzgPWOg7IvlnNQQZml7uhW2B6E1xJ6I7cf4WE4YeJSefpwrgiYmwKgcR98Xj2BHzGrN/sEa2LU0uPIHWfgQlzWcRJSNge90lQizhLiv8vHccbSRoubgmOS+eA+IkmGr0TVpQGpeJmg2vhHDYKl1YdJrPdTUNPDdK2slt9eVbIZHJgpFuVbUHOq9PxovRYM7e8ZE44/r3a2Oghd+LQ1pOZ+bO2SVPD0x11jT7/fvM89WLiKkkLG7hoIXLE6DhdIhv+MiXAGJAKoLLzs9WjigOs1t2JdHaXI5ZayBD1yqFctLkeD/BEJ3OP+imXuTKBnWdOJRWX2t/hWQWyNKZnR211DBu/Skp0/Z0/JjUY1G1e0VX+cqNM/tkKdUPWBQeO5dw0qo7so/T7FWiPnJkCeuuQpUqig5gH17IJ0a+8QQY3sXSAWobSwzRa3+De8tchHwT9WLhXw4VofA+3rx+/fo0JZjrD0cNTlTceUeusQCQSSh9RbhxR/AJMRTJHvGfDgE4SsjEo6+av8uNfDBwxezDJ8XGWI6zyhWd7Rp1QkBzn/ZpOw== [email protected]"
@martezr
martezr / costcenters.json
Last active March 5, 2021 17:51
Morpheus Option Lists Example
[
{
"id": 1,
"name": "633450 - (R&D)",
"costcenter": 633450
},
{
"id": 2,
"name": "633256 - (Security)",
"costcenter": 633256
@martezr
martezr / active-root.py
Last active October 7, 2022 09:01
Identifying Active HashiCorp Vault Root Tokens
#!/usr/local/bin/python3
import os
import time
import hvac
import urllib3
from prettytable import PrettyTable
urllib3.disable_warnings()
[CmdletBinding()]
param (
# The number of days the SSL certificate is valid
[Parameter(Mandatory=$false)]
[int]
$certificate_validity_days
)
$listeners = Get-ChildItem WSMan:\localhost\Listener