mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Updated build script
This commit is contained in:
parent
7d30b0ec4e
commit
26fe278485
@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
REPO=carlosedp
|
REPO=carlosedp
|
||||||
|
|
||||||
# Retag Addon-resizer google images to have unified manifest on DockerHub
|
|
||||||
AOM_VERSION=2.1
|
AOM_VERSION=2.1
|
||||||
|
KSM_VERSION=v1.3.0
|
||||||
|
VERSION=v0.20.0
|
||||||
|
PROMCONFIGRELOADER_VERSION=v0.20.0
|
||||||
|
|
||||||
|
# Kubernetes addon-resizer
|
||||||
|
# Retag Addon-resizer google images to have unified manifest on DockerHub
|
||||||
docker pull gcr.io/google-containers/addon-resizer-arm64:$AOM_VERSION
|
docker pull gcr.io/google-containers/addon-resizer-arm64:$AOM_VERSION
|
||||||
docker pull gcr.io/google-containers/addon-resizer-arm:$AOM_VERSION
|
docker pull gcr.io/google-containers/addon-resizer-arm:$AOM_VERSION
|
||||||
|
|
||||||
@ -17,9 +21,7 @@ docker push $REPO/addon-resizer:$AOM_VERSION-arm64
|
|||||||
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/addon-resizer:$AOM_VERSION-ARCH --target $REPO/addon-resizer:$AOM_VERSION
|
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/addon-resizer:$AOM_VERSION-ARCH --target $REPO/addon-resizer:$AOM_VERSION
|
||||||
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/addon-resizer:$AOM_VERSION-ARCH --target $REPO/addon-resizer:latest
|
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/addon-resizer:$AOM_VERSION-ARCH --target $REPO/addon-resizer:latest
|
||||||
|
|
||||||
|
|
||||||
# Kube-state-metrics
|
# Kube-state-metrics
|
||||||
KSM_VERSION=v1.3.0
|
|
||||||
go get github.com/kubernetes/kube-state-metrics
|
go get github.com/kubernetes/kube-state-metrics
|
||||||
mv $HOME/go/src/github.com/kubernetes/kube-state-metrics $HOME/go/src/k8s.io/kube-state-metrics
|
mv $HOME/go/src/github.com/kubernetes/kube-state-metrics $HOME/go/src/k8s.io/kube-state-metrics
|
||||||
cd $HOME/go/src/k8s.io/kube-state-metrics
|
cd $HOME/go/src/k8s.io/kube-state-metrics
|
||||||
@ -39,17 +41,14 @@ manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --tem
|
|||||||
|
|
||||||
# Prometheus-operator
|
# Prometheus-operator
|
||||||
|
|
||||||
VERSION=v0.20.0
|
|
||||||
go get github.com/coreos/prometheus-operator
|
go get github.com/coreos/prometheus-operator
|
||||||
cd $HOME/go/src/github.com/coreos/prometheus-operator
|
cd $HOME/go/src/github.com/coreos/prometheus-operator
|
||||||
git checkout ${VERSION}
|
git checkout ${VERSION}
|
||||||
|
|
||||||
|
|
||||||
go get -u github.com/prometheus/promu
|
go get -u github.com/prometheus/promu
|
||||||
|
|
||||||
cat Dockerfile |sed -e 's/\.build\/linux-amd64\/operator/operator/' |sed -e 's/^FROM.*/FROM busybox/' > Dockerfile.arm
|
cat Dockerfile |sed -e 's/\.build\/linux-amd64\/operator/operator/' |sed -e 's/^FROM.*/FROM busybox/' > Dockerfile.arm
|
||||||
|
|
||||||
|
|
||||||
GOOS=linux GOARCH=arm $GOPATH/bin/promu build --prefix `pwd`
|
GOOS=linux GOARCH=arm $GOPATH/bin/promu build --prefix `pwd`
|
||||||
docker build -t $REPO/prometheus-operator:${VERSION}-arm -f Dockerfile.arm .
|
docker build -t $REPO/prometheus-operator:${VERSION}-arm -f Dockerfile.arm .
|
||||||
|
|
||||||
@ -65,25 +64,23 @@ manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --tem
|
|||||||
rm Dockerfile.arm
|
rm Dockerfile.arm
|
||||||
|
|
||||||
# prometheus-config-reloader
|
# prometheus-config-reloader
|
||||||
|
|
||||||
VERSION=v0.20.0
|
|
||||||
go get github.com/coreos/prometheus-operator
|
go get github.com/coreos/prometheus-operator
|
||||||
cd $HOME/go/src/github.com/coreos/prometheus-operator/
|
cd $HOME/go/src/github.com/coreos/prometheus-operator/
|
||||||
git checkout ${VERSION}
|
git checkout ${PROMCONFIGRELOADER_VERSION}
|
||||||
cd $HOME/go/src/github.com/coreos/prometheus-operator/contrib/prometheus-config-reloader
|
cd $HOME/go/src/github.com/coreos/prometheus-operator/contrib/prometheus-config-reloader
|
||||||
|
|
||||||
cat Dockerfile |sed -e 's/^FROM.*/FROM busybox/' > Dockerfile.arm
|
cat Dockerfile |sed -e 's/^FROM.*/FROM busybox/' > Dockerfile.arm
|
||||||
|
|
||||||
GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -o prometheus-config-reloader main.go
|
GOOS=linux GOARCH=arm CGO_ENABLED=0 go build -o prometheus-config-reloader main.go
|
||||||
docker build -t $REPO/prometheus-config-reloader:${VERSION}-arm -f Dockerfile.arm .
|
docker build -t $REPO/prometheus-config-reloader:${PROMCONFIGRELOADER_VERSION}-arm -f Dockerfile.arm .
|
||||||
|
|
||||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o prometheus-config-reloader main.go
|
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -o prometheus-config-reloader main.go
|
||||||
docker build -t $REPO/prometheus-config-reloader:${VERSION}-arm64 -f Dockerfile.arm .
|
docker build -t $REPO/prometheus-config-reloader:${PROMCONFIGRELOADER_VERSION}-arm64 -f Dockerfile.arm .
|
||||||
|
|
||||||
docker push $REPO/prometheus-config-reloader:$VERSION-arm
|
docker push $REPO/prometheus-config-reloader:$PROMCONFIGRELOADER_VERSION-arm
|
||||||
docker push $REPO/prometheus-config-reloader:$VERSION-arm64
|
docker push $REPO/prometheus-config-reloader:$PROMCONFIGRELOADER_VERSION-arm64
|
||||||
|
|
||||||
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/prometheus-config-reloader:$VERSION-ARCH --target $REPO/prometheus-config-reloader:$VERSION
|
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/prometheus-config-reloader:$PROMCONFIGRELOADER_VERSION-ARCH --target $REPO/prometheus-config-reloader:$VERSION
|
||||||
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/prometheus-config-reloader:$VERSION-ARCH --target $REPO/prometheus-config-reloader:latest
|
manifest-tool-linux-arm64 push from-args --platforms linux/arm,linux/arm64 --template $REPO/prometheus-config-reloader:$PROMCONFIGRELOADER_VERSION-ARCH --target $REPO/prometheus-config-reloader:latest
|
||||||
|
|
||||||
rm Dockerfile.arm
|
rm Dockerfile.arm
|
||||||
|
Loading…
Reference in New Issue
Block a user