|
| 1 | +apiVersion: v1 |
| 2 | +kind: Namespace |
| 3 | +metadata: |
| 4 | + name: icinga-kubernetes |
| 5 | + labels: |
| 6 | + app: icinga-kubernetes |
| 7 | + |
| 8 | +--- |
| 9 | +apiVersion: v1 |
| 10 | +kind: ConfigMap |
| 11 | +metadata: |
| 12 | + name: icinga-kubernetes-config |
| 13 | + namespace: icinga-kubernetes |
| 14 | +data: |
| 15 | + config: | |
| 16 | + # This is the configuration file for Icinga Kubernetes. |
| 17 | + # |
| 18 | + # Connection configuration for the database to which Icinga Kubernetes synchronizes Kubernetes data. |
| 19 | + # This is also the database used in Icinga Kubernetes Web to view and work with the data. |
| 20 | + database: |
| 21 | + # Database type. Either 'mysql' for MySQL or 'pgsql' for PostgreSQL. |
| 22 | + # Defaults to 'mysql'. |
| 23 | + # type: mysql |
| 24 | +
|
| 25 | + # Database host or absolute Unix socket path. |
| 26 | + host: 10.96.0.2 |
| 27 | + |
| 28 | + # Database port. By default, the MySQL or PostgreSQL port, depending on the database type. |
| 29 | + # port: |
| 30 | + |
| 31 | + # Database name. |
| 32 | + database: kubernetes |
| 33 | + |
| 34 | + # Database user. |
| 35 | + user: kubernetes |
| 36 | + |
| 37 | + # Database password. |
| 38 | + password: kubernetes |
| 39 | + |
| 40 | + # Icinga Kubernetes logs its activities at various severity levels and any errors that occur either |
| 41 | + # on the console or in systemd's journal. The latter is used automatically when running under systemd. |
| 42 | + # In any case, the default log level is 'info'. |
| 43 | + logging: |
| 44 | + # Default logging level. Can be set to 'fatal', 'error', 'warn', 'info' or 'debug'. |
| 45 | + # If not set, defaults to 'info'. |
| 46 | + level: info |
| 47 | + |
| 48 | + # Logging output. Can be set to 'console' (stderr) or 'systemd-journald'. |
| 49 | + # If not set, logs to systemd-journald when running under systemd, otherwise stderr. |
| 50 | + # output: |
| 51 | +
|
| 52 | + # Interval for periodic logging defined as duration string. |
| 53 | + # A duration string is a sequence of decimal numbers and a unit suffix, such as "20s". |
| 54 | + # Valid units are "ms", "s", "m", "h". |
| 55 | + # Defaults to "20s". |
| 56 | + # interval: 20s |
| 57 | +
|
| 58 | +--- |
| 59 | +apiVersion: v1 |
| 60 | +kind: ServiceAccount |
| 61 | +metadata: |
| 62 | + name: icinga-kubernetes |
| 63 | + namespace: icinga-kubernetes |
| 64 | + |
| 65 | +--- |
| 66 | +kind: ClusterRole |
| 67 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 68 | +metadata: |
| 69 | + namespace: icinga-kubernetes |
| 70 | + name: resource-reader |
| 71 | +rules: |
| 72 | + - apiGroups: [ "" ] |
| 73 | + resources: [ "*" ] |
| 74 | + verbs: [ "get", "watch", "list" ] |
| 75 | + |
| 76 | +--- |
| 77 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 78 | +kind: ClusterRoleBinding |
| 79 | +metadata: |
| 80 | + name: read-resources |
| 81 | + namespace: icinga-kubernetes |
| 82 | +subjects: |
| 83 | + - kind: ServiceAccount |
| 84 | + name: icinga-kubernetes |
| 85 | + namespace: icinga-kubernetes |
| 86 | +roleRef: |
| 87 | + kind: ClusterRole |
| 88 | + name: resource-reader |
| 89 | + apiGroup: "rbac.authorization.k8s.io" |
| 90 | + |
| 91 | +--- |
| 92 | +apiVersion: v1 |
| 93 | +kind: Pod |
| 94 | +metadata: |
| 95 | + name: icinga-kubernetes |
| 96 | + labels: |
| 97 | + app: icinga-kubernetes |
| 98 | + namespace: icinga-kubernetes |
| 99 | +spec: |
| 100 | + serviceAccountName: icinga-kubernetes |
| 101 | + containers: |
| 102 | + - name: icinga-kubernetes |
| 103 | + image: icinga-kubernetes |
| 104 | + imagePullPolicy: Never |
| 105 | + env: |
| 106 | + - name: ICINGA_KUBERNETES_CONFIG |
| 107 | + valueFrom: |
| 108 | + configMapKeyRef: |
| 109 | + name: icinga-kubernetes-config |
| 110 | + key: config |
0 commit comments