hashicorp / terraform-k8s

Terraform Cloud Operator for Kubernetes
https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator?in=terraform/kubernetes
Mozilla Public License 2.0
455 stars 71 forks source link

New flag to omit namespace prefix from workspace name #105

Closed kunalvalia closed 3 years ago

kunalvalia commented 3 years ago

Community Note

Closes #94

Release note for CHANGELOG:

Currently the operator defaults to naming the workspace in a predetermined format "[namespace]-[name]." This PR adds a new optional flag in the k8s object to omit the namespace prefix from the workspace name. This enables complete control over the workspace name.

In k8s custom resource workspace

---
apiVersion: app.terraform.io/v1alpha1
kind: Workspace
metadata:
    name: greetings
spec:
    secretsMountPath: "/tmp/secrets"
    module:
        source: "git::https://github.com/koikonom/tfc-operator-test.git"
    omitNamespacePrefix: true
...

The name of this workspace is "greetings."