From e053ebd1850f7ec51525da3f8dc72d18d244637f Mon Sep 17 00:00:00 2001
From: yxxhero <aiopsclub@163.com>
Date: Thu, 30 Mar 2023 12:21:50 +0800
Subject: [PATCH] add sops in k8s-helm azcli and tccli

---
 k8s-helm-azcli/Dockerfile | 3 +++
 k8s-helm-tccli/Dockerfile | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/k8s-helm-azcli/Dockerfile b/k8s-helm-azcli/Dockerfile
index 2f5b651..dd8e9a3 100644
--- a/k8s-helm-azcli/Dockerfile
+++ b/k8s-helm-azcli/Dockerfile
@@ -6,6 +6,7 @@ ARG HELMFILE_VERSION=0.149.0
 # set helm version, It can be changed to other version form by args
 ARG HELM_VERSION=3.9.4
 ARG AZURECLI_VERSION=2.43.0
+ARG SOPS_VERSION=3.7.3
 
 WORKDIR /workspace
 
@@ -22,6 +23,8 @@ RUN apk add curl libressl-dev gcc cargo rust python3-dev make libffi-dev linux-h
     && curl -fsSL -o kubectl https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl \
     && chmod a+x kubectl \
     && cp kubectl /usr/local/bin/ \
+    && curl -fsSL -o sops https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux.amd64 \
+    && chmod a+x sops && mv sops /usr/local/bin/ \
     && helm plugin install https://github.com/aslafy-z/helm-git --version 0.11.1 \
     && helm plugin install https://github.com/databus23/helm-diff --version 3.6.0 \
     && helm plugin install https://github.com/chartmuseum/helm-push.git --version 0.10.1 \
diff --git a/k8s-helm-tccli/Dockerfile b/k8s-helm-tccli/Dockerfile
index 3653093..a55dd8f 100644
--- a/k8s-helm-tccli/Dockerfile
+++ b/k8s-helm-tccli/Dockerfile
@@ -3,6 +3,7 @@ FROM alpine:3.15.4
 ARG VAULT_VERSION=1.9.0
 ARG TCCLI_VERSION=3.0.642.1
 ARG HELMFILE_VERSION=0.149.0
+ARG SOPS_VERSION=3.7.3
 
 # set helm version, It can be changed to other version form by args
 ARG HELM_VERSION=3.9.4
@@ -22,6 +23,8 @@ RUN apk add curl git ca-certificates python3 py-pip bash jq unzip --update --no-
     && curl -fsSL -o kubectl https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl \
     && chmod a+x kubectl \
     && cp kubectl /usr/local/bin/ \
+    && curl -fsSL -o sops https://github.com/mozilla/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux.amd64 \
+    && chmod a+x sops && mv sops /usr/local/bin/ \
     && helm plugin install https://github.com/aslafy-z/helm-git --version 0.11.1 \
     && helm plugin install https://github.com/databus23/helm-diff --version 3.6.0 \
     && helm plugin install https://github.com/chartmuseum/helm-push.git --version 0.10.1\
-- 
GitLab