Skip to content

Instantly share code, notes, and snippets.

View amitkrout's full-sized avatar
🙂

Amit Rout amitkrout

🙂
View GitHub Profile
@amitkrout
amitkrout / delete-dockerhub-images.sh
Created May 26, 2022 05:27 — forked from jriguera/delete-dockerhub-images.sh
Delete Docker images on DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
@amitkrout
amitkrout / dockerhub-v2-api-user.sh
Created May 26, 2022 05:27 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all imagas and tags associated with a Docker Hub user account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username and password
UNAME=""
UPASS=""
0. Install the latest "oc" openshift-client and opm tool
https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/latest-4.7/
1. Login as kubeadmin
2. Connect to VPN
(skip) 2.1. Disable default operator indices
Connect to VPN
# skip this. we don't depend on pipeline anymore
#Clone Pipelines Operator bundle source
#http://pkgs.devel.redhat.com/cgit/containers/openshift-pipelines-operator-prod-operator-metadata/
#Checkout the right branch e.g. "pipelines-1.3-rhel-8"
#Edit clusterserviceversion yaml to remove "replaces" statement
#Docker build the bundle
#Push the bundle
1. Modify to Argo CD Operator
1.1. defaults.go
1.1.1. replace redis image to
1.1.1.1. ArgoCDDefaultRedisImage = "registry.redhat.io/rhel8/redis-5"
1.1.1.2. ArgoCDDefaultRedisVersion = "sha256:85d7f044c718567ed9375e845299ee8aa0fef8f327262c444506c6c7c7a42eb0" // latest
1.2. deployment.go
1.2.1. Disable dex deployment/reconciliation
1.2.2. Change redis command args:
"redis-server",
"--save",
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"