-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* powerdns: update dependencies and force re-release * fix tests * fix golangci-lint errors * powerdns: use forked repo * change authoritative pdns image to one that is maintained * print logs at e2e scenario exit * final fixes and cleanup * upgrade go-mod for the config generator
- Loading branch information
Showing
20 changed files
with
167 additions
and
565 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,4 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# ############################################################### | ||
# Integration variables | ||
root_dir=$1 | ||
integration_dir="${root_dir}/exporters/powerdns" | ||
integration_bin_dir="${integration_dir}/target/bin" | ||
|
||
# ############################################################### | ||
# Clone exporter | ||
tmp_dir=$(mktemp -d) | ||
git clone --no-checkout "${EXPORTER_REPO_URL}" "${tmp_dir}" | ||
cd "${tmp_dir}" | ||
|
||
if [[ -z "${EXPORTER_TAG}" ]] | ||
then | ||
git -c advice.detachedHead=false checkout "${EXPORTER_COMMIT}" | ||
else | ||
git checkout "${EXPORTER_TAG}" -d | ||
fi | ||
|
||
IFS=',' read -r -a goarchs <<< "$PACKAGE_LINUX_GOARCHS" | ||
for goarch in "${goarchs[@]}" | ||
do | ||
echo "Build exporter Linux ${goarch}" | ||
GOARCH=${goarch} make build | ||
mkdir -p "${integration_bin_dir}/linux_${goarch}" | ||
cp "${tmp_dir}/powerdns_exporter" "${integration_bin_dir}/linux_${goarch}/powerdns-exporter" | ||
done | ||
location=$(dirname "${BASH_SOURCE[0]}") | ||
${location}/build-exporter.sh "linux" "$@" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# ############################################################### | ||
# Integration variables | ||
os="$1" | ||
root_dir="$2" | ||
integration_dir="${root_dir}/exporters/powerdns" | ||
integration_bin_dir="${integration_dir}/target/bin" | ||
download_url="https://github.com/newrelic-forks/prometheus-powerdns_exporter/releases/download" | ||
|
||
# ############################################################### | ||
# Validate variables | ||
if ! [ -z "$EXPORTER_COMMIT" ]; then | ||
echo "This script does not support to build by commit anymore." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$EXPORTER_TAG" ]; then | ||
echo "This script requires .exporter_tag to download the exporter." | ||
exit 2 | ||
fi | ||
|
||
if [ "$os" != "linux" ] && [ "$os" != "windows" ]; then | ||
echo "os not supported: $os." | ||
exit 3 | ||
fi | ||
|
||
# ############################################################### | ||
# Download the exporter | ||
IFS=',' read -r -a goarchs <<< "$PACKAGE_LINUX_GOARCHS" | ||
for goarch in "${goarchs[@]}" | ||
do | ||
echo "Downloading exporter for ${os} ${goarch}" | ||
mkdir -p "${integration_bin_dir}/${os}_${goarch}" | ||
curl -qsLo "${integration_bin_dir}/${os}_${goarch}/powerdns-exporter" "${download_url}/${EXPORTER_TAG}/prometheus-powerdns_exporter_${EXPORTER_TAG}_${os}_${goarch}" | ||
chmod a+x "${integration_bin_dir}/${os}_${goarch}/powerdns-exporter" | ||
done |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,6 @@ | ||
FROM debian:bookworm | ||
|
||
ENV PDNSCONF_LAUNCH="gmysql" | ||
ENV PDNSCONF_GMYSQL_HOST="mysql" | ||
ENV PDNSCONF_GMYSQL_USER="pdns" | ||
ENV PDNSCONF_GMYSQL_DBNAME="pdns" | ||
ENV PDNSCONF_GMYSQL_PASSWORD="pdnspw" | ||
ENV PDNSCONF_INCLUDE_DIR="/etc/powerdns/pdns.d" | ||
ENV PDNSCONF_GMYSQL_DNSSEC="yes" | ||
ENV PDNSCONF_API_KEY="apisecret" | ||
ENV SECALLZONES_CRONJOB="no" | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl gnupg && \ | ||
curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add - | ||
|
||
ADD pdns.list /etc/apt/sources.list.d/pdns.list | ||
ADD pdns.preference /etc/apt/preferences.d/pdns | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -q -y pdns-server pdns-backend-mysql mariadb-client && \ | ||
rm /etc/powerdns/pdns.d/*.conf && rm /etc/powerdns/*.conf && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cron jq && \ | ||
rm /etc/cron.daily/* && \ | ||
mkdir /var/run/pdns && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
EXPOSE 53/udp 53/tcp | ||
FROM ghcr.io/txqueuelen/powerdns-docker/powerdns:v4.9.1 | ||
|
||
ADD start.sh /usr/local/bin/start.sh | ||
ADD fixdsrrs.sh /usr/local/bin/fixdsrrs.sh | ||
ADD secallzones.sh /usr/local/bin/secallzones.sh | ||
ADD schema.mysql.sql /usr/share/doc/pdns-backend-mysql/ | ||
RUN chmod a+x /usr/local/bin/*.sh | ||
|
||
CMD ["/usr/local/bin/start.sh"] | ||
ENTRYPOINT [ "/bin/bash", "/usr/local/bin/start.sh" ] | ||
CMD [] |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
query-cache-ttl=20 | ||
cache-ttl=20 | ||
slave=yes | ||
webserver=yes | ||
webserver-address=0.0.0.0 | ||
webserver-allow-from=0.0.0.0/0,::/0 | ||
launch=gmysql | ||
gmysql-dbname=pdns | ||
gmysql-dnssec=yes | ||
gmysql-host=mysql | ||
gmysql-password=pdnspw | ||
gmysql-user=pdns | ||
launch=gsqlite3 | ||
gsqlite3-database=/data/db.sqlite | ||
api-key=authoritative-secret | ||
dnsupdate=yes | ||
allow-axfr-ips=0.0.0.0/0,::/0 | ||
api=yes | ||
api-key=authoritative-secret | ||
local-address=0.0.0.0 | ||
local-port=53 | ||
setgid=pdns | ||
setuid=pdns | ||
any-to-tcp=yes | ||
dnsupdate=no |
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
exporters/powerdns/e2e/pdns-authoritative/pdns.local.gmysql.conf
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.