Skip to content

Instantly share code, notes, and snippets.

View rflorenc's full-sized avatar

Ricardo Lourenço rflorenc

View GitHub Profile
@rflorenc
rflorenc / kind_build_notes_api_tweak.txt
Created July 24, 2020 11:17
kind_build_notes_api_tweak
➜ kubernetes git:(api_tweak) ✗ git diff
diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go
index 2660130f1d0..c9d4eb3d46c 100644
--- a/cmd/kube-apiserver/app/server.go
+++ b/cmd/kube-apiserver/app/server.go
@@ -147,6 +147,7 @@ cluster's shared state through which all other components interact.`,
func Run(completeOptions completedServerRunOptions, stopCh <-chan struct{}) error {
// To help debugging, immediately log version
klog.Infof("Version: %+v", version.Get())
+ klog.Infof("Friday Mode Activated: %+v", version.Get())
@rflorenc
rflorenc / core_v1_limits_quotas_kexec
Last active January 12, 2020 17:46
core_v1_limits_quotas
#!/usr/bin/python
from __future__ import absolute_import, division, print_function
import sys
__metaclass__ = type
import copy
import shlex
from ansible.module_utils.k8s.common import KubernetesAnsibleModule
from ansible.module_utils.k8s.common import AUTH_ARG_SPEC
@rflorenc
rflorenc / quota_calc.py
Last active December 9, 2019 12:47
openshift-quotas-limits/library/quota_calc.py
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.module_utils.basic import *
from ansible.module_utils.facts.utils import get_file_content, get_file_lines
import openshift
@rflorenc
rflorenc / pprof.info
Created August 29, 2019 14:27
performance debugging
https://github.com/openshift/origin/blob/master/HACKING.md#performance-debugging
@rflorenc
rflorenc / logger-daemonset.yaml
Last active August 21, 2019 14:14
logger ds
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: logger
labels:
app: logger
spec:
selector:
matchLabels:
name: logger
#!/bin/bash
EXEC="$1"
TYPE=$2
MKTEMP=$(dirname $(realpath $0))
function containers {
case $1 in
--check)
@rflorenc
rflorenc / gist:93e908fc5e4d1a057c3e443afcbe58e2
Created June 11, 2019 15:48 — forked from flyemsafe/gist:603b4c9d897b18038b7bf80a1c2d776e
Satellite 6 Product with OpenShift container repos
## Create Red Hat Container Catalog
### Helper Function
```
sync_container_repos () {
REPOS_LIST=$1
CONTAINER_REPOS="$(mktemp)"
@rflorenc
rflorenc / container-examples.yml
Created August 23, 2017 19:07
container-index/index.d/
Projects:
- id : 1
app-id : container-examples
job-id : starter-arbitrary-uid
git-url : https://github.com/RHsyseng/container-rhel-examples
git-path : starter-arbitrary-uid
git-branch : master
target-file : Dockerfile.centos7
notify-email: rlourenc@redhat.com
@rflorenc
rflorenc / gist:5a3fedbd359c208a933fa94e96915185
Created December 1, 2016 16:48
cluster loader cfg template
provider: local
LoggingSoak:
Scale: 2
ClusterLoader:
delete: true
projects:
- num: 1
basename: clusterproject
tuning: default
pods:
#!/usr/bin/env bash
#
# Ignore warnings/errors about already existing API types or resources (roles/templates etc...)
T=20
MASTER_URL=${1:-'https://:10.1.236.13.xip.io:8443'}
KIBANA_HOST=${2:-'10.1.236.17.xip.io'}
CLUSTER_SIZE=${3:-'1'}
echo "MASTER_URL: $MASTER_URL"