Describe the bug
When attempting to provision a CloudResource using a Revision that has an auth secret in a different namespace, the Configuration triggers an event Authentication secret (spec.auth) does not exist and Terranetes does not attempt to run terraform plan.
To Reproduce
Steps to reproduce the behavior:
- Create a git secret in the
terraform-system namespace.
kubectl -n terraform-system create secret generic github-credentials \
--from-literal=GIT_USERNAME=foo \
--from-literal=GIT_PASSWORD=bar
- Create a
Revision that references this secret.
kubectl apply -f- <<EOT
apiVersion: terraform.appvia.io/v1alpha1
kind: Revision
metadata:
name: bucket.v1
spec:
plan:
name: bucket
categories: [gcp, bucket, gcs]
description: Creates a GCS storage bucket
revision: v1.0.0
inputs:
- key: name
description: The name of the bucket you are provisioning
required: true
configuration:
auth:
name: github-credentials
namespace: terraform-system
module: "https://github.com/my-org/my-module-repo.git?ref=v1.0.0"
EOT
- Attempt to deploy a
CloudResource referencing this Revision.
kubectl apply -f- <<EOT
apiVersion: terraform.appvia.io/v1alpha1
kind: CloudResource
metadata:
name: my-bucket
namespace: tenant
spec:
plan:
name: bucket
revision: v1.0.0
providerRef:
name: my-provider
variables:
name: my-test-bucket
EOT
- Observe a failure in the
Configuration resource indicating the auth secret does not exist.
kubectl -n tenant events
LAST SEEN TYPE REASON OBJECT MESSAGE
4m5s (x13 over 64m) Warning Action Required Configuration/my-bucket-xl9ck Authentication secret (spec.auth) does not exist
Expected behavior
Terranetes should be able to provision the CloudResource correctly.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Describe the bug
When attempting to provision a
CloudResourceusing aRevisionthat has an auth secret in a different namespace, theConfigurationtriggers an eventAuthentication secret (spec.auth) does not existand Terranetes does not attempt to run terraform plan.To Reproduce
Steps to reproduce the behavior:
terraform-systemnamespace.kubectl -n terraform-system create secret generic github-credentials \ --from-literal=GIT_USERNAME=foo \ --from-literal=GIT_PASSWORD=barRevisionthat references this secret.CloudResourcereferencing thisRevision.Configurationresource indicating the auth secret does not exist.Expected behavior
Terranetes should be able to provision the CloudResource correctly.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.