-
Notifications
You must be signed in to change notification settings - Fork 617
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
Unable to decrypt files via sops and KMS using v0.26.1 version #2405
Comments
AWS requires an |
Thanks @stefanprodan I will look into this! Regards, |
I am re-opening this issue because I think the issue I am encountering now its different. I tried the above steps, non of the steps describe in the docs worked and the issue is still occuring. What I am confused about it is the error messege. How does Flux knows the secret name when the kustomization resoure is configured to mount a volume from a secret and dump the secret into .aws folder? Is not configure to read the secret directly from k8s secrets.
Thank you! |
Flux uses the AWS SDK, the SDK knows where the token is located. Have you restarted kustomize-controller after adding the IAM role binding to the kustomize-controller service account? For AWS to mount the secret inside the pod, you need to delete the controller pod after you create the role binding. |
It looks that the I did remove flux, add the permissions and then install flux again via the Subscription model. I will look into this more and keep you update it. Regards, |
Hi, Setting the env in the Openshift operator subscription to:
Would fix this issue. The last version of the operator is changing the Thank you guys for your help. This issue can be closed. Regards, |
@groenator thanks for posting the solution for Openshift. @aryan9600 we need to add this to the kustomize-controller docs in fluxcd/kustomize-controller#641 |
@stefanprodan you are welcome! |
I am running Flux using Openshift 4.8 platform. Flux is installed via the Openshift Operator community marketplace.
However, since (last week) I installed the latest version of the operator (v0.26.1) I am no longer able to decrypt files from our repository using the AWS credentials set for flux.
When I create the Kustomization resource, I am getting the below error;
The
cloud-creds
is the secret where the AWS credentials are stored.The AWS credentials for
sops
are deployed using a credentials file inside the kustomize-controller pod located under the /home/controller/.aws folder.I tested the creds inside the cluster, making sure that there aren't any issues with the creds or networking. No issue was found there either, I was able to encrypt/decrypt the files manually.
Here is what my configuration looks like:
AWS:
Credential file with its own profile:
SOPS:
.sops.yaml
file:I forgot to mention I also tested kustomize to load the AWS credentials directly from a k8s secret. The same issue as above where sops is not reading the credentials file anymore.
I am using the same setup on others clusters without any issues, with a lower version of flux. I can confirm using the 0.25.3 flux version works fine.
What changed recently? I am aware that
sops
is managed by another team, can you confirm what version ofsops
is running inside flux?Did
sops
make a change in their API where is not able to read the credentials files anymore?Thank you for your time and I hope the information provided is enough.
The text was updated successfully, but these errors were encountered: