Skip to content

Commit

Permalink
Merge pull request #1574 from nikodemas/move_udp_server_to_k8s
Browse files Browse the repository at this point in the history
Update deploy files for udp collector
  • Loading branch information
nikodemas authored Jan 21, 2025
2 parents d1eb8a7 + ceca4e0 commit 6ef0c3c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
16 changes: 12 additions & 4 deletions kubernetes/monitoring/deploy-mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ function check_configs_am() {
# Check status of the cluster
function cluster_check() {
echo -e "\n*** check secrets"
kubectl get secrets -A | grep -E "default *|http *|alerts *" | grep Opaque
kubectl get secrets -A | grep -E "default *|http *|cpueff *|udp *" | grep Opaque
echo -e "\n*** check svc"
kubectl get svc -A | grep -E "default *|http *|alerts *"
kubectl get svc -A | grep -E "default *|http *|cpueff *|udp *"
echo -e "\n*** node status"
kubectl top node
echo -e "\n*** pods status"
kubectl top pods --sort-by=memory -A | grep -E "default *|http *|alerts *"
kubectl top pods --sort-by=memory -A | grep -E "default *|http *|cpueff *|udp *"
}

# Test VictoriaMetrics
Expand Down Expand Up @@ -170,6 +170,8 @@ function deploy_secrets() {
"$deploy_secrets_sh" http krb5cc-secrets
"$deploy_secrets_sh" http proxy-secrets
"$deploy_secrets_sh" http robot-secrets
# udp
"$deploy_secrets_sh" udp udp-secrets
#
rm_temp_deploy_secrets_sh
}
Expand All @@ -195,6 +197,8 @@ function clean_secrets() {
kubectl -n http --ignore-not-found=true delete secret krb5cc-secrets
kubectl -n http --ignore-not-found=true delete secret proxy-secrets
kubectl -n http --ignore-not-found=true delete secret robot-secrets
# udp
kubectl -n udp --ignore-not-found=true delete secret udp-secrets
}
function deploy_services() {
# auth
Expand All @@ -207,6 +211,8 @@ function deploy_services() {
kubectl -n default apply -f kmon/kube-eagle.yaml
# http
find "${script_dir}"/services/ -name "*-exp*.yaml" | awk '{print "kubectl apply -f "$1""}' | /bin/sh
# udp
kubectl -n udp apply -f services/udp-collector/udp-server.yaml
}
function clean_all_services() {
# auth
Expand All @@ -225,6 +231,8 @@ function clean_all_services() {
kubectl -n default --ignore-not-found=true delete -f services/victoria-metrics.yaml
# http
find "${script_dir}"/services/ -name "*-exp*.yaml" | awk '{print "kubectl --ignore-not-found=true delete -f "$1""}' | /bin/sh
# udp
kubectl -n default --ignore-not-found=true delete -f services/udp-collector/udp-server.yaml
}

function deploy_storage_services() {
Expand Down Expand Up @@ -274,7 +282,7 @@ deploy_ingress()
kubectl apply -f ingress/ingress.yaml
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
namespaces="auth cpueff http "
namespaces="auth cpueff http udp"
deploy_all() {
for _ns in $namespaces; do
if ! kubectl get ns | grep -q $_ns; then
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/monitoring/deploy-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set -e
##H sqoop-secrets
##H vmalert-secrets
##H grafana-backup-secrets
##H udp-secrets
##H Examples:
##H deploy-secrets.sh default prometheus-secrets ha

Expand Down Expand Up @@ -83,6 +84,8 @@ elif [ "$secret" == "grafana-backup-secrets" ]; then
token="--from-file=${sdir}/grafana-backup/token.json"
cmsmonit_k="--from-file=${sdir}/cmsmonit-keytab/keytab"
files="${token} ${cmsmonit_k}"
elif [ "$secret" == "udp-secrets" ]; then
files="--from-file=${sdir}/udp/udp_server.json"
elif [ "$secret" == "s3-keys-secrets" ]; then
files=`ls $sdir/victoria-metrics/ | awk '{ORS=" " ; print "--from-file="D"/"$1""}' D=$sdir/victoria-metrics | sed "s, $,,g"`
elif [ "$secret" == "robot-secrets" ]; then
Expand Down

0 comments on commit 6ef0c3c

Please sign in to comment.