Skip to content

Commit

Permalink
get gihub actions working
Browse files Browse the repository at this point in the history
  • Loading branch information
wr0ngway committed Nov 23, 2021
1 parent 3b26f7b commit d0b4c1b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion install/argocd-cm.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ data:
- name: argocd-cloudtruth-plugin
generate:
command: ["argocd-cloudtruth-plugin"]
args: ["./**/*.y*ml"]
args: ["*.y*ml"]
13 changes: 5 additions & 8 deletions install/argocd-repo-server.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ spec:
- name: argocd-repo-server
volumeMounts:
- name: custom-tools
subPath: cloudtruth
mountPath: /usr/local/bin/cloudtruth
- name: custom-tools
subPath: argoct.sh
mountPath: /usr/local/bin/argoct.sh
subPath: argocd-cloudtruth-plugin
mountPath: /usr/local/bin/argocd-cloudtruth-plugin
envFrom:
- secretRef:
name: argocd-cloudtruth-plugin
volumes:
- name: custom-tools
emptyDir: {}
initContainers:
- name: download-tools
image: alpine:3.8
- name: install-argocd-cloudtruth-plugin
image: cloudtruth/argocd-cloudtruth-plugin
command: [sh, -c]
args:
- wget -qO- https://github.com/cloudtruth/cloudtruth-cli/releases/latest/download/install.sh | sh && cp /usr/local/bin/cloudtruth /custom-tools/ && cp /local/argoct.sh /custom-tools/ && echo 2
- cp /argocd-cloudtruth-plugin /custom-tools/
volumeMounts:
- name: custom-tools
mountPath: /custom-tools
25 changes: 0 additions & 25 deletions install/install.sh

This file was deleted.

25 changes: 25 additions & 0 deletions install/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# fail fast
set -e


printf "Input Cloudtruth Api Key: "
read CLOUDTRUTH_API_KEY
printf "Input Cloudtruth Environment (Default and can be overridden for each Argo project): "
read CLOUDTRUTH_ENVIRONMENT
printf "Input Cloudtruth Project (Default and can be overridden for each Argo project): "
read CLOUDTRUTH_PROJECT

cat <<EOF | kubectl apply -n argocd -f -
$(cat argocd-cloudtruth-plugin-secret.yaml)
CLOUDTRUTH_API_KEY: $(echo ${CLOUDTRUTH_API_KEY} | base64)
CLOUDTRUTH_ENVIRONMENT: $(echo ${CLOUDTRUTH_ENVIRONMENT} | base64)
CLOUDTRUTH_PROJECT: $(echo ${CLOUDTRUTH_PROJECT} | base64)
EOF

kubectl get -n argocd deployment/argocd-repo-server -o yaml > argocd-repo-server.original.$(date +%s).yaml
kubectl patch -n argocd deployment/argocd-repo-server --patch "$(cat argocd-repo-server.patch.yaml)"

kubectl get -n argocd configmap/argocd-cm -o yaml > argocd-cm..original.$(date +%s).yaml
kubectl patch -n argocd configmap/argocd-cm --patch "$(cat argocd-cm.patch.yaml)"

0 comments on commit d0b4c1b

Please sign in to comment.