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 / 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 / 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
@jparrill
jparrill / luxafox.py
Created May 29, 2022 11:05
LuxafOS Script for RasPi and GPIO
#!/usr/bin/env python3
import RPi.GPIO as GPIO
import time
from flask import Flask
from flask_restful import Resource, Api
class LuxaOS(Resource):
def put(self, state):
activateLuxaOS(state)
@jparrill
jparrill / egress-limit-ssh
Created November 10, 2021 11:07
Limit bandwidth SSH
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: master
name: egress-limit-ssh
spec:
config:
ignition:
version: 3.2.0
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: network-manager-extra-conf-worker
spec:
config:
ignition:
version: 3.1.0
@jparrill
jparrill / ai_image_list
Last active April 30, 2021 09:23
Container Image Sync between a public and internal registry
quay.io/ocpmetal/s3server:latest
quay.io/ocpmetal/assisted-service:latest
quay.io/ocpmetal/assisted-installer:latest
quay.io/ocpmetal/assisted-installer-agent:latest
quay.io/ocpmetal/ocp-metal-ui:latest
quay.io/ocpmetal/bm-inventory:latest
quay.io/ocpmetal/assisted-installer-controller:latest
quay.io/ocpmetal/assisted-iso-create:latest
quay.io/ocpmetal/ocp-metal-ui-tests:latest
quay.io/ocpmetal/postgresql-12-centos7:latest