From 6e14a6aeb5a11619017db81889d853bce8d3d207 Mon Sep 17 00:00:00 2001 From: aktashasan Date: Tue, 17 Oct 2023 00:09:11 +0300 Subject: [PATCH] kustomization resource added --- config/external_name.go | 1 + config/kustomization/config.go | 11 +++++++++++ config/provider.go | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 config/kustomization/config.go diff --git a/config/external_name.go b/config/external_name.go index 736fc1e..499d823 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -22,6 +22,7 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "tanzu-mission-control_image_policy": config.IdentifierFromProvider, "tanzu-mission-control_integration": config.IdentifierFromProvider, "tanzu-mission-control_kubernetes_secret": config.IdentifierFromProvider, + "tanzu-mission-control_kustomization": config.IdentifierFromProvider, } diff --git a/config/kustomization/config.go b/config/kustomization/config.go new file mode 100644 index 0000000..ed4f6ea --- /dev/null +++ b/config/kustomization/config.go @@ -0,0 +1,11 @@ +package kustomization + +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_kustomization", func(r *config.Resource) { + r.ShortGroup = "tmc" + r.Kind = "Kustomization" + r.Version = "v1alpha1" + } \ No newline at end of file diff --git a/config/provider.go b/config/provider.go index 0de83a4..b0cb647 100644 --- a/config/provider.go +++ b/config/provider.go @@ -22,6 +22,7 @@ import ( image_policy "github.com/ankasoftco/provider-tmc/config/image_policy" 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" ) @@ -61,6 +62,7 @@ func GetProvider() *ujconfig.Provider { image_policy.Configure, integration.Configure, kubernetes_secret.Configure, + kustomization.Configure, } { configure(pc)