-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with argocd integration #193
Comments
@AnthonyWC I don't know if this is still relevant, but my gut says this the @dosu-bot what do you think? |
🤖 Hello @AnthonyWC, Based on the information you've provided and the similar issues I found in the KSOPS repository, it seems like the problem might be related to the Here are some steps you can take to troubleshoot this issue:
A working demo of the solution can be found at: https://github.com/james-callahan/example-gitops Another potential issue could be the version mismatch of KSOPS. You mentioned that you are using KSOPS v4.2.1, but the latest version is v4.2.4. If you are using KSOPS v4.2.1, then the Dockerfile should be updated to reflect this. Here is an example of how to update the Dockerfile: # https://github.com/argoproj/argo-cd/blob/master/Dockerfile
ARG KSOPS_VERSION="v4.2.1"
#--------------------------------------------#
#--------Build KSOPS and Kustomize-----------#
#--------------------------------------------#
FROM viaductoss/ksops:$KSOPS_VERSION as ksops-builder
#--------------------------------------------#
#--------Build Custom Argo Image-------------#
#--------------------------------------------#
FROM argoproj/argocd:$ARGO_CD_VERSION
# Switch to root for the ability to perform install
USER root
ARG PKG_NAME=ksops
# Override the default kustomize executable with the Go built version
COPY --from=ksops-builder /usr/local/bin/kustomize /usr/local/bin/kustomize
# Add ksops executable to path
COPY --from=ksops-builder /usr/local/bin/ksops /usr/local/bin/ksops
# Switch back to non-root user
USER argocd And the Argo CD Helm Chart should be updated as follows: # Enable Kustomize Alpha Plugins via Argo CD ConfigMap, required for ksops
server:
config:
kustomize.buildOptions: "--enable-alpha-plugins --enable-exec"
repoServer:
# Use init containers to configure custom tooling
# https://argoproj.github.io/argo-cd/operator-manual/custom_tools/
volumes:
- name: custom-tools
emptyDir: {}
initContainers:
- name: install-ksops
image: viaductoss/ksops:v4.2.1
command: ["/bin/sh", "-c"]
args:
- echo "Installing KSOPS...";
mv ksops /custom-tools/;
mv kustomize /custom-tools/;
echo "Done.";
volumeMounts:
- mountPath: /custom-tools
name: custom-tools
volumeMounts:
- mountPath: /usr/local/bin/kustomize
name: custom-tools
subPath: kustomize
- mountPath: /usr/local/bin/ksops
name: custom-tools
subPath: ksops This should ensure that the correct version of KSOPS is being used in your Argo CD integration. Please try these suggestions and let me know if the issue persists. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
I am using argo-cd integration according to doc with viaductoss/ksops:v4.2.1 but i have issue with decryption; if i re-create kustomization.yaml files on argocd-repo-server and manually run kustomize it works so i am baffled why it doesn't work with argocd.
I am using GPG key from k8 secret; i imported gpg key in container command via
where i mounted pgp secret and i see imported key listed.
:
sops --encrypt --in-place secret.yaml
file is encrypted with gpg:
kustomize works as expected
ksop-test2 directory contains same file and it works locally with kustomize build but fails in argocd:
I had this as applicationset with git generator but i also tried manually creating it as app in GUI; both has issue decrypting file.
The text was updated successfully, but these errors were encountered: