$ kubectl -n <NAMESPACE> get secret <SECRET> -o json | jq -r '.data."prometheus.yaml.gz"' | base64 -d | gunzip
-
setup
$ kind create cluster
-
install zot with minimal image for security-minded dist-spec-only
$ helm upgrade zot zot/zot --set image.repository=ghcr.io/project-zot/zot-minimal-linux-amd64
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
package main | |
import ( | |
"context" | |
"fmt" | |
"net/http/httptest" | |
"os" | |
"os/signal" | |
"strings" | |
"syscall" |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" |
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
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
echo "step1" | |
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
echo "kubeadm install" | |
sudo apt update -y | |
sudo apt -y install vim git curl wget kubelet=1.24.3-00 kubeadm=1.24.3-00 kubectl=1.24.3-00 | |
echo "memory swapoff" | |
sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab | |
sudo swapoff -a | |
sudo modprobe overlay |
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
package main | |
import ( | |
"crypto/x509" | |
"encoding/pem" | |
"errors" | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
"io/ioutil" | |
"net" |
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
package main | |
import ( | |
"context" | |
"os" | |
"github.com/moby/buildkit/client/llb" | |
) | |
func createLLBState() llb.State { |
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
docker buildx build -t devopps/hello-world-multi-arch:v1 \ | |
--push=true \ | |
--cache-from type=registry,ref=devopps/hello-world-multi-arch:cache \ | |
--cache-to type=registry,ref=devopps/hello-world-multi-arch:cache,mode=max \ | |
--platform linux/amd64,linux/arm64 . |
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
$ docker buildx create --name builder --use | |
$ docker buildx inspect builder --bootstrap |
NewerOlder