Skip to content

Commit

Permalink
fix: migrate apis directory to api per standard (#6646)
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 Jan 9, 2024
1 parent 5429668 commit c557c54
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 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
2 changes: 1 addition & 1 deletion testdata/go/v3/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.32.0
OPERATOR_SDK_VERSION ?= v1.33.0

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down
2 changes: 1 addition & 1 deletion testdata/go/v3/monitoring/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.32.0
OPERATOR_SDK_VERSION ?= v1.33.0

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down
2 changes: 1 addition & 1 deletion testdata/go/v4/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.32.0
OPERATOR_SDK_VERSION ?= v1.33.0

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down
2 changes: 1 addition & 1 deletion testdata/go/v4/monitoring/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.32.0
OPERATOR_SDK_VERSION ?= v1.33.0

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down
2 changes: 1 addition & 1 deletion testdata/helm/memcached-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif

# Set the Operator SDK version to use. By default, what is installed on the system is used.
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.32.0
OPERATOR_SDK_VERSION ?= v1.33.0

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
Expand Down

0 comments on commit c557c54

Please sign in to comment.