Skip to content

Commit

Permalink
fix: migrate apis directory to api per standard
Browse files Browse the repository at this point in the history
- When multigroup is true, the api directory is now used instead of apis.

Signed-off-by: Gabe Alford <redhatrises@gmail.com>
  • Loading branch information
redhatrises committed Dec 20, 2023
1 parent 5429668 commit 0e8d279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func convertConfig3AlphaTo3(cfgBytes []byte) (_ []byte, err error) {
// Only Go projects use "resources[*].path".
var apiPath string
if isMultigroup {
apiPath = path.Join("apis", resources[i].Group, resources[i].Version)
apiPath = path.Join("api", resources[i].Group, resources[i].Version)
} else {
apiPath = path.Join("api", resources[i].Version)
}
Expand Down
6 changes: 1 addition & 5 deletions internal/cmd/operator-sdk/generate/kustomize/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ func (c *manifestsCmd) setDefaults(cfg config.Config) error {
}

if c.apisDir == "" {
if cfg.IsMultiGroup() {
c.apisDir = "apis"
} else {
c.apisDir = "api"
}
c.apisDir = "api"
}
return nil
}
Expand Down

0 comments on commit 0e8d279

Please sign in to comment.