Skip to content

Commit

Permalink
custom policy and ekscluster resource added
Browse files Browse the repository at this point in the history
  • Loading branch information
aktashasan committed Oct 16, 2023
1 parent 858cdf2 commit e65141f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/ekscluster/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package ekscluster

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_ekscluster", func(r *config.Resource) {
r.ShortGroup = "tmc"
r.Kind = "EKSCluster"
r.Version = "v1alpha1"
})
}
2 changes: 2 additions & 0 deletions config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var ExternalNameConfigs = map[string]config.ExternalName{
"tanzu-mission-control_cluster_node_pool": config.IdentifierFromProvider,
"tanzu-mission-control_credential": config.IdentifierFromProvider,
"tanzu-mission-control_custom_policy": config.IdentifierFromProvider,
"tanzu-mission-control_ekscluster": config.IdentifierFromProvider,

}

// ExternalNameConfigurations applies all external name configs listed in the
Expand Down
4 changes: 4 additions & 0 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
cluster_group "github.com/ankasoftco/provider-tmc/config/cluster_group"
cluster_node_pool "github.com/ankasoftco/provider-tmc/config/cluster_node_pool"
credential "github.com/ankasoftco/provider-tmc/config/credential"
custom_policy "github.com/ankasoftco/provider-tmc/config/custom_policy"
ekscluster "github.com/ankasoftco/provider-tmc/config/ekscluster"


)
Expand Down Expand Up @@ -47,6 +49,8 @@ func GetProvider() *ujconfig.Provider {
cluster_group.Configure,
cluster_node_pool.Configure,
credential.Configure,
custom_policy.Configure,
ekscluster.Configure,

} {
configure(pc)
Expand Down

0 comments on commit e65141f

Please sign in to comment.