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

Commit

Permalink
generator: strip down the number of groups to be generated for tech p…
Browse files Browse the repository at this point in the history
…review release

Signed-off-by: Muvaffak Onus <[email protected]>
  • Loading branch information
muvaf committed Sep 13, 2021
1 parent b091e61 commit 9c50bb5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cmd/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ var (
// available at this path
providerConfigBuilderPath = filepath.Join(modulePath, "internal", "clients")
)

// These resources cannot be generated because of their suffixes colliding with
// kubebuilder-accepted type suffixes.
var skipList = map[string]struct{}{
"aws_config_configuration_recorder_status": {},
"aws_vpc_peering_connection_accepter": {},
Expand All @@ -56,6 +59,24 @@ var skipList = map[string]struct{}{
"aws_kinesis_analytics_application": {},
}

var techPreviewIncludedGroups = map[string]struct{}{
"vpc": {},
"rds": {},
"eks": {},
"ec2": {},
"s3": {},
"iam": {},
"default": {},
"eip": {},
"elb": {},
"instance": {},
"lb": {},
"main": {},
"route": {},
"route53": {},
"subnet": {},
}

func main() { // nolint:gocyclo
wd, err := os.Getwd()
if err != nil {
Expand Down Expand Up @@ -93,6 +114,9 @@ func main() { // nolint:gocyclo
}

for group, resources := range groups {
if _, ok := techPreviewIncludedGroups[group]; !ok {
continue
}
version := "v1alpha1"
versionGen := pipeline.NewVersionGenerator(wd, modulePath, strings.ToLower(group)+groupSuffix, version)

Expand Down

0 comments on commit 9c50bb5

Please sign in to comment.