Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Rename tf to jet #3

Merged
merged 4 commits into from
Nov 18, 2021
Merged

Rename tf to jet #3

merged 4 commits into from
Nov 18, 2021

Conversation

turkenh
Copy link
Collaborator

@turkenh turkenh commented Nov 18, 2021

This PR renames tf suffix as jet to indicate this is a provider generated with Terrajet.

As a reference for others who wants to do the same, here is the steps that I've applied:

git grep -l  'tf' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**' | xargs sed -i.bak -E 's/(\.|\-)tf(\.|\-)/\1jet\2/g'

git grep -l  'tfgcp' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**' | xargs sed -i.bak -E 's/tfgcp/gcpjet/g'
git grep -l  'TF GCP' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**' | xargs sed -i.bak -E 's/TF GCP/GCP JET/g'
git grep -l  'tf gcp' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**' | xargs sed -i.bak -E 's/tf gcp/gcp jet/g'

git clean -fd

mv "cluster/images/provider-tf-gcp" "cluster/images/provider-jet-gcp"
mv "cluster/images/provider-tf-gcp-controller" "cluster/images/provider-jet-gcp-controller"

go mod tidy

make generate

And we also need to change the shortname, I preferred to change it from tfgcp to gcpjet but happy to discuss.

@turkenh turkenh requested review from muvaf and ulucinar November 18, 2021 10:51
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Copy link
Collaborator

@ulucinar ulucinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

Maybe we can check whether we can use a dotted name such as gcp.jet so that in other providers we can consider consistent short names such as aws.jet, azure.jet.

@turkenh
Copy link
Collaborator Author

turkenh commented Nov 18, 2021

Maybe we can check whether we can use a dotted name such as gcp.jet so that in other providers we can consider consistent short names such as aws.jet, azure.jet.

Just tested gcp.jet but apply CRDs failed with:

Error from server (Invalid): error when creating "package/crds/storage.gcp.jet.crossplane.io_buckets.yaml": CustomResourceDefinition.apiextensions.k8s.io "buckets.storage.gcp.jet.crossplane.io" is invalid: spec.names.categories[2]: Invalid value: "gcp.jet": a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character (e.g. 'my-name', or 'abc-123', regex used for validation is 'a-z?')

@turkenh turkenh merged commit 773730e into crossplane-contrib:main Nov 18, 2021
@turkenh
Copy link
Collaborator Author

turkenh commented Nov 18, 2021

It appears to be 3 more instances left that needs to be replaced:

$ git grep  'tf' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**'
apis/v1alpha1/doc.go:// Package v1alpha1 contains the core resources of the tf gcp provider.
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}

I'll fix in a follow up PR.

@ulucinar
Copy link
Collaborator

It appears to be 3 more instances left that needs to be replaced:

$ git grep  'tf' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**'
apis/v1alpha1/doc.go:// Package v1alpha1 contains the core resources of the tf gcp provider.
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}

I'll fix in a follow up PR.

Thanks @turkenh. Could you please also update the description of this PR (and even maybe include the full instructions in the new one) so that as references they will be complete?

@turkenh
Copy link
Collaborator Author

turkenh commented Nov 18, 2021

It appears to be 3 more instances left that needs to be replaced:

$ git grep  'tf' -- './*' ':!build/**' ':!go.sum' ':!*zz_*' ':!package/crds/**'
apis/v1alpha1/doc.go:// Package v1alpha1 contains the core resources of the tf gcp provider.
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}
apis/v1alpha1/types.go:// +kubebuilder:resource:scope=Cluster,categories={crossplane,provider,tfgcp}

I'll fix in a follow up PR.

Thanks @turkenh. Could you please also update the description of this PR (and even maybe include the full instructions in the new one) so that as references they will be complete?

@ulucinar done!

@turkenh turkenh mentioned this pull request Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants