terranetes-controller icon indicating copy to clipboard operation
terranetes-controller copied to clipboard

fix: allow using a different namespace for the auth

Open taktakpeops opened this issue 6 months ago • 1 comments

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

taktakpeops avatar Aug 07 '24 10:08 taktakpeops