Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates CoreDNS readme for kubebuilder 2.0 #45

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,17 @@ A few differences so we can use go modules and [crane](https://github.com/google
Created with kubebuilder:

```bash
kubebuilder init --dep=false --domain=k8s.io --license apache2
export KUBEBUILDER_ENABLE_PLUGINS=1
kubebuilder init --dep=false --domain=k8s.io --license=apache2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubebuilder init --dep=false --domain=k8s.io --license=apache2
kubebuilder init --fetch-deps=false --domain=k8s.io --license=apache2


kubebuilder create api --controller=true --example=false --group=addons --kind=CoreDNS --make=false --namespaced=true --resource=true --version=v1alpha1
kubebuilder create api --pattern addon --controller=true --example=false --group=addons --kind=CoreDNS --make=false --namespaced=true --resource=true --version=v1alpha1

```

Switched to go modules:
Run go mod vendor:

```bash
export GO111MODULE=on
go mod init sigs.k8s.io/cluster-addons/coredns

# Insert our tools.go for extra dependencies
cp ../tools.go tools.go

go get -m k8s.io/client-go@v10.0.0
go get -m k8s.io/api@kubernetes-1.13.5
go get -m k8s.io/apimachinery@kubernetes-1.13.5
go get -m k8s.io/apiserver@kubernetes-1.13.5
go get -m k8s.io/apiextensions-apiserver@kubernetes-1.13.5

go mod vendor

rm Gopkg.toml
```

Delete the test suites that are more checking that kubebuilder is working:
Expand Down Expand Up @@ -73,12 +60,8 @@ EOF
Running the operator locally:

```bash
export GOPATH=<go-path>
go mod vendor
make
go build -o bin/manager sigs.k8s.io/cluster-addons/coredns/cmd/manager
make install
bin/manager
make run
```
We can see logs from the operator!

Expand Down