Skip to content

Commit cb8ce0b

Browse files
authored
Merge pull request #84 from sector2000/add-helm-secrets-sops-age
Add helm-secrets, sops and age
2 parents cd75b70 + ee79ab4 commit cb8ce0b

2 files changed

Lines changed: 67 additions & 65 deletions

File tree

Containerfile

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ ARG DNF_TO_REMOVE="dejavu-sans-fonts langpacks-core-font-en langpacks-core-en la
2525
ARG RPM_TO_FORCEFULLY_REMOVE="cracklib-dicts"
2626
# Versions
2727
ARG OPENSHIFT_CLIENT_VERSION="4.14.20"
28+
ARG HYPERSHIFT_VERSION="2.7.2-1"
2829
ARG HELM_VERSION="3.13.3"
2930
ARG ARGOCD_VERSION="2.9.7"
3031
ARG TKN_CLI_VERSION="0.35.2"
3132
ARG YQ_VERSION="4.40.7"
3233
ARG TEA_VERSION="0.9.2"
34+
ARG SOPS_VERSION="3.11.0"
35+
ARG AGE_VERSION="1.3.1"
36+
ARG HELM_SECRETS_VERSION="4.7.5"
3337

3438
# As of 9/5/2024: awxkit is not compatible with python 3.12 due to setuptools
3539
# Ansible-core 2.19 is needed for losing track of async jobs (as noted in AGOF for infra.controller_configuration)
@@ -47,11 +51,10 @@ ARG OPTTARGETARCH
4751
# Extra rpms for specific arches. Needed because on arm64 pip insists on rebuilding psutils
4852
ARG EXTRARPMS
4953

50-
ARG HYPERSHIFT_VER="2.7.2-1"
51-
ARG HYPERSHIFT_URL="https://developers.redhat.com/content-gateway/file/pub/mce/clients/hcp-cli/${HYPERSHIFT_VER}/hcp-cli-${HYPERSHIFT_VER}-linux-${TARGETARCH}.tar.gz"
52-
5354
USER root
5455

56+
ENV HELM_PLUGINS=/etc/helm-plugins
57+
5558
ADD https://cli.github.com/packages/rpm/gh-cli.repo /etc/yum.repos.d/gh-cli.repo
5659

5760
# 'pip' is expected to be the pip resolved by 'python3 pip' AKA the one we install with PYTHON_VERSION
@@ -66,24 +69,18 @@ microdnf remove -y $DNF_TO_REMOVE && \
6669
rpm -e --nodeps $RPM_TO_FORCEFULLY_REMOVE && \
6770
microdnf clean all && \
6871
rm -rf /var/cache/dnf && \
69-
curl -sfL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v${ARGOCD_VERSION}/argocd-linux-${TARGETARCH} && \
70-
chmod +x /usr/local/bin/argocd && \
71-
curl -sLfO https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
72-
tar xf helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz --strip-component 1 -C /usr/local/bin && \
73-
chmod +x /usr/local/bin/helm && rm -f /usr/local/bin/README.md && rm -f /usr/local/bin/LICENSE && \
74-
rm -f helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
75-
curl -sLfO https://github.com/tektoncd/cli/releases/download/v${TKN_CLI_VERSION}/tkn_${TKN_CLI_VERSION}_Linux_${ALTTARGETARCH}.tar.gz && \
76-
tar xf tkn_${TKN_CLI_VERSION}_Linux_${ALTTARGETARCH}.tar.gz -C /usr/local/bin --no-same-owner && chmod 755 /usr/local/bin/tkn && \
77-
rm -f tkn_${TKN_CLI_VERSION}_Linux_${ALTTARGETARCH}.tar.gz && \
78-
rm -f /usr/local/bin/README.md && rm -f /usr/local/bin/LICENSE && \
79-
curl -skLf -o hcp.tar.gz ${HYPERSHIFT_URL} && \
80-
tar xf hcp.tar.gz -C /usr/local/bin/ && \
81-
rm -f hcp.tar.gz && \
82-
curl -sLfO https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OPENSHIFT_CLIENT_VERSION}/openshift-client-linux-${OPTTARGETARCH}${OPENSHIFT_CLIENT_VERSION}.tar.gz && \
83-
tar xvf openshift-client-linux-${OPTTARGETARCH}${OPENSHIFT_CLIENT_VERSION}.tar.gz -C /usr/local/bin && \
84-
rm -rf openshift-client-linux-${OPTTARGETARCH}${OPENSHIFT_CLIENT_VERSION}.tar.gz && rm -f /usr/local/bin/kubectl && ln -sf /usr/local/bin/oc /usr/local/bin/kubectl && \
85-
curl -sSL -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_${TARGETARCH} && chmod 755 /usr/local/bin/yq && \
86-
curl -sSL -o /usr/local/bin/tea https://gitea.com/gitea/tea/releases/download/v${TEA_VERSION}/tea-${TEA_VERSION}-linux-${TARGETARCH} && chmod 755 /usr/local/bin/tea && \
72+
curl -sSfL https://github.com/argoproj/argo-cd/releases/download/v${ARGOCD_VERSION}/argocd-linux-${TARGETARCH} -o /usr/local/bin/argocd && \
73+
curl -sSfL https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz | tar xzf - --strip-components=1 -C /usr/local/bin linux-${TARGETARCH}/helm && \
74+
curl -sSfL https://github.com/tektoncd/cli/releases/download/v${TKN_CLI_VERSION}/tkn_${TKN_CLI_VERSION}_Linux_${ALTTARGETARCH}.tar.gz | tar xzf - -C /usr/local/bin tkn && \
75+
curl -sSfL https://developers.redhat.com/content-gateway/file/pub/mce/clients/hcp-cli/${HYPERSHIFT_VERSION}/hcp-cli-${HYPERSHIFT_VERSION}-linux-${TARGETARCH}.tar.gz | tar xzf - -C /usr/local/bin ./hcp && \
76+
curl -sSfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OPENSHIFT_CLIENT_VERSION}/openshift-client-linux-${OPTTARGETARCH}${OPENSHIFT_CLIENT_VERSION}.tar.gz | tar xzf - -C /usr/local/bin oc && ln -sf /usr/local/bin/oc /usr/local/bin/kubectl && \
77+
curl -sSfL https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_${TARGETARCH} -o /usr/local/bin/yq && \
78+
curl -sSfL https://gitea.com/gitea/tea/releases/download/v${TEA_VERSION}/tea-${TEA_VERSION}-linux-${TARGETARCH} -o /usr/local/bin/tea && \
79+
curl -sSfL https://github.com/getsops/sops/releases/download/v${SOPS_VERSION}/sops-v${SOPS_VERSION}.linux.${TARGETARCH} -o /usr/local/bin/sops && \
80+
curl -sSfL https://github.com/FiloSottile/age/releases/download/v${AGE_VERSION}/age-v${AGE_VERSION}-linux-${TARGETARCH}.tar.gz | tar xzf - --strip-components=1 -C /usr/local/bin age/age* && \
81+
mkdir -p "${HELM_PLUGINS}" && \
82+
curl -sSfL https://github.com/jkroepke/helm-secrets/releases/download/v${HELM_SECRETS_VERSION}/helm-secrets.tar.gz | tar xzf - -C "${HELM_PLUGINS}" && \
83+
chown root:root /usr/local/bin/* && chmod 755 /usr/local/bin/* && \
8784
rm -rf /root/anaconda* /root/original-ks.cfg /usr/local/README
8885

8986
# The hypershift cli is downloaded directly from the cluster.
@@ -126,19 +123,21 @@ mv /usr/local/bin/ansible-playbook /usr/local/bin/ansible-playbook.orig && \
126123
cp /tmp/ansible-playbook-wrapper.sh /usr/local/bin/ansible-playbook && \
127124
chmod +x /usr/local/bin/ansible-playbook && \
128125
rm -rf /usr/local/lib/python${PYTHON_VERSION}/site-packages/ansible_collections/$COLLECTIONS_TO_REMOVE && \
129-
curl -L -O https://raw.githubusercontent.com/clumio-code/azure-sdk-trim/main/azure_sdk_trim/azure_sdk_trim.py && \
126+
curl -sSfL -O https://raw.githubusercontent.com/clumio-code/azure-sdk-trim/main/azure_sdk_trim/azure_sdk_trim.py && \
130127
python3 azure_sdk_trim.py && rm azure_sdk_trim.py && pip uninstall -y humanize && \
131128
if [ -n "$EXTRARPMS" ]; then microdnf remove -y $EXTRARPMS; fi && \
132129
mkdir -p /pattern/.ansible/tmp /pattern-home/.ansible/tmp && \
133130
find /pattern/.ansible -type d -exec chmod 770 "{}" \; && \
134131
find /pattern-home/.ansible -type d -exec chmod 770 "{}" \;
135132

136133

137-
# Adding python scripts to start, stop and retrieve status of hostedcluster instnances
134+
# Adding python scripts to start, stop and retrieve status of hostedcluster instances
138135
ADD https://raw.githubusercontent.com/validatedpatterns/utilities/main/aws-tools/start-instances.py \
139136
https://raw.githubusercontent.com/validatedpatterns/utilities/main/aws-tools/stop-instances.py \
140137
https://raw.githubusercontent.com/validatedpatterns/utilities/main/aws-tools/status-instances.py /usr/local/bin/
141138

139+
RUN chmod 755 /usr/local/bin/start-instances.py /usr/local/bin/stop-instances.py /usr/local/bin/status-instances.py
140+
142141
COPY default-cmd.sh /usr/local/bin
143142
WORKDIR /pattern
144143
CMD ["/usr/local/bin/default-cmd.sh"]

README.md

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,51 @@ This container provides a pre-configured environment with all the necessary tool
1414

1515
<!-- textlint-disable -->
1616

17-
| name | type | version |
18-
| :---------------------------------: | :--------: | :------------: |
19-
| ansible | pip | 2.16.14 |
20-
| ansible.posix | collection | 2.1.0 |
21-
| ansible-runner | pip | 2.4.2 |
22-
| ansible.utils | collection | 6.0.0 |
23-
| argocd | binary | v2.9.7+fbb6b20 |
24-
| awscli | pip | 1.42.65 |
25-
| awx.awx | collection | 24.6.1 |
26-
| awxkit | pip | 24.6.1 |
27-
| azure-cli | pip | 2.79.0 |
28-
| boto3 | pip | 1.40.65 |
29-
| botocore | pip | 1.40.65 |
30-
| community.general | collection | 12.0.0 |
31-
| community.okd | collection | 5.0.0 |
32-
| gcloud | pip | 0.18.3 |
33-
| gh | package | 2.82.1 |
34-
| git-core | package | 2.47.3 |
35-
| gzip | package | 1.12 |
36-
| hcp | binary | 4.17.0 |
37-
| helm | binary | v3.13.3 |
38-
| infra.ah_configuration | collection | 2.1.0 |
39-
| infra.controller_configuration | collection | 3.2.0 |
40-
| infra.eda_configuration | collection | 1.1.0 |
41-
| jmespath | pip | 1.0.1 |
42-
| jq | package | 1.6 |
43-
| kubernetes.core | collection | 6.2.0 |
44-
| kubernetes | pip | 34.1.0 |
45-
| kustomize | binary | v5.0.1 |
46-
| make | package | 4.3 |
47-
| openshift | binary | 4.14.20 |
48-
| pytest | pip | 8.4.2 |
49-
| python3-pip | package | 21.3.1 |
50-
| python | package | 3.11.11 |
51-
| redhat_cop.controller_configuration | collection | 2.3.1 |
52-
| rhvp.cluster_utils | collection | 1.1.0 |
53-
| sshpass | package | 1.09 |
54-
| tar | package | 1.34 |
55-
| tea | binary | 0.9.2 |
56-
| tekton | binary | 0.35.2 |
57-
| vi | package | 8.2.2637 |
58-
| vp-qe-test-common | pip | 0.1.0 |
17+
| name | type | version |
18+
| :---------------------------------: | :---------: | :------------: |
19+
| age | binary | 1.3.1 |
20+
| ansible | pip | 2.16.14 |
21+
| ansible.posix | collection | 2.1.0 |
22+
| ansible-runner | pip | 2.4.2 |
23+
| ansible.utils | collection | 6.0.0 |
24+
| argocd | binary | v2.9.7+fbb6b20 |
25+
| awscli | pip | 1.42.65 |
26+
| awx.awx | collection | 24.6.1 |
27+
| awxkit | pip | 24.6.1 |
28+
| azure-cli | pip | 2.79.0 |
29+
| boto3 | pip | 1.40.65 |
30+
| botocore | pip | 1.40.65 |
31+
| community.general | collection | 12.0.0 |
32+
| community.okd | collection | 5.0.0 |
33+
| gcloud | pip | 0.18.3 |
34+
| gh | package | 2.82.1 |
35+
| git-core | package | 2.47.3 |
36+
| gzip | package | 1.12 |
37+
| hcp | binary | 4.17.0 |
38+
| helm | binary | v3.13.3 |
39+
| helm-secrets | helm plugin | 4.7.5 |
40+
| infra.ah_configuration | collection | 2.1.0 |
41+
| infra.controller_configuration | collection | 3.2.0 |
42+
| infra.eda_configuration | collection | 1.1.0 |
43+
| jmespath | pip | 1.0.1 |
44+
| jq | package | 1.6 |
45+
| kubernetes.core | collection | 6.2.0 |
46+
| kubernetes | pip | 34.1.0 |
47+
| kustomize | binary | v5.0.1 |
48+
| make | package | 4.3 |
49+
| openshift | binary | 4.14.20 |
50+
| pytest | pip | 8.4.2 |
51+
| python3-pip | package | 21.3.1 |
52+
| python | package | 3.11.11 |
53+
| redhat_cop.controller_configuration | collection | 2.3.1 |
54+
| rhvp.cluster_utils | collection | 1.1.0 |
55+
| sops | binary | 3.11.0 |
56+
| sshpass | package | 1.09 |
57+
| tar | package | 1.34 |
58+
| tea | binary | 0.9.2 |
59+
| tekton | binary | 0.35.2 |
60+
| vi | package | 8.2.2637 |
61+
| vp-qe-test-common | pip | 0.1.0 |
5962

6063
<!-- textlint-enable -->
6164

0 commit comments

Comments
 (0)