Commit Graph

25 Commits

Author SHA1 Message Date
Ruslan Aliev 910b06e4ba Add complete support for operator-based bootstrap
* operator logs is now streaming to pipeline and to pod
 * printing status of armada chart objects
 * adjust armada container cmd parameters to support both
   golang and python based images

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I6d8629a48c1b862db937ddc3cd68792220388b19
2024-01-10 10:27:07 -06:00
Ruslan Aliev 2dda3c505c Enable configurable support of armada apply operator mode
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Ie5e582aa7b4a64a4fa3f3fabb8d65ded76e14340
2024-01-05 11:07:12 -06:00
Ruslan Aliev 29405cec00 Add configurable support for armada-operator
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I22cf48839ccfd62a6ed293080fd8b90a2f31a5f9
2023-11-20 17:18:15 -06:00
Sean Eagan 53d0ecb7f9 Remove Tiller
Depends-On: https://review.opendev.org/c/airship/armada/+/812047
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Ic1eddda3639d629a94bb39f93bf48da54445469f
2021-10-06 13:16:34 +00:00
ubuntu 183b977754 Fix deprecated warning in Promenade apiserver chart
Removed PersistentVolumeLabel from apiserver to fix below warning.
Deprecated warning:
1. PersistentVolumeLabel admission controller is deprecated.
   Please remove this controller from your configuration files and scripts.
2. insecure-port has been deprecated, This flag has no effect now
   and will be removed in v1.24.

Change-Id: Iaccff8467b5ed967fa41e85b38c27f7345cd97bb
2021-06-29 16:14:17 +00:00
Phil Sphicas fd9f3d6cec Stop using kube-apiserver insecure-port
The tiller container in the armada bootstrap pod relies on the insecure
port that kube-apiserver once listened on by default. The kube-apiserver
ability to serve on an insecure port, deprecated since v1.10, has been
removed in v1.20. [0]

This change updates the armada bootstrap pod to use the secure port
instead.

0: https://github.com/kubernetes/kubernetes/pull/95856

Change-Id: I6a37fa4e7f97c7aaa3cd0f61b56214483a7dc217
2021-04-21 21:52:29 +00:00
Chris Wedgwood b65930f205 Prevent creation of kubernetes service endpoint by bootstrap apiserver
If the kubernetes apiserver (in the bootstrap Armada pod) runs with the
reconciler enabled, the kubernetes endpoint can be created with an
invalid port which will not be corrected later.

Change-Id: I6d5fb86c6c4ffded9f42bda6e2ffbf2fbc13806f
2020-01-28 14:02:28 -06:00
Sean Eagan e5c65f8cd9 Add configuration for tiller storage
This adds a parameter to the genesis schema
to configure the tiller storage [0] type. For backward
compatibility, by default the parameter is not passed
to tiller, thus relying on the upstream default, which
is 'configmap'.

[0]: https://helm.sh/docs/using_helm/#tiller-s-release-information

Change-Id: I045f8b57f695385b1a502a8f13f61a58d400784e
2019-09-23 14:43:45 -05:00
Sean Eagan 4168418719 Armada metric output for genesis
This change has passed the Promenade resiliency gate.

Armada recently added support for generating metric output [0] [1].
This adds support for capturing this output during genesis Armada runs,
and storing it in a configurable path on the genesis node, so that it
can later be consumed by for example by the node exporter text file
collector [2]. The number of Armada attempts to collect metrics for
is also configurable.

[0]: https://airship-armada.readthedocs.io/en/latest/operations/metrics.html#exporting
[1]: https://review.opendev.org/#/c/668980/
[2]: https://github.com/prometheus/node_exporter#textfile-collector

Change-Id: Ifd5b9d351204541595b1aadf1f06b16ab54308b0
2019-09-11 11:43:26 -05:00
Sean Eagan 7517d3161c Fix potential port conflict
This change has been tested by the promenade resiliency gate.

This adds configuration for which ports to use for the tiller container
in the bootstrap-armada pod, and changes the defaults to be outside of
`net.ipv4.ip_local_port_range`, since the apiserver container in this pod
dynamically selects ports in that range to connect to etcd, which can
cause conflicts. See [0] for an example.

By default, since we're no longer using the standard tiller ports, this
does mean that we cannot connect to this tiller instance (before it's
replaced by the chart-based instance) via the helm CLI, until it supports
overriding the tiller port to connect to, however this should be
relatively soon [1].

[0]: https://github.com/helm/helm/issues/4886
[1]: https://github.com/helm/helm/pull/5590

Change-Id: Ief11411f079db27489e6974c028f6b7a16bb67bf
2019-08-05 15:52:39 -05:00
Egorov, Stanislav (se6518) 955deeda41 New source for hyperkube binary definition
Now it's possible to use hyperkube Docker image to extract hyperkube binary.
Use case for this feature is kubelet/kubectl delivery in one binary(hyperkube)
which is built into Docker image. Promenade will extract hyperkube from Docker image,
create symlinks for kubelet/kubectl pointed to hyperkube. To do so promenade container
need to be configured to use Docker on the host where this container will be created.
This is happening only for script generation for genesis node. Later when promenade
will be started as a service pod inside ucp cluster it will generate scripts for joining nodes
by using cached hyperkube from /tmp.

Old way to delivery kubelet from tarball is still supported.

Configuration for the new method.

Need to export environment variables to properly configure Docker in Docker.
Docker socket should be provided as a mounted file inside promenade.
Also need to set temporary permissions for this socket during the build scripts stage.

Example:
DOCKER_SOCK="/var/run/docker.sock"
sudo chmod o+rw $DOCKER_SOCK
export DOCKER_HOST="unix:/${DOCKER_SOCK}"
export PROMENADE_TMP="abs_path_tmp_dir_on_host"
export PROMENADE_TMP_LOCAL="tmp_dir_inside_container"

After genesis scripts generation Docker socket permission should be turned back:
sudo chmod o-rw $DOCKER_SOCK

Change-Id: Ida22ea934fc551fec34df162d8147c8b9e630330
2019-06-06 10:30:29 -07:00
Scott Hussey 885a32a0c7 (bootstrap) Turn down tiller verbosity
- The pod running tiller during bootstrap had verbosity 99
  making the tiller logs almost unusable. Turn this down.

Change-Id: I6a93d7948e7db96ee95894d685a410aa0b82500a
2019-01-23 15:42:55 -06:00
Mark Burnett 04da7585ff Refactor API server
This change accomplishes 2 primary things:
1. It generalizes work to enable the EventRateLimit admission plugin.
2. It restructures the anchor so that during an upgrade an "old" anchor
   does not try to coordinate the injection of "new" data from
   configmaps/secrets.

It also includes these ancillary changes:
* Clean up apiserver argument specification in the chart.
* De-duplicate and realign apiserver arguments in bootstrapping templates.

It has the side effects of:
* Adding a new field, ".apiserver.arguments" to the Genesis config,
  which will be the preferred way to configure bootstrapping apiservers
  going forward (in lieu of command_prefix).

Change-Id: I33cfe80ee8e29cd79e479a7985e3c098a2288fda
2019-01-10 16:31:50 -06:00
Michael Beaver cc4eb17aa5 Change static pod template to run as root user
Change-Id: Ie04a52bec37633ebbd2b1f9e252740575cc80de1
2018-12-15 12:03:21 -06:00
Matt McEuen 178193be84 Add EventRateLimit admission controller
Add the EventRateLimit admission controller, to allow operators to
define rate limits for the k8s API server at the server, namespace,
or user account level.

This also
* cleans up some of the parameters passed into the API server
* replaces the deprecated --admission-control parameter
* applies --repair-malformed-updates consistently, incl examples
* removes unused batch/v2alpha1 runtime config
* https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/
* removes duplicate --service-cluster-ip-range setting

This PS adds EventRateLimits to the bootstrap and anchor API
servers; future work will need to add it to the Keystone
Webhook API server.

Change-Id: I32a2d4add880e50f470e4cb0687e20d16e6e926d
2018-10-27 15:35:43 -05:00
anthony.lin 6e81ed7b40 Update Labels - Application/Component
1) Kubernetes Template (Bootstrap)
2) Other charts within Promenade Repo

Change-Id: I872802112587bdff84d3630a5b2542dc4b3f77f8
2018-05-30 22:56:15 +08:00
Aaron Sheffield 6fa106fe2a Disable anonymous-auth
- Turn off anonymous-auth.
- Reworked haproxy helm test and updated test images.
- Reworked kubernetes-apiserver readiness and liveness tests.

Change-Id: Ifb39ebed0f9f6e430e97247fceebbd7816f092c7
2018-05-08 14:57:24 -05:00
Mark Burnett 8bbb84af97 Add a second auxiliary etcd server for bootstrap
This adds stability to etcd and enables cleaner waiting by tiller during
deployment of the Kubernetes apiserver and etcd.

* Adds second auxiliary etcd process.
* Enables "sequenced" for remaining ChartGroups.
* Removes unused disks from test VMs.
* Add readiness and liveness probes for kubernetes components

Change-Id: I6f83bb912f76b0ec35503723b417ba45d69e39c5
2018-04-27 13:31:39 -05:00
Mark Burnett 4f975a8cd8 Allow configuration of bootstrap API server
This avoids possible issues when the configuration of the bootstrapping
apiserver differs from the chart's configuration.  Issues were
specifically seen when overriding the node port range, but this opens up
additional configuration also.

Change-Id: I2a3fc5847e850c8055c099bac50782debbbabbf4
2018-04-27 14:37:57 +00:00
Aaron Sheffield 2885218d35 Add Helm test for HAProxy
- Added a helm test to test HAProxy's health via kubernetes healthz endpoint.

Change-Id: I0ffba39d4e4245fad69c27f0fcafdcb58fdc9067
2018-04-19 12:16:27 -04:00
Mark Burnett 8c468b359b Add ability to specify target-manifest for Armada
Change-Id: Ica00512062fb19ae395544c254de517fe0161e12
2018-02-16 12:20:40 -05:00
Mark Burnett 39c6e9c92f Make bootstrap armada target its own apiserver
This helps avoid an exception when armada deploys the apiserver chart.

Change-Id: Iba3acc917a4a115a1c4f62c81c8c906b41958d7e
2018-01-04 09:11:54 -05:00
Mark Burnett 13641c9fb9 Fix: add proxy environment to armada pod
Change-Id: Ib5813da2e6e174cb7c3764269817b687d6adaf34
2017-12-20 09:51:20 -06:00
Anthony Lin 4a41bab364 Update bootstrap-armada.yaml
Use apiserver instead of proxy server

Change-Id: Ia9eb6e59b13055f46412fd84508733ee72fc4cf6
2017-12-05 15:42:53 +00:00
Mark Burnett 51df4ce078 Avoid insecure apiserver port for tiller
This allows us to replace the apiserver process during genesis with the
chart-managed version that is likely to only listen on a secure port.

* Bundle armada + tiller + insecure apiserver into a static pod
* Report aramda logs via host filesystem

NOTE: This is using an additional apiserver sidecar rather than a
`kubectl proxy` sidecar with a serviceaccount, because it's running as a
static pod.

Change-Id: I39c638020c0ad36db8d3b10c4ecb959a6642ad0e
2017-12-01 14:46:32 -06:00