Skip to content

Instantly share code, notes, and snippets.

View jparrill's full-sized avatar
🏡
Working from Home!

Juan Manuel Parrilla Madrid jparrill

🏡
Working from Home!
View GitHub Profile
@jparrill
jparrill / hostname_servers
Created October 14, 2013 06:16
Names for servers
Hostnames!
You have to set up a bunch of machines, and suddenly have a mental block as to what to call them all?
Well, here's some good hostnames to get you going.
The idea is to come up with some kind of category, so that people have something to remember all the names by. Some categories: Geographical (countries, cities, parks, rivers, lakes, streets), entertainment (flintsones, simpsons, disney films, celebrities), companies (hotels, airports, local shops, restarants), astronomy (planets, comets, space missions), literature (mythology, philosophers, writers of particular generes, languages), political (presidents, judges, congressmen, terminology), science (units of measure, anatomy, instruments, scientists), industry (tools, machines, inventions, inventors), computers (terminology, programming languages, number systems).
Some hostnames I've seen, used, or expect to use..
(Not responsible for typos; do your own spell checks!)
@jparrill
jparrill / Makefile
Created August 18, 2025 09:53
OIDC Tools
# Makefile for OIDC Tools
.PHONY: help build clean test install run-example
# Variables
BINARY_NAME=oidc-tools
VERSION=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
help: ## Show this help
@echo "OIDC Tools - Tools for managing OIDC documents in Hypershift HostedClusters"
@jparrill
jparrill / Prow_hands_on.md
Last active February 5, 2025 10:12
How to install and Play with CI/CD Prow from Kubernetes test-infra project.

Prow and Quickstart

Prow is a Kubernetes based CI/CD system. Jobs can be triggered by various types of events and report their status to many different services. In addition to job execution, Prow provides GitHub automation in the form of policy enforcement, chat-ops via /foo style commands, and automatic PR merging.

NOTE|WARNING: In order to make Prow work fine with your repo, the Kubernetes cluster MUST be reachable by GitHub Webhook.

Articles to read and understand

@jparrill
jparrill / HCP-ImageSetConfig.yaml
Created August 19, 2024 09:16
ImageSetConfiguration Sample for Mirroring into disconnected environments
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
storageConfig:
registry:
imageURL: registry.hypershiftbm.lab:5000/openshift/release/metadata:latestv2
mirror:
platform:
channels:
- name: candidate-4.17
minVersion: 4.17.0-ec.1
@jparrill
jparrill / mirror-missing-images.sh
Last active September 21, 2023 20:49
Mirror all the missing images which are in `ImagePullBackOff` state in the cluster.
#!/bin/bash
function identifyImages() {
export KUBECONFIG=/root/.kcli/clusters/hub-ipv6/auth/kubeconfig
> imagesToMirror.txt
IFS=$'\n'
for image in $(oc get pod -A -o yaml | grep "Back-off pulling image"); do
extractedImage=$(echo "$image" | grep -o '"[^"]*"')
finalImage=$(echo "$extractedImage" | cut -d '"' -f 2)
echo $finalImage >> $filename
@jparrill
jparrill / README.md
Last active July 24, 2023 09:38
Nuke open-cluster-management deployment
  • Download deploy repo
git clone https://github.com/stolostron/deploy.git
  • Create the nuke.sh script
cd deploy
@jparrill
jparrill / blurlock.sh
Created February 14, 2018 09:51
i3 Config + Scripts
#!/bin/bash
import -window root /tmp/screenshot.png
convert /tmp/screenshot.png -spread 6 /tmp/screenshotblur.png
rm /tmp/screenshot.png
i3lock -i /tmp/screenshotblur.png
@jparrill
jparrill / labelchecker.go
Created June 7, 2023 16:54
LabelChecker
package main
import (
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type labelChecker struct {
@jparrill
jparrill / HostedCluster.yaml
Last active December 19, 2022 15:50
Hypershift Examples
apiVersion: hypershift.openshift.io/v1beta1
kind: HostedCluster
metadata:
creationTimestamp: null
name: sample-hosted
namespace: clusters
spec:
autoscaling: {}
controllerAvailabilityPolicy: SingleReplica
dns:
@jparrill
jparrill / Generate_MigrationEnv.md
Last active November 23, 2022 16:59
Generate Migration HC Environment