support install prometheus offline

pull/1166/head
jin.gjm 2022-06-19 08:58:21 +08:00
parent 62373504ad
commit 942ba674b1
2 changed files with 65 additions and 5 deletions

45
ezdown
View File

@ -31,9 +31,9 @@ metricsVer=v0.5.2
pauseVer=3.6 pauseVer=3.6
# images not downloaded by default(only download with '-X') # images not downloaded by default(only download with '-X')
ciliumVer=1.11.6
flannelVer=v0.15.1 flannelVer=v0.15.1
nfsProvisionerVer=v4.0.2 nfsProvisionerVer=v4.0.2
ciliumVer=1.11.6
promChartVer=35.5.1 promChartVer=35.5.1
# images not downloaded # images not downloaded
@ -441,6 +441,49 @@ function get_extra_images() {
docker push easzlab.io.local:5000/cilium/json-mock:v1.3.0 docker push easzlab.io.local:5000/cilium/json-mock:v1.3.0
docker tag quay.io/cilium/alpine-curl:v1.3.0 easzlab.io.local:5000/cilium/alpine-curl:v1.3.0 docker tag quay.io/cilium/alpine-curl:v1.3.0 easzlab.io.local:5000/cilium/alpine-curl:v1.3.0
docker push easzlab.io.local:5000/cilium/alpine-curl:v1.3.0 docker push easzlab.io.local:5000/cilium/alpine-curl:v1.3.0
# prometheus chart
if [[ ! -f "$imageDir/prometheus-chart_$promChartVer.tar" ]];then
docker pull easzlab/kube-state-metrics:v2.4.1 && \
docker pull easzlab/kube-webhook-certgen:v1.1.1 && \
docker pull grafana/grafana:8.5.3 && \
docker pull quay.io/kiwigrid/k8s-sidecar:1.15.6 && \
docker pull quay.io/prometheus-operator/prometheus-config-reloader:v0.56.3 && \
docker pull quay.io/prometheus-operator/prometheus-operator:v0.56.3 && \
docker pull quay.io/prometheus/alertmanager:v0.24.0 && \
docker pull quay.io/prometheus/node-exporter:v1.3.1 && \
docker pull quay.io/prometheus/prometheus:v2.35.0 && \
docker save -o "$imageDir/prometheus-chart_$promChartVer.tar" \
easzlab/kube-state-metrics:v2.4.1 \
easzlab/kube-webhook-certgen:v1.1.1 \
grafana/grafana:8.5.3 \
quay.io/kiwigrid/k8s-sidecar:1.15.6 \
quay.io/prometheus-operator/prometheus-config-reloader:v0.56.3 \
quay.io/prometheus-operator/prometheus-operator:v0.56.3 \
quay.io/prometheus/alertmanager:v0.24.0 \
quay.io/prometheus/node-exporter:v1.3.1 \
quay.io/prometheus/prometheus:v2.35.0
else
docker load -i "$imageDir/prometheus-chart_$promChartVer.tar"
fi
docker tag easzlab/kube-state-metrics:v2.4.1 easzlab.io.local:5000/prometheus/kube-state-metrics:v2.4.1
docker push easzlab.io.local:5000/prometheus/kube-state-metrics:v2.4.1
docker tag easzlab/kube-webhook-certgen:v1.1.1 easzlab.io.local:5000/prometheus/kube-webhook-certgen:v1.1.1
docker push easzlab.io.local:5000/prometheus/kube-webhook-certgen:v1.1.1
docker tag grafana/grafana:8.5.3 easzlab.io.local:5000/prometheus/grafana:8.5.3
docker push easzlab.io.local:5000/prometheus/grafana:8.5.3
docker tag quay.io/kiwigrid/k8s-sidecar:1.15.6 easzlab.io.local:5000/prometheus/k8s-sidecar:1.15.6
docker push easzlab.io.local:5000/prometheus/k8s-sidecar:1.15.6
docker tag quay.io/prometheus-operator/prometheus-config-reloader:v0.56.3 easzlab.io.local:5000/prometheus/prometheus-config-reloader:v0.56.3
docker push easzlab.io.local:5000/prometheus/prometheus-config-reloader:v0.56.3
docker tag quay.io/prometheus-operator/prometheus-operator:v0.56.3 easzlab.io.local:5000/prometheus/prometheus-operator:v0.56.3
docker push easzlab.io.local:5000/prometheus/prometheus-operator:v0.56.3
docker tag quay.io/prometheus/alertmanager:v0.24.0 easzlab.io.local:5000/prometheus/alertmanager:v0.24.0
docker push easzlab.io.local:5000/prometheus/alertmanager:v0.24.0
docker tag quay.io/prometheus/node-exporter:v1.3.1 easzlab.io.local:5000/prometheus/node-exporter:v1.3.1
docker push easzlab.io.local:5000/prometheus/node-exporter:v1.3.1
docker tag quay.io/prometheus/prometheus:v2.35.0 easzlab.io.local:5000/prometheus/prometheus:v2.35.0
docker push easzlab.io.local:5000/prometheus/prometheus:v2.35.0
} }
function download_all() { function download_all() {

View File

@ -1,7 +1,6 @@
## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6 ## Provide a k8s version to auto dashboard import script example: kubeTargetVersionOverride: 1.16.6
kubeTargetVersionOverride: "{{ K8S_VER }}" kubeTargetVersionOverride: "{{ K8S_VER }}"
## Configuration for alertmanager
alertmanager: alertmanager:
enabled: true enabled: true
#config: #config:
@ -12,6 +11,9 @@ alertmanager:
# webhook_configs: # webhook_configs:
# - send_resolved: false # - send_resolved: false
# url: http://webhook-dingtalk.monitor.svc.cluster.local:8060/dingtalk/webhook1/send # url: http://webhook-dingtalk.monitor.svc.cluster.local:8060/dingtalk/webhook1/send
alertmanagerSpec:
image:
repository: easzlab.io.local:5000/prometheus/alertmanager
## Configuration for Alertmanager service ## Configuration for Alertmanager service
service: service:
@ -22,10 +24,14 @@ alertmanager:
grafana: grafana:
enabled: true enabled: true
adminPassword: Admin1234! adminPassword: Admin1234!
image:
repository: easzlab.io.local:5000/prometheus/grafana
service: service:
nodePort: 30903 nodePort: 30903
type: NodePort type: NodePort
sidecar: sidecar:
image:
repository: easzlab.io.local:5000/prometheus/k8s-sidecar
skipTlsVerify: true skipTlsVerify: true
## Component scraping the kube api server ## Component scraping the kube api server
@ -101,7 +107,7 @@ kubeProxy:
## Configuration for kube-state-metrics subchart ## Configuration for kube-state-metrics subchart
kube-state-metrics: kube-state-metrics:
image: image:
repository: easzlab/kube-state-metrics repository: easzlab.io.local:5000/prometheus/kube-state-metrics
## Manages Prometheus and Alertmanager components ## Manages Prometheus and Alertmanager components
prometheusOperator: prometheusOperator:
@ -110,11 +116,16 @@ prometheusOperator:
enabled: true enabled: true
patch: patch:
image: image:
repository: easzlab/kube-webhook-certgen repository: easzlab.io.local:5000/prometheus/kube-webhook-certgen
image:
repository: easzlab.io.local:5000/prometheus/prometheus-operator
service: service:
nodePort: 30899 nodePort: 30899
nodePortTls: 30900 nodePortTls: 30900
type: NodePort type: NodePort
prometheusConfigReloader:
image:
repository: easzlab.io.local:5000/prometheus/prometheus-config-reloader
## Deploy a Prometheus instance ## Deploy a Prometheus instance
prometheus: prometheus:
@ -126,6 +137,8 @@ prometheus:
type: NodePort type: NodePort
prometheusSpec: prometheusSpec:
image:
repository: easzlab.io.local:5000/prometheus/prometheus
replicas: 1 replicas: 1
secrets: secrets:
@ -147,3 +160,7 @@ prometheus:
## ##
# emptyDir: # emptyDir:
# medium: Memory # medium: Memory
prometheus-node-exporter:
image:
repository: easzlab.io.local:5000/prometheus/node-exporter