From aa5234117bbf61beae3ba68d659a8dc185d326eb Mon Sep 17 00:00:00 2001 From: aktashasan Date: Tue, 17 Oct 2023 00:11:03 +0300 Subject: [PATCH] namespace resource added --- config/external_name.go | 1 + config/namespace/config.go | 12 ++++++++++++ config/provider.go | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 config/namespace/config.go diff --git a/config/external_name.go b/config/external_name.go index 499d823..586e0fa 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -23,6 +23,7 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "tanzu-mission-control_integration": config.IdentifierFromProvider, "tanzu-mission-control_kubernetes_secret": config.IdentifierFromProvider, "tanzu-mission-control_kustomization": config.IdentifierFromProvider, + "tanzu-mission-control_namespace": config.IdentifierFromProvider, } diff --git a/config/namespace/config.go b/config/namespace/config.go new file mode 100644 index 0000000..4fd5bc9 --- /dev/null +++ b/config/namespace/config.go @@ -0,0 +1,12 @@ +package namespace + +import "github.com/upbound/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("tanzu-mission-control_namespace", func(r *config.Resource) { + r.ShortGroup = "tmc" + r.Kind = "Namespace" + r.Version = "v1alpha1" + }) +} \ No newline at end of file diff --git a/config/provider.go b/config/provider.go index b0cb647..2aecc3c 100644 --- a/config/provider.go +++ b/config/provider.go @@ -23,6 +23,7 @@ import ( integration "github.com/ankasoftco/provider-tmc/config/integration" kubernetes_secret "github.com/ankasoftco/provider-tmc/config/kubernetes_secret" kustomization "github.com/ankasoftco/provider-tmc/config/kustomization" + namespace "github.com/ankasoftco/provider-tmc/config/namespace" ) @@ -63,7 +64,7 @@ func GetProvider() *ujconfig.Provider { integration.Configure, kubernetes_secret.Configure, kustomization.Configure, - + name } { configure(pc) }