Skip to content

Commit

Permalink
OM-174 - Fixed docker issues (#108)
Browse files Browse the repository at this point in the history
1. corrected ape.toml.template to use string values properly
2. corrected entry point shell script with right environment variables
3. updated docker creation script to allow manual workflow execution with an input tag
  • Loading branch information
mphanias authored Mar 5, 2024
1 parent d3eebae commit 898d022
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
tags:
- v*

workflow_dispatch:
inputs:
docker_tag:
description: Docker Tag
required: false
jobs:
build-container:
runs-on: ubuntu-latest
Expand All @@ -25,5 +29,11 @@ jobs:
echo "DOCKER_TAG=$(echo $GITHUB_REF_NAME | cut -c 2-)" >> $GITHUB_ENV
- name: Build and push
run: |
echo ${{ env.DOCKER_TAG }}
make VERSION=${{ env.DOCKER_TAG }} release-docker-multi-arch
if [ "${{ github.event.inputs.docker_tag }}" == "" ]; then
echo "Creating Docker Images with given Docker Tag with GITHUB_REF_NAME - ".${{ env.DOCKER_TAG }}
make VERSION=${{ env.DOCKER_TAG }} release-docker-multi-arch
else
echo "Creating Docker Images with Input Docker Tag value ".${{ github.event.inputs.docker_tag }}
make VERSION=${{ github.event.inputs.docker_tag }} release-docker-multi-arch
fi
2 changes: 1 addition & 1 deletion configs/ape.toml.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
labels = {${METRIC_LABELS}}

# mention cloud provider (aws, gcp, azure ) so exporter collects few details like region, zone etc.,
cloud_provider = ${AGENT_CLOUD_PROVIDER}
cloud_provider = "${AGENT_CLOUD_PROVIDER}"

# metrics server timeout in seconds
timeout = ${AGENT_TIMEOUT}
Expand Down
8 changes: 4 additions & 4 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ export SINDEX_METRICS_ALLOWLIST=${SINDEX_METRICS_ALLOWLIST:-""}
export SINDEX_METRICS_BLOCKLIST=${SINDEX_METRICS_BLOCKLIST:-""}

export AGENT_REFRESH_SYSTEM_STATS=${AGENT_REFRESH_SYSTEM_STATS:-"false"}
export AGENT_CLOUD_PROVIDER=${AGENT_CLOUD_PROVIDER:-""}
export AGENT_CLOUD_PROVIDER=${AGENT_CLOUD_PROVIDER:-""}

export AGENT_PROMETHEUS=${AGENT_PROMETHEUS:-"true"}
export AGENT_OTEL=${AGENT_OPEN_TELEMETRY:-"false"}
export AGENT_OPEN_TELEMETRY=${AGENT_OPEN_TELEMETRY:-"false"}

export USE_MOCK_DATASOURCE=${USE_MOCK_DATASOURCE:-"true"}
export USE_MOCK_DATASOURCE=${USE_MOCK_DATASOURCE:-"false"}
export AGENT_OTEL_APP_SERVICE_NAME=${AGENT_OTEL_APP_SERVICE_NAME:-"aerospike-server-metrics"}
export AGENT_OTEL_ENDPOINT=${AGENT_OTEL_ENDPOINT:-""}
export AGENT_OTEL_TLS_ENABLED=${AGENT_OTEL_TLS_ENABLED:-"true"}
export AGENT_OTEL_HEADERS=${AGENT_OTEL_HEADERS:-""}
export AGENT_OTEL_SERVER_STAT_FETCH_INTERVAL=${AGENT_OTEL_SERVER_STAT_FETCH_INTERVAL:-"60"}

export AGENT_OTEL_PUSH_INTERVAL=${AGENT_OTEL_PUSH_INTERVAL:-"60"}

if [ -f /etc/aerospike-prometheus-exporter/ape.toml.template ]; then
env | while IFS= read -r line; do
Expand Down

0 comments on commit 898d022

Please sign in to comment.