How to reference secrets from different namespace in Kustomization? #391
-
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: gotk-system
namespace: gotk-system
spec:
interval: 1m0s
url: my-cluster-config.git
... apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: workloads
namespace: default
spec:
interval: 2m0s
path: ./path/to/sync
prune: true
sourceRef:
kind: GitRepository
name: gotk-system
namespace: gotk-system
... This don't work |
Beta Was this translation helpful? Give feedback.
Answered by
vladimirfx
Oct 29, 2020
Replies: 3 comments 7 replies
-
What version are you using? What's the logged error for the above config? |
Beta Was this translation helpful? Give feedback.
0 replies
-
There is no 'namespace' attribute in Kustomization.spec.sourceRef . In 'decryption' section namespace is absent too. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
kingdonb
-
I've tested this with gotk v0.1.8 and works fine $ cat << EOF | kubectl apply -f -
> apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
> kind: Kustomization
> metadata:
> name: workloads
> namespace: default
> spec:
> interval: 2m0s
> path: ./path/to/sync
> prune: true
> sourceRef:
> kind: GitRepository
> name: gotk-system
> namespace: gotk-system
> EOF
kustomization.kustomize.toolkit.fluxcd.io/workloads created |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no 'namespace' attribute in Kustomization.spec.sourceRef . In 'decryption' section namespace is absent too.