Commit Graph

118 Commits

Author SHA1 Message Date
Joyce Liu 43061af74a Update test-infra to the latest version (#154) 2019-05-31 17:41:33 -07:00
Joyce Liu cf41ab2b73 update test-infra in vendor (#148) 2019-05-29 11:46:31 -07:00
Roland Huß c10092ffae fix: Update cli-runtime to include fix for cli options help (#137)
The update to kubernetes-1.13.5 for cli-runtime introduces a fix for #135 (i.e. sorting the keys for the options)
2019-05-21 09:54:27 -07:00
Roland Huß 52b6b236fe Update to serving 0.6.0 (#129)
* chore: Update to 0.6.0

* chore: Fix test

* chore: Update modules.txt
2019-05-20 10:41:27 -07:00
Adriano Cunha 8bb85c6aed Fix auto releases of Knative Client (#124)
This requires updating test-infra to deal with a repo that has no releases yet.

Also use hash and dates from the helper, to keep the binary and the GCS dirs in sync.
2019-05-17 14:40:16 -07:00
Adriano Cunha 9ec9671b2e Setup release infrastructure for Knative Client (#115)
Just like the other Knative modules, and ready for automation.

Requires updating test-infra to the latest version.
2019-05-16 10:51:17 -07:00
Navid Shaikh bd7d57fa09 Adds service get command (#90)
* Adds service get command

 replaces service list command

* Updates go.mod and vendors/*

* Adds message if no services found in requested namespace

* Adds tests for service get
2019-05-13 10:56:40 -07:00
Adriano Cunha c33b1de89a License checking works now, enable it (#98)
* License checking now works, enable it

* Update test-infra

* Update vendored test-infra
2019-05-09 14:51:38 -07:00
dr.max 95808278d4 Adds Cobra generated docs and means to generate them and first cut of other docs (#93)
* Added Cobra generated docs and ways to generate them

* Adds docs/README.md and first user's guide for Kn
2019-05-06 17:39:36 -07:00
Roland Huß 18ae474c77 chore: Update dependencies (#68)
* chore: Update dependency to knative-serving 0.5.1

* chore: Changed deps to released versions where possible

Rebuilt mod deps and vendor dir based on this dependency list

github.com/knative/serving v0.5.
github.com/knative/pkg v0.0.0-20190330001454-aad7a9ad4639
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.1
k8s.io/api kubernetes-1.14.1
k8s.io/apimachinery kubernetes-1.14.1
k8s.io/cli-runtime kubernetes-1.14.1
k8s.io/client-go v11.0.0
sigs.k8s.io/yaml v1.1.0

Not sure if all dependencies are required (e.g. is k8s.io/api required
to be specified explicitely or shouldn't we rely on k8s.io/client-go
to bring it this as a transitive dependency which maches always
the cli-runtime's version.

* chore: Update .gitignore to *not* ignore certain vendor files

* chore: Aligned with k8s version from serving 0.5.2

* chore: Run `go mod tidy`

* chore(modules): Update dependencies
2019-04-30 09:48:33 -07:00
dr.max dd4e2a917b Added support for limits and requests of CPU and memory (#78)
* Added support for limits and requests of CPU and memory. Examples:
1. kn service create mysvc --image dev.local/ns/image:latest --request-cpu 100m --requests-memory 64Mi
2. kn service create mysvc --image dev.local/ns/image:latest --limits-cpu 1000m --limits-memory 1024Mi

You can also include and/or omit the requests and limits. So the following should also work:
kn service create mysvc --image dev.local/ns/image:latest  --request-cpu 1000m --limits-memory 1024Mi

* Addressed comments about maintaining existing requests and limits and added more tests
* TestServiceCreateWithRequests
* TestServiceCreateWithLimits
* TestServiceCreateRequestsLimitsCPU
* TestServiceCreateRequestsLimitsMemory
* TestServiceCreateRequestsLimitsCPUMemory

* updating dependencies and formatting tests code
2019-04-25 20:20:29 -07:00
Kenjiro Nakayama 6b2b7f2cc0 Support --all-namespaces option for service and revision list (#32)
* Support --all-namespaces option for service and revision list

`kn {service, revision} list` does not have the all-namespaces
options. Although it is possible to list them by `kn service list -n
""`(empty string), it is difficult to find such secret trick.

Hence, This patch adds `--all-namespaces` option.

* Add all-namespace option to KnParams

* Add AddNamespaceFlags function

* Add GetNamespace func

* Update help message

* Use GetNamespace util in service create cmmand
2019-04-09 09:09:58 -07:00
Ben Browning 585fe80099 Stub in an integration test (#55)
* Stub in an integration test

This just calls `kn service list` and verifies it doesn't have a
non-zero exit status.

* Build the client in pre_integration_tests

* Need to explicitly build the `kn` client

As opposed to just building the entire repo. That didn't actually
stick a `kn` binary in the root.

* Address code review feedback

Build the client in e2e-tests.sh instead of presubmit-tests.sh, fix a
couple copy/paste places that referred to eventing, remove unnecessary
knative_teardown function.

* Don't attempt to build kn twice

* Turns out pre_integration_tests() is the easiest way to build kn

We don't have any other good hooks at the moment to do something in
`e2e-tests.sh` that runs only once before the test cluster gets setup.

* Update test-infra to use the new cluster_setup function

This updates the version of test-infra to use the new cluster_setup
function added in https://github.com/knative/test-infra/pull/667

It simplifies our e2e setup logic into one place instead of being
split over presubmit-tests.sh and e2e-tests.sh

* Update vendored test-infra as well

* We have to explicitly tell CI to use the vendored modules

* Be a bit more descriptive in the stubbed out integration test
2019-04-08 10:50:58 -07:00
Naomi Seyfer ebbd659e69 go.mod and go.sum updates (#46)
* go.mod and go.sum updates

* Set GO111MODULE=on
2019-03-26 12:41:51 -07:00
Naomi Seyfer b5b02f64f3
Incorporate reference to knative/test-infra for setting up automated tests. (#34)
* Set up some test infra

* fix gitignore

* More mod gitignore

* Add dummy file that depends on stuff
2019-03-05 16:31:05 -08:00
Scott Andrews 855ea20d40 Generate go.sum with go 1.11.5 (#19)
When building with go 1.11.5 I see a hash mismatch for knative/serving.
The algorithm for computing the hash has changed in recent go releases.

To create this PR I ran:
- `rm go.sum`
- `go test ./pkg/...`
- `go build ./cmd/kn`
- `go mod tidy`

All developers should update their version of go and clean their module
cache to flush downloaded modules with an invalid hash.
2019-02-04 16:19:49 -08:00
Naomi Seyfer 7cc59481bb
Refactor to allow testing; write first tests. (#10)
* Refactor commands to allow insertion of fakes for testing

* Pin client-go to version that matches signatures other libs use

* Add tests for service list

* actually add test file

* Review comments: Fatal instead of Error/return, Split instead of read to newline
2019-01-29 12:40:22 -08:00
Naomi Seyfer 38932b1d61
Get revision and service listing skeletons in. (#2)
* Get revision and service listing skeletons in.

This adds the kn program, with basic commands for service and revision listing
in.

kn service list
kn revision list

They use the genericclioptions library from kubernetes to support jsonpath,
yaml, and json output. The default is to just list the names of the objects, for
now, until we add in some of the kubectl-based libraries for creating tables in
another commit.

This is deliberately bare-bones; I am looking to get the basic skeletons of how
this repository is laid out down.

No tests yet. Soon.

* Move commands to pkg, so cmd only contains minimalist main.go

* RunE instead of Run. The defaults on Cobra command generation are weird.

* Oops forgot to change types of stuff

* Do not panic on bad config file

* Make commands no longer global

* Make configuration initialization not static in the module, but rather triggered by main.go init
2019-01-22 09:03:58 -08:00