From 8f464a58739c5abfc0fc638cfb73c4aaf6d52e71 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Fri, 10 Mar 2023 15:20:47 +0800 Subject: [PATCH] add datadog/agent --- .github/workflows/datadog-agent.yaml | 25 ++++++++++++++++--- oci/datadog/agent/Dockerfile | 21 ++++++++++++++++ .../cluster-agent}/Dockerfile | 0 .../kubernetes_apiserver.d/conf.yaml.default | 0 .../conf.d/orchestrator.d/conf.yaml.default | 0 .../cluster-agent}/entrypoint.sh | 0 .../cluster-agent}/install_info | 0 .../cluster-agent}/readsecret.sh | 0 .../readsecret_multiple_providers.sh | 0 9 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 oci/datadog/agent/Dockerfile rename oci/{datadog-cluster-agent => datadog/cluster-agent}/Dockerfile (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/conf.d/kubernetes_apiserver.d/conf.yaml.default (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/conf.d/orchestrator.d/conf.yaml.default (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/entrypoint.sh (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/install_info (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/readsecret.sh (100%) rename oci/{datadog-cluster-agent => datadog/cluster-agent}/readsecret_multiple_providers.sh (100%) diff --git a/.github/workflows/datadog-agent.yaml b/.github/workflows/datadog-agent.yaml index e3d05d0..ed084b7 100644 --- a/.github/workflows/datadog-agent.yaml +++ b/.github/workflows/datadog-agent.yaml @@ -3,12 +3,31 @@ on: pull_request: push: paths: + - 'oci/datadog/agent/Dockerfile' + - 'oci/datadog/cluster-agent/Dockerfile' - '.github/workflows/datadog-agent.yaml' - - 'oci/datadog-cluster-agent/Dockerfile' branches: - main jobs: + datadog-cluster-agent: + runs-on: ubuntu-latest + name: build chart builder datadog-cluster-agent image + steps: + - uses: actions/checkout@master + + - name: 'Artifact: build && push datadog-cluster-agent image' + uses: aevea/action-kaniko@master + with: + registry: artifact.onwalk.net + username: admin + password: ${{ secrets.HELM_REPO_PASSWORD }} + path: 'oci/datadog/cluster-agent/' + build_file: 'Dockerfile' + image: public/cluster-agent + tag: 7.43.1 + cache: false + cache_registry: cache datadog-agent: runs-on: ubuntu-latest name: build chart builder datadog-cluster-agent image @@ -21,9 +40,9 @@ jobs: registry: artifact.onwalk.net username: admin password: ${{ secrets.HELM_REPO_PASSWORD }} - path: 'oci/datadog-cluster-agent/' + path: 'oci/datadog/agent/' build_file: 'Dockerfile' - image: public/cluster-agent + image: public/agent tag: 7.43.1 cache: false cache_registry: cache diff --git a/oci/datadog/agent/Dockerfile b/oci/datadog/agent/Dockerfile new file mode 100644 index 0000000..10f2d61 --- /dev/null +++ b/oci/datadog/agent/Dockerfile @@ -0,0 +1,21 @@ +FROM artifact.onwalk.net/k8s/datadog/agent:7.43.1 + +LABEL maintainer "Datadog " + +ARG CIBUILD +RUN apt update && apt install ca-certificates curl -y +RUN cd /usr/local/share/ca-certificates/ && curl http://certinfo.roche.com/rootcerts/Roche%20Root%20CA%201.cer -o RocheRootCA1.cer && \ + curl http://certinfo.roche.com/rootcerts/RocheEnterpriseCA1.cer -o RocheEnterpriseCA1.cer && \ + curl http://certinfo.roche.com/rootcerts/RocheEnterpriseCA2.cer \ + -o RocheEnterpriseCA2.cer && curl http://certinfo.roche.com/rootcerts/Roche%20Root%20CA%201%20-%20G2.crt \ + -o RocheRootCA1-G2.crt && curl http://certinfo.roche.com/rootcerts/Roche%20Enterprise%20CA%201%20-%20G2.crt \ + -o RocheEnterpriseCA1-G2.crt && curl http://certinfo.roche.com/rootcerts/Roche%20G3%20Root%20CA.crt \ + -o RocheG3RootCA.crt && curl http://certinfo.roche.com/rootcerts/Roche%20G3%20Issuing%20CA%201.crt \ + -o RocheG3IssuingCA1.crt && curl http://certinfo.roche.com/rootcerts/Roche%20G3%20Issuing%20CA%202.crt \ + -o RocheG3IssuingCA2.crt && curl http://certinfo.roche.com/rootcerts/Roche%20G3%20Issuing%20CA%203.crt \ + -o RocheG3IssuingCA3.crt && curl http://certinfo.roche.com/rootcerts/Roche%20G3%20Issuing%20CA%204.crt \ + -o RocheG3IssuingCA4.crt && update-ca-certificates + +ENV LD_PRELOAD=/opt/lib/nosys.so + +CMD ["/bin/entrypoint.sh"] diff --git a/oci/datadog-cluster-agent/Dockerfile b/oci/datadog/cluster-agent/Dockerfile similarity index 100% rename from oci/datadog-cluster-agent/Dockerfile rename to oci/datadog/cluster-agent/Dockerfile diff --git a/oci/datadog-cluster-agent/conf.d/kubernetes_apiserver.d/conf.yaml.default b/oci/datadog/cluster-agent/conf.d/kubernetes_apiserver.d/conf.yaml.default similarity index 100% rename from oci/datadog-cluster-agent/conf.d/kubernetes_apiserver.d/conf.yaml.default rename to oci/datadog/cluster-agent/conf.d/kubernetes_apiserver.d/conf.yaml.default diff --git a/oci/datadog-cluster-agent/conf.d/orchestrator.d/conf.yaml.default b/oci/datadog/cluster-agent/conf.d/orchestrator.d/conf.yaml.default similarity index 100% rename from oci/datadog-cluster-agent/conf.d/orchestrator.d/conf.yaml.default rename to oci/datadog/cluster-agent/conf.d/orchestrator.d/conf.yaml.default diff --git a/oci/datadog-cluster-agent/entrypoint.sh b/oci/datadog/cluster-agent/entrypoint.sh similarity index 100% rename from oci/datadog-cluster-agent/entrypoint.sh rename to oci/datadog/cluster-agent/entrypoint.sh diff --git a/oci/datadog-cluster-agent/install_info b/oci/datadog/cluster-agent/install_info similarity index 100% rename from oci/datadog-cluster-agent/install_info rename to oci/datadog/cluster-agent/install_info diff --git a/oci/datadog-cluster-agent/readsecret.sh b/oci/datadog/cluster-agent/readsecret.sh similarity index 100% rename from oci/datadog-cluster-agent/readsecret.sh rename to oci/datadog/cluster-agent/readsecret.sh diff --git a/oci/datadog-cluster-agent/readsecret_multiple_providers.sh b/oci/datadog/cluster-agent/readsecret_multiple_providers.sh similarity index 100% rename from oci/datadog-cluster-agent/readsecret_multiple_providers.sh rename to oci/datadog/cluster-agent/readsecret_multiple_providers.sh