Skip to content

Commit

Permalink
chore: prepare for 1.15.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
werne2j committed Jun 23, 2023
1 parent 2f3a187 commit 2513543
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install the AVP plugin (as root so we can copy to /usr/local/bin)
ENV AVP_VERSION=0.2.2
ENV AVP_VERSION=1.15.0
ENV BIN=argocd-vault-plugin
RUN curl -L -o ${BIN} https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v${AVP_VERSION}/argocd-vault-plugin_${AVP_VERSION}_linux_amd64
RUN chmod +x ${BIN}
Expand Down Expand Up @@ -274,7 +274,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install the AVP plugin (as root so we can copy to /usr/local/bin)
ENV AVP_VERSION=1.11.0
ENV AVP_VERSION=1.15.0
ENV BIN=argocd-vault-plugin
RUN curl -L -o ${BIN} https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v${AVP_VERSION}/argocd-vault-plugin_${AVP_VERSION}_linux_amd64
RUN chmod +x ${BIN}
Expand Down
14 changes: 7 additions & 7 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ For sidecar configured plugins, add this to `cmp-plugin` ConfigMap, and then [ad

Use this option if you want to use Helm along with argocd-vault-plugin and use additional helm args.

**IMPORTANT**: passing `${ARGOCD_ENV_helm_args}` effectively allows users to run arbitrary code in the Argo CD
**IMPORTANT**: passing `${ARGOCD_ENV_HELM_ARGS}` effectively allows users to run arbitrary code in the Argo CD
repo-server (or, if using a sidecar, in the plugin sidecar). Only use this when the users are completely trusted. If
possible, determine which Helm arguments are needed by your users and explicitly pass only those arguments.

Expand All @@ -95,7 +95,7 @@ configManagementPlugins: |
args: ["helm dependency build"]
generate:
command: ["sh", "-c"]
args: ["helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_helm_args} . --include-crds | argocd-vault-plugin generate -"]
args: ["helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE ${ARGOCD_ENV_HELM_ARGS} . --include-crds | argocd-vault-plugin generate -"]
```
For sidecar configured plugins, add this to `cmp-plugin` ConfigMap, and then [add a sidecar to run it](../installation#initcontainer-and-configuration-via-sidecar):
```yaml
Expand Down Expand Up @@ -130,7 +130,7 @@ Helm args must be defined in the application manifest:
plugin:
name: argocd-vault-plugin-helm
env:
- name: helm_args
- name: HELM_ARGS
value: -f values-dev.yaml -f values-dev-tag.yaml
```

Expand All @@ -145,7 +145,7 @@ configManagementPlugins: |
- name: argocd-vault-plugin-helm
generate:
command: ["bash", "-c"]
args: ['helm template "$ARGOCD_APP_NAME" -f <(echo "$ARGOCD_ENV_helm_values") . | argocd-vault-plugin generate -']
args: ['helm template "$ARGOCD_APP_NAME" -f <(echo "$ARGOCD_ENV_HELM_VALUES") . | argocd-vault-plugin generate -']
```
For sidecar configured plugins, add this to `cmp-plugin` ConfigMap, and then [add a sidecar to run it](../installation#initcontainer-and-configuration-via-sidecar):
```yaml
Expand All @@ -168,7 +168,7 @@ For sidecar configured plugins, add this to `cmp-plugin` ConfigMap, and then [ad
- bash
- "-c"
- |
helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE -f <(echo "$ARGOCD_ENV_helm_values") . |
helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE -f <(echo "$ARGOCD_ENV_HELM_VALUES") . |
argocd-vault-plugin generate -
lockRepo: false
```
Expand All @@ -180,7 +180,7 @@ Then you can define your Helm values inline in your application manifest:
plugin:
name: argocd-vault-plugin-helm
env:
- name: helm_values
- name: HELM_VALUES
value: |
# non-vault helm values are specified normally
someValue: lasldkfjlksa
Expand Down Expand Up @@ -278,7 +278,7 @@ If you want to load in a new value from your Secret Manager without making any n

<img src="https://github.com/argoproj-labs/argocd-vault-plugin/raw/main/assets/hard-refresh.png" width="300">

You can also use the `argocd app diff` command passing the `--hard-refresh` flag. This will run argocd-vault-plugin again and pull in the new values from you Secret Manager and then you can either have Auto Sync setup or Sync manually to apply the new values.
You can also use the `argocd app diff` command passing the `--hard-refresh` flag. This will run argocd-vault-plugin again and pull in the new values from your Secret Manager and then you can either have Auto Sync setup or Sync manually to apply the new values.

### Caveats

Expand Down
2 changes: 1 addition & 1 deletion manifests/cmp-configmap/argocd-repo-server-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
# Note the lack of the `v` prefix unlike the git tag
env:
- name: AVP_VERSION
value: "1.14.0"
value: "1.15.0"
args:
- >-
wget -O argocd-vault-plugin
Expand Down
2 changes: 1 addition & 1 deletion manifests/cmp-configmap/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- https://github.com/argoproj/argo-cd/manifests/cluster-install
- https://github.com/argoproj/argo-cd/manifests/cluster-install?ref=v2.7.5

patchesStrategicMerge:
- argocd-repo-server-deploy.yaml
Expand Down
8 changes: 4 additions & 4 deletions manifests/cmp-sidecar/argocd-repo-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
image: registry.access.redhat.com/ubi8
env:
- name: AVP_VERSION
value: 1.14.0
value: 1.15.0
command: [sh, -c]
args:
- >-
Expand All @@ -41,7 +41,7 @@ spec:
containers:
- name: avp-helm
command: [/var/run/argocd/argocd-cmp-server]
image: quay.io/argoproj/argocd:v2.4.0
image: quay.io/argoproj/argocd:v2.7.5
securityContext:
runAsNonRoot: true
runAsUser: 999
Expand All @@ -66,7 +66,7 @@ spec:
# argocd-vault-plugin with Kustomize
- name: avp-kustomize
command: [/var/run/argocd/argocd-cmp-server]
image: quay.io/argoproj/argocd:v2.4.0
image: quay.io/argoproj/argocd:v2.7.5
securityContext:
runAsNonRoot: true
runAsUser: 999
Expand All @@ -91,7 +91,7 @@ spec:
# argocd-vault-plugin with plain YAML
- name: avp
command: [/var/run/argocd/argocd-cmp-server]
image: quay.io/argoproj/argocd:v2.4.0
image: quay.io/argoproj/argocd:v2.7.5
securityContext:
runAsNonRoot: true
runAsUser: 999
Expand Down
2 changes: 1 addition & 1 deletion manifests/cmp-sidecar/cmp-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data:
- "-c"
- "find . -name 'Chart.yaml' && find . -name 'values.yaml'"
generate:
# **IMPORTANT**: passing `${ARGOCD_ENV_helm_args}` effectively allows users to run arbitrary code in the Argo CD
# **IMPORTANT**: passing `${ARGOCD_ENV_HELM_ARGS}` effectively allows users to run arbitrary code in the Argo CD
# repo-server (or, if using a sidecar, in the plugin sidecar). Only use this when the users are completely trusted. If
# possible, determine which Helm arguments are needed by your users and explicitly pass only those arguments.
command:
Expand Down
6 changes: 2 additions & 4 deletions manifests/cmp-sidecar/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ kind: Kustomization

images:
- name: quay.io/argoproj/argocd
newTag: v2.4.0
newTag: v2.7.5

# Note: Versions below 2.4.0 will not always work if trying to use AVP with Helm
# Fixed in https://github.com/argoproj/argo-cd/pull/9319
resources:
- https://github.com/argoproj/argo-cd//manifests/cluster-install?ref=v2.4.0
- https://github.com/argoproj/argo-cd//manifests/cluster-install?ref=v2.7.5
- cmp-plugin.yaml

patchesStrategicMerge:
Expand Down

0 comments on commit 2513543

Please sign in to comment.