Skip to content

Instantly share code, notes, and snippets.

View infinitydon's full-sized avatar

Christopher Adigun infinitydon

  • United States
View GitHub Profile
@infinitydon
infinitydon / kubernetes_add_service_account_kubeconfig.sh
Created June 8, 2022 19:07 — forked from xtavras/kubernetes_add_service_account_kubeconfig.sh
create kubernetes service account and corresponding kubeconfig
#!/usr/bin/env bash
# script was taken from https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708 and adjusted with "apply_rbac" function and colorized output
set -e
set -o pipefail
# Colors
RED="\e[01;31m"
@infinitydon
infinitydon / cmd.sh
Created March 29, 2022 18:02 — forked from mejedi/cmd.sh
Populating VPP with a sample GTPU config
#! /bin/sh
set -eu
vppctl create host-interface name vpp0
vppctl set interface state host-vpp0 up
vppctl set interface ip address host-vpp0 172.16.16.2/24
vppctl create host-interface name vpp1
vppctl set interface state host-vpp1 up
@infinitydon
infinitydon / netpps.sh
Created March 20, 2022 14:53 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@infinitydon
infinitydon / gist:7d27767c6650520a5395703be1b1cf58
Created August 13, 2019 12:42
Openstack LB SG update with Port addtion
1.) First all create a LB svc:
kind: Service
apiVersion: v1
metadata:
name: ingress-nginx
namespace: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
@infinitydon
infinitydon / gist:d2d83baa27822e42732f3665869b739b
Created April 4, 2019 14:34
slub_unable To Allocate Memory
[Wed Apr 3 16:51:45 2019] [<ffffffff8106c512>] mm_fault_error+0x82/0x160
[Wed Apr 3 16:51:45 2019] [<ffffffff8106c9d9>] __do_page_fault+0x3e9/0x410
[Wed Apr 3 16:51:45 2019] [<ffffffff8106ca22>] do_page_fault+0x22/0x30
[Wed Apr 3 16:51:45 2019] [<ffffffff81826858>] page_fault+0x28/0x30
[Wed Apr 3 16:51:45 2019] Task in /kubepods/pod70849c83-5081-11e9-a4f4-0606b708822a/f757a788d85b1b04b1bc5b7d0ed3596a928dcf3cb8c56242112fdb16849d537f killed as a result of limit of /kubepods/pod70849c83-5081-11e9-a4f4-0606b708822a
[Wed Apr 3 16:51:45 2019] memory: usage 1024000kB, limit 1024000kB, failcnt 4662
[Wed Apr 3 16:51:45 2019] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[Wed Apr 3 16:51:45 2019] kmem: usage 25824kB, limit 9007199254740988kB, failcnt 0
[Wed Apr 3 16:51:45 2019] Memory cgroup stats for /kubepods/pod70849c83-5081-11e9-a4f4-0606b708822a: cache:0KB rss:0KB rss_huge:0KB mapped_file:0KB dirty:0KB writeback:0KB inactive_anon:0KB active_anon:0KB inactive_file:0KB active_fi
le:0KB une
apiVersion: v1
kind: ConfigMap
metadata:
name: continuousdeployment
data:
config.json: "{ \n\"test\":\"1232\", \n\"apiUrl\":\"http://applictaion.cloudapp.net/\"\n}\n"
apiVersion: v1
kind: Pod
@infinitydon
infinitydon / job.yaml
Created January 8, 2019 15:41 — forked from alexellis/job.yaml
Use a Kubernetes Job and Kaniko to build an OpenFaaS function from Git
# Alex Ellis 2018
# Example from: https://blog.alexellis.io/quick-look-at-google-kaniko/
# Pre-steps:
# kubectl create secret generic docker-config --from-file $HOME/.docker/config.json
# Other potential optimizations (suggested by @errordeveloper)
# - Store "templates" in a permanent volume
# - Download source via "tar" instead of git clone
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: prometheus-federation
namespace: kube-system
labels:
prometheus: kube-prometheus
spec:
selector:
matchLabels:
data.template_file.inventory: Refreshing state...
null_resource.inventories: Creating...
triggers.%: "" => "1"
triggers.template: "" => "[all]\nmercy-ops-master-1 ansible_host=10.0.0.5\nmercy-ops-infra-1 ansible_host=10.0.0.10\nmercy-ops-compute-1 ansible_host=10.0.0.14\nmercy-ops-etcd-1 ansible_host=10.0.0.4\n\n[OSEv3:children]\nmasters\nnodes\netcd\n\n# Set variables common for all OSEv3 hosts\n[OSEv3:vars]\nansible_ssh_user=\"centos\"\nopenshift_deployment_type=\"origin\"\nenable_excluders=false\nansible_become=true\nopenshift_release=3.9\nopenshift_disable_check=docker_storage\nopenshift_repos_enable_testing=true\n\n# Uncomment the following to enable htpasswd authentication; defaults to\n# DenyAllPasswordIdentityProvider.\nopenshift_master_identity_providers=[{\\'name:\\' \\'htpasswd_auth\\', \\'login:\\' \\'true\\', \\'challenge:\\' \\'true\\', \\'kind:\\' \\'HTPasswdPasswordIdentityProvider\\', \\'filename:\\' \\'/etc/origin/master/htpasswd\\'}]\n# Native high availability cluster method wit
@infinitydon
infinitydon / gist:b458aa2f27669330f50d7444c8583f64
Created April 11, 2018 14:24
Openstack Openshift LBaaSv2
resource "openstack_lb_loadbalancer_v2" "master_ops" {
name = "${var.cluster_name}-master-lb"
admin_state_up = "true"
vip_subnet_id = "${var.network_id}"
security_group_ids = [
"${var.ops_master_security_group}",
]
}