Skip to content

Commit a713fcb

Browse files
starzu-sumoMikołaj Świątek
authored andcommitted
Add k8s monitors to the setup docker
1 parent e86fb68 commit a713fcb

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ FROM alpine:3.15
22

33
ENV TERRAFORM_VERSION=1.1.4
44
ENV COLLECTION_VERSION=v2.4.1
5+
ENV MONITORS_VERSION=be74295483f766f2fc6dd916b429b372a5655bd3
56
ARG TARGETPLATFORM
67

78
RUN apk add --no-cache \
89
bash \
910
curl \
1011
jq \
12+
git \
1113
&& apk upgrade \
1214
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then TERRAFORM_PLATFORM="linux_amd64"; fi; \
1315
if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then TERRAFORM_PLATFORM="linux_arm"; fi; \
@@ -21,14 +23,21 @@ RUN apk add --no-cache \
2123
&& delgroup ping \
2224
&& addgroup -g 999 setup \
2325
&& adduser -u 999 -D -G setup setup \
24-
&& mkdir /terraform /scripts \
25-
&& chown -R setup:setup /terraform /scripts
26+
&& mkdir /terraform /scripts /monitors \
27+
&& chown -R setup:setup /terraform /scripts /monitors
2628

2729
USER setup
2830
RUN cd /terraform/ \
2931
&& curl -O https://raw.githubusercontent.com/SumoLogic/sumologic-kubernetes-collection/${COLLECTION_VERSION}/deploy/helm/sumologic/conf/setup/main.tf \
3032
&& terraform init \
3133
&& rm main.tf
34+
RUN cd /monitors/ \
35+
&& git clone https://github.com/SumoLogic/terraform-sumologic-sumo-logic-monitor.git \
36+
&& cd terraform-sumologic-sumo-logic-monitor \
37+
&& git checkout ${MONITORS_VERSION} \
38+
&& cd .. \
39+
&& cp terraform-sumologic-sumo-logic-monitor/monitor_packages/kubernetes/* . \
40+
&& rm -rf terraform-sumologic-sumo-logic-monitor
3241

3342
ARG BUILD_TAG=latest
3443
ENV TAG=$BUILD_TAG

0 commit comments

Comments
 (0)