Skip to content

Instantly share code, notes, and snippets.

View kincl's full-sized avatar
:fishsticks:
#fishsticks

Jason Kincl kincl

:fishsticks:
#fishsticks
View GitHub Profile
@kincl
kincl / puppet_cert
Last active September 5, 2022 07:50
Uses puppet certificate API to list, sign, revoke certificates
#!/bin/env python#!/bin/env python
# https://github.com/puppetlabs/puppet/blob/stable/api/docs/http_certificate_status.md
import os
import sys
import json
import requests
import argparse
import subprocess
# -- Bootstrap kubelet on each node
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module Docstring
"""
__author__ = "Your Name"
__version__ = "0.1.0"
import argparse
@kincl
kincl / forward-proxy-with-apache-httpd.md
Created June 2, 2022 15:00
Forward Proxy with Apache HTTPd

Forward Proxy with Apache HTTPd

Getting started

  • Get httpd.conf
podman run --rm httpd:2.4 cat /usr/local/apache2/conf/httpd.conf > httpd.conf
@kincl
kincl / openshift-nfs.txt
Last active July 26, 2022 16:26 — forked from johnsimcall/openshift-nfs.txt
Simplified NFS storage for OpenShift
git clone https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.git
cd nfs-subdir-external-provisioner
sed -i.backup 's/nfs-client/nfs-storage/g' ./deploy/class.yaml
sed -i.backup 's/namespace:.*/namespace: nfs-storage/g' ./deploy/rbac.yaml
sed -i.backup 's/namespace:.*/namespace: nfs-storage/g' ./deploy/deployment.yaml
vi ./deploy/deployment.yaml
# Update NFS_SERVER and NFS_PATH values (4 edits required)
@kincl
kincl / index.md
Last active August 15, 2023 12:42
Adding to existing ignition config with butane

step 1: get butane

Butane is a tool for converting our hand-written butane configuration into the "machine-read" ignition configuration.

Get butane from our OCP mirror

step 2: butane config

I pulled the chrony butane config from our docs

@kincl
kincl / echo-headers.yaml
Created August 28, 2023 20:36
python-based echo headers for kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
name: python-http
labels:
app: python-http
data:
app.py: |
from http.server import HTTPServer, BaseHTTPRequestHandler
@kincl
kincl / imageset-config-4.12.yaml
Last active May 29, 2024 19:56 — forked from johnsimcall/imageset-config.yaml
oc-mirror imageset-config.yaml for OpenShift Virtualization and OpenShift Data Foundations
kind: ImageSetConfiguration
apiVersion: mirror.openshift.io/v1alpha2
storageConfig:
local:
path: ./
mirror:
platform:
channels:
@kincl
kincl / disk-benchmarking.md
Last active September 26, 2023 20:39
disk benchmarking

Disk Benchmarking

IOzone

Option Documentation
-C Show bytes transferred by each child in throughput testing. Useful if your operating system has any starvation problems in file I/O or in process management.
-w Do not unlink temporary files when finished using them.
-c Include close() in the timing calculations. This is useful only if you suspect that close() is broken in the operating system currently under test. It can be useful for NFS Version 3 testing as well to help identify if the nfs3_commit is working well.
-e Include flush (fsync,fflush) in the timing calculations
@kincl
kincl / 00-README.md
Last active October 3, 2023 12:36
manual-cloud-credential-operator-iam-policy

manual-cloud-credential-operator-iam-policy

This script will take a list of CredentialsRequest YAML files and output a combined IAM policy document

Usage

$ create_policy.py *.yaml