Skip to content

Commit

Permalink
teach code generator about ugly fields
Browse files Browse the repository at this point in the history
Kubernetes-commit: 0710b6836c655f4a197cc0efbffc615b5d1d165e
  • Loading branch information
lavalamp authored and k8s-publishing-bot committed Mar 18, 2022
1 parent 3e00677 commit f85d174
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/applyconfiguration-gen/generators/applyconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package generators

import (
"io"
"strings"

"k8s.io/gengo/generator"
"k8s.io/gengo/namer"
Expand Down Expand Up @@ -131,6 +132,10 @@ func blocklisted(t *types.Type, member types.Member) bool {
if objectMeta.Name == t.Name && member.Name == "SelfLink" {
return true
}
// Hide any fields which are en route to deletion.
if strings.HasPrefix(member.Name, "ZZZ_") {
return true
}
return false
}

Expand Down

0 comments on commit f85d174

Please sign in to comment.