hashicorp / terraform-cloud-operator

Kubernetes Operator allows managing HCP Terraform resources via Kubernetes Custom Resources.
https://developer.hashicorp.com/terraform/cloud-docs
Mozilla Public License 2.0
114 stars 27 forks source link

🐛 Spacing is incorrect in docs/migration/crds/workspaces_patch_a.yaml. #338

Closed justinb-shipt closed 1 month ago

justinb-shipt commented 5 months ago

Operator Version, Kind and Kubernetes Version

YAML Manifest File

N/A

Output Log

N/A

Output of relevant kubectl commands

❯ kubectl diff -f workspaces_patch_a.yaml error: error parsing workspaces_patch_a.yaml: error converting YAML to JSON: yaml: line 330: did not find expected key

Steps To Reproduce

https://developer.hashicorp.com/terraform/cloud-docs/integrations/kubernetes/ops-v2-migration

Expected Behavior

What should have happened?

Should have returned a successful diff.

Actual Behavior

What actually happened?

error: error parsing workspaces_patch_a.yaml: error converting YAML to JSON: yaml: line 330: did not find expected key

Additional Context

Add any other context about the problem here.

Not exactly a bug with the Operator, but a bug within the files provided for migration. I added 2 additional spaces for the entire v1alpha2 section and was able to get a successful diff. I have not tested the b patch yet.

❯ kubectl diff -f workspaces_patch_a.yaml
diff -u -N /var/folders/r1/ddmpvl596pxgl9116g4b67180000gq/T/LIVE-2625289397/apiextensions.k8s.io.v1.CustomResourceDefinition..workspaces.app.terraform.io /var/folders/r1/ddmpvl596pxgl9116g4b67180000gq/T/MERGED-2644053759/apiextensions.k8s.io.v1.CustomResourceDefinition..workspaces.app.terraform.io
--- /var/folders/r1/ddmpvl596pxgl9116g4b67180000gq/T/LIVE-2625289397/apiextensions.k8s.io.v1.CustomResourceDefinition..workspaces.app.terraform.io  2024-02-10 13:50:33
+++ /var/folders/r1/ddmpvl596pxgl9116g4b67180000gq/T/MERGED-2644053759/apiextensions.k8s.io.v1.CustomResourceDefinition..workspaces.app.terraform.io    2024-02-10 13:50:33
@@ -2,11 +2,11 @@
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.8.0
+    controller-gen.kubebuilder.io/version: v0.11.3
<snip>

References

Community Note