This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: image.openshift.io/v1 | |
kind: ImageStream | |
metadata: | |
annotations: | |
openshift.io/image.dockerRepositoryCheck: "2023-08-22T15:59:52Z" | |
creationTimestamp: "2023-08-22T15:59:51Z" | |
generation: 2 | |
name: test-1 | |
namespace: test | |
resourceVersion: "32104" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example to use Podman instead of containerd & nerdctl | |
# $ limactl start ./podman.yaml | |
# $ limactl shell podman podman run -it -v $HOME:$HOME --rm docker.io/library/alpine | |
# To run `podman` on the host (assumes podman-remote is installed): | |
# $ export CONTAINER_HOST=$(limactl list podman --format 'unix://{{.Dir}}/sock/podman.sock') | |
# $ podman --remote ... | |
# To run `docker` on the host (assumes docker-cli is installed): | |
# $ export DOCKER_HOST=$(limactl list podman --format 'unix://{{.Dir}}/sock/podman.sock') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: the below has not been tested | |
integration-test: | |
@docker run -d --name integration_test -v "${PWD}:/quay-registry" -w "/quay-registry" docker:20.10.12-dind-alpine3.15 | |
@docker exec integration_test apk add curl | |
@docker exec integration_test curl -L "https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
@docker exec integration_test chmod +x /usr/local/bin/docker-compose | |
@docker exec -d integration_test docker-compose up | |
@docker stop integration_test | |
@docker rm integration_test | |
# TODO: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATTERN=localhost | |
# run the cmd below to see what you'll delete | |
# docker images --format '{{.ID}} {{.Repository}}' | grep ${PATTERN} | |
docker rmi $(docker images --format '{{.ID}} {{.Repository}}' | grep ${PATTERN} | awk '{print $1}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# before running the below, make sure to run the container with your operator index | |
# (aka catalog) | |
docker run -ti --rm -p 50052:50051 quay.io/you/your-catalog:tag | |
# note: you'll want to change the packageName value in the jq select filter | |
grpcurl -plaintext localhost:50052 api.Registry.ListBundles | \ | |
jq 'select(.packageName == "quay-bridge-operator") | { csvName: .csvName, channelName: .channelName, version: .version, skips: .skips, skipRange: .skipRange, replaces: .replaces }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://github.com/pyenv/pyenv/issues/950 | |
[email protected] pyenv install 2.7.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG PKG_VER_ALPINE=3.8 | |
FROM alpine:${PKG_VER_ALPINE} | |
# seabolt deps | |
RUN apk add --no-cache openssl-dev pkgconfig cmake | |
# download and extract seabolt (neo4j go driver C dep) | |
RUN wget https://github.com/neo4j-drivers/seabolt/releases/download/v1.7.2/seabolt-1.7.2-Linux-alpine-3.8.2.tar.gz | |
# now extract it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INGRESS=my-nginx | |
kubectl get endpoints -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|sort | |
kubectl get ing ${INGRESS} -o=jsonpath='{range .spec.rules[*]}{range .http.paths[*]}{.backend.serviceName}{"\n"}{end}{end}'|sort | |
#see in vimdiff | |
vimdiff <(kubectl get endpoints -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|sort) <(kubectl get ing ${INGRESS} -o=jsonpath='{range .spec.rules[*]}{range .http.paths[*]}{.backend.serviceName}{"\n"}{end}{end}'|sort) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GO_TARGET_PKG=./my/pkg | |
go list -f '{{ join .Imports "\n" }}' "${GO_TARGET_PKG}" | grep -v vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: | |
# add_reviewer_to_PR <your-username> <reviewer> <one-time-password> <PR-nr> | |
# you'll be prompted for your github password. | |
function add_reviewer_to_PR { | |
user=$1 | |
reviewer=$2 | |
OTP=$3 | |
PR=$4 | |
curl -X POST -u "$user" -H 'Content-Type: application/json' -H "X-GitHub-OTP: $OTP" -d "{\"reviewers\": [\"$reviewer\"]}" https://api.github.com/repos/mindoktor/mindoktor/pulls/"$PR"/requested_reviewers | |
} |
NewerOlder