sam@sam-G74Sx ~/g/p/redis-operator (master)> make generate-crd
docker run -it --rm \
-v /home/sam/github/pych/redis-operator:/go/src/github.com/spotahome/redis-operator \
-e GO_PROJECT_ROOT=/go/src/github.com/spotahome/redis-operator \
-e CRD_TYPES_PATH=/go/src/github.com/spotahome/redis-operator/api \
-e CRD_OUT_PATH=/go/src/github.com/spotahome/redis-operator/manifests \
quay.io/slok/kube-code-generator:v1.22.0 update-crd.sh
Generating CRD manifests...
Error: err: exit status 1: stderr: go: github.com/go-redis/redis/v8@v8.11.5 requires
github.com/onsi/ginkgo@v1.16.5: missing go.sum entry; to add it:
go mod download github.com/onsi/ginkgo
Usage:
controller-gen [flags]
Examples:
# Generate RBAC manifests and crds for all types under apis/,
# outputting crds to /tmp/crds and everything else to stdout
controller-gen rbac:roleName=<role name> crd paths=./apis/... output:crd:dir=/tmp/crds output:stdout
# Generate deepcopy/runtime.Object implementations for a particular file
controller-gen object paths=./apis/v1beta1/some_types.go
# Generate OpenAPI v3 schemas for API packages and merge them into existing CRD manifests
controller-gen schemapatch:manifests=./manifests output:dir=./manifests paths=./pkg/apis/...
# Run all the generators for a given project
controller-gen paths=./apis/...
# Explain the markers for generating CRDs, and their arguments
controller-gen crd -ww
Flags:
-h, --detailed-help count print out more detailed help
(up to -hhh for the most detailed output, or -hhhh for json output)
--help print out usage and a summary of options
--version show version
-w, --which-markers count print out all markers available with the requested generators
(up to -www for the most detailed output, or -wwww for json output)
Options
generators
+webhook package generates (partial) {Mutating,Validating}WebhookConfiguration objects.
+schemapatch[:generateEmbeddedObjectMeta=<bool>],manifests=<string>[,maxDescLen=<int>] package patches existing CRDs with new schemata.
+rbac:roleName=<string> package generates ClusterRole objects.
+object[:headerFile=<string>][,year=<string>] package generates code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
+crd[:allowDangerousTypes=<bool>][,crdVersions=<[]string>][,generateEmbeddedObjectMeta=<bool>][,maxDescLen=<int>][,preserveUnknownFields=<bool>][,trivialVersions=<bool>] package generates CustomResourceDefinition objects.
generic
+paths=<[]string> package represents paths and go-style path patterns to use as package roots.
output rules (optionally as output:<generator>:...)
+output:artifacts[:code=<string>],config=<string> package outputs artifacts to different locations, depending on whether they're package-associated or not.
+output:dir=<string> package outputs each artifact to the given directory, regardless of if it's package-associated or not.
+output:none package skips outputting anything.
+output:stdout package outputs everything to standard-out, with no separation.
run `controller-gen crd:trivialVersions=true paths=./api/... output:dir=./manifests -w` to see all available markers, or `controller-gen crd:trivialVersions=true paths=./api/... output:dir=./manifests -h` for usage
make: *** [Makefile:197: generate-crd] Error 1
and
make mocks
docker build \
--build-arg uid=1000 \
-t quay.io/spotahome/redis-operator-dev:latest \
-t quay.io/spotahome/redis-operator-dev:e93a030b1c7d7b74a396e55335ac376d2dff329e \
-f docker/development/Dockerfile \
.
Sending build context to Docker daemon 63.6MB
Step 1/11 : FROM golang:1.19-alpine
---> 6e31dcd72d8f
Step 2/11 : ENV CODEGEN_VERSION="1.11.9"
---> Using cache
---> 118772b41ad5
Step 3/11 : RUN apk --no-cache add bash git g++ openssl
---> Using cache
---> 48710267e54d
Step 4/11 : RUN wget http://github.com/kubernetes/code-generator/archive/kubernetes-${CODEGEN_VERSION}.tar.gz && mkdir -p /go/src/k8s.io/code-generator/ && tar zxvf kubernetes-${CODEGEN_VERSION}.tar.gz --strip 1 -C /go/src/k8s.io/code-generator/ && mkdir -p /go/src/k8s.io/kubernetes/hack/boilerplate/ && touch /go/src/k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt
---> Using cache
---> d88b294239f5
Step 5/11 : ARG MOCKERY_VERSION="2.9.4"
---> Using cache
---> 368548ea461e
Step 6/11 : RUN wget -c https://github.com/vektra/mockery/releases/download/v${MOCKERY_VERSION}/mockery_${MOCKERY_VERSION}_$(uname -o)_$(uname -m).tar.gz -O - | tar -xz -C /go/bin/
---> Using cache
---> 46803cde2205
Step 7/11 : ARG uid=1000
---> Using cache
---> 885b6bc6e648
Step 8/11 : ARG gid=1000
---> Using cache
---> d6c3307996cd
Step 9/11 : RUN addgroup -g $gid rf && adduser -D -u $uid -G rf rf && chown rf:rf -R /go
---> Using cache
---> f60cdd50c355
Step 10/11 : USER rf
---> Using cache
---> 692fbb7b2ad7
Step 11/11 : WORKDIR /go/src/github.com/spotahome/redis-operator
---> Using cache
---> cb0f80d44d69
Successfully built cb0f80d44d69
Successfully tagged quay.io/spotahome/redis-operator-dev:latest
Successfully tagged quay.io/spotahome/redis-operator-dev:e93a030b1c7d7b74a396e55335ac376d2dff329e
docker run -ti --rm -v /home/sam/github/pych/redis-operator:/go/src/github.com/spotahome/redis-operator -u 1000:1000 --name redis-operator quay.io/spotahome/redis-operator-dev /bin/sh -c 'go generate ./mocks'
06 Nov 22 08:05 UTC INF Starting mockery dry-run=false version=v2.9.4
06 Nov 22 08:05 UTC INF Walking dry-run=false version=v2.9.4
2022/11/06 08:05:19 internal error: package "fmt" without types was imported from "github.com/spotahome/redis-operator/log"
mocks/doc.go:7: running "mockery": exit status 1
make: *** [Makefile:173: mocks] Error 1
Steps to reproduce the behaviour
Just the above commands from the the master branch
Environment
How are the pieces configured?
Redis Operator version - master
Kubernetes version - Not applicable
Kubernetes configuration used (eg: Is RBAC active?) - Not applicable
Expected behaviour
What do you want to achieve?
All the make command to pass
Actual behaviour
and
Steps to reproduce the behaviour
Just the above commands from the the master branch
Environment
How are the pieces configured?
master