Bug 1396340 - [DOCS] Document Example Daemonset definition
Summary: [DOCS] Document Example Daemonset definition
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Brandi Munilla
QA Contact: DeShuai Ma
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-18 05:42 UTC by brice
Modified: 2017-03-21 03:30 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 03:30:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description brice 2016-11-18 05:42:28 UTC
https://docs.openshift.com/container-platform/3.3/admin_guide/manage_authorization_policy.html#admin-guide-granting-users-daemonset-permissions

Step 1:

Section describes an example daemonset definition that when attempting to create it, comes with an error:

# oc create -f foo.yaml 
unable to decode "foo.yaml": json: cannot unmarshal array into Go value of type unversioned.TypeMeta

Step 2:

The command creates role name daemonset-admin, not system:daemonset-admin.

https://github.com/openshift/openshift-docs/issues/3243

Comment 4 Brandi Munilla 2017-03-08 15:09:54 UTC
Hi DeShuai,

I updated the documentation for Step 2 in PR#3740[1]. I'm still working on Step 1. In the meantime, would you mind taking a look at the open PR?

Thanks!

[1] https://github.com/openshift/openshift-docs/pull/3740

Comment 5 Luke Meyer 2017-03-08 18:22:20 UTC
The clusterrole definition there is straight out of the aggregated logging definitions, at https://github.com/openshift/origin-aggregated-logging/blob/c083193b838c1e2cb0a2787a2e855950b460c614/deployer/deployer.yaml#L53

Those are working fine as far as we know, so I don't see what could be wrong with this. Nevertheless, it does fail as reported. I'm not sure how to track down why.

Comment 6 Brandi Munilla 2017-03-08 18:59:08 UTC
Thanks, Luke!

Comment 7 DeShuai Ma 2017-03-09 03:23:00 UTC
Add comment to the pr

Comment 8 Kenjiro Nakayama 2017-03-09 06:45:10 UTC
(In reply to Luke Meyer from comment #5)
> The clusterrole definition there is straight out of the aggregated logging
> definitions, at
> https://github.com/openshift/origin-aggregated-logging/blob/
> c083193b838c1e2cb0a2787a2e855950b460c614/deployer/deployer.yaml#L53
> 
> Those are working fine as far as we know, so I don't see what could be wrong
> with this. Nevertheless, it does fail as reported. I'm not sure how to track
> down why.

Since current docs is just copied&pasted the role from deployer.yaml directly, the format is invalid.  Please aware that deployer.yaml defines ClusterRole as one of the "list".
So, I would appreciate it if you could update the doc as below(just simply remove '-' and two whitespaces):

~~~
apiVersion: v1
kind: ClusterRole
metadata:
  name: daemonset-admin
rules:
- resources:
  - daemonsets
  apiGroups:
  - extensions
  verbs:
  - create
  - get
  - list
  - watch
  - delete
  - update
~~~

Then, as for system:daemonset-admin to daemonset-admin, that looks good with current PR.

> Deshuai

Thank you.

Comment 9 Luke Meyer 2017-03-10 21:25:54 UTC
Boy do I feel dumb now :)

Comment 10 Brandi Munilla 2017-03-13 18:20:18 UTC
Thank you, Deshuai and Kenjiro! I updated the PR and removed the hyphen and extraneous spaces.

Comment 11 openshift-github-bot 2017-03-14 18:05:27 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/0bc77e65512966e8ad06a3b9305358f8e9253494
Bug 1396340 Update to example daemonset definition

https://github.com/openshift/openshift-docs/commit/da4eef95bc3a3cc6de058691fc0749e14b89e088
Merge pull request #3740 from bmcelvee/BZ1396340

Bug 1396340 Update to example daemonset definition

Comment 12 Vikram Goyal 2017-03-21 03:30:30 UTC
This is now live here: https://docs.openshift.com/container-platform/3.3/admin_guide/manage_authorization_policy.html#admin-guide-granting-users-daemonset-permissions

Moving this to CLOSED --> CURRENTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.