Skip to content

Instantly share code, notes, and snippets.


Luis Gonzalez funkytaco

View GitHub Profile
import os
import sys
import pytest
# python3, mock is built in.
from unittest.mock import patch
except ImportError:
# In python2, mock is installed via pip.
View OpenShift Monitoring
# Docker daemon
systemctl is-active docker
# Check that Docker volume group has adequate space
echo $(echo \"$(docker info 2>/dev/null | awk '/Data Space Available/ {print $4}') / $(docker info 2>/dev/null | awk '/Data Space Total/ {print $4}')\" | bc -l) '>' 0.3 | bc -l
# Check that Docker volume group has adequate metadata space
echo $(echo \"$(docker info 2>/dev/null | awk '/Metadata Space Available/ {print $4}') / $(docker info 2>/dev/null | awk '/Metadata Space Total/ {print $4}')\" | bc -l) '>' 0.3 | bc -l
# etcd is active
View 01_ocp_route_ep_test
# A test to see if a route can bind to endpoints w/o a svc.
# Create an endpoints
apiVersion: v1
kind: Endpoints
app: console
name: console-test
namespace: openshift-console
View partition.yaml
- name: Create partitions on master
hosts: masters
become: yes
- name: Create LVEtcd logical volume
lv: LVEtcd
size: 10g
funkytaco / gist:0d48fb987673599fecd4a2e8cc3d53c6
Last active Mar 25, 2020 — forked from abutcher/gist:ad9271655e4fe63a2740
Openshift - Regenerate ose dns entries
View gist:0d48fb987673599fecd4a2e8cc3d53c6
#!/usr/bin/env oo-ruby
require "/var/www/openshift/broker/config/environment"[:enabled] = false
Mongoid.raise_not_found_error = false
class Regenerate
entries = []
Application.all.each do |app|
funkytaco /
Created Nov 8, 2019 — forked from terlar/
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See:
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
funkytaco /
Last active Nov 5, 2019
prometheusoperator.0.27.0 YAML

So I found this by googling for prometheusoperator.0.27.0

Found it in Google's cache:

It looks like there was a 0.32.0 version added to OperatorHub 8 days ago, but maybe it's not published yet.

So just create a new project my-prometheus, update metadata.namespace from 'placeholder' to 'my-prometheus'

  • Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app 
  • Turn off/on DC triggers to do a batch of changes without spam many deployments


  "scripts": {
    "precommit": "npm run precommit:client && npm run precommit:server",
    "precommit:client": "cd client && npm run precommit",
    "precommit:server": "cd server && npm run precommit"


View tsconfig.json
"compileOnSave": true,
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"lib": [
You can’t perform that action at this time.