Compare commits

...

264 Commits

Author SHA1 Message Date
Ganesh Maharaj Mahalingam 17ee9d5040 Upgrades to components in preparation of k8s 1.25 (#345)
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-08-29 12:17:33 -07:00
Ganesh Maharaj Mahalingam ae85c01b63 Revert check for prometheus deployment and update nginx
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-08-16 17:18:48 -06:00
Ganesh Maharaj Mahalingam 8f2f1d7422 Fix bash command to check prometheus crds
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-08-15 17:00:30 -06:00
Ganesh Maharaj Mahalingam 32f421a2f9 fix canal download URL
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-05-18 10:57:13 -06:00
Justin Scott 6aff0ac601 Remove static cpu from kubeadm.yaml
* Removing static cpu pinning due to confusion and complications it causes with disabling/enabling cores.
* Static CPU policy by defaults pins the process to CPUs if a kubernetes pod limits are set to be full cpus. While this a neat thing, this also causes issues when setaffinity is tried in a particular CPU. While we would like to set limits, pinning a process to a core is something we will try to avoid in the near future.
2022-04-04 14:31:15 -07:00
Ganesh Maharaj Mahalingam 0d1d72e7a1 Update rook, kata, metrics-server and kube-prometheus (#340)
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-03-29 16:17:07 -07:00
Ganesh Maharaj Mahalingam dc39af186f Update CNIs to versions that work well with 1.20.X of Kubernetes
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2022-03-04 12:00:27 -07:00
Ganesh Maharaj Mahalingam 6b56a905a6 Update CNIs
Canal: v3.18
Cilium: v1.9
Flannel: 0.14.0-rc1

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2021-05-18 09:08:55 -06:00
Ganesh Maharaj Mahalingam f9b260088d Update README to take not of k8s-migration package (#334)
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2021-03-17 13:26:12 -07:00
Mark Horn 5ca64545b1 Disable swap before OS Update (#333)
Mask all swap targets.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-12-17 10:38:43 -08:00
Hyunsun Moon e74b3ca892 Add support of CNI version 0.3.1 to vfioveth
Tested with K8S v1.18.6 and the latest multus stable image.
2020-09-10 15:14:19 -07:00
António Meireles 55b2aa2d19 accommodate upstream libvirt boxes changes in a forward and backward way (#330)
per https://github.com/AntonioMeireles/ClearLinux-packer/issues/24 the
ClearLinux libvirt boxes default size was lowered from the previous 40G
to a more manageable 5G, having the user the ability to, at box
instantiation, to increase that value to whatever is adequate.

In order to avoid surprises in this side the Vagrantfile was modded to
have hardcoded the previous default value.

This change is forward and backward compatible as it will just be
ignored when using older boxes ( since the 'new' root volume size just
the same as original one) and will resize the box to the expected 40G in
newer ones.

Signed-off-by: António Meireles <antonio.meireles@reformi.st>
2020-08-19 14:23:51 -07:00
Ganesh Maharaj Mahalingam aad050f944 Switch private network for Vagrant VMs (#324)
Previously used IP range seems to be allocated to NASA and probably not
a good idea to use it here. Switching the private network to be part of
the IPs allocated to private networks.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2020-06-15 09:40:22 -07:00
David Lyle a872ccca6c adding support for HA clusters, using HAProxy (#317)
* adding support for HA clusters, using HAProxy

Signed-off-by: David Lyle <dklyle0@gmail.com>

* fixing typo

* fixing load balancer port default value
2020-06-15 09:38:34 -07:00
Saikrishna Edupuganti 1525407bd4 Update multi-net components to latest releases (#329)
* Update multi-net components to latest releases

Multus CNI 3.4.2
SR-IOV CNI 2.3
SR-IOV DP  3.2

Tested as per the README. Works fine.

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>

* Provide dpdk-stable 3 LTS and 1 recent release

Testpmd manifests of the last 3 LTS and 1 latest release from stable
repo to help test actual DPDK app instead of sleep.

Currently 17.11 and 19.11 are the only functioning ones without
privileged.

```
NAME              READY   STATUS    RESTARTS   AGE
dpdk-1711         1/1     Running   0          3m5s
dpdk-1811         0/1     Error     0          3m5s
dpdk-1911         1/1     Running   0          3m5s
dpdk-2002         0/1     Error     0          3m5s
```

```
EAL: PCI device 0000:07:06.4 on NUMA socket 0
EAL:   probe driver: 8086:154c net_i40e_vf
EAL: Getting a vfio_dev_fd for 0000:07:06.4 failed
EAL: Requested device 0000:07:06.4 cannot be used
…
testpmd: No probed ethernet devices
EAL: Error - exiting with code: 1
  Cause: Invalid port 1
```

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2020-06-05 09:06:08 -07:00
Miguel Bernal Marin 9b4f0a8582 setup_system: use local admin path for proxy.conf (#328)
Currently the system.conf.d/proxy.conf file is saved at /usr/lib
which is the vendor path, and can be dropped by
"swupd repair --picky --force".

This commit creates the local administrator /etc/systemd/system.conf.d
directory and store the proxy.conf inside.
2020-05-26 10:45:25 -07:00
Antti Kervinen 696861ce66 metrics: change collectd output to host /opt/collectd/run
Currently we loose collectd data from a node when scaling ends to a
system failure on the node - yet this data can be very helpful in root
causing the failure. This patch changes collectd configuration so that
the output will be continuously written to host filesystem instead of
the collectd container overlay that will be lost unless scaling
reaches graceful exit.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2020-05-19 19:56:54 +01:00
Graham Whaley 07fd8412da metrics: report: Error more cleanly
Clean up the rest of the report R files to allow them to quit
cleanly when they find an error or missing data, so that the
final PDF report gives meaninful errors such as 'No data found',
rather than cryptic R errors.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-05-19 19:53:23 +01:00
Graham Whaley 058e1753ae metrics: report: quit cleanly on tidy_scaling failure
When there are no files to process, we tend to quit with a loud
and not helpful error. Improve that by spotting the obvious error
cases (such as no files to process for a specific test), and quit
with a nicer error/warning message that ends up in the rendered
report.

Start with the tidy_scaling test. The only clean way to quit a
fragment of Rmarkdown R looks to be to place it inside a function
so we can 'return'. Otherwise, all other forms of 'quit', quit the
whole Rmarkdown render pipeline, which is not what we want - we
want to carry on and try to process the rest of the fragments for
the rest of the tests.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-05-19 19:53:23 +01:00
Graham Whaley 091e76c3d8 metrics: k8s_scale_net: whitespace fixes
Fix some indentation that had gone rogue.
Note, there are other whitespace fixes that can be done in this file,
it appears to have a mix of tabs and spaces.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-05-15 09:11:37 -06:00
Graham Whaley 7121418dd3 metrics: Imrove documentation
Improve and expand the documents across the metrics subsystem.
Clarify and re-order some documents. Add some more details around
each individual test.
Note that only the 'rapid' test is currently actively used, and the
other tests may need some nurturing if they are found to be useful.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-05-15 09:11:37 -06:00
Gabriela Cervantes e10260e99c metrics: Use a specific version of rocker/tidyverse
This PR uses a specific version of rocker/tidyverse as the latest version
does not have the latex-xcolor package which makes impossible to create
the metrics report.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2020-05-13 15:18:05 +01:00
CraigSterrett e732cc693b Updated metrics github location (#323)
The metrics-server package has moved out of the kubernetes incubator
github location and is now in the sigs location.

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2020-05-06 13:00:07 -07:00
Hyunsun Moon cf9b85cf03 Update vfioveth CNI to add VF device id as alias 2020-04-15 11:20:27 -07:00
CraigSterrett a82b9d9601 Modified setup_system to use Systemd level proxy (#316)
Modified setup_system.sh to use Systemd level proxy instead of per
service proxy.
Tested create_stack all with defaults and ran Sonobuoy successfully against change.

Closes issue #307

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2020-04-03 09:09:30 -07:00
CraigSterrett 96978c5228 Rook updated to v1.2.6 (#315)
Rook updated to V1.2.6

Closes issue #312
https://github.com/clearlinux/cloud-native-setup/issues/312

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2020-03-27 11:22:17 -07:00
CraigSterrett 8c17c4b47c removed v0.8.3 of rook (#314)
Rook v0.8.3 was found to be not working and is too old to continue
supporting.

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2020-03-26 10:25:13 -07:00
CraigSterrett 514efd6592 Fix rook single node setup (#313)
* Fix rook single node setup

Modified the rook installation to support both multinode kubernetes
clusters and standalone kubernetes clusters. Multinode installations
will occur as before, with changes for standalone installations.
v0.8.3 I found it was not currently working and
is too old to continue to support, will submit a PR for removing it. Also made a couple minor spacing
changes to yaml as detected by yamllint

closes issue 306 https://github.com/clearlinux/cloud-native-setup/issues/306
closes issue 311 https://github.com/clearlinux/cloud-native-setup/issues/311

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>

* Fix rook single node setup

Modified the rook installation to support both multinode kubernetes
clusters and standalone kubernetes clusters. Multinode installations
will occur as before, with changes for standalone installations.
v0.8.3 I found it was not currently working and
is too old to continue to support, will submit a PR for removing it. Also made a couple minor spacing
changes to yaml as detected by yamllint

closes issue 306 clearlinux#306
closes issue 311 clearlinux#311

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2020-03-26 10:07:18 -07:00
Julio Rivera 603c42703f Add initial Jenkinsfile (#301)
Signed-off-by: Rivera Gonzalez, Julio C <julio.c.rivera.gonzalez@intel.com>
2020-02-12 09:44:18 -08:00
Khanak Nangia 52d1a8406b Updating flannel (#299) 2020-01-11 01:04:53 -08:00
CraigSterrett 61b8702472 Added --force flag to swupd repair command (#298)
Running setup_system.sh on a system setting the OS version to keep setup_system from upgrading the OS causes an error because a package has been removed. Need to add the --force flag to the
sudo swupd repair -m "${CLR_VER}" --picky command

Closes issue #297
2020-01-09 14:22:39 -08:00
Justin Scott 00c1d60470 Update kubeadm.yaml to 1.17 version (#296)
Closes #295

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2020-01-08 12:43:57 -08:00
Khanak Nangia 07c2231e62 Updating ingress-nginx to v0.26.1 (#285)
* Updating ingress-nginx to v0.26.1

* removing extra line
2019-12-09 10:44:25 -08:00
Morales Quispe, Marcela 4ef8d34671 Make and rename net server process variables configurable
Some CNIs takes longer for its related deployments to become ready, that
is why `proc_wait_time` needs to be customized. Now `proc_wait_time` can
be set at execution time and has a default value too for time to pod
network test harness.

Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-12-09 14:56:29 +00:00
Khanak Nangia bc0f257176 Updating metrics to v0.3.6 (#286) 2019-12-05 14:47:46 -08:00
Khanak Nangia e70e32d36e Updating MetalLB to v0.8.3 (#284) 2019-12-05 14:40:11 -08:00
Khanak Nangia 518fa87f27 Updating cilium to v1.6.4 (#289) 2019-12-05 14:39:46 -08:00
Khanak Nangia 6cd87d74be Updating rook to v1.1.7 (#283) 2019-12-05 12:36:42 -08:00
Morales Quispe, Marcela 927ceddc9c Add time to pod network metric.
To measure the time to pod network, a deployment that uses agnhost
image is used, which get exposed as a net server and replies to curl
calls, the test measure this reply time and saves it for further reporting.
Then, only the exposed net service gets deleted.

Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-12-05 11:00:41 +00:00
Graham Whaley 6298cf2054 metrics: tidy: widen the graphs
Move the legends to the bottom (underneath) for the tidy scaling graphs
to make them wider on the page, and thus easier to read with more
resolution.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-12-04 10:02:36 +00:00
Graham Whaley acf5a95177 metrics: tidy: move local assign inside loop
The bootdata assignments were outside the 'valid file' check loop,
which meant in the case there was a data directory which did not
contain a valid scaling file, we would fail the assignment (as the
`local_bootdata` would be empty).

Fix by moving the assignments into the loop, thus only assigning when
we know we have valid data.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-12-04 10:02:36 +00:00
Graham Whaley 68a62f50bc metrics: report: improve interface y axis divs
Most of the time we have 0 interface errors or drops, so we pin the y
scale to '1', so we don't hit 'infinity' errors. That left us with a
strange y-axis label anomoly - as the axis was automatically divided
into 5 labels, and we got for some reason the sequence '0,0,0,1,1'.
That just plain looked wrong and confusing.
Fix it by using `pretty_breaks()` for the error/drop y axis, whilst
maintaining the `comma` count for the pod count y axis.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-12-04 10:02:36 +00:00
Graham Whaley 9431dd9f38 metrics: report: shrink page margins for more resolution
The pdf output by default has large page margins, which wastes a lot of
page space, and reduces our 'resolution'. Shrink the margins to a pretty
minimal 1cm to increase the graph resolution. The document itself then
does not look as 'pretty', but we can see more data visually.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-12-04 10:02:36 +00:00
Graham Whaley 9b8c7c093f metrics: collectd: move legends under graphs
Move the legends under the graphs to give more width, and thus
resolution, to the final pictures.
This works well for the collectd graphs as they are spread out
into sets of single column graphs per page.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-12-04 10:02:36 +00:00
Syed Ahsan bdcb4fb5b7 Update Kata to v1.9.1 (#282)
This patch updates Kata to use v 1.9.1 and adds the kustomization.

Signed-off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-12-02 16:34:10 -08:00
Eric Ernst a0ca2a2017 set the snapshotter to devmapper in setup script
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-25 13:29:13 -08:00
Obed N Munoz 46b3f230ee scaling: Remove tty parameter in report's generation cmd
This is in order to avoid tty-related issues in our CI systems
which by default is not supporting tty. With this change we'll
avoid the following faling report's generation `docker run` command.
```
the input device is not a TTY
```

Signed-off-by: Obed N Munoz <obed.n.munoz@intel.com>
2019-11-22 09:17:03 +00:00
Graham Whaley b6c7cf1b8e metrics: make pods_per_gb valid JSON
Under some circumstances, the pod_per_gb value would come out as <0,
and be generated without any leading 0's (such as `.14` rather than
`0.14`). This is not valid JSON, and would break the report generation
parsing in R.

Use `printf` to force a leading 0 prefix onto the value.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-11-21 08:48:40 -07:00
Syed Ahsan f146c771cc Using consistent ENV variable for RUNNER (#273)
Earlier there was confusion between CLRK8S_RUNNER and RUNNER in
setup_system.sh and create_stack.sh script, this patch fixes this
and now the variable can either be RUNNER/CLRK8S_RUNNER.

Signed-off: syed.ahsan.shamim.zaidi@intel.com
2019-11-20 15:35:18 -08:00
Graham Whaley 9510b068e0 metrics: cpu-load: save cpu-load config in JSON
If the cpu-load function is enabled, save its config settings into the
JSON results file.
This required a little bit of re-sequencing of the json library calls,
to ensure we did the init of the JSON early enough, but not more than
once.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-11-15 12:23:38 -06:00
Graham Whaley 952e037420 metrics: enable cpu-load ability across tests
Rejig the framework a little to unify the init/shutdown calls and code,
which allows us to add the cpu-load enable/disable ability to all the
existing metrics.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-11-15 12:23:38 -06:00
Graham Whaley c846e9753d metrics: add cpu-load generator code and docs
Add library code that can generate a variety of cpu loads across the
cluster. Configuration is via environment variables, documented in the
.md file.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-11-15 12:23:38 -06:00
Graham Whaley 39c7cc643a metrics: README: add some information about stats gathering
Add the `collectd` subdir to the top level description of the code
layout, and add some developer details about how and where the stats
code lives and is configured/enabled.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-11-15 12:23:38 -06:00
CraigSterrett 54adf53cdd Adding non-routable IPs to no_proxy (#270)
Adding non-routable IPs to the no_proxy, non-routable addresses will
never go out the proxy, and are used as internal IPs by VM's running
cloud-native setup. Without the addition of the IP's in no_proxy,
kubernetes nodes will not be able to communicate to the Kubernetes IP as
the traffic will be routed out the proxy server.

Signed-off-by: Craig Sterrett <craig.Sterrett@intel.com>
2019-11-14 11:18:59 -08:00
CraigSterrett 00df885b45 Fixed code for no_proxy in setup_system.sh (#265)
The sed command for updating no-proxy settings in the proxy.sh file was
not working. I made it match the above command which was working for
/etc/environment.

Signed-off-by: Craig Sterrett <craig.sterrett@intel.com>
2019-11-13 09:48:59 -08:00
David Lyle a76cc3437e Specify hostname for file name for collectd
On some machines the value for hostname, that is used in naming
the csv directory, isn't always determined by collectd to be
localhost. The scaling code assumes it will always be localhost.

This patch specifies the hostname to be localhost.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-11-13 09:25:33 +00:00
David Lyle e09285f1e1 support older network interface naming
KIND uses the older network interface naming standard. Other
operating system images may as well. Adding support for 'eth'
network interface naming prefix.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-11-12 16:51:08 -06:00
Eric Ernst b4e6813ed6 devmapper: update to be functional, usable
base_image_size is effectively the max size of the thinpool snapshot,
and this is static (does not resize).  If you are running containers
with larger individual layers, this will fail. (elastic is a good test
for this).

The thinpool should be 10GB, not 1GB (to align with the .img's defined
earlier in file).

Fixes: #266

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-11 09:49:35 -08:00
David Lyle 7efe99f139 disregard collectd tail data from stats
Since collectd is started before the pods are launched and
shutdown after the last pod is launched, we gather data outside
the pod launch window which can adversely influence the per pod
launch stats. This is especially true after the last pod launches
as all the pods are then deleted before collectd stops collecting
metrics.

This patch isolates the collectd data used to only
coincide with the pod launch window.

And additional change in this patch is to improve the secondary
y axis scaling. There was an ill-advised check in previously to
force the scale to be at least 1. This does not work well when
the pod number is significantly higher than say 100 (the max
possible cpu idle value).

This patch changes the scaling to be across all data to be graphed.
The special condition for interface drops and interface errors,
where the data is typically 0. We don't scale by 0.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-11-06 14:31:56 +00:00
Khanak Nangia 103bfcc681 updating the deprecated APIs for K8s v1.16 (#259) 2019-11-05 14:15:59 -08:00
Khanak Nangia 9574f44b20 Cleaning containerd data in reset_stack script (#260) 2019-11-05 14:15:46 -08:00
Morales Quispe, Marcela f7254e2b30 Edit test description for k8s_scale and k8s_parallel tests.
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-11-05 09:15:44 +00:00
David Lyle df0af2ab2c fixing makereport container build
A recent change to debian apt repositories led to build errors
for the report container. The error was around stretch release
files. The container image we are based on published an update
which fixes this error. This patch updates to use :latest to
avoid errors when building.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-30 09:09:39 +00:00
Justin Scott e985ffd6e0 Kustomize kata-deploy image to stable version (#254)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-28 15:25:28 -07:00
Justin Scott 7840d720b0 Add CLRK8S_CLR_VER to Vagrantfile (#253)
This adds env var to the Vagrantfile so that Clear version can be
specified.

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-28 15:03:38 -07:00
Syed Ahsan 43fa8bad8f Adding Kustomization for Cilium (#246)
This patch adds kustomization path and file for Cilium

Signed-off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-28 14:08:51 -07:00
Justin Scott da6087762a Add CLRK8S_CLR_VER to setup_system.sh (#250)
This adds ability to upgrade/downgrade to desired Clear version.
The default behavior remains unchanged (auto updating to latest)

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-28 10:16:57 -07:00
Justin Scott 5b03651467 Update Canal to v3.10 (#247)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-25 14:45:32 -07:00
Khanak Nangia 598289573b updating readme with increased CPUS and MEMORY value for vagrant VMs (#242) 2019-10-25 12:07:36 -07:00
Justin Scott 6972963363 Disable git checkout advice in create_stack.sh (#244)
This PR disables the git advice message seen for
each component as its installed.

Signed-off-by: Justin Scott <justin.a.scott@gmail.com>
2019-10-25 08:22:43 -07:00
Syed Ahsan d271a73fe3 Adding Global Functions outside (#243)
This patch adds Global functions versions outside
the create_stack.sh file.

Signed-off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-25 08:19:06 -07:00
Syed Ahsan 674ab84d0d Adding Flannel to CNI (#239)
This patch add's Flannel to CNI, export the environment variable
to use Flannel, and uses crio as default unless the user
specify otherwise.

Signed-Off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-24 18:05:44 -07:00
Justin Scott 3984a18b18 Add node-feature-discovery (#236)
This adds the node-feature-discovery component.

Partialy implements #32

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-24 16:35:47 -07:00
Justin Scott 02880b82ee Add update_checker.sh (#238)
This adds a script that parses create_stack for component versions
and URLs and compares them to the latest versions available.

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-24 15:56:28 -07:00
Khanak Nangia 88b899d7e3 increasing the CPUS and MEMORY default value for vagrant VMs (#240) 2019-10-24 14:58:06 -07:00
Julio Rivera 2ae8360760 Adding Cert sans to kubeadm config (#188)
* Adding Cert sans to kubeadm config

This patch add the possibility to pass a list of ips or names to the certSans
property in the kubeadm.yml file.

Signed-off-by: Rivera Gonzalez, Julio C <julio.c.rivera.gonzalez@intel.com>

* Make idempotent addition of certSANs

Signed-off-by: Rivera Gonzalez, Julio C <julio.c.rivera.gonzalez@intel.com>
2019-10-24 14:45:30 -07:00
Syed Ahsan aa86c554e8 Adding Cilium to create_stack (#218)
This change adds Cilium to create_stack script, and uses crio
by default unless the user otherwise speicify

Signed-Off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-24 12:00:32 -07:00
CraigSterrett ad2fc108d3 Added .svc to no_proxy (#235)
Added .svc to the no_proxy in setup_system.sh to keep Kubernetes service
requests from being routed to the proxy. This fixes and issue that
Humberto was seeing in his testing.

Signed-off-by: Craig Sterrett <craig.sterrett@intel.com>
2019-10-24 00:44:05 -07:00
Julio Rivera 4edbaebf87 Removes kustomize from kubeadm init (#222)
This commit drops kustomize support from kubeadm config file.

Signed-off-by: Rivera Gonzalez, Julio C <julio.c.rivera.gonzalez@intel.com>
2019-10-23 23:43:12 -07:00
David Lyle e7b7d33be0 handle multiday collectd data
The collectd csv plugin starts a new file for each day that data is
being recorded. Currently, collectd_scaling.R only reads from the
first day's file. This leads to incomplete data being rendered in
the report charts. All the data files are collected and present,
they just need to be read.

This patch makes changes to read all the days of collectd data and add
them to the data set.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-23 12:02:59 -05:00
Morales Quispe, Marcela f2e89413ad Add extra table about node information into PDF report.
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-10-18 14:42:01 -06:00
David Lyle 9c01cbfacb Proxy work around for alpine collectd
Add Dockerfile for building an alpine image with collectd.

Published an image to dockerhub and reference it in collectd.yaml

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00
David Lyle 50553aa7bb only collect noschedule once
As part of the existing json file, there is a 'kubectl get nodes'
json dump. Instead of collecting this information each pod launch,
use the data already gathered. This data is immutable during the
test runs. This greatly improves the overall runtime of the test
script by preventing expensive kubectl execs per node per iteration.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00
David Lyle 174c836980 Fixing secondary y axis scaling
The secondary y axis have to be scaled by a factor of the primary
y axis, the default being 1. Some of the charts graph both a data
value and the number of pods. The scale for those are different
and dependent on the data collected. Logic has been added to
calculate the scale for each chart based on the data.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00
David Lyle 8f67f641ee Support multiple network interfaces and more names
Adding support for more than one network interface in a given node.

Also supporting more interface naming patterns.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00
David Lyle 20cb90c7f7 Adding support for aysnc metrics via collectd
This patch adds a new script, scaling/k8s_scaling_rapid.sh, for
launching pods and collecting metrics. The goal is to two fold.
The first goal is improve the required runtime duration of scaling
to large numbers of pods. k8s_scaling.sh can take up to 29 hours
to scale to 2900 pods. The is largely due to the overhead of
collecting system utilization stats after each new pod is launched.
This new script will collect system utilization stats asynchronously.
The second goal is to make it easier to collect additional system
utilization stats by leveraging the plugins supported by collectd.

Instead of using the stats daemon set, a new daemon set
that runs collectd on each node is added. collectd configuration
is handled by collectd/collectd.conf A configmap is added to the
K8s cluster containing collectd.conf, so the user of the script
can test new configurations easily. The configmap is created and
deleted as part of the test run. The data from collectd is stored on
each node in the cluster via the csv plugin and the data is
collected to the master node at the end of the test run.

Several new pages have been added to the metrics_report.pdf
These pages cover the same metrics as k8s_scale.sh results, but are
populated with data from collectd. Additionally, network interface
results are added.

To run the report, in addition to the previous steps of creating
a new directory and copying the result json file into it, all the
new <node_name>.tar.gz files must be copied in as well.

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00
Morales Quispe, Marcela 12c59bbf4c Add execution entries at debugging report phase example to avoid confusion.
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-10-16 16:56:13 -06:00
Morales Quispe, Marcela 3ec1dfda66 Add number of sockets and hypervisor per node to be captured in output result.
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-10-15 13:17:13 -06:00
Khanak Nangia d267feb8ff there is no need of launching kubelet before, since it will startup once we have configured with kubeadm (#209) 2019-10-14 14:23:25 -07:00
CraigSterrett 8d0caf2dee Changed default container engine to crio (#217)
Vagrant file also sets a default container engine and runs
setup_system.sh. This was currently setting runner=containerd if RUNNER
environment variable was not set, I changed default to crio

Closes issue #216

Signed-off-by: Craig Sterrett <craig.sterrett@intel.com>
2019-10-14 09:18:30 -07:00
David Lyle d557bfe559 Add vagrantfile support for HIGH_POD_COUNT config
This adds passing HIGH_POD_COUNT on to setup_system.sh
2019-10-11 16:01:10 -05:00
Marcela Morales Q ef72f7387c Update to Kubernetes naming usage in README file and logs to be homogenous. (#213)
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-10-11 11:07:27 -07:00
Julio Rivera 276ff274db Kustomize kubeadm.yaml config file (#193)
Signed-off-by: Rivera Gonzalez, Julio C <julio.c.rivera.gonzalez@intel.com>
2019-10-11 11:02:12 -07:00
Justin Scott a7f92a918b Update rook to v1.1.1 (#199)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-09 10:52:02 -07:00
Syed Ahsan ebff530fa4 Vagrant Libvirt Instructions update (#189)
* Vagrant Libvirt Instructions update

This patch adds the users to the default group so we dont
have to use sudo to start the vagrant, as using sudo is not
the most optimal route for gems to be properly configured.

Signed-off: Syed Ahsan<ahsanmohsin04@yahoo.com>
2019-10-08 11:10:50 -07:00
Syed Ahsan 859237b189 Setting the RUNNER to use crio (#208)
This change helps with setting up the RUNNER to use crio
by default instead of using containerd. If the user wants
to use containerd, they need to specify when running the
setup_system script.

Signed-off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-08 11:05:21 -07:00
Syed Ahsan Shamim Zaidi d95d82e102 Typo in vagrant instruction
This patch fixes the typo in vagrant instructions, it should be
CPUS.

Signed-off: Syed Ahsan <syed.ahsan.shamim.zaidi@intel.com>
2019-10-08 09:24:45 -06:00
Antti Kervinen 0325a44d6f scaling: fix syntax error in results/k8s-scaling-nc.json
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2019-10-07 11:21:04 -06:00
David Lyle 11c6d011cf global variables in function aren't global
A recent change put global variable declarations in a function,
the variables no longer are globally visible. This change removes
the encapsulation in a function.
2019-10-03 17:01:22 -05:00
Justin Scott 7c352427a2 Add section about code conventions to DEVELOP.md (#185)
This adds details about shfmt and shellcheck settings.

Closes #180

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-02 11:19:22 -07:00
Justin Scott 5c8f4e89a1 Update Prometheus to v0.2.0 (#196)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-10-02 11:13:03 -07:00
Antti Kervinen 6213a499c1 metrics: scaling: add pod response latency test
- Send n requests for each of the running pods.
- Measure response time to response.
- Report response time percentiles: 5-25-50-75-95 %.
- Refactor scaling/*.sh variables to scaling/common.bash.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2019-10-01 14:30:33 -06:00
Mikko Ylinen 2332542376 kubelet: use systemd cgroup driver (#192)
Fixes: clearlinux/distribution/issues/1267 (partial)

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-09-30 16:11:32 -07:00
Marcela Morales Q 38d8d058d9 Add main README file for cloud-native-setup repository. (#195)
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-09-30 10:12:06 -07:00
Morales Quispe, Marcela 908a9f72f5 Add step-by-step guide for scaling execution into README file.
Signed-off-by: Morales Quispe, Marcela <marcela.morales.quispe@intel.com>
2019-09-27 20:51:30 -05:00
Justin Scott 6170fe3d3b Update metrics to v0.3.5 (#191)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-26 11:56:53 -07:00
Justin Scott d9f5318d4d Update canal to v3.9 (#187)
This replaces previous canal v3.3 which is no available.

Closes #186

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-25 16:31:23 -07:00
Syed Ahsan Shamim Zaidi 1f9a8cf3ef Adding instructions to modify CPU/MEMORY for VM's
This change add's a note to specify env vars to use desired
CPU and Memory for individual VM's as required

Signed-off: Syed Ahsan<syed.ahsan.shamim.zaidi@intel.com>
2019-09-25 17:15:44 -06:00
Justin Scott 4dd5d51248 Update kata to v1.8.2 (#184)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-19 19:16:13 -07:00
Justin Scott 651510a51d Update metallb to v0.8.1 (#183)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-19 11:18:27 -07:00
Justin Scott 48ba56142d Update ingress-nginx to v0.25.1 (#182)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-19 10:59:04 -07:00
Justin Scott bd6ac270e6 Update to rook v1.1.0 (#169)
Update to rook v1.1.0 which has CSI support by default.

Closes #30

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-19 09:40:56 -07:00
David Lyle dc48b000d5 fixing timing of kubelet configuration 2019-09-13 17:36:38 -05:00
David Lyle 43a402e45b splitting config to appropriate script 2019-09-13 17:36:38 -05:00
David Lyle b476b5d6e5 Moving from metrics config to setup_system.sh 2019-09-13 17:36:38 -05:00
David Lyle 332ec89af9 Adding node-config.sh
This script configures a node in the cluster for pod scaling
testing. This configuration is necessary for pushing beyond the
110 pod max default in Kubernetes.
2019-09-13 17:36:38 -05:00
David Lyle ccddc591dc Adding metric for inode usage
Adds support for tracking inode usage on the nodes. Results also
added to report.

The stats pod is updated as well to use net=host.
2019-09-12 09:45:05 -05:00
Khanak Nangia 044146703f adding detailed instructions for vagrant setup on clear linux (#173)
* adding detailed instructions for vagrant setup on clear linux

* adding all the dependencies together
2019-09-04 12:22:06 -07:00
CraigSterrett 23712beac2 Fixes no_proxy issues with Vagrant file (#172)
Vagrant file blows up if http_proxy is set but no_proxy is not set. This
was discovered during the testing of the initial patch which was to add
the default CIDR for Vagrant to the no_proxy settings.

Closes issue #136

Signed-off-by: craigsterrett <craig.sterrett@intel.com>
2019-09-04 11:44:34 -07:00
Justin Scott 98f8e3eb5e WIP Add node problem detector (#160)
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-09-03 10:39:38 -07:00
David Lyle 20c7eccf1f Fixing number of pods in report
In the rewrite of the report generation code, we regressed to
using the passed in requested number of pods rather than the
actual. Since we typically attempt to launch more pods than the
system is capable of, the math for the stats are done incorrectly
and misreported.

This changes the behavior back to using the correct value of the
total number of pods launched.
2019-09-02 10:57:55 -05:00
Graham Whaley be164144e4 metrics: json: use tr for newline/whitespace conversion
Use `tr` rather than `sed` for doing the line/whitespace conversions
on the JSON stream, if asked. Slightly more efficient, and we also drop
the wrapping ""'s, to allow the data to land in logstash without error.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-29 12:33:41 -06:00
Antti Kervinen 18fde35232 metrics: scaling: require jq is installed
Also remove trailing whitespace

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
2019-08-29 09:01:00 -06:00
David Lyle a61deb736c Fix array declaration
Used as associative array, not declared that way. The result
was indexing errors.
2019-08-29 14:31:50 +01:00
Syed Ahsan Zaidi 270bbc6f90 Support for Virtualbox
This change adds the env variable for the support for
virtualbox to support kubernetes communication between
master and worker nodes. Since KVM gives default ip
address to the spinned up VM's, whereas virtualbox uses
same ip address for all, the kubelet was not functioning
, this change fixes it and assigns the ip address to env
variable.
2019-08-27 12:10:56 -07:00
Graham Whaley 8787955188 metrics: report: generate PNGs alongside the pdf
To aid in incorporating the results graphs and tables into other
documents, generate PNG files of the tables and plots alongside
the full PDF report, and place them in the output directory.

Achieve this by processing an html as well as a pdf targetted
output document, and grabbing the png's generated from that
operation.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 12:46:11 -06:00
Graham Whaley 2d1f8551b0 metrics: report: update README with new debug mode info
Debug mode of the report generator now volume mounts the scripts
into the container (rather than just COPYing them in), to allow
interactive edit/run debug cycles. Document it.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 659600b9a6 metrics: report: drop deprecated scaling.R
Now the new tidy_scaling.R seems to be functional, drop the
deprecated scaling.R.
Yes, we could/should probably have just replaced scaling.R, but
that is just the way it panned out.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 0e6596bed6 metrics: report: do not account noschedule. Show boot in S
Do not account for 'noschedule' nodes in the stats calculations,
as they don't host the pods we are measuring.
Show the boot times in seconds, rather than milliseconds.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 6d5c782fce metrics: scaling: check we have bc installed
We now use `bc` for some of the stats calculations. Ensure it
is installed, or we silently generate bad field data.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 6a7eb8bbc9 metrics: report: scaling: use a more 'tidyverse' flow
Due to the nature of the shape of the JSON data import, the scaling
R had some hard wired constructs bound to the data shape. This limited
our extending the JSON data.
recode to be more 'R tidyverse' style.
Also add in a launch time stats table, and split the graphing
across 3 pages to de-cramp them (particularly when rendering >1
test run).

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 6e189ff2be metrics: report: mount scripts in debug mode
When in debug mode, mount the scripts dir into the container to
allow 'live' editing and reloading into R. This makes the dev cycle
much faster.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley 5e53ce9afb metrics: scaling: calculate mem consumed and pod/Gb
Keep track of memory consumed on the nodes, log that, and
generate an overall cluster value for 'pods-per-Gb'.

Generate this data here, whilst we have the data to hand, as
it can get much more difficult to calculate this information
the further you get down the monitoring stream (such as the
farther you get into an ELK stack).

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
Graham Whaley d3cab6b06e metrics: report: switch scaling to tidy R
Switch the rendering of the scaling page to use the tidy R version.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-27 09:41:44 -06:00
craigsterrett ba52442d0c Removed vagrant box pinning
Removed hardcoded vagrant box version. This change will now
allow the override of the version, or if no override is passed in
it will take the version on the system, or download the latest version.

Signed-off-by: craigsterrett <craig.sterrett@intel.com>
2019-08-22 13:48:15 -07:00
Justin Scott 535680bce2 Update setup_system.sh to include alt OS file (#141)
This udpate allows us to specify an OS specific
include file with function overrides. Useful when using
setup_system.sh on other OSes.

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-08-19 15:04:53 -07:00
Graham Whaley 68be049f98 metrics: README: update to be accurate and more descriptive
The README has not kept upto date with the code. Update to make it
more useful, but try to keep fairly neutral so it does not rot so
fast.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-19 10:50:36 -06:00
Ganesh Maharaj Mahalingam 78e07e2c4f Fix script error cause of missing variables
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-08-17 21:38:05 -07:00
Khanak Nangia 202c8ec007 adding bullets points for distro names 2019-08-16 15:48:52 -07:00
Khanak Nangia 82795e7850 adding distros as headers 2019-08-16 15:48:52 -07:00
Khanak Nangia 5267dac92e updating with the raw URL 2019-08-16 15:48:52 -07:00
Khanak Nangia 53ae4e0227 updating vagrant steps for Clear 2019-08-16 15:48:52 -07:00
Khanak Nangia 262fb9b58d Adding vagrant steps for Clear 2019-08-16 15:48:52 -07:00
Ganesh Maharaj Mahalingam 2b2506439f Allow bootstrap token and master_ip to be customizable
This change will allow the create_stack.sh script to be called to init
the k8s cluster with a user generated bootstrap token and a pre-defined
master_ip. This will allow us to automate initial deployment of cluster
with a known list of IPs

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-08-16 15:01:43 -07:00
NitinAtIntel ef0c39c39d Removing reference to patch file 2019-08-15 22:49:47 -07:00
NitinAtIntel 20b788fd4b Patch file is no longer needed 2019-08-15 22:49:47 -07:00
NitinAtIntel 67f542e0f5 Setting rp_filter to strict mode as supported by Calico 2019-08-15 22:49:47 -07:00
Graham Whaley c54c048da6 metrics: report: Add system under test details
Add a table to the end of the report showing useful details about
the systems that were under test - version numbers, resources etc.

Fixes: #145

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-15 17:20:35 -06:00
Graham Whaley 615e7d6e6f metrics: report: parallel: change title to 'deployment time'
The time we measure is the time to launch and delete the whole
deployment, not the 'pod'. Change the graph titles to be more
accurate.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 10:58:06 -06:00
Graham Whaley 1c14965e6c metrics: parallel: dedup use of aes()
Rather than duplicate the same aes() over all the parts of the ggplot(),
add the aes to the base ggplot, and then default to using that for
all the other additions.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 10:58:06 -06:00
Graham Whaley 645110832b metrics: parallel: Only smooth with big data sets
geom_smooth can generate a mass of warnings when applied to a small
dataset. Use the same test (>20 samples) we do for 'do we draw dots',
but in the inverse - so, we either draw dots (small set) or a smoothed
overlayed line (bit sets).

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 10:58:06 -06:00
Graham Whaley b3f40569b2 metrics: parallel: take into account 'stepping'
Now the data has the ability to 'step' (that is, increment
the pod count by >1 between samples), use that n_pod value
for the x-axis, rather than a +1 count, so the x-axis makes
a lot more sense.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 10:58:06 -06:00
Graham Whaley aeb6ebbab7 metrics: json: default RUNTIME to 'default'
If a RUNTIME is not set, then save it as 'default' in the JSON
rather than an empty string, as the emptry string does not render
well later in any graphing.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 08:20:36 -06:00
Graham Whaley 40cca1a8d4 metrics: scaling: whitespace fix
four-space to tab.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 08:20:36 -06:00
Graham Whaley 7b98d82e11 metrics: scaling: add datestamps to stats samples
Add invididual date entries to each statistics sample, to
suppliment the top level date entry. This helps order the
samples if we are flattening the data into say Elasticsearch.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 08:20:36 -06:00
Graham Whaley e4ef431b0f metrics: parallel scaling: add 'grace' handling
When 'grace' handling was added, it got missed from the parallel
script (which shares the bb.*.in files). Add it in to fix the test.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-14 08:20:36 -06:00
David Lyle 15ab28deaf fixing indexing, start with 0 2019-08-14 10:04:24 +01:00
NitinAtIntel 85fe594c20 Formatting cleanup 2019-08-12 18:29:11 -07:00
NitinAtIntel 0d71305d65 Splitting out detailed vagrant instructions 2019-08-12 18:29:11 -07:00
NitinAtIntel 5c4de21fe7 Adding detailed steps to get vagrant working with libvirt 2019-08-12 18:29:11 -07:00
Justin Scott 10307fde45 Use directories instead of partitions for rook
Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-08-12 14:19:33 -07:00
root a29f8b7b71 Fixed vagrant issue with proxy
proxy_ip_list variable had scope issues, used as global variable
initially then as a local variable. Changed all to global.

Signed-off-by: root <root@csterret-desk1.amr.corp.intel.com>
2019-08-08 18:19:20 -07:00
Justin Scott 9f4ffb2e39 Kustomize all the things
This commit replaces our static manifests with Kustomize
versions and adds scripting to apply them.

Signed-off-by: Justin Scott <justin.a.scott@intel.com>
2019-08-08 16:31:18 -07:00
David Lyle 67ee1cb2d4 tuning node dataset charting, removing skip_points 2019-08-08 17:02:19 +01:00
David Lyle c88d9a61c3 clean up 2019-08-07 09:53:36 +01:00
David Lyle d72621ae2e show which node the pod launched on, store pod name 2019-08-07 09:53:36 +01:00
David Lyle af7b595e4a excluding NoSchedule nodes from workload calculations 2019-08-07 09:53:36 +01:00
David Lyle ec9dbe1f0e changing node shapes in charts rather than color 2019-08-02 17:39:44 +01:00
David Lyle 45c9a7821a format fixes 2019-08-02 17:39:44 +01:00
David Lyle d8a8d77d1b Adding charting support for multinode 2019-08-02 17:39:44 +01:00
David Lyle 510dd83b09 adding multinode utilization tracking 2019-08-02 17:39:44 +01:00
Graham Whaley 42359e1f8e metrics: scaling: store json int results as non-strings
We were storing some JSON data (such as NUM_PODS) as strings.
This would default their type into the Elastic DB as strings,
and not ints. May as well store ints as ints, so make that so.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley 5c9a5df264 metrics: report: Fix scaling points for boot chart
The boot 'points' code was accidentally updating the cpu plot
(copy and paste error). Correct it to update the correct chart.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley e73beb18e1 metrics: parallel: Test deployment parallel pod scaling
Test how long it takes to launch, and delete, a deployment
running up 'n' pods. Used to ascertain if parallel launch times
are linear with number of pods or not.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley 59a1f36e37 metrics: common: remove un-used docker-esque code
We were carrying a bunch of legacy docker based functions
that we do not use. Drop them. We can always add them back
in later if we find we do need some.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley fa94c2ce90 metrics: api: move some api code out to a common file
We are very likely to re-use the k8s api code in many/all of the
tests, so move common code out to a common libray file.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley 293a2b32d2 metrics: json: add k8s info sections
Capture some of the k8s setup information in the JSON results
files. Add sections for:
 - kubectl version
 - kubectl get nodes

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley bead9c7dfc metrics: use RUNTIME to determine RuntimeClass
If we have $RUNTIME set in the env, then we set up the pod
RuntimeClass, otherwise, just use the default node runtimes.

Clean up some of the un-used library code around docker/RUNTIME
as well whilst we are there.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 13:13:35 -06:00
Graham Whaley 6e238d7cd9 metrics: scaling: change check for 'first deploy' to non-1 indexed
We need to check when we are launching our first instance of a
deployment when using the k8s API directly, as we have to modify
the URL for the first instance. Rather than check for '1', let's
check for 'STEP', as technically you can run the loop starting at
a non-1 index (particularly useful to run with NUM_PODS==STEP, as
you then get a 'single shot' test of 'n' containers).

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-30 11:51:06 -07:00
David Lyle c4b6824f07 Fixing proxy process management 2019-07-26 16:14:55 +01:00
David Lyle d7d40598b4 Add option to use API to launch 2019-07-26 16:14:55 +01:00
Graham Whaley 351540049d metrics: Add the start of the local report generator
Add the first basic report generator code, utilising R, Rmarkdown
and pandoc to do the data processing and pdf report generation.

Fixes: #121

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-24 10:52:13 -06:00
David Lyle 0f39518f8d Moving to milliseconds rather than seconds 2019-07-24 17:46:21 +01:00
David Lyle c67566e41e Initial commit of metrics for scaling 2019-07-24 17:46:21 +01:00
Ganesh Maharaj Mahalingam 39a3f46ec8 Add swupd update back
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-07-22 14:00:48 -07:00
NitinAtIntel 0e27cf06a3 As scripts will be distributed with bundle in clear, user can control their clear version if using scripts from git. 2019-07-22 10:35:37 -07:00
NitinAtIntel 41e9b05cc0 Enabling exit on error at top of script. Switched method to obtain k8s source with check for existing repo. Switched version check to look at client version as we want to test using same client k8s version as came bundled 2019-07-22 10:35:37 -07:00
NitinAtIntel 7106afcd9f Adding a script to execute upstream k8s e2e tests on the cloud native stack 2019-07-22 10:35:37 -07:00
Ganesh Maharaj Mahalingam 859da50c94 Move to containerd as the default manager
This setup scripts have been using cri-o all this while as the pod
controller/manager system. Recent past cri-o has had some issues with
kata-deploy (A restart of the service will not be able to re-connect
with the existing pods and restart all of them including kata-deploy,
which will hit an endless loop). Moving to containerd as default for
now.

Firecracker cannot be used with a released version of containerd as
there is no default block based snapshotter available today. If you wish
to use cri-o make sure you set `RUNNER=crio` in your environment prior
to using the script.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-07-19 17:32:01 -07:00
Manohar Castelino 0ffacbd904 Versioning: Update clearlinux version to 30270
Clearlinux release 30270 is now a known good version compatible
with kubernetes.

RuntimeName:  cri-o
RuntimeVersion:  1.14.4
RuntimeApiVersion:  v1alpha1

Kubernetes v1.15.0

runc version 1.0.0-rc5
spec: 1.0.0

systemd 242 (242)
+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=legacy

Kernel: 4.19.57-60.lts2018

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-07-10 17:09:45 -07:00
Saikrishna Edupuganti bbeb447a8a Pinning to working box version and clear version
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-06-25 10:04:49 -07:00
Saikrishna Edupuganti 8ab98c53db Configure canal to ignore rpf instead of host
Modifying rp_filter setting on host seems to be causing a routing issue
when connecting to a pod from remote node. Until we figure out the best
way to solve the issue, we are configuring canal to ignore default
setting of 2

Fixes: #102

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-06-20 17:03:48 -07:00
Ganesh Maharaj Mahalingam 0e280f40fa cri-o update fixes
ClearLinux now has cri-o version 1.14.1 which allows multiple plugin
locations and also creates /opt/cni/bin by default. We no longer need
the hacks for them

Fixes: #82
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-06-04 11:53:36 -07:00
Ganesh Maharaj Mahalingam d31d78c193 calico-node fails to come up cause of all.rp_filter
Currently net.ipv4.conf.all.rp_filter is set to 2 in Clear and
calico-node fails to come up unless that value is either 0 or 1.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-05-30 14:17:44 -07:00
Jose Carlos Venegas Munoz 04487a2cfe reset_stack: stop containerd and crio
- If stop CRI service if is running
- Restart the CRI service only if enabled
- Do not enable crio on reset_stack.sh this should be only part of the
setup.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-29 18:20:33 -07:00
Jose Carlos Venegas Munoz e67630b0bd create_stack: quote variables to avoid code expands
General fixes make my vim mark less warnings from shellcheck

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-24 11:40:49 -07:00
Jose Carlos Venegas Munoz e08c92f6d5 stack: do not provide CRI socket
kubeadm autodetects the socket path based on defaults from well known
CRI servers.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-24 11:37:08 -07:00
Jose Carlos Venegas Munoz d00a5ea9d8 README: update flavor setup information.
Add docuementation to use ./clr-k8s-examples/reset_stack.sh help

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-23 20:38:45 -07:00
Jose Carlos Venegas Munoz a9b3b5c506 create_stack: Add init and cni subcommands
Add more subcommands to to increase granularity

init: start cluster
cni: setup network

This functionality already existed, we only handle
subcommands in a more dynamic way.

Fixes: #92

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-23 18:56:59 -07:00
Ganesh Maharaj Mahalingam 24f248b02f Set reverse path forwarding to strict.
Calico requires the default reverse path forwarding to be either 0 (no
validation) or 1 (strict validation). The default value of 2 (loose
validation) prevents calico from completing the setup and the pod is
always stuck getting ready.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-05-18 14:13:13 -07:00
Ganesh Maharaj Mahalingam d688cbb693 Download OVMF if it doesn't exist
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-05-01 09:57:04 -07:00
Ganesh Maharaj Mahalingam 4e82cf411d Fix readme to add k8s version dependency
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-04-04 10:56:23 -07:00
Saikrishna Edupuganti af56d51499 Remove applying runtimeclass CRD
CRD was removed as part of 1.14 update. Missed update to create_stack

Fixes: #84

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-04-04 10:01:36 -07:00
Eric Ernst f863bb7f1f runtimeClass updates for kubernetes 1.14
RuntimeClass moved from alpha to beta. Remove the feature gates, remove
the runtimeClass CRD since it is a built in type, and take the new data
structure into account.

Fixes: #77

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-04-03 11:23:40 -07:00
Eric Ernst d0c7bb3513 kata-deploy: update to match what's on Kata master
We updated to use containerd v2 shim - pull in latest from master

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-03-28 13:09:39 -07:00
Saikrishna Edupuganti 4f38e14245 Turn on static policy for CPU manager
This is finally supported in Kata 1.6
Update memory limit for kata to run in guaranteed test case

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-03-27 10:27:12 -07:00
Saikrishna Edupuganti 3b7e7f75d1 Updated top-level README to point to admit-kata
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-03-27 10:26:54 -07:00
Saikrishna Edupuganti 39b454045d Copied the README too
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-03-27 10:26:54 -07:00
Saikrishna Edupuganti fe57aa93ff Upstream artifact for kata admission controller
Get upstream artifacts of kata admission controller from
https://github.com/kata-containers/tests/tree/master/kata-webhook
Commit: 5ad2cec

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-03-27 10:26:54 -07:00
Saikrishna Edupuganti 0417be1cdd Update README.md
Add note about environment variables that can be used to customize the setup
2019-03-26 16:35:25 -07:00
Ganesh Maharaj Mahalingam 02750e991c Make firecracker setup configurable
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-03-22 17:11:57 -07:00
Saikrishna Edupuganti dc345d4bdf Do not restart containerd, remove stop kubelet
In case of containerd there is no need to restart. Restart for crio is needed
when it manages the networks ns lifecycle. Removed the kubelet stop step which
was a leftover from earlier device plugin install.

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-03-20 13:23:16 -07:00
Manohar Castelino 935bb69cfd Eliminate legacy annotation
We only support kubernetes versions with support for runtimeClass.
Remove the legacy annotations to reduce confusion.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-03-14 10:03:37 -07:00
Manohar Castelino e5c55c3c0d Update webhook setup and documentation
The admission controller is now able to access full context.
Hence explicit tagging of pod manifests to exclude them from
kata is no longer required.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-03-14 10:03:37 -07:00
Manohar Castelino a6d2f487d8 Disable proxy
Disable proxy setup if the host does not have proxy setup in
the enviornment variables

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-03-12 09:57:44 -07:00
Saikrishna Edupuganti ed9f71ee92 Update README.md 2019-03-10 09:23:50 -07:00
Saikrishna Edupuganti c2e932ac7b Hotfix for rsync update in new clear (box?)
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-26 17:31:55 -08:00
Saikrishna Edupuganti 13226c0c72 Update README.md 2019-02-22 19:35:41 -08:00
Saikrishna Edupuganti be17bc3ab7 Use kata-deploy to install and configure kata
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-22 19:34:49 -08:00
Saikrishna Edupuganti b76ff0a4d3 Update multi-network readme
Add steps to show use of helper scripts
2019-02-20 17:05:24 -08:00
Ganesh Maharaj Mahalingam d57b6b187f kata_firecracker.sh script cleanup.
* Remove duplicate lifecycle entry in crio.conf
* Remove fc config.toml as that is provided by the distro.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-02-20 14:46:00 -08:00
Ganesh Maharaj Mahalingam b92dd0e5ed Check crio.conf before copying
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-02-19 13:02:40 -08:00
Manohar Castelino 5cd217a510 Disable devicemapper udev sync
Disable devicemapper udev sync. Without this the storage device
will not be discovered post system reboot

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-02-12 19:11:41 -08:00
Manohar Castelino ac79ef38c5 Downloading OVMF causes issues with libvirt
The parent box is already downloading the OVMF firmware.
Just use the firmware that is already downloaded.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-02-12 16:17:18 -08:00
Saikrishna Edupuganti a43f9bd3de Update to latest metrics-server 0.3.x works
With kubelet service file fixed and correct args set in
metrics-server-deployment.yaml, autoscale seems to be working reliably.

Fixes: #5

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-08 14:06:18 -08:00
Saikrishna Edupuganti b925d25730 Re-organize tests,Add resource/limits/runtimeclass
Currently cpumanagerpolicy:static is partially broken.
Hope these files catch future regressions

Added a script to generate yamls for different runtimeclass from
a template with different resource constraints on the pod

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-08 09:43:53 -08:00
Saikrishna Edupuganti f238ed6db1 Update README.md 2019-02-05 18:22:04 -08:00
Saikrishna 88b6d23aa9 Simplify sriov.sh, do not generate random MAC
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-05 18:22:04 -08:00
Saikrishna 7805f2c942 Show both netdevice and vfio examples
Addressing comments -
1a. added flag to `sriov.sh` to indicate bind to vfio-pci
1b. systemd unit sets up two pools 1 per mode
2a. updated `sriov-conf.yaml` to use the two pools
3a. included network examples for both resource pools
3b. included pod examples for both resource pools

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-05 18:22:04 -08:00
Saikrishna fc99db500b Enable sriov-network-device-plugin vfio mode
Adding a cni to mirror MAC address of VF on a veth pair with results
from ipam applied to enable DPDK apps to configure themselves when
operating sriov-network-device-plugin in vfio mode

Updated helper sriov.sh to allow for binding VFs to vfio-pci on boot

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-05 18:22:04 -08:00
Saikrishna Edupuganti 72659b3ba3 Make script executable and qualify run as pod
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-02-05 17:58:30 -08:00
Manohar Castelino c234cca3c3 kata-webhook: Change location to katadocker
The kata-webhook is now hosted within the Kata repository.
Switch to using the kata generated images

https://cloud.docker.com/u/katadocker/repository/docker/katadocker/kata-webhook-example
https://github.com/kata-containers/tests/tree/master/kata-webhook

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-02-01 15:43:34 -08:00
Saikrishna Edupuganti a979f0056b Revert "kata 1.5 supports cpumanagerpolicy static"
This reverts commit c8006ca944.

Got too excited. Lets try this in next release
2019-01-31 21:24:20 +00:00
Ganesh Maharaj Mahalingam f8dc5cd815 Change disk image names
Avoid creating unique names for disks as vagrant-libvirt today does not
delete those images when VMs are deleted. Once that is fixed we can move
back to using unique names. Until then this should suffice.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-01-31 13:34:35 -08:00
Ganesh Maharaj Mahalingam f33ecc1091 Switch vagrant boxes
Switching boxes to the one maintained by Antonio at
https://github.com/AntonioMeireles/ClearLinux-packer. They now support
libvirt and will eventually be part of the clearlinux tree.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-01-30 10:18:22 -08:00
Saikrishna Edupuganti 97f8ea2506 Moving around to allow early exit
In case we need to exit early this would have copied the credentials
into the home dir

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-30 09:10:52 -08:00
Saikrishna Edupuganti c8006ca944 kata 1.5 supports cpumanagerpolicy static
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-30 09:10:52 -08:00
Saikrishna Edupuganti 0d01668513 Update readme with location of files and cleanup
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-17 14:14:33 -08:00
Saikrishna Edupuganti f5b1aa7ee5 Mount the working dir at vagrant user home
Instead of mounting at /vagrant it will now be at /home/vagrant/clr-k8s-examples

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-17 14:14:33 -08:00
Ganesh Maharaj Mahalingam 5beadf6a23 Enable kubectl autocompletion by default in the VMs
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-01-14 19:17:55 -08:00
Saikrishna 42ffa8df71 Auto-generate multus conf. Do not exit sriov DS
Instead of relying on configmap to be created/customized by the user to
generate multus conf, we autogenerate it using the current default CNI
conf file on the host. This way CNI's with host specific conf details
will continue to work.

```
{
  "type": "calico",
  "nodename": "clr-01",
   ...
}
```

Since SR-IOV device may not be present on all nodes, the daemonset
should not exit as this will put the pod in restart loop. This would
cause the kubelet and runtimes to repeatedly restart, as per
initContainer logic.

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-08 15:34:45 -08:00
Saikrishna 39f3e063d3 Example systemd scripts to setup SR-IOV on nodes
Signed-off-by Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-07 11:41:40 -08:00
Saikrishna aecda4bf65 Add README for multus and sriov
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-07 11:41:40 -08:00
Saikrishna e974d2fc51 Add Dockerfile to generate the image with multus, sriov binaries
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-07 11:41:40 -08:00
Saikrishna a0261d6507 Adding multus and sriov artifacts
This set of yamls installs multus-cni, sriov-cni and sriov-device-plugin

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-07 11:41:40 -08:00
Saikrishna e4ea313ff2 Adding gitignore
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-04 22:04:15 -08:00
Saikrishna Edupuganti 3291e1582d Rename test-deploy-kata-fire.yaml to test-deploy-kata-fc.yaml
Typo
2019-01-04 14:44:25 -08:00
Saikrishna bfa29b5543 [README] Update to reflect filename changes
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-04 14:32:00 -08:00
Saikrishna f96b48beca Make naming consistent, kata points to kata-qemu
Runtime class kata-qemu created and older kata point to kata-qemu
handler. Now all the handlers match the crio.conf settings.

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-04 14:32:00 -08:00
Eric Ernst eff1fc9021 update runtimeClass, binary naming
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-01-04 14:32:00 -08:00
Manohar Castelino 7ddf9c3911 Firecracker: Update README
Update README to call out how to try firecracker workloads.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-01-04 10:19:23 -08:00
Saikrishna Edupuganti 1908f0c9fc Minor modifications (#1)
Keep `setup_firecracker.sh` separate and mark it experimental in README.
Fix modules load, needed to run k8s without reboot. Fix runtimeclass to
add fire.

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-04 09:43:19 -08:00
Manohar Castelino 7dfce0dd00 Initial support for firecracker configuration on Clearlinux
Initial support for firecracker configuration on Clearlinux.
This is a little bit complicated due to CRIO requiring a
disk or partition to use devicemapper.

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2019-01-04 09:43:19 -08:00
Saikrishna Edupuganti 113e3b4daf Reflect two flavors of install 2019-01-03 15:22:05 -08:00
Saikrishna d6b4306a10 Re-organized and formatted the scripts
Added an option to do minimal install. Default is all

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-03 15:22:05 -08:00
Saikrishna 452e467969 Temporarily disable cpuManagerPolicy=static
Temporarily disabled `cpuManagerPolicy=static`, issue below
https://github.com/kata-containers/runtime/issues/878

Provided kata equivalent yaml for cpumanager test

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-02 16:23:03 -08:00
Saikrishna e3f8369c11 Example usage for Guaranteed QoS workload
```
$ kubectl logs test-cpumanager-runc
pid 1's current affinity mask: 100000000000
```

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-02 08:35:59 -08:00
Saikrishna 5fe7fa0d89 Set CPUManagerPolicy=static, reserve compute resources
Fixes: #8, #16

Setting CPUManager=static allows `Guaranteed` QoS class workloads to
get cpu isolation and affinity benefits.
https://kubernetes.io/blog/2018/07/24/feature-highlight-cpu-manager/

Setting reserved compute resources for system processes and critical
kube components prevents from DoS'ing the compute node.
https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-02 08:35:59 -08:00
Saikrishna d4c47d2c5b Update canal manifest and setup_system.sh
Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2019-01-02 08:24:36 -08:00
Saikrishna 9f097cacd8 Do not pin kubernetes version in kubeadm config
clearlinux-pkgs/kubernetes installs kubeadm kubelet of the same version
and kubeadm uses/fallsback to stable branch of its major+minor version when
generating kubernetes component manifests if none is provided. This
helps with staying upto date with any fixes without any further
modifications

```
vagrant@clr-01 ~ $ bash /vagrant/create_stack.sh
I1207 21:37:25.285850   16086 version.go:236] remote version is much newer: v1.13.0; falling back to: stable-1.12
[init] using Kubernetes version: v1.12.3
```

Signed-off-by: Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>
2018-12-07 14:17:32 -08:00
Graham Whaley bdd8d89025 setup: restart services
After we have maybe modified the setups of the services, we need to
reload and restart them.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-12-07 07:42:40 -08:00
Graham Whaley 5246582266 setup: fix whitespace
we had a bunch of 2-space indents - convert to tabs to match
the rest of the file.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-12-07 07:42:40 -08:00
Graham Whaley f352bdde76 setup_system.sh: bolster checks and quieten output
Bolster some checks so we don't try to edit files that do not
exist (for proxy setup for instance).
Also replace the 'sudo tee' commands with 'sudo bash -c "cat >"'
commands to reduce the echoing of the output to stdout.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2018-12-07 07:42:40 -08:00
William Douglas e49f0490bd Use tabs instead of spaces to indent the Makefile 2018-12-06 10:59:41 -08:00
260 changed files with 8502 additions and 19026 deletions
+3
View File
@@ -0,0 +1,3 @@
.vagrant
OVMF.fd
Vendored
+56
View File
@@ -0,0 +1,56 @@
pipeline {
agent {
label 'clearlinux'
}
options {
timeout(time: 1, unit: "HOURS")
}
triggers {
cron('H */12 * * *')
}
environment {
CLR_K8S_PATH="${env.WORKSPACE}/clr-k8s-examples"
}
stages {
stage('Setup system') {
steps {
dir(path: "$CLR_K8S_PATH") {
sh './setup_system.sh'
}
}
}
stage('Init') {
steps {
dir(path: "$CLR_K8S_PATH") {
sh './create_stack.sh init'
sh 'mkdir -p $HOME/.kube'
sh 'sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config'
sh 'sudo chown $(id -u):$(id -g) $HOME/.kube/config'
sh 'kubectl version'
}
}
}
stage('CNI') {
steps {
dir(path: "$CLR_K8S_PATH") {
sh './create_stack.sh cni'
sh 'kubectl rollout status deployment/coredns -n kube-system --timeout=5m'
sh 'kubectl get pods -n kube-system'
}
}
}
stage('Reset Stack') {
steps {
dir(path: "$CLR_K8S_PATH") {
sh './reset_stack.sh'
}
}
}
}
post {
always {
sh 'uname -a'
sh 'swupd info'
}
}
}
+2 -2
View File
@@ -5,5 +5,5 @@ TARGET ?= $(PREFIX)/share/
all:
install:
install -m 0755 -d $(DESTDIR)/$(TARGET)/clr-k8s-examples
cp -r clr-k8s-examples/* $(DESTDIR)/$(TARGET)/clr-k8s-examples/
install -m 0755 -d $(DESTDIR)/$(TARGET)/clr-k8s-examples
cp -r clr-k8s-examples/* $(DESTDIR)/$(TARGET)/clr-k8s-examples/
+7
View File
@@ -0,0 +1,7 @@
## Cloud Native Setup
Automation around setting up the cloud-native content (Kubernetes) on Clear Linux.
### Folder Structure
* **clr-k8s-examples**: script tools to deploy a Kubernetes cluster
* **metrics**: tools to aid in measuring the scaling capabilities of Kubernetes clusters.
-405
View File
@@ -1,405 +0,0 @@
# Canal Version v3.3.0
# https://docs.projectcalico.org/v3.3/releases#v3.3.0
# This manifest includes the following component versions:
# calico/node:v3.3.0
# calico/cni:v3.3.0
# coreos/flannel:v0.9.1
# This ConfigMap is used to configure a self-hosted Canal installation.
kind: ConfigMap
apiVersion: v1
metadata:
name: canal-config
namespace: kube-system
data:
# The interface used by canal for host <-> host communication.
# If left blank, then the interface is chosen using the node's
# default route.
canal_iface: ""
# Whether or not to masquerade traffic to destinations not within
# the pod network.
masquerade: "true"
# The CNI network configuration to install on each node. The special
# values in this config will be automatically populated.
cni_network_config: |-
{
"name": "k8s-pod-network",
"cniVersion": "0.3.0",
"plugins": [
{
"type": "calico",
"log_level": "info",
"datastore_type": "kubernetes",
"nodename": "__KUBERNETES_NODE_NAME__",
"ipam": {
"type": "host-local",
"subnet": "usePodCidr"
},
"policy": {
"type": "k8s"
},
"kubernetes": {
"kubeconfig": "__KUBECONFIG_FILEPATH__"
}
},
{
"type": "portmap",
"snat": true,
"capabilities": {"portMappings": true}
}
]
}
# Flannel network configuration. Mounted into the flannel container.
net-conf.json: |
{
"Network": "10.244.0.0/16",
"Backend": {
"Type": "vxlan"
}
}
---
# This manifest installs the calico/node container, as well
# as the Calico CNI plugins and network config on
# each master and worker node in a Kubernetes cluster.
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: canal
namespace: kube-system
labels:
k8s-app: canal
spec:
selector:
matchLabels:
k8s-app: canal
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
k8s-app: canal
annotations:
# This, along with the CriticalAddonsOnly toleration below,
# marks the pod as a critical add-on, ensuring it gets
# priority scheduling and that its resources are reserved
# if it ever gets evicted.
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
nodeSelector:
beta.kubernetes.io/os: linux
hostNetwork: true
tolerations:
# Make sure canal gets scheduled on all nodes.
- effect: NoSchedule
operator: Exists
# Mark the pod as a critical add-on for rescheduling.
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
serviceAccountName: canal
# Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
# deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
terminationGracePeriodSeconds: 0
containers:
# Runs calico/node container on each Kubernetes node. This
# container programs network policy and routes on each
# host.
- name: calico-node
image: quay.io/calico/node:v3.3.0
env:
# Use Kubernetes API as the backing datastore.
- name: DATASTORE_TYPE
value: "kubernetes"
# Wait for the datastore.
- name: WAIT_FOR_DATASTORE
value: "true"
# Set based on the k8s node name.
- name: NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# Don't enable BGP.
- name: CALICO_NETWORKING_BACKEND
value: "none"
# Cluster type to identify the deployment type
- name: CLUSTER_TYPE
value: "k8s,canal"
# Period, in seconds, at which felix re-applies all iptables state
- name: FELIX_IPTABLESREFRESHINTERVAL
value: "60"
# No IP address needed.
- name: IP
value: ""
# The default IPv4 pool to create on startup if none exists. Pod IPs will be
# chosen from this range. Changing this value after installation will have
# no effect. This should fall within `--cluster-cidr`.
- name: CALICO_IPV4POOL_CIDR
value: "192.168.0.0/16"
# Disable file logging so `kubectl logs` works.
- name: CALICO_DISABLE_FILE_LOGGING
value: "true"
# Set Felix endpoint to host default action to ACCEPT.
- name: FELIX_DEFAULTENDPOINTTOHOSTACTION
value: "ACCEPT"
# Disable IPv6 on Kubernetes.
- name: FELIX_IPV6SUPPORT
value: "false"
# Set Felix logging to "info"
- name: FELIX_LOGSEVERITYSCREEN
value: "info"
- name: FELIX_HEALTHENABLED
value: "true"
securityContext:
privileged: true
resources:
requests:
cpu: 250m
livenessProbe:
httpGet:
path: /liveness
port: 9099
host: localhost
periodSeconds: 10
initialDelaySeconds: 10
failureThreshold: 6
readinessProbe:
httpGet:
path: /readiness
port: 9099
host: localhost
periodSeconds: 10
volumeMounts:
- mountPath: /lib/modules
name: lib-modules
readOnly: true
- mountPath: /run/xtables.lock
name: xtables-lock
readOnly: false
- mountPath: /var/run/calico
name: var-run-calico
readOnly: false
- mountPath: /var/lib/calico
name: var-lib-calico
readOnly: false
# This container installs the Calico CNI binaries
# and CNI network config file on each node.
- name: install-cni
image: quay.io/calico/cni:v3.3.0
command: ["/install-cni.sh"]
env:
# Name of the CNI config file to create.
- name: CNI_CONF_NAME
value: "10-canal.conflist"
# Set the hostname based on the k8s node name.
- name: KUBERNETES_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
# The CNI network config to install on each node.
- name: CNI_NETWORK_CONFIG
valueFrom:
configMapKeyRef:
name: canal-config
key: cni_network_config
volumeMounts:
- mountPath: /host/opt/cni/bin
name: cni-bin-dir
- mountPath: /host/etc/cni/net.d
name: cni-net-dir
# This container runs flannel using the kube-subnet-mgr backend
# for allocating subnets.
- name: kube-flannel
image: quay.io/coreos/flannel:v0.9.1
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
securityContext:
privileged: true
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: FLANNELD_IFACE
valueFrom:
configMapKeyRef:
name: canal-config
key: canal_iface
- name: FLANNELD_IP_MASQ
valueFrom:
configMapKeyRef:
name: canal-config
key: masquerade
volumeMounts:
- mountPath: /run/xtables.lock
name: xtables-lock
readOnly: false
- name: flannel-cfg
mountPath: /etc/kube-flannel/
volumes:
# Used by calico/node.
- name: lib-modules
hostPath:
path: /lib/modules
- name: var-run-calico
hostPath:
path: /var/run/calico
- name: var-lib-calico
hostPath:
path: /var/lib/calico
- name: xtables-lock
hostPath:
path: /run/xtables.lock
type: FileOrCreate
# Used by flannel.
- name: flannel-cfg
configMap:
name: canal-config
# Used to install CNI.
- name: cni-bin-dir
hostPath:
path: /opt/cni/bin
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: canal
namespace: kube-system
---
# Create all the CustomResourceDefinitions needed for
# Calico policy and networking mode.
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: felixconfigurations.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: FelixConfiguration
plural: felixconfigurations
singular: felixconfiguration
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: bgpconfigurations.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: BGPConfiguration
plural: bgpconfigurations
singular: bgpconfiguration
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ippools.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: IPPool
plural: ippools
singular: ippool
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: hostendpoints.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: HostEndpoint
plural: hostendpoints
singular: hostendpoint
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: clusterinformations.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: ClusterInformation
plural: clusterinformations
singular: clusterinformation
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: globalnetworkpolicies.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: GlobalNetworkPolicy
plural: globalnetworkpolicies
singular: globalnetworkpolicy
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: globalnetworksets.crd.projectcalico.org
spec:
scope: Cluster
group: crd.projectcalico.org
version: v1
names:
kind: GlobalNetworkSet
plural: globalnetworksets
singular: globalnetworkset
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: networkpolicies.crd.projectcalico.org
spec:
scope: Namespaced
group: crd.projectcalico.org
version: v1
names:
kind: NetworkPolicy
plural: networkpolicies
singular: networkpolicy
@@ -0,0 +1,4 @@
resources:
- canal/canal.yaml
@@ -0,0 +1,2 @@
resources:
- canal/canal.yaml
@@ -0,0 +1,4 @@
resources:
- canal/canal.yaml
@@ -0,0 +1,4 @@
resources:
- canal/canal.yaml
@@ -0,0 +1,4 @@
resources:
- canal/canal.yaml
- canal/rbac.yaml
@@ -0,0 +1,4 @@
resources:
- canal/canal.yaml
-131
View File
@@ -1,131 +0,0 @@
# {{site.prodname}} Roles
# Reference {{site.url}}/{{page.version}}/getting-started/kubernetes/installation/hosted/rbac-kdd.yaml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: calico
rules:
- apiGroups: [""]
resources:
- namespaces
- serviceaccounts
verbs:
- get
- list
- watch
- apiGroups: [""]
resources:
- pods/status
verbs:
- patch
- apiGroups: [""]
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups: [""]
resources:
- services
verbs:
- get
- apiGroups: [""]
resources:
- endpoints
verbs:
- get
- apiGroups: [""]
resources:
- nodes
verbs:
- get
- list
- update
- watch
- apiGroups: ["networking.k8s.io"]
resources:
- networkpolicies
verbs:
- get
- list
- watch
- apiGroups: ["crd.projectcalico.org"]
resources:
- globalfelixconfigs
- felixconfigurations
- bgppeers
- globalbgpconfigs
- globalnetworksets
- hostendpoints
- bgpconfigurations
- ippools
- globalnetworkpolicies
- networkpolicies
- clusterinformations
verbs:
- create
- get
- list
- update
- watch
---
# Flannel roles
# Pulled from https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel-rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: flannel
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- nodes/status
verbs:
- patch
---
# Bind the flannel ClusterRole to the canal ServiceAccount.
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: canal-flannel
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: flannel
subjects:
- kind: ServiceAccount
name: canal
namespace: kube-system
---
# Bind the {{site.prodname}} ClusterRole to the canal ServiceAccount.
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: canal-calico
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: calico
subjects:
- kind: ServiceAccount
name: canal
namespace: kube-system
-2
View File
@@ -1,2 +0,0 @@
https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/canal/rbac.yaml
https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/hosted/canal/canal.yaml
@@ -0,0 +1,2 @@
resources:
cilium/cilium.yaml
@@ -0,0 +1,2 @@
resources:
cilium/cilium.yaml
@@ -0,0 +1,2 @@
resources:
cilium/cilium.yaml
@@ -0,0 +1,5 @@
ipam:
mode: "cluster-pool"
operator:
clusterPoolIPv4PodCIDR: "10.244.0.0/16"
clusterPoolIPv4MaskSize: 24
@@ -0,0 +1,2 @@
resources:
- flannel/Documentation/kube-flannel.yml
@@ -0,0 +1,2 @@
resources:
- flannel/Documentation/kube-flannel.yml
@@ -0,0 +1,2 @@
resources:
- flannel/Documentation/kube-flannel.yml
@@ -0,0 +1,2 @@
resources:
- flannel/Documentation/kube-flannel.yml
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: metrics-server:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
@@ -1,13 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: metrics-server-auth-reader
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
@@ -1,13 +0,0 @@
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io
spec:
service:
name: metrics-server
namespace: kube-system
group: metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100
@@ -1,31 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-server
namespace: kube-system
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: metrics-server
namespace: kube-system
labels:
k8s-app: metrics-server
spec:
selector:
matchLabels:
k8s-app: metrics-server
template:
metadata:
name: metrics-server
labels:
k8s-app: metrics-server
spec:
serviceAccountName: metrics-server
containers:
- name: metrics-server
image: gcr.io/google_containers/metrics-server-amd64:v0.2.0
imagePullPolicy: Always
command:
- /metrics-server
- --source=kubernetes.summary_api:https://kubernetes.default.svc?kubeletHttps=true&kubeletPort=10250&useServiceAccount=true&insecure=true
@@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: metrics-server
namespace: kube-system
labels:
kubernetes.io/name: "Metrics-server"
spec:
selector:
k8s-app: metrics-server
ports:
- port: 443
protocol: TCP
targetPort: 443
@@ -0,0 +1,8 @@
resources:
- metrics-server/deploy/1.8+/aggregated-metrics-reader.yaml
- metrics-server/deploy/1.8+/auth-delegator.yaml
- metrics-server/deploy/1.8+/auth-reader.yaml
- metrics-server/deploy/1.8+/metrics-apiservice.yaml
- metrics-server/deploy/1.8+/metrics-server-deployment.yaml
- metrics-server/deploy/1.8+/metrics-server-service.yaml
- metrics-server/deploy/1.8+/resource-reader.yaml
@@ -0,0 +1,8 @@
resources:
- metrics-server/deploy/1.8+/aggregated-metrics-reader.yaml
- metrics-server/deploy/1.8+/auth-delegator.yaml
- metrics-server/deploy/1.8+/auth-reader.yaml
- metrics-server/deploy/1.8+/metrics-apiservice.yaml
- metrics-server/deploy/1.8+/metrics-server-deployment.yaml
- metrics-server/deploy/1.8+/metrics-server-service.yaml
- metrics-server/deploy/1.8+/resource-reader.yaml
@@ -0,0 +1,8 @@
resources:
- metrics-server/deploy/1.8+/aggregated-metrics-reader.yaml
- metrics-server/deploy/1.8+/auth-delegator.yaml
- metrics-server/deploy/1.8+/auth-reader.yaml
- metrics-server/deploy/1.8+/metrics-apiservice.yaml
- metrics-server/deploy/1.8+/metrics-server-deployment.yaml
- metrics-server/deploy/1.8+/metrics-server-service.yaml
- metrics-server/deploy/1.8+/resource-reader.yaml
@@ -0,0 +1,8 @@
resources:
- components.yaml
patchesJson6902:
- target:
version: v1
kind: Deployment
name: metrics-server
path: patch_metricstls.yaml
@@ -0,0 +1,3 @@
- op: add
path: "/spec/template/spec/containers/0/args/-"
value: --kubelet-insecure-tls
@@ -1,37 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- nodes/stats
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- "extensions"
resources:
- deployments
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
-1
View File
@@ -1 +0,0 @@
f90c6705d2381ea2db1a6343da6c400bd2ef4cb2
@@ -1,14 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
@@ -1,176 +0,0 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------- Dashboard Secret ------------------- #
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-certs
namespace: kube-system
type: Opaque
---
# ------------------- Dashboard Service Account ------------------- #
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
---
# ------------------- Dashboard Role & Role Binding ------------------- #
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kubernetes-dashboard-minimal
namespace: kube-system
rules:
# Allow Dashboard to create 'kubernetes-dashboard-key-holder' secret.
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create"]
# Allow Dashboard to create 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["create"]
# Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]
resources: ["secrets"]
resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs"]
verbs: ["get", "update", "delete"]
# Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["kubernetes-dashboard-settings"]
verbs: ["get", "update"]
# Allow Dashboard to get metrics from heapster.
- apiGroups: [""]
resources: ["services"]
resourceNames: ["heapster"]
verbs: ["proxy"]
- apiGroups: [""]
resources: ["services/proxy"]
resourceNames: ["heapster", "http:heapster:", "https:heapster:"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kubernetes-dashboard-minimal
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kubernetes-dashboard-minimal
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
---
# ------------------- Dashboard Deployment ------------------- #
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: kubernetes-dashboard-pvc
namespace: kube-system
labels:
k8s-app: kubernetes-dashboard
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
kind: Deployment
apiVersion: apps/v1beta2
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s-app: kubernetes-dashboard
template:
metadata:
labels:
k8s-app: kubernetes-dashboard
spec:
containers:
- name: kubernetes-dashboard
image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0
ports:
- containerPort: 8443
protocol: TCP
args:
- --auto-generate-certificates
# Uncomment the following line to manually specify Kubernetes API server Host
# If not specified, Dashboard will attempt to auto discover the API server and connect
# to it. Uncomment only if the default does not work.
# - --apiserver-host=http://my-address:port
volumeMounts:
- name: kubernetes-dashboard-certs
mountPath: /certs
# Create on-disk volume to store exec logs
- mountPath: /tmp
name: tmp-volume
livenessProbe:
httpGet:
scheme: HTTPS
path: /
port: 8443
initialDelaySeconds: 30
timeoutSeconds: 30
volumes:
- name: kubernetes-dashboard-certs
secret:
secretName: kubernetes-dashboard-certs
- name: tmp-volume
persistentVolumeClaim:
claimName: kubernetes-dashboard-pvc
serviceAccountName: kubernetes-dashboard
# Comment the following tolerations if Dashboard must not be deployed on master
#tolerations:
#- key: node-role.kubernetes.io/master
# effect: NoSchedule
---
# ------------------- Dashboard Service ------------------- #
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard
namespace: kube-system
spec:
ports:
- port: 443
targetPort: 8443
selector:
k8s-app: kubernetes-dashboard
@@ -0,0 +1,3 @@
resources:
- dashboard/src/deploy/recommended/kubernetes-dashboard.yaml
@@ -0,0 +1,3 @@
resources:
- dashboard/aio/deploy/recommended.yaml
@@ -0,0 +1,19 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kubernetes-dashboard
@@ -0,0 +1,4 @@
resources:
- dashboard/aio/deploy/recommended.yaml
- dashboard-admin.yaml
-1
View File
@@ -1 +0,0 @@
https://github.com/kubernetes/dashboard/commit/5728e0303a742a889d9a25c7ae9c07e426917e90
-17
View File
@@ -1,17 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: elasticsearch-logging
namespace: kube-system
labels:
k8s-app: elasticsearch-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "Elasticsearch"
spec:
ports:
- port: 9200
protocol: TCP
targetPort: db
selector:
k8s-app: elasticsearch-logging
-117
View File
@@ -1,117 +0,0 @@
# RBAC authn and authz
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch-logging
namespace: kube-system
labels:
k8s-app: elasticsearch-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: elasticsearch-logging
labels:
k8s-app: elasticsearch-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
rules:
- apiGroups:
- ""
resources:
- "services"
- "namespaces"
- "endpoints"
verbs:
- "get"
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: kube-system
name: elasticsearch-logging
labels:
k8s-app: elasticsearch-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
subjects:
- kind: ServiceAccount
name: elasticsearch-logging
namespace: kube-system
apiGroup: ""
roleRef:
kind: ClusterRole
name: elasticsearch-logging
apiGroup: ""
---
# Elasticsearch deployment itself
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch-logging
namespace: kube-system
labels:
k8s-app: elasticsearch-logging
version: v6.3.0
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
serviceName: elasticsearch-logging
replicas: 2
volumeClaimTemplates:
- metadata:
name: elasticsearch-logging
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
selector:
matchLabels:
k8s-app: elasticsearch-logging
version: v6.3.0
template:
metadata:
labels:
k8s-app: elasticsearch-logging
version: v6.3.0
kubernetes.io/cluster-service: "true"
spec:
serviceAccountName: elasticsearch-logging
containers:
- image: k8s.gcr.io/elasticsearch:v6.3.0
name: elasticsearch-logging
resources:
# need more cpu upon initialization, therefore burstable class
limits:
cpu: 1000m
requests:
cpu: 100m
ports:
- containerPort: 9200
name: db
protocol: TCP
- containerPort: 9300
name: transport
protocol: TCP
volumeMounts:
- name: elasticsearch-logging
mountPath: /data
env:
- name: "NAMESPACE"
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# Elasticsearch requires vm.max_map_count to be at least 262144.
# If your OS already sets up this number to a higher value, feel free
# to remove this init container.
initContainers:
- image: alpine:3.6
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
name: elasticsearch-logging-init
securityContext:
privileged: true
@@ -1,464 +0,0 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: fluentd-es-config-v0.1.6
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: Reconcile
data:
system.conf: |-
<system>
root_dir /tmp/fluentd-buffers/
</system>
containers.input.conf: |-
# This configuration file for Fluentd / td-agent is used
# to watch changes to Docker log files. The kubelet creates symlinks that
# capture the pod name, namespace, container name & Docker container ID
# to the docker logs for pods in the /var/log/containers directory on the host.
# If running this fluentd configuration in a Docker container, the /var/log
# directory should be mounted in the container.
#
# These logs are then submitted to Elasticsearch which assumes the
# installation of the fluent-plugin-elasticsearch & the
# fluent-plugin-kubernetes_metadata_filter plugins.
# See https://github.com/uken/fluent-plugin-elasticsearch &
# https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter for
# more information about the plugins.
#
# Example
# =======
# A line in the Docker log file might look like this JSON:
#
# {"log":"2014/09/25 21:15:03 Got request with path wombat\n",
# "stream":"stderr",
# "time":"2014-09-25T21:15:03.499185026Z"}
#
# The time_format specification below makes sure we properly
# parse the time format produced by Docker. This will be
# submitted to Elasticsearch and should appear like:
# $ curl 'http://elasticsearch-logging:9200/_search?pretty'
# ...
# {
# "_index" : "logstash-2014.09.25",
# "_type" : "fluentd",
# "_id" : "VBrbor2QTuGpsQyTCdfzqA",
# "_score" : 1.0,
# "_source":{"log":"2014/09/25 22:45:50 Got request with path wombat\n",
# "stream":"stderr","tag":"docker.container.all",
# "@timestamp":"2014-09-25T22:45:50+00:00"}
# },
# ...
#
# The Kubernetes fluentd plugin is used to write the Kubernetes metadata to the log
# record & add labels to the log record if properly configured. This enables users
# to filter & search logs on any metadata.
# For example a Docker container's logs might be in the directory:
#
# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b
#
# and in the file:
#
# 997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log
#
# where 997599971ee6... is the Docker ID of the running container.
# The Kubernetes kubelet makes a symbolic link to this file on the host machine
# in the /var/log/containers directory which includes the pod name and the Kubernetes
# container name:
#
# synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
# ->
# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log
#
# The /var/log directory on the host is mapped to the /var/log directory in the container
# running this instance of Fluentd and we end up collecting the file:
#
# /var/log/containers/synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
#
# This results in the tag:
#
# var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
#
# The Kubernetes fluentd plugin is used to extract the namespace, pod name & container name
# which are added to the log message as a kubernetes field object & the Docker container ID
# is also added under the docker field object.
# The final tag is:
#
# kubernetes.var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
#
# And the final log record look like:
#
# {
# "log":"2014/09/25 21:15:03 Got request with path wombat\n",
# "stream":"stderr",
# "time":"2014-09-25T21:15:03.499185026Z",
# "kubernetes": {
# "namespace": "default",
# "pod_name": "synthetic-logger-0.25lps-pod",
# "container_name": "synth-lgr"
# },
# "docker": {
# "container_id": "997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b"
# }
# }
#
# This makes it easier for users to search for logs by pod name or by
# the name of the Kubernetes container regardless of how many times the
# Kubernetes pod has been restarted (resulting in a several Docker container IDs).
# Json Log Example:
# {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"}
# CRI Log Example:
# 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here
<source>
@id fluentd-containers.log
@type tail
path /var/log/containers/*.log
pos_file /var/log/es-containers.log.pos
tag raw.kubernetes.*
read_from_head true
<parse>
@type multi_format
<pattern>
format json
time_key time
time_format %Y-%m-%dT%H:%M:%S.%NZ
</pattern>
<pattern>
format /^(?<time>.+) (?<stream>stdout|stderr) [^ ]* (?<log>.*)$/
time_format %Y-%m-%dT%H:%M:%S.%N%:z
</pattern>
</parse>
</source>
# Detect exceptions in the log output and forward them as one log entry.
<match raw.kubernetes.**>
@id raw.kubernetes
@type detect_exceptions
remove_tag_prefix raw
message log
stream stream
multiline_flush_interval 5
max_bytes 500000
max_lines 1000
</match>
system.input.conf: |-
# Example:
# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
<source>
@id minion
@type tail
format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
time_format %Y-%m-%d %H:%M:%S
path /var/log/salt/minion
pos_file /var/log/salt.pos
tag salt
</source>
# Example:
# Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script
<source>
@id startupscript.log
@type tail
format syslog
path /var/log/startupscript.log
pos_file /var/log/es-startupscript.log.pos
tag startupscript
</source>
# Examples:
# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
# TODO(random-liu): Remove this after cri container runtime rolls out.
<source>
@id docker.log
@type tail
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
path /var/log/docker.log
pos_file /var/log/es-docker.log.pos
tag docker
</source>
# Example:
# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
<source>
@id etcd.log
@type tail
# Not parsing this, because it doesn't have anything particularly useful to
# parse out of it (like severities).
format none
path /var/log/etcd.log
pos_file /var/log/es-etcd.log.pos
tag etcd
</source>
# Multi-line parsing is required for all the kube logs because very large log
# statements, such as those that include entire object bodies, get split into
# multiple lines by glog.
# Example:
# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
<source>
@id kubelet.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/kubelet.log
pos_file /var/log/es-kubelet.log.pos
tag kubelet
</source>
# Example:
# I1118 21:26:53.975789 6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
<source>
@id kube-proxy.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/kube-proxy.log
pos_file /var/log/es-kube-proxy.log.pos
tag kube-proxy
</source>
# Example:
# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
<source>
@id kube-apiserver.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/kube-apiserver.log
pos_file /var/log/es-kube-apiserver.log.pos
tag kube-apiserver
</source>
# Example:
# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
<source>
@id kube-controller-manager.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/kube-controller-manager.log
pos_file /var/log/es-kube-controller-manager.log.pos
tag kube-controller-manager
</source>
# Example:
# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
<source>
@id kube-scheduler.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/kube-scheduler.log
pos_file /var/log/es-kube-scheduler.log.pos
tag kube-scheduler
</source>
# Example:
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
<source>
@id glbc.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/glbc.log
pos_file /var/log/es-glbc.log.pos
tag glbc
</source>
# Example:
# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf
<source>
@id cluster-autoscaler.log
@type tail
format multiline
multiline_flush_interval 5s
format_firstline /^\w\d{4}/
format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
time_format %m%d %H:%M:%S.%N
path /var/log/cluster-autoscaler.log
pos_file /var/log/es-cluster-autoscaler.log.pos
tag cluster-autoscaler
</source>
# Logs from systemd-journal for interesting services.
# TODO(random-liu): Remove this after cri container runtime rolls out.
<source>
@id journald-docker
@type systemd
matches [{ "_SYSTEMD_UNIT": "docker.service" }]
<storage>
@type local
persistent true
path /var/log/journald-docker.pos
</storage>
read_from_head true
tag docker
</source>
<source>
@id journald-container-runtime
@type systemd
matches [{ "_SYSTEMD_UNIT": "crio.service" }]
<storage>
@type local
persistent true
path /var/log/journald-container-runtime.pos
</storage>
read_from_head true
tag container-runtime
</source>
# <source>
# @type systemd
# path /var/log/journal
# matches [{"SYSLOG_IDENTIFIER": "kata-runtime"}, {"SYSLOG_IDENTIFIER": "kata-proxy"}, {"SYSLOG_IDENTIFIER": "kata-shim"}]
# tag kata-containers
# <entry>
# fields_strip_underscores true
# fields_lowercase true
# </entry>
# </source>
<source>
@id journald-kubelet
@type systemd
matches [{ "_SYSTEMD_UNIT": "kubelet.service" }]
<storage>
@type local
persistent true
path /var/log/journald-kubelet.pos
</storage>
read_from_head true
tag kubelet
</source>
<source>
@id journald-node-problem-detector
@type systemd
matches [{ "_SYSTEMD_UNIT": "node-problem-detector.service" }]
<storage>
@type local
persistent true
path /var/log/journald-node-problem-detector.pos
</storage>
read_from_head true
tag node-problem-detector
</source>
<source>
@id kernel
@type systemd
matches [{ "_TRANSPORT": "kernel" }]
<storage>
@type local
persistent true
path /var/log/kernel.pos
</storage>
<entry>
fields_strip_underscores true
fields_lowercase true
</entry>
read_from_head true
tag kernel
</source>
forward.input.conf: |-
# Takes the messages sent over TCP
<source>
@type forward
</source>
monitoring.conf: |-
# Prometheus Exporter Plugin
# input plugin that exports metrics
<source>
@type prometheus
</source>
<source>
@type monitor_agent
</source>
# input plugin that collects metrics from MonitorAgent
<source>
@type prometheus_monitor
<labels>
host ${hostname}
</labels>
</source>
# input plugin that collects metrics for output plugin
<source>
@type prometheus_output_monitor
<labels>
host ${hostname}
</labels>
</source>
# input plugin that collects metrics for in_tail plugin
<source>
@type prometheus_tail_monitor
<labels>
host ${hostname}
</labels>
</source>
output.conf: |-
# Enriches records with Kubernetes metadata
<filter kubernetes.**>
@type kubernetes_metadata
</filter>
# Concatenate multi-line logs
<filter **>
@type concat
key message
multiline_end_regexp /\n$/
separator ""
</filter>
<match **>
@id elasticsearch
@type elasticsearch
@log_level info
type_name fluentd
include_tag_key true
host elasticsearch-logging
port 9200
logstash_format true
<buffer>
@type file
path /var/log/fluentd-buffers/kubernetes.system.buffer
flush_mode interval
retry_type exponential_backoff
flush_thread_count 2
flush_interval 5s
retry_forever
retry_max_interval 30
chunk_limit_size 2M
queue_limit_length 8
overflow_action block
</buffer>
</match>
-108
View File
@@ -1,108 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: fluentd-es
namespace: kube-system
labels:
k8s-app: fluentd-es
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fluentd-es
labels:
k8s-app: fluentd-es
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
rules:
- apiGroups:
- ""
resources:
- "namespaces"
- "pods"
verbs:
- "get"
- "watch"
- "list"
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: fluentd-es
labels:
k8s-app: fluentd-es
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
subjects:
- kind: ServiceAccount
name: fluentd-es
namespace: kube-system
apiGroup: ""
roleRef:
kind: ClusterRole
name: fluentd-es
apiGroup: ""
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: fluentd-es-v2.2.1
namespace: kube-system
labels:
k8s-app: fluentd-es
version: v2.2.1
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
selector:
matchLabels:
k8s-app: fluentd-es
version: v2.2.1
template:
metadata:
labels:
k8s-app: fluentd-es
kubernetes.io/cluster-service: "true"
version: v2.2.1
# This annotation ensures that fluentd does not get evicted if the node
# supports critical pod annotation based priority scheme.
# Note that this does not guarantee admission on the nodes (#40573).
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ''
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
priorityClassName: system-node-critical
serviceAccountName: fluentd-es
containers:
- name: fluentd-es
image: k8s.gcr.io/fluentd-elasticsearch:v2.3.2
env:
- name: FLUENTD_ARGS
value: --no-supervisor -q
resources:
limits:
memory: 500Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: config-volume
mountPath: /etc/fluent/config.d
terminationGracePeriodSeconds: 30
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: config-volume
configMap:
name: fluentd-es-config-v0.1.6
@@ -1,58 +0,0 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This Dockerfile will build an image that is configured
# to run Fluentd with an Elasticsearch plug-in and the
# provided configuration file.
# The image acts as an executable for the binary /usr/sbin/td-agent.
# Note that fluentd is run with root permssion to allow access to
# log files with root only access under /var/log/containers/*
FROM debian:stretch-slim
ARG DEBIAN_FRONTEND=noninteractive
COPY clean-apt /usr/bin
COPY clean-install /usr/bin
COPY Gemfile /Gemfile
# 1. Install & configure dependencies.
# 2. Install fluentd via ruby.
# 3. Remove build dependencies.
# 4. Cleanup leftover caches & files.
RUN BUILD_DEPS="make gcc g++ libc6-dev ruby-dev libffi-dev" \
&& clean-install $BUILD_DEPS \
ca-certificates \
libjemalloc1 \
ruby \
&& echo 'gem: --no-document' >> /etc/gemrc \
&& gem install --file Gemfile \
&& apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
$BUILD_DEPS \
&& clean-apt \
# Ensure fluent has enough file descriptors
&& ulimit -n 65536
# Copy the Fluentd configuration file for logging Docker container logs.
COPY fluent.conf /etc/fluent/fluent.conf
COPY run.sh /run.sh
# Expose prometheus metrics.
EXPOSE 80
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
# Start Fluentd to pick up our config that watches Docker container logs.
CMD ["/run.sh"]
@@ -1,12 +0,0 @@
source 'https://rubygems.org'
gem 'fluentd', '<=1.2.4'
gem 'activesupport', '~>5.2.1'
gem 'fluent-plugin-concat', '~>2.3.0'
gem 'fluent-plugin-detect-exceptions', '~>0.0.11'
gem 'fluent-plugin-elasticsearch', '~>2.11.5'
gem 'fluent-plugin-kubernetes_metadata_filter', '~>2.0.0'
gem 'fluent-plugin-multi-format-parser', '~>1.0.0'
gem 'fluent-plugin-prometheus', '~>1.0.1'
gem 'fluent-plugin-systemd', '~>1.0.1'
gem 'oj', '~>3.6.5'
@@ -1,25 +0,0 @@
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.PHONY: build push
PREFIX = staging-k8s.gcr.io
IMAGE = fluentd-elasticsearch
TAG = v2.3.1
build:
docker build --pull -t $(PREFIX)/$(IMAGE):$(TAG) .
push:
docker push $(PREFIX)/$(IMAGE):$(TAG)
@@ -1,14 +0,0 @@
# Collecting Docker Log Files with Fluentd and Elasticsearch
This directory contains the source files needed to make a Docker image
that collects Docker container log files using [Fluentd][fluentd]
and sends them to an instance of [Elasticsearch][elasticsearch].
This image is designed to be used as part of the [Kubernetes][kubernetes]
cluster bring up process. The image resides at GCR under the name
[k8s.gcr.io/fluentd-elasticsearch][image].
[fluentd]: http://www.fluentd.org/
[elasticsearch]: https://www.elastic.co/products/elasticsearch
[kubernetes]: https://kubernetes.io
[image]: https://k8s.gcr.io/fluentd-elasticsearch
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/fluentd-elasticsearch/fluentd-es-image/README.md?pixel)]()
@@ -1,29 +0,0 @@
#!/bin/sh
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A script encapsulating a common Dockerimage pattern for installing packages
# and then cleaning up the unnecessary install artifacts.
# e.g. clean-install iptables ebtables conntrack
set -o errexit
apt-get clean -y
rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/* \
/var/tmp/*
@@ -1,30 +0,0 @@
#!/bin/sh
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A script encapsulating a common Dockerimage pattern for installing packages
# and then cleaning up the unnecessary install artifacts.
# e.g. clean-install iptables ebtables conntrack
set -o errexit
if [ $# = 0 ]; then
echo >&2 "No packages specified"
exit 1
fi
apt-get update
apt-get install -y --no-install-recommends $@
clean-apt
@@ -1,8 +0,0 @@
# This is the root config file, which only includes components of the actual configuration
# Do not collect fluentd's own logs to avoid infinite loops.
<match fluent.**>
@type null
</match>
@include /etc/fluent/config.d/*.conf
@@ -1,23 +0,0 @@
#!/bin/sh
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# These steps must be executed once the host /var and /lib volumes have
# been mounted, and therefore cannot be done in the docker build stage.
# For systems without journald
mkdir -p /var/log/journal
exec /usr/local/bin/fluentd $FLUENTD_ARGS
@@ -1,39 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kibana-logging
namespace: kube-system
labels:
k8s-app: kibana-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
spec:
replicas: 1
selector:
matchLabels:
k8s-app: kibana-logging
template:
metadata:
labels:
k8s-app: kibana-logging
annotations:
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
spec:
containers:
- name: kibana-logging
image: docker.elastic.co/kibana/kibana-oss:6.3.2
resources:
# need more cpu upon initialization, therefore burstable class
limits:
cpu: 1000m
requests:
cpu: 100m
env:
- name: ELASTICSEARCH_URL
value: http://elasticsearch-logging:9200
- name: SERVER_BASEPATH
value: /api/v1/namespaces/kube-system/services/kibana-logging/proxy
ports:
- containerPort: 5601
name: ui
protocol: TCP
@@ -1,17 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: kibana-logging
namespace: kube-system
labels:
k8s-app: kibana-logging
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
kubernetes.io/name: "Kibana"
spec:
ports:
- port: 5601
protocol: TCP
targetPort: ui
selector:
k8s-app: kibana-logging
@@ -0,0 +1,8 @@
resources:
- instrumentation-addons/fluentd-elasticsearch/create-logging-namespace.yaml
- instrumentation-addons/fluentd-elasticsearch/es-service.yaml
- instrumentation-addons/fluentd-elasticsearch/es-statefulset.yaml
- instrumentation-addons/fluentd-elasticsearch/fluentd-es-configmap.yaml
- instrumentation-addons/fluentd-elasticsearch/fluentd-es-ds.yaml
- instrumentation-addons/fluentd-elasticsearch/kibana-deployment.yaml
- instrumentation-addons/fluentd-elasticsearch/kibana-service.yaml
@@ -0,0 +1,18 @@
resources:
- kubernetes/cluster/addons/fluentd-elasticsearch/es-service.yaml
- kubernetes/cluster/addons/fluentd-elasticsearch/es-statefulset.yaml
- kubernetes/cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml
- kubernetes/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
- kubernetes/cluster/addons/fluentd-elasticsearch/kibana-deployment.yaml
- kubernetes/cluster/addons/fluentd-elasticsearch/kibana-service.yaml
images:
- name: gcr.io/fluentd-elasticsearch/fluentd
newName: quay.io/fluentd_elasticsearch/fluentd
newTag: v2.6.0
- name: gcr.io/fluentd-elasticsearch/elasticsearch
newName: quay.io/fluentd_elasticsearch/elasticsearch
newTag: v7.1.1
- name: docker.elastic.co/kibana/kibana-oss
newName: docker.elastic.co/kibana/kibana-oss
newTag: 7.1.1
-1
View File
@@ -1 +0,0 @@
https://github.com/kubernetes/kubernetes/commit/954996e231074dc7429f7be1256a579bedd8344c
@@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring
@@ -1,342 +0,0 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: prometheusrules.monitoring.coreos.com
spec:
group: monitoring.coreos.com
names:
kind: PrometheusRule
plural: prometheusrules
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
description: ObjectMeta is metadata that all persisted resources must have,
which includes all objects users must create.
properties:
annotations:
description: 'Annotations is an unstructured key value map stored with
a resource that may be set by external tools to store and retrieve
arbitrary metadata. They are not queryable and should be preserved
when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations'
type: object
clusterName:
description: The name of the cluster which the object belongs to. This
is used to distinguish resources with same name and namespace in different
clusters. This field is not set anywhere right now and apiserver is
going to ignore it if set in create or update request.
type: string
creationTimestamp:
description: Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON. Wrappers are provided for many of the
factory methods that the time package offers.
format: date-time
type: string
deletionGracePeriodSeconds:
description: Number of seconds allowed for this object to gracefully
terminate before it will be removed from the system. Only set when
deletionTimestamp is also set. May only be shortened. Read-only.
format: int64
type: integer
deletionTimestamp:
description: Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON. Wrappers are provided for many of the
factory methods that the time package offers.
format: date-time
type: string
finalizers:
description: Must be empty before the object is deleted from the registry.
Each entry is an identifier for the responsible component that will
remove the entry from the list. If the deletionTimestamp of the object
is non-nil, entries in this list can only be removed.
items:
type: string
type: array
generateName:
description: |-
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency
type: string
generation:
description: A sequence number representing a specific generation of
the desired state. Populated by the system. Read-only.
format: int64
type: integer
initializers:
description: Initializers tracks the progress of initialization.
properties:
pending:
description: Pending is a list of initializers that must execute
in order before this object is visible. When the last pending
initializer is removed, and no failing result is set, the initializers
struct will be set to nil and the object is considered as initialized
and visible to all clients.
items:
description: Initializer is information about an initializer that
has not yet completed.
properties:
name:
description: name of the process that is responsible for initializing
this object.
type: string
required:
- name
type: array
result:
description: Status is a return value for calls that don't return
other objects.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this
representation of an object. Servers should convert recognized
schemas to the latest internal value, and may reject unrecognized
values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
code:
description: Suggested HTTP return code for this status, 0 if
not set.
format: int32
type: integer
details:
description: StatusDetails is a set of additional properties
that MAY be set by the server to provide additional information
about a response. The Reason field of a Status object defines
what attributes will be set. Clients must ignore fields that
do not match the defined type of each attribute, and should
assume that any attribute may be empty, invalid, or under
defined.
properties:
causes:
description: The Causes array includes more details associated
with the StatusReason failure. Not all StatusReasons may
provide detailed causes.
items:
description: StatusCause provides more information about
an api.Status failure, including cases when multiple
errors are encountered.
properties:
field:
description: |-
The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items"
type: string
message:
description: A human-readable description of the cause
of the error. This field may be presented as-is
to a reader.
type: string
reason:
description: A machine-readable description of the
cause of the error. If this value is empty there
is no information available.
type: string
type: array
group:
description: The group attribute of the resource associated
with the status StatusReason.
type: string
kind:
description: 'The kind attribute of the resource associated
with the status StatusReason. On some operations may differ
from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
name:
description: The name attribute of the resource associated
with the status StatusReason (when there is a single name
which can be described).
type: string
retryAfterSeconds:
description: If specified, the time in seconds before the
operation should be retried. Some errors may indicate
the client must take an alternate action - for those errors
this field may indicate how long to wait before taking
the alternate action.
format: int32
type: integer
uid:
description: 'UID of the resource. (when there is a single
resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string
kind:
description: 'Kind is a string value representing the REST resource
this object represents. Servers may infer this from the endpoint
the client submits requests to. Cannot be updated. In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
message:
description: A human-readable description of the status of this
operation.
type: string
metadata:
description: ListMeta describes metadata that synthetic resources
must have, including lists and various status objects. A resource
may have only one of {ObjectMeta, ListMeta}.
properties:
continue:
description: continue may be set if the user set a limit
on the number of items returned, and indicates that the
server has more data available. The value is opaque and
may be used to issue another request to the endpoint that
served this list to retrieve the next set of available
objects. Continuing a consistent list may not be possible
if the server configuration has changed or more than a
few minutes have passed. The resourceVersion field returned
when using this continue value will be identical to the
value in the first response, unless you have received
this token from an error message.
type: string
resourceVersion:
description: 'String that identifies the server''s internal
version of this object that can be used by clients to
determine when objects have changed. Value must be treated
as opaque by clients and passed unmodified back to the
server. Populated by the system. Read-only. More info:
https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency'
type: string
selfLink:
description: selfLink is a URL representing this object.
Populated by the system. Read-only.
type: string
reason:
description: A machine-readable description of why this operation
is in the "Failure" status. If this value is empty there is
no information available. A Reason clarifies an HTTP status
code but does not override it.
type: string
status:
description: 'Status of the operation. One of: "Success" or
"Failure". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status'
type: string
required:
- pending
labels:
description: 'Map of string keys and values that can be used to organize
and categorize (scope and select) objects. May match selectors of
replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels'
type: object
name:
description: 'Name must be unique within a namespace. Is required when
creating resources, although some resources may allow a client to
request the generation of an appropriate name automatically. Name
is primarily intended for creation idempotence and configuration definition.
Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
namespace:
description: |-
Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
type: string
ownerReferences:
description: List of objects depended by this object. If ALL objects
in the list have been deleted, this object will be garbage collected.
If this object is managed by a controller, then an entry in this list
will point to this controller, with the controller field set to true.
There cannot be more than one managing controller.
items:
description: OwnerReference contains enough information to let you
identify an owning object. Currently, an owning object must be in
the same namespace, so there is no namespace field.
properties:
apiVersion:
description: API version of the referent.
type: string
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the key-value
store until this reference is removed. Defaults to false. To
set this field, a user needs "delete" permission of the owner,
otherwise 422 (Unprocessable Entity) will be returned.
type: boolean
controller:
description: If true, this reference points to the managing controller.
type: boolean
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
uid:
description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids'
type: string
required:
- apiVersion
- kind
- name
- uid
type: array
resourceVersion:
description: |-
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency
type: string
selfLink:
description: SelfLink is a URL representing this object. Populated by
the system. Read-only.
type: string
uid:
description: |-
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
type: string
spec:
description: PrometheusRuleSpec contains specification parameters for a
Rule.
properties:
groups:
description: Content of Prometheus rule file
items:
description: RuleGroup is a list of sequentially evaluated recording
and alerting rules.
properties:
interval:
type: string
name:
type: string
rules:
items:
description: Rule describes an alerting or recording rule.
properties:
alert:
type: string
annotations:
type: object
expr:
anyOf:
- type: string
- type: integer
for:
type: string
labels:
type: object
record:
type: string
required:
- expr
type: array
required:
- name
- rules
type: array
version: v1
@@ -1,291 +0,0 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: servicemonitors.monitoring.coreos.com
spec:
group: monitoring.coreos.com
names:
kind: ServiceMonitor
plural: servicemonitors
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
spec:
description: ServiceMonitorSpec contains specification parameters for a
ServiceMonitor.
properties:
endpoints:
description: A list of endpoints allowed as part of this ServiceMonitor.
items:
description: Endpoint defines a scrapeable endpoint serving Prometheus
metrics.
properties:
basicAuth:
description: 'BasicAuth allow an endpoint to authenticate over
basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
properties:
password:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
optional:
description: Specify whether the Secret or it's key must
be defined
type: boolean
required:
- key
username:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
optional:
description: Specify whether the Secret or it's key must
be defined
type: boolean
required:
- key
bearerTokenFile:
description: File to read bearer token for scraping targets.
type: string
honorLabels:
description: HonorLabels chooses the metric's labels on collisions
with target labels.
type: boolean
interval:
description: Interval at which metrics should be scraped
type: string
metricRelabelings:
description: MetricRelabelConfigs to apply to samples before ingestion.
items:
description: 'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It defines
`<metric_relabel_configs>`-section of Prometheus configuration.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description: Action to perform based on regex matching.
Default is 'replace'
type: string
modulus:
description: Modulus to take of the hash of the source label
values.
format: int64
type: integer
regex:
description: Regular expression against which the extracted
value is matched. defailt is '(.*)'
type: string
replacement:
description: Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
type: string
separator:
description: Separator placed between concatenated source
label values. default is ';'.
type: string
sourceLabels:
description: The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular expression
for the replace, keep, and drop actions.
items:
type: string
type: array
targetLabel:
description: Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
type: string
type: array
params:
description: Optional HTTP URL parameters
type: object
path:
description: HTTP path to scrape for metrics.
type: string
port:
description: Name of the service port this endpoint refers to.
Mutually exclusive with targetPort.
type: string
proxyUrl:
description: ProxyURL eg http://proxyserver:2195 Directs scrapes
to proxy through this endpoint.
type: string
relabelings:
description: 'RelabelConfigs to apply to samples before ingestion.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<relabel_config>'
items:
description: 'RelabelConfig allows dynamic rewriting of the
label set, being applied to samples before ingestion. It defines
`<metric_relabel_configs>`-section of Prometheus configuration.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
properties:
action:
description: Action to perform based on regex matching.
Default is 'replace'
type: string
modulus:
description: Modulus to take of the hash of the source label
values.
format: int64
type: integer
regex:
description: Regular expression against which the extracted
value is matched. defailt is '(.*)'
type: string
replacement:
description: Replacement value against which a regex replace
is performed if the regular expression matches. Regex
capture groups are available. Default is '$1'
type: string
separator:
description: Separator placed between concatenated source
label values. default is ';'.
type: string
sourceLabels:
description: The source labels select values from existing
labels. Their content is concatenated using the configured
separator and matched against the configured regular expression
for the replace, keep, and drop actions.
items:
type: string
type: array
targetLabel:
description: Label to which the resulting value is written
in a replace action. It is mandatory for replace actions.
Regex capture groups are available.
type: string
type: array
scheme:
description: HTTP scheme to use for scraping.
type: string
scrapeTimeout:
description: Timeout after which the scrape is ended
type: string
targetPort:
anyOf:
- type: string
- type: integer
tlsConfig:
description: TLSConfig specifies TLS configuration parameters.
properties:
caFile:
description: The CA cert to use for the targets.
type: string
certFile:
description: The client cert file for the targets.
type: string
insecureSkipVerify:
description: Disable target certificate validation.
type: boolean
keyFile:
description: The client key file for the targets.
type: string
serverName:
description: Used to verify the hostname for the targets.
type: string
type: array
jobLabel:
description: The label to use to retrieve the job name from.
type: string
namespaceSelector:
description: NamespaceSelector is a selector for selecting either all
namespaces or a list of namespaces.
properties:
any:
description: Boolean describing whether all namespaces are selected
in contrast to a list restricting them.
type: boolean
matchNames:
description: List of namespace names.
items:
type: string
type: array
podTargetLabels:
description: PodTargetLabels transfers labels on the Kubernetes Pod
onto the target.
items:
type: string
type: array
sampleLimit:
description: SampleLimit defines per-scrape limit on number of scraped
samples that will be accepted.
format: int64
type: integer
selector:
description: A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty
label selector matches all objects. A null label selector matches
no objects.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that contains
values, a key, and an operator that relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string values. If the operator
is In or NotIn, the values array must be non-empty. If the
operator is Exists or DoesNotExist, the values array must
be empty. This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: array
matchLabels:
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator is
"In", and the values array contains only "value". The requirements
are ANDed.
type: object
targetLabels:
description: TargetLabels transfers labels on the Kubernetes Service
onto the target.
items:
type: string
type: array
required:
- endpoints
- selector
version: v1
@@ -1,66 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-operator
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- alertmanagers
- prometheuses
- prometheuses/finalizers
- alertmanagers/finalizers
- servicemonitors
- prometheusrules
verbs:
- '*'
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- delete
- apiGroups:
- ""
resources:
- services
- endpoints
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus-operator
subjects:
- kind: ServiceAccount
name: prometheus-operator
namespace: monitoring
@@ -1,44 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
k8s-app: prometheus-operator
template:
metadata:
labels:
k8s-app: prometheus-operator
spec:
containers:
- args:
- --kubelet-service=kube-system/kubelet
- --logtostderr=true
- --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
- --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.25.0
image: quay.io/coreos/prometheus-operator:v0.25.0
name: prometheus-operator
ports:
- containerPort: 8080
name: http
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
serviceAccountName: prometheus-operator
@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: monitoring
spec:
clusterIP: None
ports:
- name: http
port: 8080
targetPort: http
selector:
k8s-app: prometheus-operator
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-operator
namespace: monitoring
@@ -1,14 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: monitoring
spec:
endpoints:
- honorLabels: true
port: http
selector:
matchLabels:
k8s-app: prometheus-operator
@@ -1,20 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
labels:
alertmanager: main
name: main
namespace: monitoring
spec:
baseImage: quay.io/prometheus/alertmanager
nodeSelector:
beta.kubernetes.io/os: linux
replicas: 3
storage:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 1Gi
serviceAccountName: alertmanager-main
version: v0.15.2
@@ -1,8 +0,0 @@
apiVersion: v1
data:
alertmanager.yaml: Imdsb2JhbCI6IAogICJyZXNvbHZlX3RpbWVvdXQiOiAiNW0iCiJyZWNlaXZlcnMiOiAKLSAibmFtZSI6ICJudWxsIgoicm91dGUiOiAKICAiZ3JvdXBfYnkiOiAKICAtICJqb2IiCiAgImdyb3VwX2ludGVydmFsIjogIjVtIgogICJncm91cF93YWl0IjogIjMwcyIKICAicmVjZWl2ZXIiOiAibnVsbCIKICAicmVwZWF0X2ludGVydmFsIjogIjEyaCIKICAicm91dGVzIjogCiAgLSAibWF0Y2giOiAKICAgICAgImFsZXJ0bmFtZSI6ICJEZWFkTWFuc1N3aXRjaCIKICAgICJyZWNlaXZlciI6ICJudWxsIg==
kind: Secret
metadata:
name: alertmanager-main
namespace: monitoring
type: Opaque
@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
alertmanager: main
name: alertmanager-main
namespace: monitoring
spec:
ports:
- name: web
port: 9093
targetPort: web
selector:
alertmanager: main
app: alertmanager
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: alertmanager-main
namespace: monitoring
@@ -1,14 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: alertmanager
name: alertmanager
namespace: monitoring
spec:
endpoints:
- interval: 30s
port: web
selector:
matchLabels:
alertmanager: main
@@ -1,8 +0,0 @@
apiVersion: v1
data:
prometheus.yaml: ewogICAgImFwaVZlcnNpb24iOiAxLAogICAgImRhdGFzb3VyY2VzIjogWwogICAgICAgIHsKICAgICAgICAgICAgImFjY2VzcyI6ICJwcm94eSIsCiAgICAgICAgICAgICJlZGl0YWJsZSI6IGZhbHNlLAogICAgICAgICAgICAibmFtZSI6ICJwcm9tZXRoZXVzIiwKICAgICAgICAgICAgIm9yZ0lkIjogMSwKICAgICAgICAgICAgInR5cGUiOiAicHJvbWV0aGV1cyIsCiAgICAgICAgICAgICJ1cmwiOiAiaHR0cDovL3Byb21ldGhldXMtazhzLm1vbml0b3Jpbmcuc3ZjOjkwOTAiLAogICAgICAgICAgICAidmVyc2lvbiI6IDEKICAgICAgICB9CiAgICBdCn0=
kind: Secret
metadata:
name: grafana-datasources
namespace: monitoring
type: Opaque
File diff suppressed because it is too large Load Diff
@@ -1,21 +0,0 @@
apiVersion: v1
data:
dashboards.yaml: |-
{
"apiVersion": 1,
"providers": [
{
"folder": "",
"name": "0",
"options": {
"path": "/grafana-dashboard-definitions/0"
},
"orgId": 1,
"type": "file"
}
]
}
kind: ConfigMap
metadata:
name: grafana-dashboards
namespace: monitoring
@@ -1,118 +0,0 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-storage-pvc
namespace: monitoring
labels:
app: grafana
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- image: grafana/grafana:5.2.4
name: grafana
ports:
- containerPort: 3000
name: http
resources:
limits:
cpu: 200m
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-storage
readOnly: false
- mountPath: /etc/grafana/provisioning/datasources
name: grafana-datasources
readOnly: false
- mountPath: /etc/grafana/provisioning/dashboards
name: grafana-dashboards
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/k8s-cluster-rsrc-use
name: grafana-dashboard-k8s-cluster-rsrc-use
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/k8s-node-rsrc-use
name: grafana-dashboard-k8s-node-rsrc-use
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/k8s-resources-cluster
name: grafana-dashboard-k8s-resources-cluster
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/k8s-resources-namespace
name: grafana-dashboard-k8s-resources-namespace
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/k8s-resources-pod
name: grafana-dashboard-k8s-resources-pod
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/nodes
name: grafana-dashboard-nodes
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/pods
name: grafana-dashboard-pods
readOnly: false
- mountPath: /grafana-dashboard-definitions/0/statefulset
name: grafana-dashboard-statefulset
readOnly: false
securityContext:
runAsNonRoot: true
runAsUser: 65534
fsGroup: 472
serviceAccountName: grafana
volumes:
- name: grafana-storage
persistentVolumeClaim:
claimName: grafana-storage-pvc
- name: grafana-datasources
secret:
secretName: grafana-datasources
- configMap:
name: grafana-dashboards
name: grafana-dashboards
- configMap:
name: grafana-dashboard-k8s-cluster-rsrc-use
name: grafana-dashboard-k8s-cluster-rsrc-use
- configMap:
name: grafana-dashboard-k8s-node-rsrc-use
name: grafana-dashboard-k8s-node-rsrc-use
- configMap:
name: grafana-dashboard-k8s-resources-cluster
name: grafana-dashboard-k8s-resources-cluster
- configMap:
name: grafana-dashboard-k8s-resources-namespace
name: grafana-dashboard-k8s-resources-namespace
- configMap:
name: grafana-dashboard-k8s-resources-pod
name: grafana-dashboard-k8s-resources-pod
- configMap:
name: grafana-dashboard-nodes
name: grafana-dashboard-nodes
- configMap:
name: grafana-dashboard-pods
name: grafana-dashboard-pods
- configMap:
name: grafana-dashboard-statefulset
name: grafana-dashboard-statefulset
@@ -1,12 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: monitoring
spec:
ports:
- name: http
port: 3000
targetPort: http
selector:
app: grafana
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: grafana
namespace: monitoring
@@ -1,69 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kube-state-metrics
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
- nodes
- pods
- services
- resourcequotas
- replicationcontrollers
- limitranges
- persistentvolumeclaims
- persistentvolumes
- namespaces
- endpoints
verbs:
- list
- watch
- apiGroups:
- extensions
resources:
- daemonsets
- deployments
- replicasets
verbs:
- list
- watch
- apiGroups:
- apps
resources:
- statefulsets
- daemonsets
- deployments
- replicasets
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- list
- watch
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kube-state-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-state-metrics
subjects:
- kind: ServiceAccount
name: kube-state-metrics
namespace: monitoring
@@ -1,97 +0,0 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: kube-state-metrics
name: kube-state-metrics
namespace: monitoring
spec:
replicas: 1
selector:
matchLabels:
app: kube-state-metrics
template:
metadata:
labels:
app: kube-state-metrics
spec:
containers:
- args:
- --secure-listen-address=:8443
- --upstream=http://127.0.0.1:8081/
image: quay.io/coreos/kube-rbac-proxy:v0.4.0
name: kube-rbac-proxy-main
ports:
- containerPort: 8443
name: https-main
resources:
limits:
cpu: 20m
memory: 40Mi
requests:
cpu: 10m
memory: 20Mi
- args:
- --secure-listen-address=:9443
- --upstream=http://127.0.0.1:8082/
image: quay.io/coreos/kube-rbac-proxy:v0.4.0
name: kube-rbac-proxy-self
ports:
- containerPort: 9443
name: https-self
resources:
limits:
cpu: 20m
memory: 40Mi
requests:
cpu: 10m
memory: 20Mi
- args:
- --host=127.0.0.1
- --port=8081
- --telemetry-host=127.0.0.1
- --telemetry-port=8082
image: quay.io/coreos/kube-state-metrics:v1.4.0
name: kube-state-metrics
resources:
limits:
cpu: 100m
memory: 150Mi
requests:
cpu: 100m
memory: 150Mi
- command:
- /pod_nanny
- --container=kube-state-metrics
- --cpu=100m
- --extra-cpu=2m
- --memory=150Mi
- --extra-memory=30Mi
- --threshold=5
- --deployment=kube-state-metrics
env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
image: quay.io/coreos/addon-resizer:1.0
name: addon-resizer
resources:
limits:
cpu: 10m
memory: 30Mi
requests:
cpu: 10m
memory: 30Mi
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
serviceAccountName: kube-state-metrics
@@ -1,30 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kube-state-metrics
namespace: monitoring
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- extensions
resourceNames:
- kube-state-metrics
resources:
- deployments
verbs:
- get
- update
- apiGroups:
- apps
resourceNames:
- kube-state-metrics
resources:
- deployments
verbs:
- get
- update
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kube-state-metrics
namespace: monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kube-state-metrics
subjects:
- kind: ServiceAccount
name: kube-state-metrics
@@ -1,18 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: kube-state-metrics
name: kube-state-metrics
namespace: monitoring
spec:
clusterIP: None
ports:
- name: https-main
port: 8443
targetPort: https-main
- name: https-self
port: 9443
targetPort: https-self
selector:
app: kube-state-metrics
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-state-metrics
namespace: monitoring
@@ -1,27 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: kube-state-metrics
name: kube-state-metrics
namespace: monitoring
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
interval: 30s
port: https-main
scheme: https
scrapeTimeout: 30s
tlsConfig:
insecureSkipVerify: true
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
port: https-self
scheme: https
tlsConfig:
insecureSkipVerify: true
jobLabel: k8s-app
selector:
matchLabels:
k8s-app: kube-state-metrics
@@ -1,17 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: node-exporter
rules:
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: node-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: node-exporter
subjects:
- kind: ServiceAccount
name: node-exporter
namespace: monitoring
@@ -1,80 +0,0 @@
apiVersion: apps/v1beta2
kind: DaemonSet
metadata:
labels:
app: node-exporter
name: node-exporter
namespace: monitoring
spec:
selector:
matchLabels:
app: node-exporter
template:
metadata:
labels:
app: node-exporter
spec:
containers:
- args:
- --web.listen-address=127.0.0.1:9101
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)
- --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
image: quay.io/prometheus/node-exporter:v0.16.0
name: node-exporter
resources:
limits:
cpu: 102m
memory: 180Mi
requests:
cpu: 102m
memory: 180Mi
volumeMounts:
- mountPath: /host/proc
name: proc
readOnly: false
- mountPath: /host/sys
name: sys
readOnly: false
- mountPath: /host/root
mountPropagation: HostToContainer
name: root
readOnly: true
- args:
- --secure-listen-address=:9100
- --upstream=http://127.0.0.1:9101/
image: quay.io/coreos/kube-rbac-proxy:v0.4.0
name: kube-rbac-proxy
ports:
- containerPort: 9100
hostPort: 9100
name: https
resources:
limits:
cpu: 20m
memory: 40Mi
requests:
cpu: 10m
memory: 20Mi
hostNetwork: true
hostPID: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
serviceAccountName: node-exporter
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
volumes:
- hostPath:
path: /proc
name: proc
- hostPath:
path: /sys
name: sys
- hostPath:
path: /
name: root
@@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: node-exporter
name: node-exporter
namespace: monitoring
spec:
clusterIP: None
ports:
- name: https
port: 9100
targetPort: https
selector:
app: node-exporter
@@ -1,5 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: node-exporter
namespace: monitoring
@@ -1,19 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
k8s-app: node-exporter
name: node-exporter
namespace: monitoring
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
interval: 30s
port: https
scheme: https
tlsConfig:
insecureSkipVerify: true
jobLabel: k8s-app
selector:
matchLabels:
k8s-app: node-exporter
@@ -0,0 +1,68 @@
# This is a temporary reference commit until a working prometheus for 1.16 is released
# (dashboard-deployment api version not updated in v0.2.0, breaking k8s 1.16)
# f458e85e5d7675f7bc253072e1b4c8892b51af0f
resources:
- kube-prometheus/manifests/00namespace-namespace.yaml
- kube-prometheus/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRoleBinding.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRole.yaml
- kube-prometheus/manifests/0prometheus-operator-deployment.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceAccount.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceMonitor.yaml
- kube-prometheus/manifests/0prometheus-operator-service.yaml
- kube-prometheus/manifests/alertmanager-alertmanager.yaml
- kube-prometheus/manifests/alertmanager-secret.yaml
- kube-prometheus/manifests/alertmanager-serviceAccount.yaml
- kube-prometheus/manifests/alertmanager-serviceMonitor.yaml
- kube-prometheus/manifests/alertmanager-service.yaml
- kube-prometheus/manifests/grafana-dashboardDatasources.yaml
- kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
- kube-prometheus/manifests/grafana-dashboardSources.yaml
- kube-prometheus/manifests/grafana-deployment.yaml
- kube-prometheus/manifests/grafana-serviceAccount.yaml
- kube-prometheus/manifests/grafana-serviceMonitor.yaml
- kube-prometheus/manifests/grafana-service.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRoleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRole.yaml
- kube-prometheus/manifests/kube-state-metrics-deployment.yaml
- kube-prometheus/manifests/kube-state-metrics-roleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-role.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceAccount.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceMonitor.yaml
- kube-prometheus/manifests/kube-state-metrics-service.yaml
- kube-prometheus/manifests/node-exporter-clusterRoleBinding.yaml
- kube-prometheus/manifests/node-exporter-clusterRole.yaml
- kube-prometheus/manifests/node-exporter-daemonset.yaml
- kube-prometheus/manifests/node-exporter-serviceAccount.yaml
- kube-prometheus/manifests/node-exporter-serviceMonitor.yaml
- kube-prometheus/manifests/node-exporter-service.yaml
- kube-prometheus/manifests/prometheus-adapter-apiService.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleServerResources.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRole.yaml
- kube-prometheus/manifests/prometheus-adapter-configMap.yaml
- kube-prometheus/manifests/prometheus-adapter-deployment.yaml
- kube-prometheus/manifests/prometheus-adapter-roleBindingAuthReader.yaml
- kube-prometheus/manifests/prometheus-adapter-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-adapter-service.yaml
- kube-prometheus/manifests/prometheus-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-clusterRole.yaml
- kube-prometheus/manifests/prometheus-prometheus.yaml
- kube-prometheus/manifests/prometheus-roleBindingConfig.yaml
- kube-prometheus/manifests/prometheus-roleBindingSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-roleConfig.yaml
- kube-prometheus/manifests/prometheus-roleSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-rules.yaml
- kube-prometheus/manifests/prometheus-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorApiserver.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorCoreDNS.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeControllerManager.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubelet.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeScheduler.yaml
- kube-prometheus/manifests/prometheus-serviceMonitor.yaml
- kube-prometheus/manifests/prometheus-service.yaml
@@ -0,0 +1,67 @@
resources:
- kube-prometheus/manifests/00namespace-namespace.yaml
- kube-prometheus/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRoleBinding.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRole.yaml
- kube-prometheus/manifests/0prometheus-operator-deployment.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceAccount.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceMonitor.yaml
- kube-prometheus/manifests/0prometheus-operator-service.yaml
- kube-prometheus/manifests/alertmanager-alertmanager.yaml
- kube-prometheus/manifests/alertmanager-secret.yaml
- kube-prometheus/manifests/alertmanager-serviceAccount.yaml
- kube-prometheus/manifests/alertmanager-serviceMonitor.yaml
- kube-prometheus/manifests/alertmanager-service.yaml
- kube-prometheus/manifests/grafana-dashboardDatasources.yaml
- kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
- kube-prometheus/manifests/grafana-dashboardSources.yaml
- kube-prometheus/manifests/grafana-deployment.yaml
- kube-prometheus/manifests/grafana-serviceAccount.yaml
- kube-prometheus/manifests/grafana-serviceMonitor.yaml
- kube-prometheus/manifests/grafana-service.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRoleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRole.yaml
- kube-prometheus/manifests/kube-state-metrics-deployment.yaml
- kube-prometheus/manifests/kube-state-metrics-roleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-role.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceAccount.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceMonitor.yaml
- kube-prometheus/manifests/kube-state-metrics-service.yaml
- kube-prometheus/manifests/node-exporter-clusterRoleBinding.yaml
- kube-prometheus/manifests/node-exporter-clusterRole.yaml
- kube-prometheus/manifests/node-exporter-daemonset.yaml
- kube-prometheus/manifests/node-exporter-serviceAccount.yaml
- kube-prometheus/manifests/node-exporter-serviceMonitor.yaml
- kube-prometheus/manifests/node-exporter-service.yaml
- kube-prometheus/manifests/prometheus-adapter-apiService.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleServerResources.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRole.yaml
- kube-prometheus/manifests/prometheus-adapter-configMap.yaml
- kube-prometheus/manifests/prometheus-adapter-deployment.yaml
- kube-prometheus/manifests/prometheus-adapter-roleBindingAuthReader.yaml
- kube-prometheus/manifests/prometheus-adapter-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-adapter-service.yaml
- kube-prometheus/manifests/prometheus-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-clusterRole.yaml
- kube-prometheus/manifests/prometheus-prometheus.yaml
- kube-prometheus/manifests/prometheus-roleBindingConfig.yaml
- kube-prometheus/manifests/prometheus-roleBindingSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-roleConfig.yaml
- kube-prometheus/manifests/prometheus-roleSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-rules.yaml
- kube-prometheus/manifests/prometheus-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorApiserver.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorCoreDNS.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeControllerManager.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubelet.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeScheduler.yaml
- kube-prometheus/manifests/prometheus-serviceMonitor.yaml
- kube-prometheus/manifests/prometheus-service.yaml
@@ -0,0 +1,76 @@
resources:
- kube-prometheus/manifests/kubeStateMetrics-serviceAccount.yaml
- kube-prometheus/manifests/blackboxExporter-clusterRole.yaml
- kube-prometheus/manifests/nodeExporter-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-prometheusRule.yaml
- kube-prometheus/manifests/kubernetesControlPlane-serviceMonitorKubeScheduler.yaml
- kube-prometheus/manifests/prometheus-serviceMonitor.yaml
- kube-prometheus/manifests/grafana-dashboardSources.yaml
- kube-prometheus/manifests/kubeStateMetrics-prometheusRule.yaml
- kube-prometheus/manifests/kubePrometheus-prometheusRule.yaml
- kube-prometheus/manifests/prometheus-clusterRole.yaml
- kube-prometheus/manifests/blackboxExporter-serviceMonitor.yaml
- kube-prometheus/manifests/prometheus-roleSpecificNamespaces.yaml
- kube-prometheus/manifests/alertmanager-service.yaml
- kube-prometheus/manifests/prometheusAdapter-serviceMonitor.yaml
- kube-prometheus/manifests/nodeExporter-prometheusRule.yaml
- kube-prometheus/manifests/nodeExporter-service.yaml
- kube-prometheus/manifests/prometheus-roleConfig.yaml
- kube-prometheus/manifests/kubeStateMetrics-clusterRole.yaml
- kube-prometheus/manifests/prometheusOperator-deployment.yaml
- kube-prometheus/manifests/prometheusOperator-serviceMonitor.yaml
- kube-prometheus/manifests/prometheusAdapter-deployment.yaml
- kube-prometheus/manifests/kubernetesControlPlane-serviceMonitorApiserver.yaml
- kube-prometheus/manifests/prometheusAdapter-configMap.yaml
- kube-prometheus/manifests/kubernetesControlPlane-prometheusRule.yaml
- kube-prometheus/manifests/kubeStateMetrics-deployment.yaml
- kube-prometheus/manifests/blackboxExporter-configuration.yaml
- kube-prometheus/manifests/kubeStateMetrics-clusterRoleBinding.yaml
- kube-prometheus/manifests/blackboxExporter-serviceAccount.yaml
- kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
- kube-prometheus/manifests/prometheusOperator-service.yaml
- kube-prometheus/manifests/grafana-service.yaml
- kube-prometheus/manifests/prometheus-prometheus.yaml
- kube-prometheus/manifests/kubernetesControlPlane-serviceMonitorKubeControllerManager.yaml
- kube-prometheus/manifests/alertmanager-alertmanager.yaml
- kube-prometheus/manifests/kubernetesControlPlane-serviceMonitorKubelet.yaml
- kube-prometheus/manifests/grafana-dashboardDatasources.yaml
- kube-prometheus/manifests/kubernetesControlPlane-serviceMonitorCoreDNS.yaml
- kube-prometheus/manifests/alertmanager-serviceMonitor.yaml
- kube-prometheus/manifests/grafana-deployment.yaml
- kube-prometheus/manifests/grafana-serviceAccount.yaml
- kube-prometheus/manifests/alertmanager-serviceAccount.yaml
- kube-prometheus/manifests/prometheusAdapter-clusterRoleAggregatedMetricsReader.yaml
- kube-prometheus/manifests/prometheusOperator-prometheusRule.yaml
- kube-prometheus/manifests/alertmanager-podDisruptionBudget.yaml
- kube-prometheus/manifests/prometheus-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-service.yaml
- kube-prometheus/manifests/prometheusAdapter-clusterRoleServerResources.yaml
- kube-prometheus/manifests/prometheusAdapter-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-roleBindingConfig.yaml
- kube-prometheus/manifests/nodeExporter-daemonset.yaml
- kube-prometheus/manifests/prometheus-roleBindingSpecificNamespaces.yaml
- kube-prometheus/manifests/nodeExporter-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheusOperator-serviceAccount.yaml
- kube-prometheus/manifests/prometheusOperator-clusterRoleBinding.yaml
- kube-prometheus/manifests/kubeStateMetrics-serviceMonitor.yaml
- kube-prometheus/manifests/prometheusAdapter-roleBindingAuthReader.yaml
- kube-prometheus/manifests/prometheusAdapter-clusterRoleBindingDelegator.yaml
- kube-prometheus/manifests/prometheusAdapter-serviceAccount.yaml
- kube-prometheus/manifests/blackboxExporter-deployment.yaml
- kube-prometheus/manifests/alertmanager-prometheusRule.yaml
- kube-prometheus/manifests/prometheus-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheusAdapter-clusterRole.yaml
- kube-prometheus/manifests/grafana-serviceMonitor.yaml
- kube-prometheus/manifests/nodeExporter-clusterRole.yaml
- kube-prometheus/manifests/prometheusAdapter-service.yaml
- kube-prometheus/manifests/prometheus-podDisruptionBudget.yaml
- kube-prometheus/manifests/blackboxExporter-service.yaml
- kube-prometheus/manifests/nodeExporter-serviceMonitor.yaml
- kube-prometheus/manifests/blackboxExporter-clusterRoleBinding.yaml
- kube-prometheus/manifests/alertmanager-secret.yaml
- kube-prometheus/manifests/prometheusAdapter-apiService.yaml
- kube-prometheus/manifests/prometheusOperator-clusterRole.yaml
- kube-prometheus/manifests/grafana-config.yaml
- kube-prometheus/manifests/prometheusAdapter-podDisruptionBudget.yaml
- kube-prometheus/manifests/kubeStateMetrics-service.yaml
@@ -0,0 +1,65 @@
resources:
- kube-prometheus/manifests/00namespace-namespace.yaml
- kube-prometheus/manifests/0prometheus-operator-0alertmanagerCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0prometheusruleCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRoleBinding.yaml
- kube-prometheus/manifests/0prometheus-operator-clusterRole.yaml
- kube-prometheus/manifests/0prometheus-operator-deployment.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceAccount.yaml
- kube-prometheus/manifests/0prometheus-operator-serviceMonitor.yaml
- kube-prometheus/manifests/0prometheus-operator-service.yaml
- kube-prometheus/manifests/alertmanager-alertmanager.yaml
- kube-prometheus/manifests/alertmanager-secret.yaml
- kube-prometheus/manifests/alertmanager-serviceAccount.yaml
- kube-prometheus/manifests/alertmanager-serviceMonitor.yaml
- kube-prometheus/manifests/alertmanager-service.yaml
- kube-prometheus/manifests/grafana-dashboardDatasources.yaml
- kube-prometheus/manifests/grafana-dashboardDefinitions.yaml
- kube-prometheus/manifests/grafana-dashboardSources.yaml
- kube-prometheus/manifests/grafana-deployment.yaml
- kube-prometheus/manifests/grafana-serviceAccount.yaml
- kube-prometheus/manifests/grafana-serviceMonitor.yaml
- kube-prometheus/manifests/grafana-service.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRoleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-clusterRole.yaml
- kube-prometheus/manifests/kube-state-metrics-deployment.yaml
- kube-prometheus/manifests/kube-state-metrics-roleBinding.yaml
- kube-prometheus/manifests/kube-state-metrics-role.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceAccount.yaml
- kube-prometheus/manifests/kube-state-metrics-serviceMonitor.yaml
- kube-prometheus/manifests/kube-state-metrics-service.yaml
- kube-prometheus/manifests/node-exporter-clusterRoleBinding.yaml
- kube-prometheus/manifests/node-exporter-clusterRole.yaml
- kube-prometheus/manifests/node-exporter-daemonset.yaml
- kube-prometheus/manifests/node-exporter-serviceAccount.yaml
- kube-prometheus/manifests/node-exporter-serviceMonitor.yaml
- kube-prometheus/manifests/node-exporter-service.yaml
- kube-prometheus/manifests/prometheus-adapter-apiService.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleAggregatedMetricsReader.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBindingDelegator.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRoleServerResources.yaml
- kube-prometheus/manifests/prometheus-adapter-clusterRole.yaml
- kube-prometheus/manifests/prometheus-adapter-configMap.yaml
- kube-prometheus/manifests/prometheus-adapter-deployment.yaml
- kube-prometheus/manifests/prometheus-adapter-roleBindingAuthReader.yaml
- kube-prometheus/manifests/prometheus-adapter-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-adapter-service.yaml
- kube-prometheus/manifests/prometheus-clusterRoleBinding.yaml
- kube-prometheus/manifests/prometheus-clusterRole.yaml
- kube-prometheus/manifests/prometheus-prometheus.yaml
- kube-prometheus/manifests/prometheus-roleBindingConfig.yaml
- kube-prometheus/manifests/prometheus-roleBindingSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-roleConfig.yaml
- kube-prometheus/manifests/prometheus-roleSpecificNamespaces.yaml
- kube-prometheus/manifests/prometheus-rules.yaml
- kube-prometheus/manifests/prometheus-serviceAccount.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorApiserver.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorCoreDNS.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeControllerManager.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubelet.yaml
- kube-prometheus/manifests/prometheus-serviceMonitorKubeScheduler.yaml
- kube-prometheus/manifests/prometheus-serviceMonitor.yaml
- kube-prometheus/manifests/prometheus-service.yaml
@@ -1,15 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus-k8s
rules:
- apiGroups:
- ""
resources:
- nodes/metrics
verbs:
- get
- nonResourceURLs:
- /metrics
verbs:
- get
@@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus-k8s
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus-k8s
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: monitoring
@@ -1,34 +0,0 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
labels:
prometheus: k8s
name: k8s
namespace: monitoring
spec:
alerting:
alertmanagers:
- name: alertmanager-main
namespace: monitoring
port: web
baseImage: quay.io/prometheus/prometheus
nodeSelector:
beta.kubernetes.io/os: linux
replicas: 2
resources:
requests:
memory: 1400Mi
storage:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 1Gi
ruleSelector:
matchLabels:
prometheus: k8s
role: alert-rules
serviceAccountName: prometheus-k8s
serviceMonitorNamespaceSelector: {}
serviceMonitorSelector: {}
version: v2.4.3

Some files were not shown because too many files have changed in this diff Show More