Compare commits

..

66 Commits

Author SHA1 Message Date
Kubernetes Publisher
1957ffeb3d Merge pull request #58664 from hzxuzhonghu/code-gen
Automatic merge from submit-queue (batch tested with PRs 58259, 58664). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix generator_for_scheme: remove blank new line

**What this PR does / why we need it**:

1. remove new blank line in `AddToScheme`
80e344644e/pkg/client/clientset_generated/internalclientset/fake/register.go (L81-L83)

2. remove new blank line in `Install`
3d69cea1e5/staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/scheme/register.go (L44-L47)

**Special notes for your reviewer**:

the first commit changes the code generator for schema register.
c8c9ca77af

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 32913ab0cdc5c4dde50e50ecffa4c1e9c6d6a150
2018-01-24 21:11:01 +00:00
Kubernetes Publisher
b044414c7d Merge pull request #58394 from deads2k/controller-08-redeliver
Automatic merge from submit-queue (batch tested with PRs 58412, 56132, 58506, 58542, 58394). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

don't stop informer delivery on error

If an informer delivery fails today, we stop delivering to it entirely.  The pull updates the code to skip that particular notification, delay, and continue delivery with the next time.

/assign derekwaynecarr
/assign ncdc
/assign ash2k

@derekwaynecarr This would change the "the controller isn't doing anything?!" to "the controller missed my (individual) resource!"

```release-note
NONE
```

Kubernetes-commit: 71426ba59fd4a37e5da7deac6298ab33101bb5b6
2018-01-23 09:10:46 +00:00
hzxuzhonghu
ccd2429093 run update code-gen
Kubernetes-commit: 1f013b7deacfaa80bd8fafbe9b1fad1375e1907d
2018-01-23 12:26:27 +08:00
Kubernetes Publisher
8a8517e82f Merge pull request #58365 from ashleyschuett/fix/spelling
Automatic merge from submit-queue (batch tested with PRs 56948, 58365, 58501). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fixed spelling of Promethus to Prometheus

Release note:
```release-note
NONE
```

Kubernetes-commit: 5a572d3e27852ac5915359beec1da33004073525
2018-01-19 13:11:00 +00:00
David Eads
1c2a06d4c0 don't stop informer delivery on error
Kubernetes-commit: 2fa93da6d5efd97dbcaad262a9e59073de9c5298
2018-01-18 13:07:18 -05:00
Kubernetes Publisher
8a28689b29 Merge pull request #53631 from dixudx/enforce_cobra_required_flags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

update vendor spf13/cobra to enforce required flags

**What this PR does / why we need it**:

spf13/cobra#502 has enforced checking flags that marked as required, an error will be raised if unset.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:fixes #54855
xref #48400
fixes kubernetes/kubectl#121

**Special notes for your reviewer**:
/assign @liggitt @eparis

**Release note**:

```release-note
kubectl now enforces required flags at a more fundamental level
```

Kubernetes-commit: 048757b8a51333f59d3112d2b228d2f0102a4afc
2018-01-18 13:10:50 +00:00
Kubernetes Publisher
da710ccb08 Merge pull request #58411 from sttts/sttts-compile-fix-bootstrap-token-api
Automatic merge from submit-queue (batch tested with PRs 58411, 58407, 52863). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

client-go: fix bootstrap token imports

Fixes the publishing-bot https://github.com/kubernetes/kubernetes/issues/56876#issuecomment-358429408.

Introduced by https://github.com/kubernetes/kubernetes/pull/55595

Kubernetes-commit: 12b5bf9e7929a8aa3d959d5f3b9f716b4894f3c7
2018-01-18 01:10:58 +00:00
Kubernetes Publisher
ce9bf2bd6c Merge pull request #55595 from guangxuli/move_token_constant_and_helper
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add generic Bootstrap Token constants and helpers to client-go

**What this PR does / why we need it**:
per https://github.com/kubernetes/client-go/issues/114

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

fix  https://github.com/kubernetes/client-go/issues/114

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```

Kubernetes-commit: 48f69ac964b9a96b55351a3541f285b4cb5611bb
2018-01-18 01:10:36 +00:00
Dr. Stefan Schimanski
807bb8875b client-go: fix bootstrap token imports
Kubernetes-commit: 36314bf10b6efafa94e728e986ce2c8d55448654
2018-01-17 21:15:02 +01:00
Gavin
ced3412595 create auto-gen files
Kubernetes-commit: f653d02b059b78b6a540fb7eadc4b8862226fc7a
2018-01-17 16:23:03 +08:00
Gavin
01f7f3801f Add generic Bootstrap Token constants and helpers to client-go
Kubernetes-commit: bb5e156aba3ff73ceb85576670c35d7565b84a4c
2018-01-17 16:22:37 +08:00
Ashley
f5d6749301 Fixed spelling of Promethus to Prometheus
Kubernetes-commit: 6a209a1e51d785fb7f7add90b5c1311c35713034
2018-01-16 20:35:00 -05:00
Kubernetes Publisher
d8b352f6b2 Merge pull request #58341 from deads2k/controller-06-lease
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

say which lease is being acquired

Adds which lease is being acquired to the message

Kubernetes-commit: fa7dde385b9af88843117af2060233728db2209d
2018-01-16 18:45:59 +00:00
Kubernetes Publisher
e9556070fb Merge pull request #57504 from yue9944882/fix-fake-client-dummy-watch
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

feat(fakeclient): push event on watched channel on add/update/delete

**What this PR does / why we need it**:

This PR enables watch function for kubernetes [fakeclient](1bcf0b0a22/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go (L88)).

This fake client add watchReactorFunction by wrapping [watch.NewFake](1bcf0b0a22/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go (L98)) which is a `chan Event` but actually nothing pushes objects into this channel. So all watch function called by fake client will never return or never receive any object.

This PR intercepts ReactionFunc of `Create / Update / DeleteActionImpl` and will push the requested object to channel.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Fixes #54075

**Special notes for your reviewer**:

**Release note**:

```dev-release-note
enable watch function for fake client
```

Kubernetes-commit: 268555a30a0f028762854f5b0d3ebb587e2ee4ee
2018-01-16 18:45:31 +00:00
David Eads
5fecd3df89 say which lease is being acquired
Kubernetes-commit: 5b854e7b17d68e191b74501afb72fc5fb9582e1b
2018-01-16 11:00:43 -05:00
Kubernetes Publisher
f031b2af14 Merge pull request #57843 from p0lyn0mial/wire_generic_scaler
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

wires the generic scaler to kubectl

**What this PR does / why we need it**:
the changes introduced in this commit plumbs in the generic scaler to kubectl.
note that we don't change the behaviour of kubectl.
For example it won't scale new resources. That's the end goal.
The first step is to retrofit existing code to use the generic scaler.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 52a2256b1ad492d8b1e6ec1676594ca9ef38487f
2018-01-13 11:32:23 +00:00
Kubernetes Publisher
b1fb949a8b Merge pull request #57059 from ericchiang/client-go/remove-openapi-import
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

client-go: remove open-api import from types

This builds off of https://github.com/kubernetes/kube-openapi/pull/21 and removes the following imports from `k8s.io/client-go/kubernetes`:

```
github.com/PuerkitoBio/purell
github.com/PuerkitoBio/urlesc
github.com/emicklei/go-restful
github.com/emicklei/go-restful/log
github.com/go-openapi/jsonpointer
github.com/go-openapi/jsonreference
github.com/go-openapi/spec
github.com/go-openapi/swag
github.com/mailru/easyjson/buffer
github.com/mailru/easyjson/jlexer
github.com/mailru/easyjson/jwriter
golang.org/x/text/cases
golang.org/x/text/internal
golang.org/x/text/internal/tag
golang.org/x/text/language
golang.org/x/text/runes
golang.org/x/text/secure/precis
golang.org/x/text/width
k8s.io/kube-openapi/pkg/common
```

/assign @sttts
/assign @mbohlool

cc @kubernetes/sig-api-machinery-pr-reviews

```release-note
NONE
```

Kubernetes-commit: f6d0632bbbf8428bfec0ca72db5103916e6248b4
2018-01-12 11:31:55 +00:00
Kubernetes Publisher
dde6ef6eaf Merge pull request #57259 from ericchiang/client-go-no-cache-import
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

client-go: remove import of github.com/gregjones/httpcache

Moves NewCacheRoundTripper from `k8s.io/client-go/transport` to its own package. This prevents Kubernetes clients from requiring its dependencies.

This change removes the following transitive imports from `k8s.io/client-go/kubernetes`

```
github.com/google/btree
github.com/gregjones/httpcache
github.com/gregjones/httpcache/diskcache
github.com/peterbourgon/diskv
```

```release-note
NONE
```

Kubernetes-commit: 4a77bd53e88a719c612086df69a52899bbdd85af
2018-01-11 11:25:56 +00:00
Kubernetes Publisher
271600dc67 Merge pull request #58091 from deads2k/client-01-scale
Automatic merge from submit-queue (batch tested with PRs 57823, 58091, 58093, 58096, 57020). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

manually handle encoding and decoding in the scale client

@p0lyn0mial I think this resolves the problems you're seeing in https://github.com/kubernetes/kubernetes/pull/57843 by manually controlling the encode and decode in the client itself.

/assign @DirectXMan12

Kubernetes-commit: eba10f1ea1541237d9aa577418423c70b79ecb04
2018-01-11 07:26:45 +00:00
Kubernetes Publisher
c9d1119131 Merge pull request #57571 from spiffxp/mk-staging-repos-authoritative
Automatic merge from submit-queue (batch tested with PRs 58025, 57112, 57879, 57571, 58062). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Treat staging repos as authoritative source for all files

Add CONTRIBUTING.md files to remind people not to PR directly into the published repos.

/hold
I believe this requires removing these files from the published repos if any copies exist there

ref: kubernetes/kubernetes#57559

Kubernetes-commit: 4bc286f0255d6c007cb8d5435018ab3e31ec7d01
2018-01-11 07:26:00 +00:00
Eric Chiang
69fbc9fa3c bump(k8s.io/kube-openapi): a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3
Kubernetes-commit: e1dda7e3be5cded77116cc48370372cb10992c17
2018-01-10 15:17:37 -08:00
David Eads
7e9fc247fe manuallly handle encoding and decoding in the scale client
Kubernetes-commit: 877143e547921747d9fd14e2af776b34663d37dc
2018-01-10 12:11:17 -05:00
Dr. Stefan Schimanski
109fef42a8 Merge pull request #356 from spiffxp/rm-pr-template
Remove .github in prep to sync from k/k/staging
2018-01-09 09:17:02 +01:00
Aaron Crickenberger
e36946081f Remove .github in prep to sync from k/k/staging 2018-01-08 12:34:11 -08:00
Eric Chiang
8331bec30f generated: update staging godeps
Kubernetes-commit: dedeb99c97dcd0e5814ba49cf0f82aa7bf23f4ad
2018-01-08 10:00:13 -08:00
Kubernetes Publisher
21ab0aa61a Merge pull request #57508 from chechiachang/enable-label-selector-for-client-go-listwatch
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable list option modification when create list watch

**What this PR does / why we need it**:
metav1.ListOptions support both field selector and label selector, but the current NewListWatchFromClient in client-go only support field selector.
 It would be helpful to use label selector in client-go.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```

Kubernetes-commit: 8504591def5ce45c9d92b57efd5f06d402a003dc
2018-01-08 12:14:05 +00:00
Kubernetes Publisher
1b825e3a78 Merge pull request #56769 from dixudx/forbid_unnamed_context
Automatic merge from submit-queue (batch tested with PRs 57521, 56769). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

forbid unnamed context

**What this PR does / why we need it**:
forbid unnamed contexts with validation

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #56747

**Special notes for your reviewer**:
/assign @sttts @fabianofranz

**Release note**:

```release-note
forbid unnamed context
```

Kubernetes-commit: a2bce0d74e283654cd6e561faacf5fba7ea29310
2018-01-07 19:42:59 +00:00
p0lyn0mial
bd935b15f7 the changes introduced in this commit plumbs in the generic scaler into kubectl.
note that we don't change the behaviour of kubectl.
For example it won't scale new resources. That's the end goal.
The first step is to retrofit existing code to use the generic scaler.

Kubernetes-commit: dd9de90b0ad1aa78c2a8dd7d5238d8f769ffe771
2018-01-04 14:52:25 +01:00
Kubernetes Publisher
18ec62fe90 Merge pull request #56534 from allenpetersen/updateGengo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update gengo version to include goimports formatter

Update gengo which now uses goimports to format code and organize imports.

Fixes #55542

**Special notes for your reviewer**:
Updates version of k8s.io/gengo
Takes new dependency on golang.org/x/tools/imports and golang.org/x/tools/go/ast/astutil

**Release Notes**:
```release-note
NONE
```

Kubernetes-commit: 46eabb7d918d962a9c8e0474d41f9371081d47fa
2018-01-04 05:55:07 +00:00
Allen Petersen
ad1ee6bff2 Update generated files
Kubernetes-commit: 3d69cea1e589add1d24fc72e9a8c46081664a719
2018-01-02 22:07:30 -08:00
Kubernetes Publisher
6829d13c43 Merge pull request #57584 from dims/update-to-latest-gophercloud
Automatic merge from submit-queue (batch tested with PRs 57584, 57679). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update to latest gophercloud

**What this PR does / why we need it**:

Catch up with all the latest stuff from gophercloud

be3fd784 - Flavor Extra Specs Create
c2cafb46 - Flavor Extra Specs: List / Get
7b1b8775 - Compute v2: Flavor Access Add
cf81d92c - Add DELETE support in V3 volume types
a879b375 - Fix incorrect variable name
2997913a - Add pagination support in snapshots
a5c71868 - Support pagination in volume resources
1db0312e - TrivialFix incorrect variable name
69194d93 - Add basic CRUD acceptance testcases in snapshot V3
22c7abce - Add CREATE support in V3 volume types
aed60e9f - Add basic CRUD acceptance in volume V3
7cbf4661 - BlockStorage v3: volumetype get/list acc test
bcab0f79 - Update README with Thank Yous
f85e7c0f - Docs: Updating Contributing and Style Guides
be1b616c - Fix a small syntax error of TestShareTypeExtraSpecs test
3f38a1ee - Add List/Get support for volume type in volume V3
48a40399 - Support for setting availability_zone_hints to a router
747776a7 - Fix the undefined function error of TestPortsbindingCRUD test
a7ec61ea - Fix the undefined function error of TestNetworksProviderCRUD test
25e18920 - Compute v2: Add the extended status information API
b63d2fd3 - availability_zone_hints for network(s)
157d7511 - Add support for ipv6_address_mode and ipv6_ra_mode in subnets
ed468967 - DBv1: configurations acceptance test
578e2aab - Configuration group time parsing error
669959f8 - Compute v2: attachinterfaces acceptance test
8113f0cb - Add Nova interface-detach support
d6484abc - Add Nova interface-attach support
7883fd95 - fix reauth deadlock by not calling Token() during reauth
4d0f8253 - Add support to get interface of a server
7dc13e0d - AccTests: BlockStorage v2 ForceDelete
1e86e54d - Refactor blockstorage actionURL
e30da231 - Feature/support force delete
e193578c - add UseTokenLock method in ProviderClient to allow safe concurrent access
e6a5f874 - ObjectStorage v1: Rename ExtractLastMarker to extractLastMarker
c47bb004 - BlockStorage v2/v3: Reorder snapshot/volume ListOpts and update godoc
2c05d0e4 - Add 'tenant' support in volume&snapshot API
639d71fd - Networking v2: Port Security Extension
755794a7 - ObjectStorage v1: Subdir and Marker detection
a043441f - fixed bug with endless loop when using delimiter on folded directory
a4799293 - OpenStack: support OS_PROJECT_* variables

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: df259cc54d62fdf8ca89ab05d6e7931c022bfaea
2018-01-03 01:52:45 +00:00
Kubernetes Publisher
7e03948729 Merge pull request #57735 from cblecker/2018-is-the-year-of-kubernetes
Automatic merge from submit-queue (batch tested with PRs 57735, 57503). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update generated copyrights for 2018

**What this PR does / why we need it**:
- Update boilerplate regex to support 2018
- Add generated runtime and generated device plugin scripts to `hack/update-all.sh` target list
- Run `make update` to regenerate all generated code

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57728

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

Kubernetes-commit: b098cafae06797ba8bf7fd35379e237fd355b047
2018-01-02 17:52:24 +00:00
Christoph Blecker
62b2cb756b Regenerate all generated code
Kubernetes-commit: 80e344644e2b6222296f2f03551a8d0273c7cbce
2018-01-02 00:21:07 -08:00
yue9944882
f855fad41e Regenerating code of fake clientset
Kubernetes-commit: 6f381ab2cd351c96a28b7ccde704ea96c38612dd
2017-12-25 11:46:56 +08:00
Kubernetes Publisher
d79b7d1f8b Merge pull request #56820 from ixdy/pure-go-binaries
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump rules_go and build "static" binaries in pure Go mode

**What this PR does / why we need it**: uses latest set of enhancements in bazelbuild/rules_go to properly build the "static" Go binaries using pure Go (i.e. `CGO_ENABLED=0`), and to support cross compilation of these binaries. Cross compilation of cgo-enabled binaries is still not supported.

Also depends on https://github.com/kubernetes/repo-infra/pull/52, and requires bazel 0.8+ (which is not yet enabled in CI for kubernetes/kubernetes).

Note that for proper cross compilation we'll also need to remove the hardcoded "linux-amd64" that's strewn about several `BUILD` files.

**Release note**:

```release-note
NONE
```

/hold
/assign @BenTheElder @mikedanese @spxtr

Kubernetes-commit: f5f6f3e715cb8dfbd9657a4229c77ec6a5eab135
2017-12-24 01:42:54 +00:00
Kubernetes Publisher
c96a48875f Merge pull request #57473 from spiffxp/add-code-of-conduct-to-staging-repos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add code-of-conduct.md to staging repos

Instead of adding it directly to their published copies

Replaces
- https://github.com/kubernetes/api/pull/13
- https://github.com/kubernetes/apiextensions-apiserver/pull/21
- https://github.com/kubernetes/apimachinery/pull/33
- https://github.com/kubernetes/apiserver/pull/28
- https://github.com/kubernetes/client-go/pull/350
- https://github.com/kubernetes/code-generator/pull/29
- https://github.com/kubernetes/kube-aggregator/pull/11
- https://github.com/kubernetes/metrics/pull/12
- https://github.com/kubernetes/sample-apiserver/pull/18
- https://github.com/kubernetes/sample-controller/pull/3

ref: kubernetes/community#1527

Kubernetes-commit: 8a4a39d6ae1be45115c12cfa166f2c8151d88d8c
2017-12-23 01:42:55 +00:00
Davanum Srinivas
95954ff384 Update to latest gophercloud
Catch up with all the latest stuff from gophercloud

4b7db606 - only try to reauth once
d13755e6 - BlockStorage v3: Rename VolumeType PublicAccess to IsPublic
614da04d - Add UPDATE support in V3 volume types (#656)
be3fd784 - Flavor Extra Specs Create
c2cafb46 - Flavor Extra Specs: List / Get
7b1b8775 - Compute v2: Flavor Access Add
cf81d92c - Add DELETE support in V3 volume types
a879b375 - Fix incorrect variable name
2997913a - Add pagination support in snapshots
a5c71868 - Support pagination in volume resources
1db0312e - TrivialFix incorrect variable name
69194d93 - Add basic CRUD acceptance testcases in snapshot V3
22c7abce - Add CREATE support in V3 volume types
aed60e9f - Add basic CRUD acceptance in volume V3
7cbf4661 - BlockStorage v3: volumetype get/list acc test
bcab0f79 - Update README with Thank Yous
f85e7c0f - Docs: Updating Contributing and Style Guides
be1b616c - Fix a small syntax error of TestShareTypeExtraSpecs test
3f38a1ee - Add List/Get support for volume type in volume V3
48a40399 - Support for setting availability_zone_hints to a router
747776a7 - Fix the undefined function error of TestPortsbindingCRUD test
a7ec61ea - Fix the undefined function error of TestNetworksProviderCRUD test
25e18920 - Compute v2: Add the extended status information API
b63d2fd3 - availability_zone_hints for network(s)
157d7511 - Add support for ipv6_address_mode and ipv6_ra_mode in subnets
ed468967 - DBv1: configurations acceptance test
578e2aab - Configuration group time parsing error
669959f8 - Compute v2: attachinterfaces acceptance test
8113f0cb - Add Nova interface-detach support
d6484abc - Add Nova interface-attach support
7883fd95 - fix reauth deadlock by not calling Token() during reauth
4d0f8253 - Add support to get interface of a server
7dc13e0d - AccTests: BlockStorage v2 ForceDelete
1e86e54d - Refactor blockstorage actionURL
e30da231 - Feature/support force delete
e193578c - add UseTokenLock method in ProviderClient to allow safe concurrent access
e6a5f874 - ObjectStorage v1: Rename ExtractLastMarker to extractLastMarker
c47bb004 - BlockStorage v2/v3: Reorder snapshot/volume ListOpts and update godoc
2c05d0e4 - Add 'tenant' support in volume&snapshot API
639d71fd - Networking v2: Port Security Extension
755794a7 - ObjectStorage v1: Subdir and Marker detection
a043441f - fixed bug with endless loop when using delimiter on folded directory
a4799293 - OpenStack: support OS_PROJECT_* variables

Kubernetes-commit: 406ef92623ea3c81e1101f11c5ffae59ab32f688
2017-12-22 17:12:51 -05:00
Aaron Crickenberger
de090a6a8d Treat staging repos as authoritative for all files
Move files from kubernetes/foo root back to
kubernetes/kubernetes/staging/src/k8s.io/foo root

Then:
- add CONTRIBUTING.md for all staging repos
- add .PULL_REQUEST_TEMPLATE to all staging repos
- ignore .github while diffing generated protobuf

Kubernetes-commit: d9b5773101e930431f24fe178d988271c1becc35
2017-12-22 17:09:51 -05:00
Kubernetes Publisher
2a98de87d5 Merge pull request #57435 from silenceshell/patch-1
Automatic merge from submit-queue (batch tested with PRs 57292, 56274, 57435, 57438, 57429). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix a typo

Just a typo, `timemoutseconds` should be `timeoutSeconds`.

Kubernetes-commit: 4caedcf3beac57e2e11d7345c4eebe91aa5a655d
2017-12-21 09:42:40 +00:00
David Chang
34ead21345 Enable list option modification when create list watch
Kubernetes-commit: 2780b8f9e4bba0a27b44e0647a579b1c435987b1
2017-12-21 17:10:47 +08:00
yue9944882
af8ed43b01 fix(fakeclient): write event to watch channel on add/update/delete
fix races with watch call

add test for non-namespace resource watch

add matching for all-namespace-watch

fix delete namespace watch & restrict test

fix multiple invocation on same resource & namespace

add descriptive doc for tracker.watchers

Kubernetes-commit: f57cc0b22d282bc8fe68faf91529e7175bc3918a
2017-12-21 16:50:16 +08:00
Aaron Crickenberger
b7e986aa58 Add code-of-conduct.md to staging repos
Kubernetes-commit: 918a6a7de7a77294a57c11c8fe40ce54cd18ea56
2017-12-20 15:21:56 -05:00
Dr. Stefan Schimanski
7316584978 Merge pull request #263 from asifdxtreme/master
Add GoReportCard badge
2017-12-20 12:55:42 +01:00
Mohammad Asif Siddiqui
0926299490 Add GoReportCard badge 2017-12-20 15:38:11 +08:00
silenceshell
d6f5cef499 fix a typo
`timemoutseconds` should be `timeoutSeconds`.

Kubernetes-commit: ee5ea41f4d199b9cef022edc77185eab995c509d
2017-12-20 13:35:43 +08:00
Dr. Stefan Schimanski
a4971b3c17 Merge pull request #347 from kubernetes/sttts-6-README
Update README.md and INSTALL.md for v6.0.0
2017-12-19 09:22:45 +01:00
Kubernetes Publisher
f4d24c8a47 Merge pull request #56811 from liggitt/cache-key
Automatic merge from submit-queue (batch tested with PRs 56108, 56811, 57335, 57331, 54530). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use struct key for TLS cache

```release-note
NONE
```

Kubernetes-commit: c77830749726a7f7e1190361609cc04512bcf525
2017-12-19 03:46:00 +00:00
Dr. Stefan Schimanski
4170dc586c Update README.md and INSTALL.md for v6.0.0 2017-12-18 17:36:01 +01:00
Dr. Stefan Schimanski
6cddcf6b00 Merge pull request #341 from nikhita/add-6.0.0-changelog
Add client-go 6.0.0 changelog
2017-12-18 13:25:44 +01:00
Kubernetes Publisher
17dfc25798 Merge pull request #57142 from nikhita/bump-jsoniter
Automatic merge from submit-queue (batch tested with PRs 57122, 57142, 57016, 56927, 56678). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

bump(13f864): github.com/json-iterator/go: use ConfigCompatibleWithStandardLibrary

Jsoniter in `ConfigFastest` mode does not support escape characters in object keys, whereas `ConfigCompatibleWithStandardLibrary` does.

Fixes kubernetes/kubernetes#56018
Related kubernetes/kubernetes#56055

Benchmark results:

```
BenchmarkDecodeIntoJSON-4                                              	   30000	     48522 ns/op	    3792 B/op	      63 allocs/op
BenchmarkDecodeIntoJSONCodecGenConfigFast-4                            	  100000	     17409 ns/op	    4524 B/op	      96 allocs/op
BenchmarkDecodeIntoJSONCodecGenConfigCompatibleWithStandardLibrary-4   	  100000	     18617 ns/op	    4924 B/op	     121 allocs/op
```

/assign sttts thockin mfojtik

Kubernetes-commit: 135d58b3941fac99ae0426e18cbda266b83ca49e
2017-12-17 07:45:10 +00:00
Kubernetes Publisher
37ead7f166 Merge pull request #56975 from davidxia/examples
Automatic merge from submit-queue (batch tested with PRs 56997, 57008, 56984, 56975, 56955). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

examples: Make messages more informative

by including pod name and namespace

**What this PR does / why we need it**:
Makes messages sent to stdout more informative.
This helps new users running the examples.

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 049ef3fdd37024299888f2cf7a1cfe9c12d8662b
2017-12-16 23:44:55 +00:00
Kubernetes Publisher
99b02d3434 Merge pull request #56997 from hzxuzhonghu/cleanup
Automatic merge from submit-queue (batch tested with PRs 56997, 57008, 56984, 56975, 56955). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

code cleanup in discovery client

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

Kubernetes-commit: 78c7c6f8597ac5990c2891d4f73ae0b9a1c013ce
2017-12-16 23:44:33 +00:00
Eric Chiang
77f9dfa073 client-go: remove import of github.com/gregjones/httpcache
Kubernetes-commit: ea085e0a32a6b723e5c565e60d8941b5a760bb68
2017-12-15 15:02:31 -08:00
Dr. Stefan Schimanski
8788745821 Merge pull request #339 from a4abhishek/patch-1
Update INSTALL.md
2017-12-14 16:41:43 +01:00
Dr. Stefan Schimanski
246626c8d5 Merge pull request #321 from mattnworb/patch-1
readme: fix minor typo in Table of Contents
2017-12-14 16:40:55 +01:00
Nikhita Raghunath
b06ac967c7 update staging godeps
Kubernetes-commit: a75aa0f41c51add6fa02c8bfc9362cfe9a5be8bc
2017-12-14 01:07:31 +05:30
Nikhita Raghunath
5e9d18c77c Add client-go 6.0.0 changelog 2017-12-12 15:23:55 +05:30
hzxuzhonghu
88b5d2a76a remove dead code
Kubernetes-commit: 46d3fa052dc087efa39585d3a9d582ee49a697f5
2017-12-10 15:39:31 +08:00
David Xia
f17d6594e8 examples: Make messages more informative
by including pod name and namespace

Kubernetes-commit: f344f50fca28e79ac67e25527b1add9bf418f957
2017-12-08 14:25:46 -06:00
Jeff Grafton
b7af4c11d3 Use race="off" mode instead of disabling race feature
Kubernetes-commit: a532ecd7041f59962f8fb29d4628be07edb02741
2017-12-04 14:23:44 -08:00
Jeff Grafton
fe985a55a2 Autogenerate BUILD files
Kubernetes-commit: efee0704c60a2ee3049268a41535aaee7f661f6c
2017-12-23 13:06:26 -08:00
Jordan Liggitt
60b0546760 Use struct key for TLS cache
Kubernetes-commit: 5c8fe23722db05dda25a54d4275737af329227eb
2017-12-04 13:51:29 -06:00
Di Xu
370f3b346b forbid unnamed context
Kubernetes-commit: 792a2299362ebadc9ca68c72347884330db23b2a
2017-12-04 14:39:05 +08:00
Abhishek Kashyap
832b09bf1b Update INSTALL.md
This is a very minor change, but it'll definitly help the New-Commers like me.
2017-12-03 02:19:02 +05:30
Di Xu
723afcf620 bump pflag
Kubernetes-commit: 6c54ec59ee7e6e1fa9f1dc311762ab98dc1b3d0a
2017-11-20 13:21:27 +08:00
Matt Brown
1e45615a5e readme: fix minor typo in Table of Contents 2017-11-07 10:19:34 -05:00
879 changed files with 277438 additions and 471 deletions

View File

@@ -1,4 +1,2 @@
Sorry, client-go does not accept changes via pull requests at this time. Please
submit your pull request to the main repository:
https://github.com/kubernetes/kubernetes. See the guidance here:
https://github.com/kubernetes/client-go#contributing-code.
Sorry, we do not accept changes directly against this repository. Please see
CONTRIBUTING.md for information on where and how to contribute instead.

View File

@@ -2,6 +2,111 @@ TODO: This document was manually maintained so might be incomplete. The
automation effort is tracked in
https://github.com/kubernetes/client-go/issues/234.
Changes in `k8s.io/api` and `k8s.io/apimachinery` are mentioned here
because `k8s.io/client-go` depends on them.
# v6.0.0
**Breaking Changes:**
* If you upgrade your client-go libs and use the `AppsV1() or Apps()` interface, please note that the default garbage collection behavior is changed.
* [https://github.com/kubernetes/kubernetes/pull/55148](https://github.com/kubernetes/kubernetes/pull/55148)
* Swagger 1.2 retriever `DiscoveryClient.SwaggerSchema` was removed from the discovery client
* [https://github.com/kubernetes/kubernetes/pull/53441](https://github.com/kubernetes/kubernetes/pull/53441)
* Informers got a NewFilteredSharedInformerFactory to e.g. filter by namespace
* [https://github.com/kubernetes/kubernetes/pull/54660](https://github.com/kubernetes/kubernetes/pull/54660)
* [k8s.io/api] The dynamic admission webhook is split into two kinds, mutating and validating.
The kinds have changed completely and old code must be ported to `admissionregistration.k8s.io/v1beta1` -
`MutatingWebhookConfiguration` and `ValidatingWebhookConfiguration`
* [https://github.com/kubernetes/kubernetes/pull/55282](https://github.com/kubernetes/kubernetes/pull/55282)
* [k8s.io/api] Renamed `core/v1.ScaleIOVolumeSource` to `ScaleIOPersistentVolumeSource`
* [https://github.com/kubernetes/kubernetes/pull/54013](https://github.com/kubernetes/kubernetes/pull/54013)
* [k8s.io/api] Renamed `core/v1.RBDVolumeSource` to `RBDPersistentVolumeSource`
* [https://github.com/kubernetes/kubernetes/pull/54302](https://github.com/kubernetes/kubernetes/pull/54302)
* [k8s.io/api] Removed `core/v1.CreatedByAnnotation`
* [https://github.com/kubernetes/kubernetes/pull/54445](https://github.com/kubernetes/kubernetes/pull/54445)
* [k8s.io/api] Renamed `core/v1.StorageMediumHugepages` to `StorageMediumHugePages`
* [https://github.com/kubernetes/kubernetes/pull/54748](https://github.com/kubernetes/kubernetes/pull/54748)
* [k8s.io/api] `core/v1.Taint.TimeAdded` became a pointer
* [https://github.com/kubernetes/kubernetes/pull/43016](https://github.com/kubernetes/kubernetes/pull/43016)
* [k8s.io/api] `core/v1.DefaultHardPodAffinitySymmetricWeight` type changed from int to int32
* [https://github.com/kubernetes/kubernetes/pull/53850](https://github.com/kubernetes/kubernetes/pull/53850)
* [k8s.io/apimachinery] `ObjectCopier` interface was removed (requires switch to new generators with DeepCopy methods)
* [https://github.com/kubernetes/kubernetes/pull/53525](https://github.com/kubernetes/kubernetes/pull/53525)
**New Features:**
* Certificate manager was moved from kubelet to `k8s.io/client-go/util/certificates`
* [https://github.com/kubernetes/kubernetes/pull/49654](https://github.com/kubernetes/kubernetes/pull/49654)
* [k8s.io/api] Workloads api types are promoted to `apps/v1` version
* [https://github.com/kubernetes/kubernetes/pull/53679](https://github.com/kubernetes/kubernetes/pull/53679)
* [k8s.io/api] Added `storage.k8s.io/v1alpha1` API group
* [https://github.com/kubernetes/kubernetes/pull/54463](https://github.com/kubernetes/kubernetes/pull/54463)
* [k8s.io/api] Added support for conditions in StatefulSet status
* [https://github.com/kubernetes/kubernetes/pull/55268](https://github.com/kubernetes/kubernetes/pull/55268)
* [k8s.io/api] Added support for conditions in DaemonSet status
* [https://github.com/kubernetes/kubernetes/pull/55272](https://github.com/kubernetes/kubernetes/pull/55272)
* [k8s.io/apimachinery] Added polymorphic scale client in `k8s.io/client-go/scale`, which supports scaling of resources in arbitrary API groups
* [https://github.com/kubernetes/kubernetes/pull/53743](https://github.com/kubernetes/kubernetes/pull/53743)
* [k8s.io/apimachinery] `meta.MetadataAccessor` got API chunking support
* [https://github.com/kubernetes/kubernetes/pull/53768](https://github.com/kubernetes/kubernetes/pull/53768)
* [k8s.io/apimachinery] `unstructured.Unstructured` got getters and setters
* [https://github.com/kubernetes/kubernetes/pull/51940](https://github.com/kubernetes/kubernetes/pull/51940)
**Bug fixes and Improvements:**
* The body in glog output is not truncated with log level 10
* [https://github.com/kubernetes/kubernetes/pull/54801](https://github.com/kubernetes/kubernetes/pull/54801)
* [k8s.io/api] Unset `creationTimestamp` field is output as null if encoded from an unstructured object
* [https://github.com/kubernetes/kubernetes/pull/53464](https://github.com/kubernetes/kubernetes/pull/53464)
* [k8s.io/apimachinery] Redirect behavior is restored for proxy subresources
* [https://github.com/kubernetes/kubernetes/pull/52933](https://github.com/kubernetes/kubernetes/pull/52933)
* [k8s.io/apimachinery] Random string generation functions are optimized
* [https://github.com/kubernetes/kubernetes/pull/53720](https://github.com/kubernetes/kubernetes/pull/53720)
# v5.0.1
Bug fix: picked up a security fix [kubernetes/kubernetes#53443](https://github.com/kubernetes/kubernetes/pull/53443) for `PodSecurityPolicy`.

7
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,7 @@
# Contributing guidelines
Do not open pull requests directly against this repository, they will be ignored. Instead, please open pull requests against [kuberentes/kubernetes](https://git.k8s.io/kubernetes/). Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md) you would follow for any other pull request made to kubernetes/kubernetes.
This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/client-go](https://git.k8s.io/kubernetes/staging/src/k8s.io/client-go) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot).
Please see [Staging Directory and Publishing](https://git.k8s.io/community/contributors/devel/staging.md) for more information

276
Godeps/Godeps.json generated
View File

@@ -30,14 +30,6 @@
"ImportPath": "github.com/Azure/go-autorest/autorest/date",
"Rev": "e14a70c556c8e0db173358d1a903dca345a8e75e"
},
{
"ImportPath": "github.com/PuerkitoBio/purell",
"Rev": "8a290539e2e8629dbc4e6bad948158f790ec31f4"
},
{
"ImportPath": "github.com/PuerkitoBio/urlesc",
"Rev": "5bd2802263f21d8788851d5305584c82a5c75d7e"
},
{
"ImportPath": "github.com/coreos/go-oidc/http",
"Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f"
@@ -86,34 +78,10 @@
"ImportPath": "github.com/docker/spdystream/spdy",
"Rev": "449fdfce4d962303d702fec724ef0ad181c92528"
},
{
"ImportPath": "github.com/emicklei/go-restful",
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
},
{
"ImportPath": "github.com/emicklei/go-restful/log",
"Rev": "ff4f55a206334ef123e4f79bbf348980da81ca46"
},
{
"ImportPath": "github.com/ghodss/yaml",
"Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee"
},
{
"ImportPath": "github.com/go-openapi/jsonpointer",
"Rev": "46af16f9f7b149af66e5d1bd010e3574dc06de98"
},
{
"ImportPath": "github.com/go-openapi/jsonreference",
"Rev": "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272"
},
{
"ImportPath": "github.com/go-openapi/spec",
"Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d"
},
{
"ImportPath": "github.com/go-openapi/swag",
"Rev": "f3f9494671f93fcff853e3c6e9e948b3eb71e590"
},
{
"ImportPath": "github.com/gogo/protobuf/proto",
"Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7"
@@ -150,10 +118,6 @@
"ImportPath": "github.com/golang/protobuf/ptypes/timestamp",
"Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9"
},
{
"ImportPath": "github.com/google/btree",
"Rev": "7d79101e329e5a3adf994758c578dab82b90c017"
},
{
"ImportPath": "github.com/google/gofuzz",
"Rev": "44d81051d367757e1c7c6a5a86423ece9afcf63c"
@@ -172,39 +136,31 @@
},
{
"ImportPath": "github.com/gophercloud/gophercloud",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/openstack/utils",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/gophercloud/gophercloud/pagination",
"Rev": "8183543f90d1aef267a5ecc209f2e0715b355acb"
},
{
"ImportPath": "github.com/gregjones/httpcache",
"Rev": "787624de3eb7bd915c329cba748687a3b22666a6"
},
{
"ImportPath": "github.com/gregjones/httpcache/diskcache",
"Rev": "787624de3eb7bd915c329cba748687a3b22666a6"
"Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97"
},
{
"ImportPath": "github.com/hashicorp/golang-lru",
@@ -228,35 +184,19 @@
},
{
"ImportPath": "github.com/json-iterator/go",
"Rev": "36b14963da70d11297d313183d7e6388c8510e1e"
"Rev": "13f86432b882000a51c6e610c620974462691a97"
},
{
"ImportPath": "github.com/juju/ratelimit",
"Rev": "5b9ff866471762aa2ab2dced63c9fb6f53921342"
},
{
"ImportPath": "github.com/mailru/easyjson/buffer",
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
},
{
"ImportPath": "github.com/mailru/easyjson/jlexer",
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
},
{
"ImportPath": "github.com/mailru/easyjson/jwriter",
"Rev": "2f5df55504ebc322e4d52d34df6a1f5b503bf26d"
},
{
"ImportPath": "github.com/peterbourgon/diskv",
"Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6"
},
{
"ImportPath": "github.com/pmezard/go-difflib/difflib",
"Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d"
},
{
"ImportPath": "github.com/spf13/pflag",
"Rev": "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
"Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea"
},
{
"ImportPath": "github.com/stretchr/testify/assert",
@@ -318,34 +258,10 @@
"ImportPath": "golang.org/x/sys/windows",
"Rev": "95c6576299259db960f6c5b9b69ea52422860fce"
},
{
"ImportPath": "golang.org/x/text/cases",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/internal",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/internal/tag",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/language",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/runes",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/secure/bidirule",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/secure/precis",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/transform",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
@@ -358,10 +274,6 @@
"ImportPath": "golang.org/x/text/unicode/norm",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "golang.org/x/text/width",
"Rev": "b19bf474d317b857955b12035d2c5acb57ce8b01"
},
{
"ImportPath": "gopkg.in/inf.v0",
"Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
@@ -372,339 +284,335 @@
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/imagepolicy/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "006a217681ae70cbacdd66a5e2fca1a61a8ff28e"
"Rev": "fbe336854453ac8e27bffe14e1964555245cbd05"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/fields",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/labels",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/selection",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/types",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/version",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/watch",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
"Rev": "68f9c3a1feb3140df59c67ced62d3a5df8e6c9c2"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/common",
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
"Rev": "2f1e02d3e57b8fb5206c5326bcb65217edc63a8e"
},
{
"ImportPath": "k8s.io/kube-openapi/pkg/util/proto",
"Rev": "39a7bf85c140f972372c2a0d1ee40adbf0c8bfe1"
"Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3"
}
]
}

View File

@@ -63,7 +63,7 @@ To install `client-go` and place its dependencies in your `$GOPATH`:
```sh
go get k8s.io/client-go/...
cd $GOPATH/src/k8s.io/client-go
git checkout v2.0.0
git checkout v6.0.0
# cd 1.5 # only necessary with 1.5 and 1.4 clients.
godep restore ./...
```
@@ -99,7 +99,7 @@ your project:
package: ( your project's import path ) # e.g. github.com/foo/bar
import:
- package: k8s.io/client-go
version: v2.0.0
version: v6.0.0
```
Second, add a Go file that imports `client-go` somewhere in your project,
@@ -132,7 +132,7 @@ requests can override the version manually in `glide.yaml`. For example:
package: ( your project's import path ) # e.g. github.com/foo/bar
import:
- package: k8s.io/client-go
version: v2.0.0
version: v6.0.0
# Use a newer version of go-spew even though client-go wants an old one.
- package: github.com/davecgh/go-spew
version: v1.1.0

View File

@@ -2,12 +2,22 @@
Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster.
We currently recommend using the v4.0.0 tag. See [INSTALL.md](/INSTALL.md) for
We currently recommend using the v6.0.0 tag. See [INSTALL.md](/INSTALL.md) for
detailed installation instructions. `go get k8s.io/client-go/...` works, but
will give you head and doesn't handle the dependencies well.
[![Build Status](https://travis-ci.org/kubernetes/client-go.svg?branch=master)](https://travis-ci.org/kubernetes/client-go)
[![GoDoc](https://godoc.org/k8s.io/client-go?status.svg)](https://godoc.org/k8s.io/client-go)
[![BuildStatus Widget]][BuildStatus Result]
[![GoReport Widget]][GoReport Status]
[![GoDocWidget]][GoDocReference]
[BuildStatus Result]: https://travis-ci.org/kubernetes/client-go
[BuildStatus Widget]: https://travis-ci.org/kubernetes/client-go.svg?branch=master
[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes/client-go
[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes/client-go
[GoDocWidget]: https://godoc.org/k8s.io/client-go?status.svg
[GoDocReference]:https://godoc.org/k8s.io/client-go
## Table of Contents
@@ -17,7 +27,7 @@ will give you head and doesn't handle the dependencies well.
- [Compatibility: client-go <-> Kubernetes clusters](#compatibility-client-go---kubernetes-clusters)
- [Compatibility matrix](#compatibility-matrix)
- [Why do the 1.4 and 1.5 branch contain top-level folder named after the version?](#why-do-the-14-and-15-branch-contain-top-level-folder-named-after-the-version)
- [Kuberentes tags](#kubernetes-tags)
- [Kubernetes tags](#kubernetes-tags)
- [How to get it](#how-to-get-it)
- [How to use it](#how-to-use-it)
- [Dependency management](#dependency-management)
@@ -81,15 +91,16 @@ We will backport bugfixes--but not new features--into older versions of
#### Compatibility matrix
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 |
|---------------------|----------------|----------------|----------------|----------------|----------------|
| client-go 1.4 | ✓ | - | - | - | - |
| client-go 1.5 | + | - | - | - | - |
| client-go 2.0 | +- | ✓ | +- | +- | +- |
| client-go 3.0 | +- | +- | ✓ | - | +- |
| client-go 4.0 | +- | +- | +- | ✓ | +- |
| client-go 5.0 | +- | +- | +- | +- | ✓ |
| client-go HEAD | +- | +- | +- | +- | + |
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 |
|---------------------|----------------|----------------|----------------|----------------|----------------|----------------|
| client-go 1.4 | ✓ | - | - | - | - | - |
| client-go 1.5 | + | - | - | - | - | - |
| client-go 2.0 | +- | ✓ | +- | +- | +- | +- |
| client-go 3.0 | +- | +- | ✓ | - | +- | +- |
| client-go 4.0 | +- | +- | +- | ✓ | +- | +- |
| client-go 5.0 | +- | +- | +- | +- | ✓ | +- |
| client-go 6.0 | +- | +- | +- | +- | +- | ✓ |
| client-go HEAD | +- | +- | +- | +- | +- | + |
Key:
@@ -112,10 +123,11 @@ between client-go versions.
|----------------|--------------------------------------|-------------------------------|
| client-go 1.4 | Kubernetes main repo, 1.4 branch | = - |
| client-go 1.5 | Kubernetes main repo, 1.5 branch | = - |
| client-go 2.0 | Kubernetes main repo, 1.5 branch | |
| client-go 3.0 | Kubernetes main repo, 1.6 branch | |
| client-go 2.0 | Kubernetes main repo, 1.5 branch | = - |
| client-go 3.0 | Kubernetes main repo, 1.6 branch | = - |
| client-go 4.0 | Kubernetes main repo, 1.7 branch | ✓ |
| client-go 5.0 | Kubernetes main repo, 1.8 branch | ✓ |
| client-go 6.0 | Kubernetes main repo, 1.9 branch | ✓ |
| client-go HEAD | Kubernetes main repo, master branch | ✓ |
Key:

3
code-of-conduct.md Normal file
View File

@@ -0,0 +1,3 @@
# Kubernetes Community Code of Conduct
Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md)

View File

@@ -9,8 +9,8 @@ load(
go_test(
name = "go_default_test",
srcs = ["memcache_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/discovery/cached",
library = ":go_default_library",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/client-go/discovery/fake:go_default_library",

View File

@@ -395,15 +395,6 @@ func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
}
func stringDoesntExistIn(str string, slice []string) bool {
for _, s := range slice {
if s == str {
return false
}
}
return true
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *DiscoveryClient) RESTClient() restclient.Interface {

View File

@@ -12,8 +12,8 @@ go_test(
"client_test.go",
"dynamic_util_test.go",
],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/dynamic",
library = ":go_default_library",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",

View File

@@ -8,8 +8,8 @@ load(
go_binary(
name = "create-update-delete-deployment",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/create-update-delete-deployment",
library = ":go_default_library",
)
go_library(

View File

@@ -8,8 +8,8 @@ load(
go_binary(
name = "in-cluster-client-configuration",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/in-cluster-client-configuration",
library = ":go_default_library",
)
go_library(

View File

@@ -8,8 +8,8 @@ load(
go_binary(
name = "out-of-cluster-client-configuration",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/out-of-cluster-client-configuration",
library = ":go_default_library",
)
go_library(

View File

@@ -62,15 +62,18 @@ func main() {
// Examples for error handling:
// - Use helper functions like e.g. errors.IsNotFound()
// - And/or cast to StatusError and use its properties like e.g. ErrStatus.Message
_, err = clientset.CoreV1().Pods("default").Get("example-xxxxx", metav1.GetOptions{})
namespace := "default"
pod := "example-xxxxx"
_, err = clientset.CoreV1().Pods(namespace).Get(pod, metav1.GetOptions{})
if errors.IsNotFound(err) {
fmt.Printf("Pod not found\n")
fmt.Printf("Pod %s in namespace %s not found\n", pod, namespace)
} else if statusError, isStatus := err.(*errors.StatusError); isStatus {
fmt.Printf("Error getting pod %v\n", statusError.ErrStatus.Message)
fmt.Printf("Error getting pod %s in namespace %s: %v\n",
pod, namespace, statusError.ErrStatus.Message)
} else if err != nil {
panic(err.Error())
} else {
fmt.Printf("Found pod\n")
fmt.Printf("Found pod %s in namespace %s\n", pod, namespace)
}
time.Sleep(10 * time.Second)

View File

@@ -8,8 +8,8 @@ load(
go_binary(
name = "workqueue",
embed = [":go_default_library"],
importpath = "k8s.io/client-go/examples/workqueue",
library = ":go_default_library",
)
go_library(

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// InitializerConfigurationInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
apps_v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/apps/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ControllerRevisionInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
apps_v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/apps/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DaemonSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
apps_v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/apps/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DeploymentInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
apps_v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/apps/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ReplicaSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
apps_v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/apps/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// StatefulSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
apps_v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ControllerRevisionInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
apps_v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DeploymentInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
apps_v1beta1 "k8s.io/api/apps/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/apps/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// StatefulSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta2
import (
time "time"
apps_v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ControllerRevisionInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta2
import (
time "time"
apps_v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DaemonSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta2
import (
time "time"
apps_v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DeploymentInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta2
import (
time "time"
apps_v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ReplicaSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta2
import (
time "time"
apps_v1beta2 "k8s.io/api/apps/v1beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta2 "k8s.io/client-go/listers/apps/v1beta2"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// StatefulSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
autoscaling_v1 "k8s.io/api/autoscaling/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/autoscaling/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v2beta1
import (
time "time"
autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v2beta1 "k8s.io/client-go/listers/autoscaling/v2beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// HorizontalPodAutoscalerInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
batch_v1 "k8s.io/api/batch/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/batch/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// JobInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
batch_v1beta1 "k8s.io/api/batch/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/batch/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// CronJobInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v2alpha1
import (
time "time"
batch_v2alpha1 "k8s.io/api/batch/v2alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// CronJobInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
certificates_v1beta1 "k8s.io/api/certificates/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/certificates/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// CertificateSigningRequestInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ComponentStatusInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ConfigMapInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// EndpointsInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// EventInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// LimitRangeInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// NamespaceInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// NodeInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PersistentVolumeInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PersistentVolumeClaimInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PodInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PodTemplateInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ReplicationControllerInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ResourceQuotaInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// SecretInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ServiceInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
core_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/core/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ServiceAccountInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
events_v1beta1 "k8s.io/api/events/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/events/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// EventInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DaemonSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// DeploymentInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// IngressInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PodSecurityPolicyInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ReplicaSetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,10 @@ limitations under the License.
package informers
import (
reflect "reflect"
sync "sync"
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,9 +43,6 @@ import (
storage "k8s.io/client-go/informers/storage"
kubernetes "k8s.io/client-go/kubernetes"
cache "k8s.io/client-go/tools/cache"
reflect "reflect"
sync "sync"
time "time"
)
type sharedInformerFactory struct {

View File

@@ -20,6 +20,7 @@ package informers
import (
"fmt"
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
v1 "k8s.io/api/apps/v1"

View File

@@ -19,11 +19,12 @@ limitations under the License.
package internalinterfaces
import (
time "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
kubernetes "k8s.io/client-go/kubernetes"
cache "k8s.io/client-go/tools/cache"
time "time"
)
type NewInformerFunc func(kubernetes.Interface, time.Duration) cache.SharedIndexInformer

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
networking_v1 "k8s.io/api/networking/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/networking/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// NetworkPolicyInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
policy_v1beta1 "k8s.io/api/policy/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/policy/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PodDisruptionBudgetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
rbac_v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/rbac/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
rbac_v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/rbac/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
rbac_v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/rbac/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
rbac_v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/rbac/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/rbac/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// ClusterRoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
rbac_v1beta1 "k8s.io/api/rbac/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/rbac/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// RoleBindingInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PriorityClassInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
settings_v1alpha1 "k8s.io/api/settings/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/settings/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// PodPresetInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1
import (
time "time"
storage_v1 "k8s.io/api/storage/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1 "k8s.io/client-go/listers/storage/v1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// StorageClassInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1alpha1
import (
time "time"
storage_v1alpha1 "k8s.io/api/storage/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/storage/v1alpha1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// VolumeAttachmentInformer provides access to a shared informer and lister for

View File

@@ -19,6 +19,8 @@ limitations under the License.
package v1beta1
import (
time "time"
storage_v1beta1 "k8s.io/api/storage/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -27,7 +29,6 @@ import (
kubernetes "k8s.io/client-go/kubernetes"
v1beta1 "k8s.io/client-go/listers/storage/v1beta1"
cache "k8s.io/client-go/tools/cache"
time "time"
)
// StorageClassInformer provides access to a shared informer and lister for

View File

@@ -95,7 +95,15 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
fakePtr := testing.Fake{}
fakePtr.AddReactor("*", "*", testing.ObjectReaction(o))
fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil))
fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
gvr := action.GetResource()
ns := action.GetNamespace()
watch, err := o.Watch(gvr, ns)
if err != nil {
return false, nil, err
}
return true, watch, nil
})
return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}}
}

View File

@@ -103,5 +103,4 @@ func AddToScheme(scheme *runtime.Scheme) {
storagev1beta1.AddToScheme(scheme)
storagev1.AddToScheme(scheme)
storagev1alpha1.AddToScheme(scheme)
}

View File

@@ -103,5 +103,4 @@ func AddToScheme(scheme *runtime.Scheme) {
storagev1beta1.AddToScheme(scheme)
storagev1.AddToScheme(scheme)
storagev1alpha1.AddToScheme(scheme)
}

View File

@@ -35,8 +35,8 @@ go_library(
go_test(
name = "go_default_test",
srcs = ["daemonset_expansion_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/listers/extensions/v1beta1",
library = ":go_default_library",
deps = [
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/api/extensions/v1beta1:go_default_library",

View File

@@ -9,8 +9,8 @@ load(
go_test(
name = "go_default_test",
srcs = ["azure_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/plugin/pkg/client/auth/azure",
library = ":go_default_library",
deps = ["//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library"],
)

View File

@@ -9,8 +9,8 @@ load(
go_test(
name = "go_default_test",
srcs = ["gcp_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/plugin/pkg/client/auth/gcp",
library = ":go_default_library",
deps = ["//vendor/golang.org/x/oauth2:go_default_library"],
)

View File

@@ -9,8 +9,8 @@ load(
go_test(
name = "go_default_test",
srcs = ["oidc_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/plugin/pkg/client/auth/oidc",
library = ":go_default_library",
)
go_library(

View File

@@ -9,8 +9,8 @@ load(
go_test(
name = "go_default_test",
srcs = ["openstack_test.go"],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/plugin/pkg/client/auth/openstack",
library = ":go_default_library",
)
go_library(

View File

@@ -16,8 +16,8 @@ go_test(
"url_utils_test.go",
"urlbackoff_test.go",
],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/rest",
library = ":go_default_library",
deps = [
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/google/gofuzz:go_default_library",

View File

@@ -71,10 +71,6 @@ type Config struct {
// TODO: demonstrate an OAuth2 compatible client.
BearerToken string
// CacheDir is the directory where we'll store HTTP cached responses.
// If set to empty string, no caching mechanism will be used.
CacheDir string
// Impersonate is the configuration that RESTClient will use for impersonation.
Impersonate ImpersonationConfig
@@ -434,7 +430,6 @@ func CopyConfig(config *Config) *Config {
Username: config.Username,
Password: config.Password,
BearerToken: config.BearerToken,
CacheDir: config.CacheDir,
Impersonate: ImpersonationConfig{
Groups: config.Impersonate.Groups,
Extra: config.Impersonate.Extra,

View File

@@ -267,7 +267,6 @@ func TestAnonymousConfig(t *testing.T) {
expected.BearerToken = ""
expected.Username = ""
expected.Password = ""
expected.CacheDir = ""
expected.AuthProvider = nil
expected.AuthConfigPersister = nil
expected.TLSClientConfig.CertData = nil

View File

@@ -89,7 +89,6 @@ func (c *Config) TransportConfig() (*transport.Config, error) {
},
Username: c.Username,
Password: c.Password,
CacheDir: c.CacheDir,
BearerToken: c.BearerToken,
Impersonate: transport.ImpersonationConfig{
UserName: c.Impersonate.UserName,

View File

@@ -35,8 +35,8 @@ go_test(
"client_test.go",
"roundtrip_test.go",
],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/scale",
library = ":go_default_library",
deps = [
"//vendor/github.com/stretchr/testify/assert:go_default_library",
"//vendor/k8s.io/api/apps/v1beta1:go_default_library",

View File

@@ -21,6 +21,7 @@ import (
autoscaling "k8s.io/api/autoscaling/v1"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/dynamic"
@@ -129,21 +130,29 @@ func (c *namespacedScaleClient) Get(resource schema.GroupResource, name string)
return nil, fmt.Errorf("unable to get client for %s: %v", resource.String(), err)
}
rawObj, err := c.client.clientBase.Get().
result := c.client.clientBase.Get().
AbsPath(path).
Namespace(c.namespace).
Resource(gvr.Resource).
Name(name).
SubResource("scale").
Do().
Get()
Do()
if err := result.Error(); err != nil {
return nil, fmt.Errorf("could not fetch the scale for %s %s: %v", resource.String(), name, err)
}
scaleBytes, err := result.Raw()
if err != nil {
return nil, err
}
decoder := scaleConverter.codecs.UniversalDecoder(scaleConverter.ScaleVersions()...)
rawScaleObj, err := runtime.Decode(decoder, scaleBytes)
if err != nil {
return nil, err
}
// convert whatever this is to autoscaling/v1.Scale
scaleObj, err := scaleConverter.ConvertToVersion(rawObj, autoscaling.SchemeGroupVersion)
scaleObj, err := scaleConverter.ConvertToVersion(rawScaleObj, autoscaling.SchemeGroupVersion)
if err != nil {
return nil, fmt.Errorf("received an object from a /scale endpoint which was not convertible to autoscaling Scale: %v", err)
}
@@ -158,7 +167,7 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut
}
// Currently, a /scale endpoint can receive and return different scale types.
// Until we hvae support for the alternative API representations proposal,
// Until we have support for the alternative API representations proposal,
// we need to deal with sending and accepting differnet API versions.
// figure out what scale we actually need here
@@ -170,25 +179,38 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut
// convert this to whatever this endpoint wants
scaleUpdate, err := scaleConverter.ConvertToVersion(scale, desiredGVK.GroupVersion())
if err != nil {
return nil, fmt.Errorf("could not convert scale update to internal Scale: %v", err)
return nil, fmt.Errorf("could not convert scale update to external Scale: %v", err)
}
encoder := scaleConverter.codecs.LegacyCodec(desiredGVK.GroupVersion())
scaleUpdateBytes, err := runtime.Encode(encoder, scaleUpdate)
if err != nil {
return nil, fmt.Errorf("could not encode scale update to external Scale: %v", err)
}
rawObj, err := c.client.clientBase.Put().
result := c.client.clientBase.Put().
AbsPath(path).
Namespace(c.namespace).
Resource(gvr.Resource).
Name(scale.Name).
SubResource("scale").
Body(scaleUpdate).
Do().
Get()
Body(scaleUpdateBytes).
Do()
if err := result.Error(); err != nil {
return nil, fmt.Errorf("could not update the scale for %s %s: %v", resource.String(), scale.Name, err)
}
scaleBytes, err := result.Raw()
if err != nil {
return nil, fmt.Errorf("could not fetch the scale for %s %s: %v", resource.String(), scale.Name, err)
return nil, err
}
decoder := scaleConverter.codecs.UniversalDecoder(scaleConverter.ScaleVersions()...)
rawScaleObj, err := runtime.Decode(decoder, scaleBytes)
if err != nil {
return nil, err
}
// convert whatever this is back to autoscaling/v1.Scale
scaleObj, err := scaleConverter.ConvertToVersion(rawObj, autoscaling.SchemeGroupVersion)
scaleObj, err := scaleConverter.ConvertToVersion(rawScaleObj, autoscaling.SchemeGroupVersion)
if err != nil {
return nil, fmt.Errorf("received an object from a /scale endpoint which was not convertible to autoscaling Scale: %v", err)
}

View File

@@ -23,6 +23,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/discovery"
scalescheme "k8s.io/client-go/scale/scheme"
scaleappsint "k8s.io/client-go/scale/scheme/appsint"
@@ -124,6 +125,7 @@ func NewDiscoveryScaleKindResolver(client discovery.ServerResourcesInterface) Sc
// ScaleConverter knows how to convert between external scale versions.
type ScaleConverter struct {
scheme *runtime.Scheme
codecs serializer.CodecFactory
internalVersioner runtime.GroupVersioner
}
@@ -141,6 +143,7 @@ func NewScaleConverter() *ScaleConverter {
return &ScaleConverter{
scheme: scheme,
codecs: serializer.NewCodecFactory(scheme),
internalVersioner: runtime.NewMultiGroupVersioner(
scalescheme.SchemeGroupVersion,
schema.GroupKind{Group: scaleext.GroupName, Kind: "Scale"},
@@ -156,6 +159,22 @@ func (c *ScaleConverter) Scheme() *runtime.Scheme {
return c.scheme
}
func (c *ScaleConverter) Codecs() serializer.CodecFactory {
return c.codecs
}
func (c *ScaleConverter) ScaleVersions() []schema.GroupVersion {
return []schema.GroupVersion{
scaleautoscaling.SchemeGroupVersion,
scalescheme.SchemeGroupVersion,
scaleext.SchemeGroupVersion,
scaleextint.SchemeGroupVersion,
scaleappsint.SchemeGroupVersion,
scaleappsv1beta1.SchemeGroupVersion,
scaleappsv1beta2.SchemeGroupVersion,
}
}
// ConvertToVersion converts the given *external* input object to the given output *external* output group-version.
func (c *ScaleConverter) ConvertToVersion(in runtime.Object, outVersion schema.GroupVersion) (runtime.Object, error) {
scaleInt, err := c.scheme.ConvertToVersion(in, c.internalVersioner)

View File

@@ -3,6 +3,7 @@ package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_test",
)
go_library(
@@ -28,6 +29,24 @@ go_library(
],
)
go_test(
name = "go_default_test",
srcs = [
"fixture_test.go",
],
embed = [":go_default_library"],
importpath = "k8s.io/client-go/testing",
deps = [
"//vendor/github.com/stretchr/testify/assert:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),

View File

@@ -29,6 +29,11 @@ import (
restclient "k8s.io/client-go/rest"
)
// FakeWatchBufferSize is the max num of watch event can be buffered in the
// watch channel. Note that when watch event overflows or exceed this buffer
// size, manipulations via fake client may be blocked.
const FakeWatchBufferSize = 128
// ObjectTracker keeps track of objects. It is intended to be used to
// fake calls to a server by returning objects based on their kind,
// namespace and name.
@@ -54,6 +59,10 @@ type ObjectTracker interface {
// didn't exist in the tracker prior to deletion, Delete returns
// no error.
Delete(gvr schema.GroupVersionResource, ns, name string) error
// Watch watches objects from the tracker. Watch returns a channel
// which will push added / modified / deleted object.
Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error)
}
// ObjectScheme abstracts the implementation of common operations on objects.
@@ -132,6 +141,13 @@ type tracker struct {
decoder runtime.Decoder
lock sync.RWMutex
objects map[schema.GroupVersionResource][]runtime.Object
// The value type of watchers is a map of which the key is either a namespace or
// all/non namespace aka "" and its value is list of fake watchers. Each of
// fake watcher holds a buffered channel of size "FakeWatchBufferSize" which
// is default to 128. Manipulations on resources will broadcast the notification
// events into the watchers' channel and note that too many unhandled event may
// potentially block the tracker.
watchers map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher
}
var _ ObjectTracker = &tracker{}
@@ -140,9 +156,10 @@ var _ ObjectTracker = &tracker{}
// of objects for the fake clientset. Mostly useful for unit tests.
func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracker {
return &tracker{
scheme: scheme,
decoder: decoder,
objects: make(map[schema.GroupVersionResource][]runtime.Object),
scheme: scheme,
decoder: decoder,
objects: make(map[schema.GroupVersionResource][]runtime.Object),
watchers: make(map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher),
}
}
@@ -185,6 +202,19 @@ func (t *tracker) List(gvr schema.GroupVersionResource, gvk schema.GroupVersionK
return list.DeepCopyObject(), nil
}
func (t *tracker) Watch(gvr schema.GroupVersionResource, ns string) (watch.Interface, error) {
t.lock.Lock()
defer t.lock.Unlock()
fakewatcher := watch.NewFakeWithChanSize(FakeWatchBufferSize, true)
if _, exists := t.watchers[gvr]; !exists {
t.watchers[gvr] = make(map[string][]*watch.FakeWatcher)
}
t.watchers[gvr][ns] = append(t.watchers[gvr][ns], fakewatcher)
return fakewatcher, nil
}
func (t *tracker) Get(gvr schema.GroupVersionResource, ns, name string) (runtime.Object, error) {
errNotFound := errors.NewNotFound(gvr.GroupResource(), name)
@@ -263,6 +293,19 @@ func (t *tracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns
return t.add(gvr, obj, ns, true)
}
func (t *tracker) getWatches(gvr schema.GroupVersionResource, ns string) []*watch.FakeWatcher {
watches := []*watch.FakeWatcher{}
if t.watchers[gvr] != nil {
if w := t.watchers[gvr][ns]; w != nil {
watches = append(watches, w...)
}
if w := t.watchers[gvr][""]; w != nil {
watches = append(watches, w...)
}
}
return watches
}
func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns string, replaceExisting bool) error {
t.lock.Lock()
defer t.lock.Unlock()
@@ -296,6 +339,9 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st
}
if oldMeta.GetNamespace() == newMeta.GetNamespace() && oldMeta.GetName() == newMeta.GetName() {
if replaceExisting {
for _, w := range t.getWatches(gvr, ns) {
w.Modify(obj)
}
t.objects[gvr][i] = obj
return nil
}
@@ -310,6 +356,10 @@ func (t *tracker) add(gvr schema.GroupVersionResource, obj runtime.Object, ns st
t.objects[gvr] = append(t.objects[gvr], obj)
for _, w := range t.getWatches(gvr, ns) {
w.Add(obj)
}
return nil
}
@@ -342,7 +392,11 @@ func (t *tracker) Delete(gvr schema.GroupVersionResource, ns, name string) error
return err
}
if objMeta.GetNamespace() == ns && objMeta.GetName() == name {
obj := t.objects[gvr][i]
t.objects[gvr] = append(t.objects[gvr][:i], t.objects[gvr][i+1:]...)
for _, w := range t.getWatches(gvr, ns) {
w.Delete(obj)
}
found = true
break
}

192
testing/fixture_test.go Normal file
View File

@@ -0,0 +1,192 @@
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package testing
import (
"fmt"
"math/rand"
"strconv"
"sync"
"testing"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/watch"
)
func getArbitraryResource(s schema.GroupVersionResource, name, namespace string) *unstructured.Unstructured {
return &unstructured.Unstructured{
Object: map[string]interface{}{
"kind": s.Resource,
"apiVersion": s.Version,
"metadata": map[string]interface{}{
"name": name,
"namespace": namespace,
"generateName": "test_generateName",
"uid": "test_uid",
"resourceVersion": "test_resourceVersion",
"selfLink": "test_selfLink",
},
"data": strconv.Itoa(rand.Int()),
},
}
}
func TestWatchCallNonNamespace(t *testing.T) {
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
testObj := getArbitraryResource(testResource, "test_name", "test_namespace")
accessor, err := meta.Accessor(testObj)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
ns := accessor.GetNamespace()
scheme := runtime.NewScheme()
codecs := serializer.NewCodecFactory(scheme)
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
watch, err := o.Watch(testResource, ns)
go func() {
err := o.Create(testResource, testObj, ns)
if err != nil {
t.Errorf("test resource creation failed: %v", err)
}
}()
out := <-watch.ResultChan()
assert.Equal(t, testObj, out.Object, "watched object mismatch")
}
func TestWatchCallAllNamespace(t *testing.T) {
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
testObj := getArbitraryResource(testResource, "test_name", "test_namespace")
accessor, err := meta.Accessor(testObj)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
ns := accessor.GetNamespace()
scheme := runtime.NewScheme()
codecs := serializer.NewCodecFactory(scheme)
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
w, err := o.Watch(testResource, "test_namespace")
wAll, err := o.Watch(testResource, "")
go func() {
err := o.Create(testResource, testObj, ns)
assert.NoError(t, err, "test resource creation failed")
}()
out := <-w.ResultChan()
outAll := <-wAll.ResultChan()
assert.Equal(t, watch.Added, out.Type, "watch event mismatch")
assert.Equal(t, watch.Added, outAll.Type, "watch event mismatch")
assert.Equal(t, testObj, out.Object, "watched created object mismatch")
assert.Equal(t, testObj, outAll.Object, "watched created object mismatch")
go func() {
err := o.Update(testResource, testObj, ns)
assert.NoError(t, err, "test resource updating failed")
}()
out = <-w.ResultChan()
outAll = <-wAll.ResultChan()
assert.Equal(t, watch.Modified, out.Type, "watch event mismatch")
assert.Equal(t, watch.Modified, outAll.Type, "watch event mismatch")
assert.Equal(t, testObj, out.Object, "watched updated object mismatch")
assert.Equal(t, testObj, outAll.Object, "watched updated object mismatch")
go func() {
err := o.Delete(testResource, "test_namespace", "test_name")
assert.NoError(t, err, "test resource deletion failed")
}()
out = <-w.ResultChan()
outAll = <-wAll.ResultChan()
assert.Equal(t, watch.Deleted, out.Type, "watch event mismatch")
assert.Equal(t, watch.Deleted, outAll.Type, "watch event mismatch")
assert.Equal(t, testObj, out.Object, "watched deleted object mismatch")
assert.Equal(t, testObj, outAll.Object, "watched deleted object mismatch")
}
func TestWatchCallMultipleInvocation(t *testing.T) {
cases := []struct {
name string
op watch.EventType
}{
{
"foo",
watch.Added,
},
{
"bar",
watch.Added,
},
{
"bar",
watch.Modified,
},
{
"foo",
watch.Deleted,
},
{
"bar",
watch.Deleted,
},
}
scheme := runtime.NewScheme()
codecs := serializer.NewCodecFactory(scheme)
testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"}
o := NewObjectTracker(scheme, codecs.UniversalDecoder())
watchNamespaces := []string{
"",
"",
"test_namespace",
"test_namespace",
}
var wg sync.WaitGroup
wg.Add(len(watchNamespaces))
for idx, watchNamespace := range watchNamespaces {
i := idx
w, err := o.Watch(testResource, watchNamespace)
go func() {
assert.NoError(t, err, "watch invocation failed")
for _, c := range cases {
fmt.Printf("%#v %#v\n", c, i)
event := <-w.ResultChan()
accessor, err := meta.Accessor(event.Object)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
assert.Equal(t, c.op, event.Type, "watch event mismatched")
assert.Equal(t, c.name, accessor.GetName(), "watched object mismatch")
}
wg.Done()
}()
}
for _, c := range cases {
switch c.op {
case watch.Added:
obj := getArbitraryResource(testResource, c.name, "test_namespace")
o.Create(testResource, obj, "test_namespace")
case watch.Modified:
obj := getArbitraryResource(testResource, c.name, "test_namespace")
o.Update(testResource, obj, "test_namespace")
case watch.Deleted:
o.Delete(testResource, "test_namespace", c.name)
}
}
wg.Wait()
}

View File

@@ -0,0 +1,26 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
],
importpath = "k8s.io/client-go/tools/bootstrap/token/api",
visibility = ["//visibility:public"],
deps = ["//vendor/k8s.io/api/core/v1:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

Some files were not shown because too many files have changed in this diff Show More