Skip to content

Commit

Permalink
Update readme (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Apr 12, 2024
1 parent 179f887 commit 99098c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,25 @@ test:
lint: bootstrap
golangci-lint run --max-same-issues 0

.PHONY: mocks
mocks: bootstrap
mockgen -source ./pkg/repository/repository.go -destination ./pkg/repository/mock/repository.go -package mock
mockgen -source ./pkg/listers/limitrange.go -destination ./pkg/listers/mock/limitrange.go -package mock
mockgen -source ./pkg/listers/node.go -destination ./pkg/listers/mock/node.go -package mock
mockgen -source ./pkg/listers/pod.go -destination ./pkg/listers/mock/pod.go -package mock
mockgen -source ./pkg/listers/radixregistration.go -destination ./pkg/listers/mock/radixregistration.go -package mock
mockgen -source ./pkg/listers/containerbulkdto.go -destination ./pkg/listers/mock/containerbulkdto.go -package mock
mockgen -source ./pkg/listers/nodebulkdto.go -destination ./pkg/listers/mock/nodebulkdto.go -package mock



HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;)
HAS_MOCKGEN := $(shell command -v mockgen;)

bootstrap:
ifndef HAS_GOLANGCI_LINT
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
endif
ifndef HAS_MOCKGEN
go install github.com/golang/mock/mockgen@v1.6.0
endif
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ sqlcmd -S ${SERVER_NAME}.database.windows.net -d ${DATABASE_NAME} -G --variables

## Deploy to cluster

Installation on cluster is handled by flux through [flux repo](https://github.com/equinor/radix-flux). Before being installed, it requires that there exist a namespace called `radix-cost-allocation`. In that namespace there must be a secret called `cost-db-secret` that contains the database password. This is handled through the setup script in [radix-platform](https://github.com/equinor/radix-platform)
Installation on cluster is handled by flux through [flux repo](https://github.com/equinor/radix-flux).

tag in git repository (in master branch) - matching to the version of Version in docs/docs.go
tag in git repository (in master branch) - matching to the version of Version in charts/Chart.yaml

## Developing

You need Go installed. Make sure `GOPATH` and `GOROOT` are properly set up.

Also needed:
You need:

- [`gomock`](https://github.com/golang/mock) (GO111MODULE=on go get github.com/golang/mock/mockgen@v1.5.0)

Expand All @@ -42,18 +40,8 @@ Want to contribute? Read our [contributing guidelines](./CONTRIBUTING.md)
We use gomock to generate mocks used in unit test.
You need to regenerate mocks if you make changes to any of the interface types used by the application; **Repository**

Repository:
```
$ mockgen -source ./pkg/repository/repository.go -destination ./pkg/repository/mock/repository.go -package mock
```
listers:
```
$ mockgen -source ./pkg/listers/limitrange.go -destination ./pkg/listers/mock/limitrange.go -package mock
$ mockgen -source ./pkg/listers/node.go -destination ./pkg/listers/mock/node.go -package mock
$ mockgen -source ./pkg/listers/pod.go -destination ./pkg/listers/mock/pod.go -package mock
$ mockgen -source ./pkg/listers/radixregistration.go -destination ./pkg/listers/mock/radixregistration.go -package mock
$ mockgen -source ./pkg/listers/containerbulkdto.go -destination ./pkg/listers/mock/containerbulkdto.go -package mock
$ mockgen -source ./pkg/listers/nodebulkdto.go -destination ./pkg/listers/mock/nodebulkdto.go -package mock
make mocks
```

## Update version
Expand Down

0 comments on commit 99098c0

Please sign in to comment.