Re: [go-nuts] Re: Unable to create Api | Go Operator | Go issue

2022-11-04 Thread Ian Lance Taylor
This sounds like a question to ask in a Kubernetes group, not here.  This
is a place to ask about the Go language and standard library, not about all
programs written in Go.

Ian

On Fri, Nov 4, 2022, 10:54 AM B K  wrote:

> Any fix for this yet?
>
> On Thursday, 18 November 2021 at 20:19:36 UTC+2 Dinesh kumar Ramasamy
> wrote:
>
>> I do see the same issue - No fix yet.
>>
>> On Monday, November 1, 2021 at 11:30:30 AM UTC-5 Vaishali Gupta wrote:
>>
>>> Hello Team
>>>
>>> getting below error while using below command
>>> could you please help us what can be done to resolve this issue ?
>>>
>>> root@k8sopa1:~/projects/memcached-operator# operator-sdk create api
>>> --group cache --version v1alpha1 --kind Memcached --resource --controller
>>> Writing kustomize manifests for you to edit...
>>> Writing scaffold for you to edit...
>>> api/v1alpha1/memcached_types.go
>>> controllers/memcached_controller.go
>>> Update dependencies:
>>> $ go mod tidy
>>> Running make:
>>> $ make generate
>>> go: creating new go.mod: module tmp
>>> Downloading sigs.k8s.io/controller-tools/cmd/control...@v0.7.0
>>> 
>>> go: downloading github.com/inconshreveable/mousetrap v1.0.0
>>> go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
>>> go get: added sigs.k8s.io/controller-tools v0.7.0
>>> /root/projects/memcached-operator/bin/controller-gen
>>> object:headerFile="hack/boilerplate.go.txt" paths="./..."
>>> /usr/local/go/src/net/cgo_linux.go:12:8: no such package located
>>> Error: not all generators ran successfully
>>> run `controller-gen object:headerFile=hack/boilerplate.go.txt
>>> paths=./... -w` to see all available markers, or `controller-gen
>>> object:headerFile=hack/boilerplate.go.txt paths=./... -h` for usage
>>> Makefile:80: recipe for target 'generate' failed
>>> make: *** [generate] Error 1
>>> Error: failed to create API: unable to run post-scaffold tasks of "
>>> base.go.kubebuilder.io/v3": exit status 2
>>> Usage:
>>>   operator-sdk create api [flags]
>>>
>>> Examples:
>>>   # Create a frigates API with Group: ship, Version: v1beta1 and Kind:
>>> Frigate
>>>   operator-sdk create api --group ship --version v1beta1 --kind Frigate
>>>
>>>   # Edit the API Scheme
>>>   nano api/v1beta1/frigate_types.go
>>>
>>>   # Edit the Controller
>>>   nano controllers/frigate/frigate_controller.go
>>>
>>>   # Edit the Controller Test
>>>   nano controllers/frigate/frigate_controller_test.go
>>>
>>>   # Generate the manifests
>>>   make manifests
>>>
>>>   # Install CRDs into the Kubernetes cluster using kubectl apply
>>>   make install
>>>
>>>   # Regenerate code and run against the Kubernetes cluster configured by
>>> ~/.kube/config
>>>   make run
>>>
>>>
>>> Flags:
>>>   --controller   if set, generate the controller without
>>> prompting the user (default true)
>>>   --forceattempt to create resource even if it
>>> already exists
>>>   --group string resource Group
>>>   -h, --help help for api
>>>   --kind string  resource Kind
>>>   --make make generate   if true, run make generate after generating
>>> files (default true)
>>>   --namespaced   resource is namespaced (default true)
>>>   --plural stringresource irregular plural form
>>>   --resource if set, generate the resource without
>>> prompting the user (default true)
>>>   --version string   resource Version
>>>
>>> Global Flags:
>>>   --plugins strings   plugin keys to be used for this subcommand
>>> execution
>>>   --verbose   Enable verbose logging
>>>
>>>
>>>
>>>
>>>
>>> *FATA[0088] failed to create API: unable to run post-scaffold tasks of
>>> "base.go.kubebuilder.io/v3 ": exit status
>>> 2Version which i am using *
>>> root@k8sopa1:~/projects/memcached-operator# kubectl version
>>> Client Version: version.Info{Major:"1", Minor:"22",
>>> GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1",
>>> GitTreeState:"clean", BuildDate:"2021-10-27T18:41:28Z",
>>> GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
>>> The connection to the server localhost:8080 was refused - did you
>>> specify the right host or port?
>>> root@k8sopa1:~/projects/memcached-operator# git version
>>> git version 2.17.1
>>> root@k8sopa1:~/projects/memcached-operator# docker version
>>> Client: Docker Engine - Community
>>>  Version:   20.10.10
>>>  API version:   1.41
>>>  Go version:go1.16.9
>>>  Git commit:b485636
>>>  Built: Mon Oct 25 07:42:57 2021
>>>  OS/Arch:   linux/amd64
>>>  Context:   default
>>>
>>> OS Ubuntu 18.04/ ubuntu 20.04
>>>
>>> Connectivity is fine with proxy
>>>
>>> root@k8sopa1:~/projects/memcached-operator# ping proxy.golang.org
>>> PING proxy.golang.org (172.217.174.81) 56(84) bytes of data.
>>> 64 bytes from bom07s25-in-f17.1e100.net 

[go-nuts] Re: Unable to create Api | Go Operator | Go issue

2022-11-04 Thread B K
Any fix for this yet?

On Thursday, 18 November 2021 at 20:19:36 UTC+2 Dinesh kumar Ramasamy wrote:

> I do see the same issue - No fix yet. 
>
> On Monday, November 1, 2021 at 11:30:30 AM UTC-5 Vaishali Gupta wrote:
>
>> Hello Team
>>
>> getting below error while using below command 
>> could you please help us what can be done to resolve this issue ?
>>
>> root@k8sopa1:~/projects/memcached-operator# operator-sdk create api 
>> --group cache --version v1alpha1 --kind Memcached --resource --controller
>> Writing kustomize manifests for you to edit...
>> Writing scaffold for you to edit...
>> api/v1alpha1/memcached_types.go
>> controllers/memcached_controller.go
>> Update dependencies:
>> $ go mod tidy
>> Running make:
>> $ make generate
>> go: creating new go.mod: module tmp
>> Downloading sigs.k8s.io/controller-tools/cmd/control...@v0.7.0 
>> 
>> go: downloading github.com/inconshreveable/mousetrap v1.0.0
>> go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
>> go get: added sigs.k8s.io/controller-tools v0.7.0
>> /root/projects/memcached-operator/bin/controller-gen 
>> object:headerFile="hack/boilerplate.go.txt" paths="./..."
>> /usr/local/go/src/net/cgo_linux.go:12:8: no such package located
>> Error: not all generators ran successfully
>> run `controller-gen object:headerFile=hack/boilerplate.go.txt paths=./... 
>> -w` to see all available markers, or `controller-gen 
>> object:headerFile=hack/boilerplate.go.txt paths=./... -h` for usage
>> Makefile:80: recipe for target 'generate' failed
>> make: *** [generate] Error 1
>> Error: failed to create API: unable to run post-scaffold tasks of "
>> base.go.kubebuilder.io/v3": exit status 2
>> Usage:
>>   operator-sdk create api [flags]
>>
>> Examples:
>>   # Create a frigates API with Group: ship, Version: v1beta1 and Kind: 
>> Frigate
>>   operator-sdk create api --group ship --version v1beta1 --kind Frigate
>>
>>   # Edit the API Scheme
>>   nano api/v1beta1/frigate_types.go
>>
>>   # Edit the Controller
>>   nano controllers/frigate/frigate_controller.go
>>
>>   # Edit the Controller Test
>>   nano controllers/frigate/frigate_controller_test.go
>>
>>   # Generate the manifests
>>   make manifests
>>
>>   # Install CRDs into the Kubernetes cluster using kubectl apply
>>   make install
>>
>>   # Regenerate code and run against the Kubernetes cluster configured by 
>> ~/.kube/config
>>   make run
>>
>>
>> Flags:
>>   --controller   if set, generate the controller without 
>> prompting the user (default true)
>>   --forceattempt to create resource even if it 
>> already exists
>>   --group string resource Group
>>   -h, --help help for api
>>   --kind string  resource Kind
>>   --make make generate   if true, run make generate after generating 
>> files (default true)
>>   --namespaced   resource is namespaced (default true)
>>   --plural stringresource irregular plural form
>>   --resource if set, generate the resource without 
>> prompting the user (default true)
>>   --version string   resource Version
>>
>> Global Flags:
>>   --plugins strings   plugin keys to be used for this subcommand 
>> execution
>>   --verbose   Enable verbose logging
>>
>>
>>
>>
>>
>> *FATA[0088] failed to create API: unable to run post-scaffold tasks of 
>> "base.go.kubebuilder.io/v3 ": exit status 
>> 2Version which i am using *
>> root@k8sopa1:~/projects/memcached-operator# kubectl version
>> Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", 
>> GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", 
>> BuildDate:"2021-10-27T18:41:28Z", GoVersion:"go1.16.9", Compiler:"gc", 
>> Platform:"linux/amd64"}
>> The connection to the server localhost:8080 was refused - did you specify 
>> the right host or port?
>> root@k8sopa1:~/projects/memcached-operator# git version
>> git version 2.17.1
>> root@k8sopa1:~/projects/memcached-operator# docker version
>> Client: Docker Engine - Community
>>  Version:   20.10.10
>>  API version:   1.41
>>  Go version:go1.16.9
>>  Git commit:b485636
>>  Built: Mon Oct 25 07:42:57 2021
>>  OS/Arch:   linux/amd64
>>  Context:   default
>>
>> OS Ubuntu 18.04/ ubuntu 20.04
>>
>> Connectivity is fine with proxy
>>
>> root@k8sopa1:~/projects/memcached-operator# ping proxy.golang.org
>> PING proxy.golang.org (172.217.174.81) 56(84) bytes of data.
>> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=1 
>> ttl=113 time=26.0 ms
>> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=2 
>> ttl=113 time=23.4 ms
>> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=3 
>> ttl=113 time=24.4 ms
>> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=4 
>> ttl=113 

[go-nuts] Re: Unable to create Api | Go Operator | Go issue

2021-11-18 Thread Dinesh kumar Ramasamy
I do see the same issue - No fix yet. 

On Monday, November 1, 2021 at 11:30:30 AM UTC-5 Vaishali Gupta wrote:

> Hello Team
>
> getting below error while using below command 
> could you please help us what can be done to resolve this issue ?
>
> root@k8sopa1:~/projects/memcached-operator# operator-sdk create api 
> --group cache --version v1alpha1 --kind Memcached --resource --controller
> Writing kustomize manifests for you to edit...
> Writing scaffold for you to edit...
> api/v1alpha1/memcached_types.go
> controllers/memcached_controller.go
> Update dependencies:
> $ go mod tidy
> Running make:
> $ make generate
> go: creating new go.mod: module tmp
> Downloading sigs.k8s.io/controller-tools/cmd/control...@v0.7.0 
> 
> go: downloading github.com/inconshreveable/mousetrap v1.0.0
> go: downloading golang.org/x/sys v0.0.0-20210616094352-59db8d763f22
> go get: added sigs.k8s.io/controller-tools v0.7.0
> /root/projects/memcached-operator/bin/controller-gen 
> object:headerFile="hack/boilerplate.go.txt" paths="./..."
> /usr/local/go/src/net/cgo_linux.go:12:8: no such package located
> Error: not all generators ran successfully
> run `controller-gen object:headerFile=hack/boilerplate.go.txt paths=./... 
> -w` to see all available markers, or `controller-gen 
> object:headerFile=hack/boilerplate.go.txt paths=./... -h` for usage
> Makefile:80: recipe for target 'generate' failed
> make: *** [generate] Error 1
> Error: failed to create API: unable to run post-scaffold tasks of "
> base.go.kubebuilder.io/v3": exit status 2
> Usage:
>   operator-sdk create api [flags]
>
> Examples:
>   # Create a frigates API with Group: ship, Version: v1beta1 and Kind: 
> Frigate
>   operator-sdk create api --group ship --version v1beta1 --kind Frigate
>
>   # Edit the API Scheme
>   nano api/v1beta1/frigate_types.go
>
>   # Edit the Controller
>   nano controllers/frigate/frigate_controller.go
>
>   # Edit the Controller Test
>   nano controllers/frigate/frigate_controller_test.go
>
>   # Generate the manifests
>   make manifests
>
>   # Install CRDs into the Kubernetes cluster using kubectl apply
>   make install
>
>   # Regenerate code and run against the Kubernetes cluster configured by 
> ~/.kube/config
>   make run
>
>
> Flags:
>   --controller   if set, generate the controller without 
> prompting the user (default true)
>   --forceattempt to create resource even if it already 
> exists
>   --group string resource Group
>   -h, --help help for api
>   --kind string  resource Kind
>   --make make generate   if true, run make generate after generating 
> files (default true)
>   --namespaced   resource is namespaced (default true)
>   --plural stringresource irregular plural form
>   --resource if set, generate the resource without 
> prompting the user (default true)
>   --version string   resource Version
>
> Global Flags:
>   --plugins strings   plugin keys to be used for this subcommand 
> execution
>   --verbose   Enable verbose logging
>
>
>
>
>
> *FATA[0088] failed to create API: unable to run post-scaffold tasks of 
> "base.go.kubebuilder.io/v3 ": exit status 
> 2Version which i am using *
> root@k8sopa1:~/projects/memcached-operator# kubectl version
> Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", 
> GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", 
> BuildDate:"2021-10-27T18:41:28Z", GoVersion:"go1.16.9", Compiler:"gc", 
> Platform:"linux/amd64"}
> The connection to the server localhost:8080 was refused - did you specify 
> the right host or port?
> root@k8sopa1:~/projects/memcached-operator# git version
> git version 2.17.1
> root@k8sopa1:~/projects/memcached-operator# docker version
> Client: Docker Engine - Community
>  Version:   20.10.10
>  API version:   1.41
>  Go version:go1.16.9
>  Git commit:b485636
>  Built: Mon Oct 25 07:42:57 2021
>  OS/Arch:   linux/amd64
>  Context:   default
>
> OS Ubuntu 18.04/ ubuntu 20.04
>
> Connectivity is fine with proxy
>
> root@k8sopa1:~/projects/memcached-operator# ping proxy.golang.org
> PING proxy.golang.org (172.217.174.81) 56(84) bytes of data.
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=1 
> ttl=113 time=26.0 ms
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=2 
> ttl=113 time=23.4 ms
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=3 
> ttl=113 time=24.4 ms
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=4 
> ttl=113 time=23.8 ms
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=5 
> ttl=113 time=23.0 ms
> 64 bytes from bom07s25-in-f17.1e100.net (172.217.174.81): icmp_seq=6 
> ttl=113 time=21.3 ms
> ^C
> ---