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

Dashboard Cleanup #83

Merged
merged 3 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resources:
cpuRequestsMissing: error
cpuLimitsMissing: error
memoryRequestsMissing: error
memoryLimitsMissing: error
cpuRequestsMissing: warning
cpuLimitsMissing: warning
memoryRequestsMissing: warning
memoryLimitsMissing: warning
images:
tagNotSpecified: error
pullPolicyNotAlways: ignore
Expand Down
10 changes: 5 additions & 5 deletions deploy/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ metadata:
data:
config.yaml: |
resources:
cpuRequestsMissing: error
cpuLimitsMissing: error
memoryRequestsMissing: error
memoryLimitsMissing: error
cpuRequestsMissing: warning
cpuLimitsMissing: warning
memoryRequestsMissing: warning
memoryLimitsMissing: warning
images:
tagNotSpecified: error
healthChecks:
Expand Down Expand Up @@ -126,7 +126,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
checksum/config: '0d7a7837e74d9179b13cade94ee8f6c11b32920f3c6223fc623da850cd399b42'
checksum/config: '6ec4a4dc87403cae67c01438398a5f1d4ef836ffeaf26a33b685c066b940495a'
name: polaris-dashboard
namespace: polaris
labels:
Expand Down
8 changes: 4 additions & 4 deletions deploy/helm/polaris/values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
config: |
resources:
cpuRequestsMissing: error
cpuLimitsMissing: error
memoryRequestsMissing: error
memoryLimitsMissing: error
cpuRequestsMissing: warning
cpuLimitsMissing: warning
memoryRequestsMissing: warning
memoryLimitsMissing: warning
images:
tagNotSpecified: error
healthChecks:
Expand Down
10 changes: 5 additions & 5 deletions deploy/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ metadata:
data:
config.yaml: |
resources:
cpuRequestsMissing: error
cpuLimitsMissing: error
memoryRequestsMissing: error
memoryLimitsMissing: error
cpuRequestsMissing: warning
cpuLimitsMissing: warning
memoryRequestsMissing: warning
memoryLimitsMissing: warning
images:
tagNotSpecified: error
healthChecks:
Expand Down Expand Up @@ -156,7 +156,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
checksum/config: '0d7a7837e74d9179b13cade94ee8f6c11b32920f3c6223fc623da850cd399b42'
checksum/config: '6ec4a4dc87403cae67c01438398a5f1d4ef836ffeaf26a33b685c066b940495a'
name: polaris-webhook
namespace: polaris
labels:
Expand Down
1 change: 0 additions & 1 deletion docs/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ Related to that, relying on cached versions of a Docker image can become a secur
## Further Reading

- [What's Wrong With The Docker :latest Tag?](https://vsupalov.com/docker-latest-tag/)

- [Kubernetes’ AlwaysPullImages Admission Control — the Importance, Implementation, and Security Vulnerability in its Absence](https://medium.com/@trstringer/kubernetes-alwayspullimages-admission-control-the-importance-implementation-and-security-d83ff3815840)
2 changes: 0 additions & 2 deletions docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@ Having these values appropriately configured ensures that:
## Further Reading

- [Kubernetes Docs: Managing Compute Resources for Containers](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)

- [Kubernetes best practices: Resource requests and limits](https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-resource-requests-and-limits)

- [Vertical Pod Autoscaler (can automatically set resource requests and limits)](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler)
1 change: 0 additions & 1 deletion docs/security-capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ With Kubernetes configuration, these capabilities can be added or removed by adj
## Further Reading

- [Kubernetes Docs: Set capabilities for a Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container)

- [Linux Programmer's Manual: Capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html)
48 changes: 41 additions & 7 deletions pkg/dashboard/assets/css/check-details.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
th, td {
padding: 4px 8px;
vertical-align: top;
}

body {
font-family: "Helvetica", "Arial", sans-serif
font-family: "Muli", "Helvetica", "Arial", sans-serif;
font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
font-family: "Muli", "Helvetica", "Arial", sans-serif
font-family: "Muli", "Helvetica", "Arial", sans-serif;
}

.card.details h1 {
margin: 0 0 20px;
}

.card.details h2 {
margin: 30px 0 10px;
}

.card.details a {
color: #23103a;
}

.card.details a:hover {
color: #657;
}

.card.details ul {
padding: 0 15px;
}

.card.details li {
margin: 5px 0;
}

.card.details table {
border-spacing: 0;
width: 100%;
}

.card.details th, .card.details td {
padding: 4px 12px;
vertical-align: top;
}

.card.details td {
border-top: 1px dotted #ddd;
}
122 changes: 90 additions & 32 deletions pkg/dashboard/assets/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@
margin-top: 15px;
}

.card.namespace {
padding: 10px 20px;
}

.card h3 {
margin: 0;
font-weight: 300;
font-size: 28px;
padding: 15px 20px 20px;
padding: 15px 20px 30px;
}

.namespace h3 strong {
margin: 0;
.card.cluster h3 {
padding-bottom: 20px;
}

.card.namespace h3 strong {
font-weight: bold;
}

Expand All @@ -33,22 +32,33 @@
}

.cluster-overview .cluster-score .weather {
font-size: 90px;
font-size: 80px;
color: #444;
margin-bottom: 15px;
margin: 10px 0 5px;
}

.cluster-overview .cluster-score .sailing-message {
.cluster-overview .cluster-score .sailing {
font-size: 16px;
line-height: 28px;
margin-left: 7px;
font-weight: 300;
font-weight: 200;
color: #555;
margin-bottom: 25px;
}

.cluster-overview .cluster-score .scores {
font-size: 16px;
margin-top: 10px;
margin-top: 15px;
}

.cluster-overview .cluster-score .scores span {
width: 70px;
display: inline-block;
color: #555;
font-weight: 200;
}

.cluster-overview .cluster-score .scores strong {
font-size: 24px;
}

.cluster .expandable-table ul.message-list {
Expand All @@ -58,7 +68,7 @@
#clusterScoreChart {
width: 550px;
position: relative;
top: -227px;
top: -270px;
left: 120px;
}

Expand All @@ -67,7 +77,8 @@
display: inline-block;
position: relative;
left: -100px;
top: -45px;
top: -80px;
font-weight: 200;
}

.cluster-overview .result-messages ul {
Expand All @@ -78,14 +89,58 @@
line-height: 35px;
}

.card.cluster .expandable-table {
margin-top: 20px;
.kubernetes-overview ul {
list-style-type: none;
margin: 0;
padding: 0 10px;
text-align: right;
}

.card.cluster .detail-label {
.kubernetes-overview li {
display: inline-block;
min-width: 140px;
margin: 20px 0 0 10px;
font-size: 11px;
color: #777;
}

.kubernetes-overview li span {
margin-right: 3px;
}

.category .name {
font-weight: bold;
}

.category .category-score {
font-size: 13px;
margin-left: 5px;
font-weight: 200;
}

.category .category-score strong {
font-weight: bold;
}


.category .category-info {
font-size: 14px;
line-height: 21px;
margin-left: 25px;
}

.category .category-info a {
font-weight: bold;
color: #23103a;
text-decoration: none;
}

.category .category-info a:hover {
text-decoration: underline;
}

.category .status {
width: 200px;
animation: fadeIn 2s;
}

.expandable-table {
Expand All @@ -98,7 +153,7 @@
height: 50px;
}

.expandable-table td {
.expandable-table .resource-info {
padding: 15px 20px;
margin: 0;
font-size: 18px;
Expand Down Expand Up @@ -180,29 +235,33 @@ ul.message-list li i.message-icon {
}

a.more-info {
color: #6a6a6a;
color: #bbb;
font-size: 12px;
text-decoration: none;
}

.namespace .status-bar {
vertical-align: top;
padding-top: 18px;
a.more-info:hover {
color: #555;
}


.card .status-bar {
padding-top: 7px;
float: right;
}
.namespace .status-bar .status {

.card .status-bar .status {
float: right;
animation: fadeIn 2s;
}

.cluster .status {
width: 280px;
}
.namespace .status {
.card .status {
width: 200px;
}

.status div {
height: 15px;
border-radius: 10px;
height: 12px;
border-radius: 5px;
}

.status .passing {
Expand All @@ -224,4 +283,3 @@ a.more-info {
0% {opacity: 0;}
100% {opacity: 1;}
}

1 change: 1 addition & 0 deletions pkg/dashboard/assets/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ $(function () {
},
options: {
responsive: false,
cutoutPercentage: 60,
legend: {
display: false,
},
Expand Down
1 change: 1 addition & 0 deletions pkg/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func GetBaseTemplate(name string) (*template.Template, error) {
"getScore": getScore,
"getIcon": getIcon,
"getCategoryLink": getCategoryLink,
"getCategoryInfo": getCategoryInfo,
})

templateFileNames := []string{
Expand Down
Loading