From 46625bfb1f67a7194fcde230fcfab779525721aa Mon Sep 17 00:00:00 2001 From: Isa Aguilar Date: Thu, 5 Oct 2023 22:39:15 -0400 Subject: [PATCH] tofu init --- Makefile | 4 +- README.md | 71 ++-------- build/Dockerfile.local | 2 +- cmd/manager/main.go | 4 +- .../tf.galleybytes.com_terraforms_crd.yaml | 3 +- go.mod | 2 +- pkg/apis/addtoscheme_tf_v1beta1.go | 2 +- pkg/apis/tf/v1beta1/doc.go | 2 +- pkg/apis/tf/v1beta1/zz_generated.openapi.go | 128 +++++++++--------- pkg/client/clientset/versioned/clientset.go | 2 +- .../versioned/fake/clientset_generated.go | 6 +- .../clientset/versioned/fake/register.go | 2 +- .../clientset/versioned/scheme/register.go | 2 +- .../typed/tf/v1beta1/fake/fake_terraform.go | 2 +- .../typed/tf/v1beta1/fake/fake_tf_client.go | 2 +- .../versioned/typed/tf/v1beta1/terraform.go | 4 +- .../versioned/typed/tf/v1beta1/tf_client.go | 4 +- pkg/controllers/terraform_controller.go | 4 +- projects/gendocs/gendocs.go | 2 +- 19 files changed, 99 insertions(+), 149 deletions(-) diff --git a/Makefile b/Makefile index 9203b60..f29f7ce 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PKG ?= github.com/galleybytes/terraform-operator +PKG ?= github.com/galleybytes/tofu-kubed DOCKER_REPO ?= ghcr.io/galleybytes IMAGE_NAME ?= terraform-operator DEPLOYMENT ?= ${IMAGE_NAME} @@ -83,7 +83,7 @@ generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." openapi-gen: openapi-gen-bin - $(OPENAPI_GEN) --logtostderr=true -o "" -i github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1 -O zz_generated.openapi -p pkg/apis/tf/v1beta1 -h ./hack/boilerplate.go.txt -r "-" + $(OPENAPI_GEN) --logtostderr=true -o "" -i github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1 -O zz_generated.openapi -p pkg/apis/tf/v1beta1 -h ./hack/boilerplate.go.txt -r "-" docs: /bin/bash hack/docs.sh ${VERSION} diff --git a/README.md b/README.md index 994a77b..a6ce1aa 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,23 @@ -# Terraform Operator +# Tofu Kubed -> A Kubernetes CRD and Controller to handle Terraform operations by generating k8s pods catered to perform Terraform workflows +> A Kubernetes CRD and Controller to handle Tofu operations by generating k8s pods catered to perform Tofu workflows -

-Terraform Operator Logo -

+## WIP -## What is terraform-operator? +This repo is a fork of [terraform-operator](https://github.com/galleybytes/terraform-operator) and is still a work in progress + +## What is tofu-kubed? This project is: -- A way to run Terraform in Kubernetes by defining Terraform deployments as Kubernetes manifests -- A controller that configures and starts [Terraform Workflows](http://tf.galleybytes.com/docs/architecture/workflow/) when it sees changes to the Kubernetes manifest -- Workflow runner pods that execute Terraform plan/apply and other user-defined scripts +- A way to run Tofu in Kubernetes by defining Tofu deployments as Kubernetes manifests +- A controller that configures and starts [Tofu Workflows](http://tf.galleybytes.com/docs/architecture/workflow/) when it sees changes to the Kubernetes manifest +- Workflow runner pods that execute Tofu plan/apply and other user-defined scripts This project is not: -- An HCL to YAML converter or vice versa -- A Terraform Module or Registry - -## Installation - -The preferred method is to use helm. See [Install using Helm](http://tf.galleybytes.com/docs/getting-started/installation/#install-using-helm) on the docs. - -Another simple method is to install the resources under `deploy` & `deploy/crds` - -```bash -git clone https://github.com/galleybytes/terraform-operator.git -cd terraform-operator -kubectl apply -f deploy/bundles/v0.14.0/v0.14.0.yaml -``` - -See [more installation options](http://tf.galleybytes.com/docs/getting-started/installation/). - -## Docs - -Visit [http://tf.galleybytes.com](http://tf.galleybytes.com) to read the docs. - -

-Terraform Operator Workflow Diagram -

- - -## Related Projects and Tools - -Here are some other projects that enhance the experience of Terraform Operator. - - -### Debug With `tfo` CLI - -Terraform is great, but every now and then, a module takes a turn for the worse and the workflow fails. When this happens, a terraform workflow will need to be "debugged." - -Fortunately, the `tfo` cli (https://github.com/isaaguilar/terraform-operator-cli) can be used to start a debug pod which is connected directly to the same terraform session the workflow runs. It does so by reading the TFO resource and generates a pod with the same environment vars, ConfigMaps, Secrets, and ServiceAccount as a regular workflow pod. Then it drops the user in a shell directly in the main module. - -```bash -tfo debug my-tfo-resource --namespace default -``` - -The user should be ready to rock-n-roll and show off their mad debugging skills. - -```bash -Connecting to my-tfo-resource-ca6ajn94-v2-debug-qmjd5..... - -Try running 'terraform init' - -/home/tfo-runner/generations/2/main$ -``` - -Happy debugging! +- A Tofu Module or Registry ## Join the Community diff --git a/build/Dockerfile.local b/build/Dockerfile.local index e9e47e0..5d21475 100644 --- a/build/Dockerfile.local +++ b/build/Dockerfile.local @@ -9,4 +9,4 @@ ENTRYPOINT ["/usr/local/bin/entrypoint"] USER ${USER_UID} # install operator binary is the only layer that changes COPY _output/manager ${OPERATOR} -LABEL org.opencontainers.image.source https://github.com/galleybytes/terraform-operator \ No newline at end of file +LABEL org.opencontainers.image.source https://github.com/galleybytes/tofu-kubed \ No newline at end of file diff --git a/cmd/manager/main.go b/cmd/manager/main.go index ad4354d..6cc5f3e 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -8,8 +8,8 @@ import ( "time" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) - "github.com/galleybytes/terraform-operator/pkg/apis" - "github.com/galleybytes/terraform-operator/pkg/controllers" + "github.com/galleybytes/tofu-kubed/pkg/apis" + "github.com/galleybytes/tofu-kubed/pkg/controllers" localcache "github.com/patrickmn/go-cache" "go.uber.org/zap/zapcore" corev1 "k8s.io/api/core/v1" diff --git a/deploy/crds/tf.galleybytes.com_terraforms_crd.yaml b/deploy/crds/tf.galleybytes.com_terraforms_crd.yaml index ab416fc..c83fda9 100644 --- a/deploy/crds/tf.galleybytes.com_terraforms_crd.yaml +++ b/deploy/crds/tf.galleybytes.com_terraforms_crd.yaml @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null name: terraforms.tf.galleybytes.com spec: group: tf.galleybytes.com diff --git a/go.mod b/go.mod index 72eee35..e5f56f1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/galleybytes/terraform-operator +module github.com/galleybytes/tofu-kubed replace github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm diff --git a/pkg/apis/addtoscheme_tf_v1beta1.go b/pkg/apis/addtoscheme_tf_v1beta1.go index b6a060b..2356565 100644 --- a/pkg/apis/addtoscheme_tf_v1beta1.go +++ b/pkg/apis/addtoscheme_tf_v1beta1.go @@ -1,7 +1,7 @@ package apis import ( - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" ) func init() { diff --git a/pkg/apis/tf/v1beta1/doc.go b/pkg/apis/tf/v1beta1/doc.go index d18f0b5..ac3112b 100644 --- a/pkg/apis/tf/v1beta1/doc.go +++ b/pkg/apis/tf/v1beta1/doc.go @@ -16,7 +16,7 @@ import ( "k8s.io/kube-openapi/pkg/validation/spec" ) -var pkgpath = "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" +var pkgpath = "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" // +kubebuilder:object:generate=false type Definition struct { diff --git a/pkg/apis/tf/v1beta1/zz_generated.openapi.go b/pkg/apis/tf/v1beta1/zz_generated.openapi.go index 77e927a..fcfd224 100644 --- a/pkg/apis/tf/v1beta1/zz_generated.openapi.go +++ b/pkg/apis/tf/v1beta1/zz_generated.openapi.go @@ -30,29 +30,29 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.AWSCredentials": schema_pkg_apis_tf_v1beta1_AWSCredentials(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector": schema_pkg_apis_tf_v1beta1_ConfigMapSelector(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Credentials": schema_pkg_apis_tf_v1beta1_Credentials(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitHTTPS": schema_pkg_apis_tf_v1beta1_GitHTTPS(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSCM": schema_pkg_apis_tf_v1beta1_GitSCM(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSSH": schema_pkg_apis_tf_v1beta1_GitSSH(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ImageConfig": schema_pkg_apis_tf_v1beta1_ImageConfig(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Images": schema_pkg_apis_tf_v1beta1_Images(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Module": schema_pkg_apis_tf_v1beta1_Module(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Plugin": schema_pkg_apis_tf_v1beta1_Plugin(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ProxyOpts": schema_pkg_apis_tf_v1beta1_ProxyOpts(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ResourceDownload": schema_pkg_apis_tf_v1beta1_ResourceDownload(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SCMAuthMethod": schema_pkg_apis_tf_v1beta1_SCMAuthMethod(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SSHKeySecretRef": schema_pkg_apis_tf_v1beta1_SSHKeySecretRef(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SecretNameRef": schema_pkg_apis_tf_v1beta1_SecretNameRef(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Setup": schema_pkg_apis_tf_v1beta1_Setup(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Stage": schema_pkg_apis_tf_v1beta1_Stage(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.StageScript": schema_pkg_apis_tf_v1beta1_StageScript(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TaskOption": schema_pkg_apis_tf_v1beta1_TaskOption(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Terraform": schema_pkg_apis_tf_v1beta1_Terraform(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformSpec": schema_pkg_apis_tf_v1beta1_TerraformSpec(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformStatus": schema_pkg_apis_tf_v1beta1_TerraformStatus(ref), - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TokenSecretRef": schema_pkg_apis_tf_v1beta1_TokenSecretRef(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.AWSCredentials": schema_pkg_apis_tf_v1beta1_AWSCredentials(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector": schema_pkg_apis_tf_v1beta1_ConfigMapSelector(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Credentials": schema_pkg_apis_tf_v1beta1_Credentials(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitHTTPS": schema_pkg_apis_tf_v1beta1_GitHTTPS(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSCM": schema_pkg_apis_tf_v1beta1_GitSCM(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSSH": schema_pkg_apis_tf_v1beta1_GitSSH(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ImageConfig": schema_pkg_apis_tf_v1beta1_ImageConfig(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Images": schema_pkg_apis_tf_v1beta1_Images(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Module": schema_pkg_apis_tf_v1beta1_Module(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Plugin": schema_pkg_apis_tf_v1beta1_Plugin(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ProxyOpts": schema_pkg_apis_tf_v1beta1_ProxyOpts(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ResourceDownload": schema_pkg_apis_tf_v1beta1_ResourceDownload(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SCMAuthMethod": schema_pkg_apis_tf_v1beta1_SCMAuthMethod(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SSHKeySecretRef": schema_pkg_apis_tf_v1beta1_SSHKeySecretRef(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SecretNameRef": schema_pkg_apis_tf_v1beta1_SecretNameRef(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Setup": schema_pkg_apis_tf_v1beta1_Setup(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Stage": schema_pkg_apis_tf_v1beta1_Stage(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.StageScript": schema_pkg_apis_tf_v1beta1_StageScript(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TaskOption": schema_pkg_apis_tf_v1beta1_TaskOption(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Terraform": schema_pkg_apis_tf_v1beta1_Terraform(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformSpec": schema_pkg_apis_tf_v1beta1_TerraformSpec(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformStatus": schema_pkg_apis_tf_v1beta1_TerraformStatus(ref), + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TokenSecretRef": schema_pkg_apis_tf_v1beta1_TokenSecretRef(ref), } } @@ -121,14 +121,14 @@ func schema_pkg_apis_tf_v1beta1_Credentials(ref common.ReferenceCallback) common SchemaProps: spec.SchemaProps{ Description: "SecretNameRef will load environment variables into the terraform runner from a kubernetes secret", Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SecretNameRef"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SecretNameRef"), }, }, "aws": { SchemaProps: spec.SchemaProps{ Description: "AWSCredentials contains the different methods to load AWS credentials for the Terraform AWS Provider. If using AWS_ACCESS_KEY_ID and/or environment variables for credentials, use fromEnvs.", Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.AWSCredentials"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.AWSCredentials"), }, }, "serviceAccountAnnotations": { @@ -151,7 +151,7 @@ func schema_pkg_apis_tf_v1beta1_Credentials(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.AWSCredentials", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SecretNameRef"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.AWSCredentials", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SecretNameRef"}, } } @@ -170,7 +170,7 @@ func schema_pkg_apis_tf_v1beta1_GitHTTPS(ref common.ReferenceCallback) common.Op }, "tokenSecretRef": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TokenSecretRef"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TokenSecretRef"), }, }, }, @@ -178,7 +178,7 @@ func schema_pkg_apis_tf_v1beta1_GitHTTPS(ref common.ReferenceCallback) common.Op }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TokenSecretRef"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TokenSecretRef"}, } } @@ -191,19 +191,19 @@ func schema_pkg_apis_tf_v1beta1_GitSCM(ref common.ReferenceCallback) common.Open Properties: map[string]spec.Schema{ "ssh": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSSH"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSSH"), }, }, "https": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitHTTPS"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitHTTPS"), }, }, }, }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitHTTPS", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSSH"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitHTTPS", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSSH"}, } } @@ -222,7 +222,7 @@ func schema_pkg_apis_tf_v1beta1_GitSSH(ref common.ReferenceCallback) common.Open }, "sshKeySecretRef": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SSHKeySecretRef"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SSHKeySecretRef"), }, }, }, @@ -230,7 +230,7 @@ func schema_pkg_apis_tf_v1beta1_GitSSH(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SSHKeySecretRef"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SSHKeySecretRef"}, } } @@ -273,26 +273,26 @@ func schema_pkg_apis_tf_v1beta1_Images(ref common.ReferenceCallback) common.Open "terraform": { SchemaProps: spec.SchemaProps{ Description: "Terraform task type container image definition", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ImageConfig"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ImageConfig"), }, }, "script": { SchemaProps: spec.SchemaProps{ Description: "Script task type container image definition", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ImageConfig"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ImageConfig"), }, }, "setup": { SchemaProps: spec.SchemaProps{ Description: "Setup task type container image definition", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ImageConfig"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ImageConfig"), }, }, }, }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ImageConfig"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ImageConfig"}, } } @@ -320,13 +320,13 @@ func schema_pkg_apis_tf_v1beta1_Module(ref common.ReferenceCallback) common.Open "configMapSelector": { SchemaProps: spec.SchemaProps{ Description: "ConfigMapSelector is an option that points to an existing configmap on the executing cluster. The configmap is expected to contains has the terraform module (ie keys ending with .tf). The configmap would need to live in the same namespace as the tfo resource.\n\nThe configmap is mounted as a volume and put into the TFO_MAIN_MODULE path by the setup task.\n\nIf a key is defined, the value is used as the module else the entirety of the data objects will be loaded as files.", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector"), }, }, "configMapSeclector": { SchemaProps: spec.SchemaProps{ Description: "Typoed form of configMapSelector", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector"), }, }, "inline": { @@ -340,7 +340,7 @@ func schema_pkg_apis_tf_v1beta1_Module(ref common.ReferenceCallback) common.Open }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector"}, } } @@ -418,7 +418,7 @@ func schema_pkg_apis_tf_v1beta1_ProxyOpts(ref common.ReferenceCallback) common.O "sshKeySecretRef": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SSHKeySecretRef"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SSHKeySecretRef"), }, }, }, @@ -426,7 +426,7 @@ func schema_pkg_apis_tf_v1beta1_ProxyOpts(ref common.ReferenceCallback) common.O }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SSHKeySecretRef"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SSHKeySecretRef"}, } } @@ -483,7 +483,7 @@ func schema_pkg_apis_tf_v1beta1_SCMAuthMethod(ref common.ReferenceCallback) comm "git": { SchemaProps: spec.SchemaProps{ Description: "Git configuration options for auth methods of git", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSCM"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSCM"), }, }, }, @@ -491,7 +491,7 @@ func schema_pkg_apis_tf_v1beta1_SCMAuthMethod(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.GitSCM"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.GitSCM"}, } } @@ -589,7 +589,7 @@ func schema_pkg_apis_tf_v1beta1_Setup(ref common.ReferenceCallback) common.OpenA Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ResourceDownload"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ResourceDownload"), }, }, }, @@ -606,7 +606,7 @@ func schema_pkg_apis_tf_v1beta1_Setup(ref common.ReferenceCallback) common.OpenA }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ResourceDownload"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ResourceDownload"}, } } @@ -718,7 +718,7 @@ func schema_pkg_apis_tf_v1beta1_StageScript(ref common.ReferenceCallback) common "configMapSelector": { SchemaProps: spec.SchemaProps{ Description: "ConfigMapSelector reads a in a script from a configmap name+key", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector"), }, }, "inline": { @@ -732,7 +732,7 @@ func schema_pkg_apis_tf_v1beta1_StageScript(ref common.ReferenceCallback) common }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ConfigMapSelector"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ConfigMapSelector"}, } } @@ -848,7 +848,7 @@ func schema_pkg_apis_tf_v1beta1_TaskOption(ref common.ReferenceCallback) common. SchemaProps: spec.SchemaProps{ Description: "Script is used to configure the source of the task's executable script.", Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.StageScript"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.StageScript"), }, }, "restartPolicy": { @@ -891,7 +891,7 @@ func schema_pkg_apis_tf_v1beta1_TaskOption(ref common.ReferenceCallback) common. }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.StageScript", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/api/rbac/v1.PolicyRule"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.StageScript", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount", "k8s.io/api/rbac/v1.PolicyRule"}, } } @@ -925,20 +925,20 @@ func schema_pkg_apis_tf_v1beta1_Terraform(ref common.ReferenceCallback) common.O "spec": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformSpec"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformStatus"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformStatus"), }, }, }, }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformSpec", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TerraformStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformSpec", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TerraformStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } @@ -1035,7 +1035,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Credentials"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Credentials"), }, }, }, @@ -1051,7 +1051,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm "sshTunnel": { SchemaProps: spec.SchemaProps{ Description: "SSHTunnel can be defined for pulling from scm sources that cannot be accessed by the network the operator/runner runs in. An example is enterprise-Github servers running on a private network.", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ProxyOpts"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ProxyOpts"), }, }, "scmAuthMethods": { @@ -1062,7 +1062,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SCMAuthMethod"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SCMAuthMethod"), }, }, }, @@ -1071,20 +1071,20 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm "images": { SchemaProps: spec.SchemaProps{ Description: "Images describes the container images used by task classes.", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Images"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Images"), }, }, "setup": { SchemaProps: spec.SchemaProps{ Description: "Setup is configuration generally used once in the setup task", - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Setup"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Setup"), }, }, "terraformModule": { SchemaProps: spec.SchemaProps{ Description: "TerraformModule is used to configure the source of the terraform module.", Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Module"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Module"), }, }, "terraformVersion": { @@ -1111,7 +1111,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TaskOption"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TaskOption"), }, }, }, @@ -1126,7 +1126,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Plugin"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Plugin"), }, }, }, @@ -1144,7 +1144,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformSpec(ref common.ReferenceCallback) comm }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Credentials", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Images", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Module", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Plugin", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.ProxyOpts", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.SCMAuthMethod", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Setup", "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.TaskOption", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Credentials", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Images", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Module", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Plugin", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.ProxyOpts", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.SCMAuthMethod", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Setup", "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.TaskOption", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } @@ -1199,7 +1199,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformStatus(ref common.ReferenceCallback) co SchemaProps: spec.SchemaProps{ Description: "Stage stores information about the current stage", Default: map[string]interface{}{}, - Ref: ref("github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Stage"), + Ref: ref("github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Stage"), }, }, "pluginsStarted": { @@ -1222,7 +1222,7 @@ func schema_pkg_apis_tf_v1beta1_TerraformStatus(ref common.ReferenceCallback) co }, }, Dependencies: []string{ - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1.Stage"}, + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1.Stage"}, } } diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 8ccc11c..65f31c6 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -22,7 +22,7 @@ import ( "fmt" "net/http" - tfv1beta1 "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/typed/tf/v1beta1" + tfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/typed/tf/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index e8cc99d..1357d30 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -19,9 +19,9 @@ limitations under the License. package fake import ( - clientset "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned" - tfv1beta1 "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/typed/tf/v1beta1" - faketfv1beta1 "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/typed/tf/v1beta1/fake" + clientset "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned" + tfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/typed/tf/v1beta1" + faketfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/typed/tf/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index 0d64430..ba32ee3 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - tfv1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" + tfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 86c4f64..5126f5e 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -19,7 +19,7 @@ limitations under the License. package scheme import ( - tfv1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" + tfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_terraform.go b/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_terraform.go index 30df7fb..7de3f9e 100644 --- a/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_terraform.go +++ b/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_terraform.go @@ -21,7 +21,7 @@ package fake import ( "context" - v1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" + v1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" diff --git a/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_tf_client.go b/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_tf_client.go index a63b747..a5bc391 100644 --- a/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_tf_client.go +++ b/pkg/client/clientset/versioned/typed/tf/v1beta1/fake/fake_tf_client.go @@ -19,7 +19,7 @@ limitations under the License. package fake import ( - v1beta1 "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/typed/tf/v1beta1" + v1beta1 "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/typed/tf/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) diff --git a/pkg/client/clientset/versioned/typed/tf/v1beta1/terraform.go b/pkg/client/clientset/versioned/typed/tf/v1beta1/terraform.go index f67a624..e084241 100644 --- a/pkg/client/clientset/versioned/typed/tf/v1beta1/terraform.go +++ b/pkg/client/clientset/versioned/typed/tf/v1beta1/terraform.go @@ -22,8 +22,8 @@ import ( "context" "time" - v1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" - scheme "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" + scheme "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/pkg/client/clientset/versioned/typed/tf/v1beta1/tf_client.go b/pkg/client/clientset/versioned/typed/tf/v1beta1/tf_client.go index cfb0c54..aac97c8 100644 --- a/pkg/client/clientset/versioned/typed/tf/v1beta1/tf_client.go +++ b/pkg/client/clientset/versioned/typed/tf/v1beta1/tf_client.go @@ -21,8 +21,8 @@ package v1beta1 import ( "net/http" - v1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" - "github.com/galleybytes/terraform-operator/pkg/client/clientset/versioned/scheme" + v1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" + "github.com/galleybytes/tofu-kubed/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) diff --git a/pkg/controllers/terraform_controller.go b/pkg/controllers/terraform_controller.go index cff6fbd..2b520dd 100644 --- a/pkg/controllers/terraform_controller.go +++ b/pkg/controllers/terraform_controller.go @@ -14,8 +14,8 @@ import ( "time" "github.com/MakeNowJust/heredoc" - tfv1beta1 "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" - "github.com/galleybytes/terraform-operator/pkg/utils" + tfv1beta1 "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" + "github.com/galleybytes/tofu-kubed/pkg/utils" "github.com/go-logr/logr" getter "github.com/hashicorp/go-getter" localcache "github.com/patrickmn/go-cache" diff --git a/projects/gendocs/gendocs.go b/projects/gendocs/gendocs.go index 39ae92f..ac2a61f 100644 --- a/projects/gendocs/gendocs.go +++ b/projects/gendocs/gendocs.go @@ -3,7 +3,7 @@ package main import ( "flag" - "github.com/galleybytes/terraform-operator/pkg/apis/tf/v1beta1" + "github.com/galleybytes/tofu-kubed/pkg/apis/tf/v1beta1" ) var (