terranetes-controller
terranetes-controller copied to clipboard
fix: allow using a different namespace for the auth
Use different namespace for fetching the auth
secret for Git in case it's specified
Use case:
revision ->
apiVersion: terraform.appvia.io/v1alpha1
kind: Revision
metadata:
name: my-revision
namespace: my-ns
spec:
# more config
configuration:
auth:
name: auth
namespace: other-ns
In this case the controller fails because it can't find the auth
secret in my-ns
.
My PR checks if spec.configuration.auth.namespace
is set and use this namespace in case it's present to get the secret