| sousaedu | e4c6aeb | 2021-01-15 18:41:15 +0000 | [diff] [blame] | 1 | # Copyright 2021 Canonical Ltd. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | # |
| 15 | # For those usages not covered by the Apache License, Version 2.0 please |
| 16 | # contact: legal@canonical.com |
| 17 | # |
| 18 | # To get in touch with the maintainers, please contact: |
| 19 | # osm-charmers@lists.launchpad.net |
| 20 | ## |
| 21 | |
| 22 | version: 2 |
| 23 | containers: |
| 24 | - name: %(name)s |
| 25 | image: %(docker_image)s |
| 26 | ports: |
| 27 | - containerPort: %(advertised-port)s |
| 28 | protocol: TCP |
| 29 | files: |
| 30 | - name: dashboards |
| 31 | mountPath: /etc/grafana/provisioning/dashboards/ |
| 32 | files: |
| 33 | dashboards-osm.yml: | |
| 34 | apiVersion: 1 |
| 35 | providers: |
| 36 | - name: 'osm' |
| 37 | orgId: 1 |
| 38 | folder: '' |
| 39 | type: file |
| 40 | options: |
| 41 | path: /etc/grafana/provisioning/dashboards/ |
| 42 | - name: datasources |
| 43 | mountPath: /etc/grafana/provisioning/datasources/ |
| 44 | files: |
| 45 | datasource-prometheus.yml: | |
| 46 | datasources: |
| 47 | - access: proxy |
| 48 | editable: true |
| 49 | is_default: true |
| 50 | name: osm_prometheus |
| 51 | org_id: 1 |
| 52 | type: prometheus |
| 53 | url: http://%(prometheus_url)s |
| 54 | version: 1 |
| 55 | kubernetes: |
| 56 | readinessProbe: |
| 57 | httpGet: |
| 58 | path: /api/health |
| 59 | port: %(advertised-port)s |
| 60 | initialDelaySeconds: 10 |
| 61 | periodSeconds: 10 |
| 62 | timeoutSeconds: 5 |
| 63 | successThreshold: 1 |
| 64 | failureThreshold: 3 |
| 65 | livenessProbe: |
| 66 | httpGet: |
| 67 | path: /api/health |
| 68 | port: %(advertised-port)s |
| 69 | initialDelaySeconds: 60 |
| 70 | timeoutSeconds: 30 |
| 71 | failureThreshold: 10 |