Skip to content

Commit

Permalink
Parse release channel annotations
Browse files Browse the repository at this point in the history
Signed-off-by: whitneygriffith <whitney.griffith16@gmail.com>
  • Loading branch information
whitneygriffith committed Apr 13, 2024
1 parent 8844238 commit a340947
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cmd/protoc-gen-crd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ import (
)

const (
extendedChannelFileName = "kubernetes/extended.gen.yaml"
// Only GA features are included in the stable channel
stableChannelFileName = "kubernetes/stable.gen.yaml"
extendedChannelFileName = "kubernetes/customresourcedefinitions.gen.yaml"
)

// Breaks the comma-separated list of key=value pairs
Expand Down Expand Up @@ -90,11 +88,6 @@ func generate(request *plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorRespon
includeExtended: true,
fds: make([]*protomodel.FileDescriptor, 0),
},
stableChannelFileName: {
shouldGen: true,
includeExtended: false,
fds: make([]*protomodel.FileDescriptor, 0),
},
}

for _, fileName := range request.FileToGenerate {
Expand All @@ -104,8 +97,6 @@ func generate(request *plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorRespon
}

channelOutput[extendedChannelFileName].fds = append(channelOutput[extendedChannelFileName].fds, fd)
// We'll later remove the files from the stable channel that are experimental
channelOutput[stableChannelFileName].fds = append(channelOutput[stableChannelFileName].fds, fd)
}

descriptionConfiguration := &DescriptionConfiguration{
Expand Down

0 comments on commit a340947

Please sign in to comment.