Commit Graph

241 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
2b201ead11 Fix and update comment with api.Scheme 2017-10-30 19:54:02 +01:00
Kubernetes Submit Queue
900c0761e3 Merge pull request #53722 from deads2k/rbac-01-allow-star
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>.

allow */subresource in rbac policy rules

xref #29698
xref #38756
xref #49504
xref #38810

Allow `*/subresource` format in RBAC policy rules to support polymorphic subresources like `*/scale` for HPA.

@DirectXMan12 fyi

```release-note
RBAC PolicyRules now allow resource=`*/<subresource>` to cover `any-resource/<subresource>`.   For example, `*/scale` covers `replicationcontroller/scale`.
```
2017-10-18 14:02:05 -07:00
Dr. Stefan Schimanski
cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
David Eads
e8a703b651 allow */subresource in rbac policy rules 2017-10-16 16:17:51 -04:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue
aa7d9b1da9 Merge pull request #52950 from liggitt/persist-rbac-v1
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>.

Change RBAC storage version to v1 for 1.9

v1 was introduced in 1.8, but storage version remained at v1beta1 to accommodate HA rolling upgrades. in 1.9, we can change the persisted and preferred version to v1

```release-note
RBAC objects are now stored in etcd in v1 format. After completing an upgrade to 1.9, RBAC objects (Roles, RoleBindings, ClusterRoles, ClusterRoleBindings) should be migrated to ensure all persisted objects are written in `v1` format, prior to `v1alpha1` support being removed in a future release.
```
2017-10-03 00:24:31 -07:00
Monis Khan
5eb5b3e402
Correct APIGroup for RoleBindingBuilder Subjects
This change corrects RoleBindingBuilder to use the RBAC API group
with users and groups as subjects (service accounts use the empty
string since they are in the legacy core group).  This is based on
the defaulting in pkg/apis/rbac/v1/defaults.go#SetDefaults_Subject.
This is required because the bootstrap RBAC data is built with these
helpers and does not go through defaulting, whereas the data
retrieved from the server has already gone through defaulting.  This
can lead to the reconciliation code incorrectly adding duplicate
subjects because it believes that they are missing (since the API
groups do not match).

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-09-30 12:15:43 -04:00
Jordan Liggitt
232db3b888
Change RBAC storage version to v1 for 1.9 2017-09-25 10:02:21 -04:00
Kubernetes Submit Queue
bd813ce089 Merge pull request #51058 from thockin/codegen-dbg
Automatic merge from submit-queue (batch tested with PRs 51666, 49829, 51058, 51004, 50938)

Add debugging to the codegen process

This was useful when debugging a different problem.
2017-09-02 22:52:06 -07:00
Tim Hockin
e73b27cbce Add debugging to the codegen process 2017-08-25 14:08:42 -07:00
Jordan Liggitt
c7defb806f
Generated files 2017-08-25 15:01:08 -04:00
Monis Khan
dd06794bc2
Add enj as reviewer to OWNERS
Adding myself as a reviewer for the following areas:

- API
- auth
- registry
- storage (etcd)

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-08-17 20:42:46 -04:00
Kubernetes Submit Queue
9f902fef24 Merge pull request #50094 from sttts/sttts-no-importprefix
Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)

apimachinery: remove pre-apigroups import path logic

Replacing #50093.
2017-08-14 12:14:55 -07:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
zhouhaibing089
2e5dc7d727 add fuzzer dir for each apigroup 2017-08-11 15:12:57 +08:00
Dr. Stefan Schimanski
8728576236 apimachinery: remove pre-apigroups import prefix logic 2017-08-10 13:07:54 +02:00
Jordan Liggitt
06c49423ed
Generated files 2017-08-09 17:04:54 -04:00
Jordan Liggitt
dd7be70a4a
Add rbac.authorization.k8s.io/v1 2017-08-09 17:04:54 -04:00
supereagle
a1c880ece3 update generated deepcopy code 2017-07-31 22:33:00 +08:00
Kubernetes Submit Queue
7988797233 Merge pull request #47897 from xilabao/dead-code-in-rbac-helper
Automatic merge from submit-queue (batch tested with PRs 49238, 49595, 43494, 47897, 48905)

remove dead code in rbac helper

**What this PR does / why we need it**:
validated in `case len(r.PolicyRule.NonResourceURLs) > 0:` .

**Which issue this PR fixes**: #49540

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-28 02:13:02 -07:00
Michal Fojtik
976488efec
update tags in types for new genclient syntax 2017-07-24 22:05:21 +02:00
Dr. Stefan Schimanski
8dd0989b39 Update generated code 2017-07-18 09:28:49 +02:00
Dr. Stefan Schimanski
39d95b9b06 deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells
2017-07-18 09:28:47 +02:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
dca135d5f7 run ./remove-original-proto.sh to remove the old proto 2017-06-22 11:30:58 -07:00
Chao Xu
e185f7e277 run hack/update-codegen.sh 2017-06-22 11:30:58 -07:00
Chao Xu
48134bc02a manually fix unit tests in pkg/api/v1
more manually fix pkg/api/v1 unit tests

change ImportPrefix

manually fix pkg/api unit tests
2017-06-22 11:30:52 -07:00
Chao Xu
cd7e7afaaa run pkg/apis/make-origin-dir-compile, pkg/apis compile 2017-06-22 11:30:51 -07:00
Chao Xu
4fb28dafad pkg/apis/move-external-types-for-apis.sh, k8s.io/api compiles 2017-06-22 11:30:51 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
xilabao
ece3188507 remove dead code in rbac helper 2017-06-22 17:48:54 +08:00
Clayton Coleman
606825eea4
generated: protobuf with stable map ordering 2017-06-17 14:32:51 -04:00
Kubernetes Submit Queue
78a9e4feba Merge pull request #46375 from deads2k/auth-05-nameprotection
Automatic merge from submit-queue (batch tested with PRs 46456, 46675, 46676, 46416, 46375)

prevent illegal verb/name combinations in default policy rules

Names aren't presented with some kinds of "normal" verbs.  This prevents people from making common mistakes.

@timothysc as I noted in your pull.  This will prevent some classes of errors.
2017-06-03 00:28:53 -07:00
Kubernetes Submit Queue
f5bcd98d5e Merge pull request #46326 from xilabao/add-role-to-describe-command
Automatic merge from submit-queue (batch tested with PRs 46432, 46701, 46326, 40848, 46396)

add role/clusterrole to describe.go

**What this PR does / why we need it**:
```
# ./cluster/kubectl.sh describe clusterrole system:kube-scheduler 
Name:		system:kube-scheduler
Labels:		kubernetes.io/bootstrapping=rbac-defaults
Annotations:	rbac.authorization.kubernetes.io/autoupdate=true
PolicyRule:
  Resources			Non-Resource URLs	Resource Names		Verbs
  ---------			-----------------	--------------		-----
  bindings			[]			[]			[create]
  endpoints			[]			[]			[create]
  endpoints			[]			[kube-scheduler]	[delete]
  endpoints			[]			[kube-scheduler]	[get]
  endpoints			[]			[kube-scheduler]	[patch]
  endpoints			[]			[kube-scheduler]	[update]
  events			[]			[]			[create patch update]
  nodes				[]			[]			[get list watch]
  persistentvolumeclaims	[]			[]			[get list watch]
  persistentvolumes		[]			[]			[get list watch]
  pods				[]			[]			[get list watch]
  pods/binding			[]			[]			[create]
  pods/status			[]			[]			[update]
  replicasets.extensions	[]			[]			[get list watch]
  replicationcontrollers	[]			[]			[get list watch]
  services			[]			[]			[get list watch]
  statefulsets.apps		[]			[]			[get list watch]

```
**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-02 11:47:07 -07:00
Solly Ross
8d03536d00 Regenerate protobuf and client-go
This commit regenerates the protobuf as per the recent generation
changes (removing erroneous imports, adding k8s.io/metrics), and
syncs the changes to client-go (which also ensures that client-go
protobuf IDL has the correct package names).
2017-05-27 00:37:49 -04:00
deads2k
5539a6721d prevent illegal verb/name combinations in default policy rules 2017-05-26 12:20:27 -04:00
xilabao
9fe2ef54ba add policy_compact to rbac validation 2017-05-26 13:22:38 +08:00
Tim St. Clair
dd9e0ecd06
Misc proto changes 2017-05-18 10:39:06 -07:00
Clayton Coleman
bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
Christoph Blecker
4361a9146e
Update generated files 2017-05-17 00:59:52 -07:00
mbohlool
103c1bfc1e Update generated files 2017-05-15 15:34:33 -07:00
deads2k
afc5ae1539 generated 2017-04-28 11:28:37 -04:00
Kubernetes Submit Queue
b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Chao Xu
d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Lucas Käldström
f32e6d8a89
Update protobuf 2017-04-25 23:50:31 +03:00
Jordan Liggitt
67360883bc
Switch to pointer to policy rule, visit and short circuit during authorization 2017-04-20 10:52:53 -04:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Jordan Liggitt
ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
Kubernetes Submit Queue
1ba9202cd8 Merge pull request #42781 from spzala/conversionlint
Automatic merge from submit-queue

Conversionlint

**What this PR does / why we need it**:
This PR adds a comment placeholder for the exported or public functions in conversion generator files. Such functions without a comment results into golint failure in various generated files. The changes in this patch takes care of about 36 related lint failures. 
Given below is an example lint error, 
zz_generated.conversion.go:91:1: exported function Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be unexported

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Considering minor changes no issue is created. 

**Special notes for your reviewer**:
Hello, I am trying to fix golint failures as we see them in the kubernetes-incubator/service-catalog project. I have separate PRs opened for lint issues related to other generator code which are in separate libraries like gengo. Thanks! 

**Release note**:

```release-note
```
2017-04-12 03:02:26 -07:00
Sahdev P. Zala
08639023d0 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.
2017-04-11 15:34:51 -04:00
Timothy St. Clair
818dd4443d Update generated due to proto-shift 2017-04-11 08:48:59 -05:00
Jordan Liggitt
939ca532aa
generated files 2017-03-20 23:57:38 -04:00
deads2k
e24b1c0c25 add namespaced role bindings 2017-02-28 13:04:23 -05:00
Dr. Stefan Schimanski
395be3b401 apimachinery: handle duplicated and conflicting type registration 2017-02-27 21:58:21 +01:00
Jordan Liggitt
26b42d350d
Reconcile bootstrap clusterroles on server start 2017-02-14 12:33:05 -05:00
Jordan Liggitt
09d51e3ee8
generated files 2017-02-13 15:33:10 -05:00
Jordan Liggitt
2a76fa1c8f
Switch RBAC subject apiVersion to apiGroup in v1beta1 2017-02-13 15:33:09 -05:00
Dr. Stefan Schimanski
b51252ab5b Update protobufs 2017-02-02 06:58:29 +01:00
Kubernetes Submit Queue
ac29a05908 Merge pull request #40392 from madhusudancs/federation-kubefed-rbac
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

[Federation][kubefed] Create a dedicated service account for federation controller manager in the host cluster and give it appropriate permissions.

Ref: Issue #39555

cc @kubernetes/sig-federation-pr-reviews @kubernetes/sig-auth-misc @kubernetes/sig-auth-pr-reviews 

```release-note
kubefed init creates a service account for federation controller manager in the federation-system namespace and binds that service account to the federation-system:federation-controller-manager role that has read and list access on secrets in the federation-system namespace. 
```
2017-01-31 01:16:48 -08:00
Madhusudan.C.S
05a0f64903 Address review comments. 2017-01-30 14:31:15 -08:00
deads2k
c9a008dff3 move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
Kubernetes Submit Queue
2cb17cc677 Merge pull request #40426 from sttts/sttts-more-cutoffs-3
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 3

Compare commit subjects.

This is the first step to get `apiserver_test.go` and `watch_test.go` in `pkg/genericapiserver/endpoints` cutoff from k8s.io/kubernetes dependencies.

After this we have to sync client-go and then "episode 4" can go in.

approved based on #40363
2017-01-30 05:57:49 -08:00
Kubernetes Submit Queue
f1cd8508e5 Merge pull request #40596 from liggitt/auth-owners
Automatic merge from submit-queue

Update authn/authz owners and reviewers

Add myself as potential reviewer to several authn/authz-related packages.

Add @deads2k as approver to several packages he wrote.
2017-01-29 20:57:05 -08:00
Dr. Stefan Schimanski
44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski
bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Jordan Liggitt
07f14ebc6f
Update authn/authz owners and reviewers 2017-01-27 08:55:44 -05:00
deads2k
c6fd6941a1 move pkg/api/validation/path to apimachinery 2017-01-27 08:49:29 -05:00
Madhusudan.C.S
4f969bdfc2 Add helpers for creating an RBAC RoleBinding. 2017-01-26 20:29:07 -08:00
Clayton Coleman
7b1c715496
generated: Move references to metav1.*Options 2017-01-24 13:41:48 -05:00
Clayton Coleman
fca7e00608
Move all *Options to metav1 2017-01-24 13:15:26 -05:00
Clayton Coleman
9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Clayton Coleman
f623a8c908
Make all groups use metav1.AddToGroupVersion for ListOptions 2017-01-23 16:53:18 -05:00
deads2k
7cc9702402 separate announce factories 2017-01-23 08:02:14 -05:00
deads2k
9d3dfbf630 move apimachinery/announced to apimachinery 2017-01-20 12:20:13 -05:00
deads2k
dfd8db8ae9 allow API groups to be installed and registered in multiple schemes 2017-01-20 12:19:49 -05:00
deads2k
d1fec7068f generated 2017-01-18 10:35:46 -05:00
deads2k
e74efe41a0 add rbac v1beta1 2017-01-18 09:49:33 -05:00
deads2k
cbf8ea2a6f remove fields not promoted to beta 2017-01-18 09:49:33 -05:00
Clayton Coleman
660095776a
generated: staging 2017-01-17 16:17:20 -05:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman
36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Clayton Coleman
dcd6e1d833
generated: protobuf for types 2017-01-13 16:20:04 -05:00
Kubernetes Submit Queue
e73d66ce44 Merge pull request #37557 from sttts/sttts-update-ugorji
Automatic merge from submit-queue

Update ugorji/go/codec godep

In order to pick-up https://github.com/ugorji/go/issues/119 and to get rid of the workaround at https://github.com/kubernetes/kubernetes/pull/36909/files#diff-a09eb061a0fb0ef3c9ef9d696f1ad0b4R426.
2017-01-12 02:36:16 -08:00
Dr. Stefan Schimanski
2741eb7fdb Update generated files 2017-01-11 21:54:07 +01:00
Dr. Stefan Schimanski
4a1d507756 Update bazel 2017-01-11 18:53:24 +01:00
Dr. Stefan Schimanski
cf60bec396 Split out server side code from pkg/apis/rbac/validation 2017-01-11 18:31:58 +01:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k
b26e9dce9f remove API to server library dependency 2017-01-10 13:38:30 -05:00
Clayton Coleman
e5019de260
refactor: Move versioned/watch to meta/v1 2017-01-06 23:45:03 -05:00
Kubernetes Submit Queue
07ce35a325 Merge pull request #39490 from deads2k/generic-16-bump-gengo
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

bump gengo to latest

bumping gengo to limit surprises while working on https://github.com/kubernetes/kubernetes/pull/39475

@kubernetes/sig-api-machinery-misc
2017-01-06 11:30:13 -08:00
deads2k
f86447c9a0 files regenerated after update 2017-01-06 11:45:40 -05:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jordan Liggitt
b8c2ad6d42
Deprecate RBAC UserAll, convert v1alpha1 User * rolebindings to Group system:authenticated 2017-01-04 17:11:16 -05:00
deads2k
ca58ec0237 mechanical changes for move 2017-01-04 10:27:05 -05:00
Dr. Stefan Schimanski
87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Jeff Grafton
fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Mike Danese
161c391f44 autogenerated 2016-12-29 13:04:10 -08:00