-
Notifications
You must be signed in to change notification settings - Fork 10
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
Flux 2.4.0 - PSA label - Failed to create temporary working directory #170
Comments
Those labels are in upstream Flux for some years now: https://github.com/fluxcd/flux2/blob/main/manifests/install/namespace.yaml I don't see how these would block the |
I agree, it's strange. I'm using version 1.32, by the way. I also noticed that even if I remove those labels, they get added again when the operator restarts(or other components in flux-system added them). Is there a way to prevent these labels from being added without relying on a custom mutating rule? @stefanprodan |
You can remove them in the FluxInstance: apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
spec:
kustomize:
patches:
- patch: |
- op: remove
path: /metadata/labels/pod-security.kubernetes.io~1warn
- op: remove
path: /metadata/labels/pod-security.kubernetes.io~1warn-version
target:
kind: Namespace Another option is to set the cluster type to |
Thanks for your help |
I’ve reopened the issue because it persists. I’m unsure why the source-controller/kustomization-controller encounters the error: Is there something in the FluxInstance configuration that I may be missing or need to add? @stefanprodan |
This error can't be related to the operator, the way it configures source-controller is identical to upstream. If this happens occasionally, I suspect it's related to your node storage. Moving the storage in-memory would be an option to avoid these errors. Did you enabled persistance storage for source-controller? |
I have the same issue on the source-controller and kustomize-controller both of them, when I changed from emptyDir to use I don't think its related to the node storage because I create a dumy pod with emptyDir and I can create dir and do everything on it. |
The empty dir permissions are set by kubelet on the node storage, so it can't be anything else. |
In the FluxInstance you can move patches:
- patch: |
- op: replace
path: /spec/template/spec/volumes/0
value:
name: tmp
emptyDir:
medium: Memory
target:
kind: Deployment
name: kustomize-controller
- patch: |
- op: replace
path: /spec/template/spec/volumes/1
value:
name: tmp
emptyDir:
medium: Memory
target:
kind: Deployment
name: source-controller |
do you think it might be related to the securityContext: fsGroup with persistentVolume
|
ok thanks I'll update the fluxInstance and test it |
In a newly created cluster with no existing policies(kyverno or OPA), I updated the Flux Operator to the latest version. It appears that the PSA label added to the
flux-system
namespace is blocking the reconciliation. Upon checking the logs of the source-controller pod, I found the following entries:Removing the PSA label
and restart the source-controller pods works fine
Any idea why the PSA labels were added?
The text was updated successfully, but these errors were encountered: