This file contains hidden or 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
# 取无法拉取镜像名 | |
kubectl get po `kubectl get pod -o wide | grep Image | awk '{print $1}'` -o yaml | grep -Po 'image: \K\S+' | sort -u | |
# docker save -o images.tar.gz \ | |
imgList="" | |
while read img;do | |
if docker inspect $img &>/dev/null;then | |
imgList+="$imgList $img" | |
fi |
This file contains hidden or 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
#!/bin/bash | |
# dnsConfig | |
kubectl -n kafka patch deployments kafka-0 -p '{"spec":{"template":{"spec":{"dnsConfig":{"options":[{"name":"single-request-reopen"}]}}}}}' | |
# dnsOptions | |
kubectl patch deploy $name \ | |
-p '{"spec":{"template":{"spec":{"dnsConfig":{"options":[{"name":"single-request-reopen"}]}}}}}' | |
function t(){ |
This file contains hidden or 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
scripts/build/.variables 文件去掉-w | |
scripts/build/binary 增加 -gcflags="all=-trimpath=$PWD -N -l" | |
构建 make -f docker.Makefile binary |
This file contains hidden or 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
dnf install -y gcc make wget vim git libseccomp-devel systemd-libs systemd-devel jq patch tar | |
go get github.com/go-delve/delve/cmd/dlv | |
wget -O /usr/share/containers/seccomp.json https://raw.githubusercontent.com/containers/common/main/pkg/seccomp/seccomp.json | |
make BUILDTAGS="containers_image_openpgp systemd exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper selinux seccomp " podman | |
podman system service --time 0 tcp:127.0.0.1:8081 |
This file contains hidden or 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 ( | |
"fmt" | |
"log" | |
"github.com/casbin/casbin/v2" | |
gormadapter "github.com/casbin/gorm-adapter/v2" | |
"github.com/gin-gonic/gin" | |
_ "github.com/go-sql-driver/mysql" |
NewerOlder