Skip to content

user-guide on a fresh install (for go) #1688

@p-sforza

Description

@p-sforza

Bug Report

What did you do?
From a fresh fedora installation (Fedora release 30) I've just followed the quick start in the readme

SDK Setup

RELEASE_VERSION=v0.9.0
$ curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
$ curl -OJL https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION}/operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu.asc

$ gpg --verify operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu.asc
KEY_ID=<KEY_ID>
$ gpg --recv-key "$KEY_ID"
$ gpg --verify operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu.asc

--> check ok

$ chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk

Dependency setup

$ dnf install -y git go mercurial bzr origin-clients dep

Quick Start

$ mkdir -p $HOME/projects/example.com/
$ cd $HOME/projects/example.com/
$ operator-sdk new memcached-operator

What did you expect to see?
Completion of the go scaffold setup

What did you see instead? Under which circumstances?
$ operator-sdk new memcached-operator

The cmd breaks with:
Error: dependency manager "modules" requires the flag --repo to be set if the working directory is not in $GOPATH/src. See "operator-sdk new -h"

I've tried
$ operator-sdk new memcached-operator --repo ./

but this breaks after a wile:
can't load package: package .//cmd/manager: non-canonical import path: ".//cmd/manager" should be "cmd/manager"

Environment

  • operator-sdk version:

operator-sdk version: v0.9.0, commit: 560208d

  • go version:

go version go1.12.7 linux/amd64

  • Kubernetes version information:

Client Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2018-12-06T15:15:06Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0+d4cacc0", GitCommit:"d4cacc0", GitTreeState:"clean", BuildDate:"2019-07-08T19:16:39Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind: OKD

  • Are you writing your operator in ansible, helm, or go?
    go

Possible Solution
maybe define the go path... but this is not more required for newer go versions

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions