Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to dashboard 2.0.0 with metrics scrapper support #5821

Merged
merged 6 commits into from
Apr 25, 2020

Conversation

jseguillon
Copy link
Contributor

@jseguillon jseguillon commented Mar 25, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:
Dashboard 2.0 has now a due date to 6th of april. This PR bumps dashboard to 2.0.0 and add metrics scrapper.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:
I first push this PR with 2.0-rc6 for review and will update to 2.0.0 as soon as it will be released.
Reference deployment for 2.0 is provided by dashboard team

I added a variable for choosing destination namespace since dahsboard team now recommend using "kubernetes-dashboard" for this. I let the variable with the value "kube-system" to avoid introducing breaking changes for kubespray users.

Does this PR introduce a user-facing change?:
None

EDIT : due date changed from 30th of march to 6th of april

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 25, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @jseguillon. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 25, 2020
@jseguillon
Copy link
Contributor Author

/hold wait for 2.0.0 30th of march

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 25, 2020
@jseguillon jseguillon force-pushed the feat-dashboard-2.0 branch 6 times, most recently from d3b62ce to ea9f3f7 Compare March 26, 2020 08:26
@floryut
Copy link
Member

floryut commented Mar 30, 2020

@jseguillon Looks like another rc and not a release for today, hopefully in the next days or so

@jseguillon
Copy link
Contributor Author

@floryut yup I just saw this => I edited PR first comment => due date is now on 6th of april. hope this won't be delayed again 🙏

@Miouge1 Miouge1 added this to the 2.13 milestone Mar 31, 2020
@Miouge1
Copy link
Contributor

Miouge1 commented Mar 31, 2020

Sound good to me, I'm marking this for v2.13, the final release should be ready by then.

/assign

@Miouge1 Miouge1 added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Mar 31, 2020
@jseguillon
Copy link
Contributor Author

jseguillon commented Apr 2, 2020

refering issue for easier tracking : kubernetes/dashboard#4259

@Miouge1
Copy link
Contributor

Miouge1 commented Apr 10, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 10, 2020
@jseguillon
Copy link
Contributor Author

all issues with 2.0.0 milestone are now closed, we can expect tag and release in short time I gues

@floryut floryut mentioned this pull request Apr 10, 2020
@floryut
Copy link
Member

floryut commented Apr 10, 2020

This should fix #5367 & #5284 yay 👍

@madianas
Copy link

madianas commented Apr 20, 2020

Hello!
Thanks for this PR, really looking forward to it.
Found one error though, in this file:
roles/kubernetes-apps/ansible/templates/dashboard.yml.j2

RoleBinding needs a name for the roleRef, line 118

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: {{ dashboard_namespace }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: kubernetes-dashboard
subjects:
  - kind: ServiceAccount
    name: kubernetes-dashboard
    namespace: {{ dashboard_namespace }}

without it I get this error:

error validating data: ValidationError(RoleBinding.roleRef): missing required field \"name\" in io.k8s.api.rbac.v1.RoleRef; if you choose to ignore these errors, turn validation off with --validate=false\n

Here is the full error:

failed: [k2m1] (item={'diff': [], 'src': '/root/.ansible/tmp/ansible-tmp-1587335834.0666761-167586740713535/source', 'changed': True, 'group': 'root', 'uid': 0, 'dest': '/etc/kubernetes/dashboard.yml', 'checksum': '930b0033464bb2005123b9206b8fbc77563803ce', 'md5sum': '08787b749fa2691ac8cf2035990cddfb', 'owner': 'root', 'state': 'file', 'gid': 0, 'secontext': 'system_u:object_r:etc_t:s0', 'mode': '0644', 'invocation': {'module_args': {'directory_mode': None, 'force': True, 'remote_src': None, '_original_basename': 'dashboard.yml.j2', 'owner': None, 'follow': False, 'local_follow': None, 'group': None, 'unsafe_writes': None, 'setype': None, 'content': None, 'serole': None, 'dest': '/etc/kubernetes/dashboard.yml', 'selevel': None, 'regexp': None, 'validate': None, 'src': '/root/.ansible/tmp/ansible-tmp-1587335834.0666761-167586740713535/source', 'checksum': '930b0033464bb2005123b9206b8fbc77563803ce', 'seuser': None, 'delimiter': None, 'mode': None, 'attributes': None, 'backup': False}}, 'size': 8207, 'failed': False, 'item': {'file': 'dashboard.yml', 'type': 'deploy', 'name': 'kubernetes-dashboard'}, 'ansible_loop_var': 'item'}) => {"ansible_loop_var": "item", "changed": false, "item": {"ansible_loop_var": "item", "changed": true, "checksum": "930b0033464bb2005123b9206b8fbc77563803ce", "dest": "/etc/kubernetes/dashboard.yml", "diff": [], "failed": false, "gid": 0, "group": "root", "invocation": {"module_args": {"_original_basename": "dashboard.yml.j2", "attributes": null, "backup": false, "checksum": "930b0033464bb2005123b9206b8fbc77563803ce", "content": null, "delimiter": null, "dest": "/etc/kubernetes/dashboard.yml", "directory_mode": null, "follow": false, "force": true, "group": null, "local_follow": null, "mode": null, "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": "/root/.ansible/tmp/ansible-tmp-1587335834.0666761-167586740713535/source", "unsafe_writes": null, "validate": null}}, "item": {"file": "dashboard.yml", "name": "kubernetes-dashboard", "type": "deploy"}, "md5sum": "08787b749fa2691ac8cf2035990cddfb", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 8207, "src": "/root/.ansible/tmp/ansible-tmp-1587335834.0666761-167586740713535/source", "state": "file", "uid": 0}, "msg": "error running kubectl (/usr/local/bin/kubectl --namespace=kube-system apply --force --filename=/etc/kubernetes/dashboard.yml) command (rc=1), out='secret/kubernetes-dashboard-certs created\nsecret/kubernetes-dashboard-csrf created\nsecret/kubernetes-dashboard-key-holder created\nconfigmap/kubernetes-dashboard-settings created\nserviceaccount/kubernetes-dashboard created\nrole.rbac.authorization.k8s.io/kubernetes-dashboard created\n', err='error: error validating \"/etc/kubernetes/dashboard.yml\": error validating data: ValidationError(RoleBinding.roleRef): missing required field \"name\" in io.k8s.api.rbac.v1.RoleRef; if you choose to ignore these errors, turn validation off with --validate=false\n'"}

@jseguillon
Copy link
Contributor Author

removal of dashboard_metrics_scrapper_enabled is done. tested ok.

but we still need to update doc I think.

any proposal here in comments is welcomed

@jseguillon
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 24, 2020
@floryut
Copy link
Member

floryut commented Apr 24, 2020

removal of dashboard_metrics_scrapper_enabled is done. tested ok.

but we still need to update doc I think.

any proposal here in comments is welcomed

Hum what would you update?

@Miouge1
Copy link
Contributor

Miouge1 commented Apr 24, 2020

I think the https://first_master:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login will not work anymore, which might require to update the docs.

Also a note on the ServiceAccount token might also be welcome in the "getting started" section?

@floryut
Copy link
Member

floryut commented Apr 24, 2020

I think the https://first_master:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login will not work anymore, which might require to update the docs.

Also a note on the ServiceAccount token might also be welcome in the "getting started" section?

Agreed that would help as otherwise people would have to google.

@floryut
Copy link
Member

floryut commented Apr 25, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2020
@Miouge1
Copy link
Contributor

Miouge1 commented Apr 25, 2020

Let's merge this, the doc can be updated in another PR.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jseguillon, Miouge1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2020
@k8s-ci-robot k8s-ci-robot merged commit 98e7a07 into kubernetes-sigs:master Apr 25, 2020
@woopstar
Copy link
Member

@jseguillon the metric scraper deployment is missing priorityClassName: system-cluster-critical

@floryut
Copy link
Member

floryut commented Apr 27, 2020

@jseguillon the metric scraper deployment is missing priorityClassName: system-cluster-critical

@jseguillon would you be available to do a PR with that and the doc improvement ?

LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request May 29, 2020
…s#5821)

* bump to dashboard 2.0 rc6 with metrics scrapper

* fix missing yaml seperator making Replicaset complaining about missing ServiceAccount

* unwanted legay gross hack forgot to remove before

* no  need namespace on CrBinding

* bump to 2.0.0 release

* remove dashboard_metrics_scrapper_enabled
@aviorma
Copy link

aviorma commented Jun 4, 2020

Hi all and @jseguillon

How can i access the dashboard with api-server url ?

(6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy )

i need a way to login without using kubectl proxy ..

Thanks

@floryut
Copy link
Member

floryut commented Jun 4, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants