Commit Graph

25 Commits

Author SHA1 Message Date
Phil Sphicas c7e72942a9 Remove hyperkube extraction functionality
The extraction of the monolithic hyperkube binary from its container
image to be used as kubelet was last relevant in Kubernetes 1.16. Since
then, the hyperkube image has been deprecated, the structure of the
image has been changed, and it has ultimately been eliminated in
Kubernetes 1.19.

This change cleans up promenade accordingly.

Reverts the following commits:
* 886007b New CLI option to extract hyperkube
* 32a6c15 hyperkube image in promenade init
* 955deed New source for hyperkube binary definition

Change-Id: Ib62ecdf1af13abe8202a4ba4f86c39b9042ed13f
2021-02-11 17:23:32 +00:00
KHIYANI, RAHUL (rk0850) 4eb069dd88 Add missing security context template to promenade init container
This change adds security context template at container level
to implement readOnly-fs flag

Change-Id: Iab814a3dd5a9bc46251939d6335af6aab21e5eb5
2020-08-05 13:23:33 -05:00
KHIYANI, RAHUL (rk0850) 535e39262b promenade: Add default apparmor profile to init containers
Adding profile to promenade-util and haproxy-perms init containers

Change-Id: I46f4c6a3fe561f994860a9434d7e5cb10884e190
2020-04-30 09:42:40 -05:00
Zuul 68337cd83c Merge " Add Docker default AppArmor profile to promenade" 2020-02-18 18:08:08 +00:00
NarlaSandeepNarlaSaibaba fc331e5124 Add Docker default AppArmor profile to promenade
Change-Id: Ic3983f963ae5003445642f842a9c550cf49d4d34
2020-02-12 01:19:30 -06:00
Matt McEuen bfd4924452 promenade: convert configmap-etc to secret
This converts the etc configmap to be a secret, whic provides
additional obfuscation against accidental inspection of secrets.

Change-Id: Ifd522a786eb751e7fad35d3f9ee17ec2bb87e010
2019-12-17 15:07:57 -06:00
Egorov, Stanislav (se6518) 32a6c15ffd hyperkube image in promenade init
Use hyperkube image for promenade init container.
It's purpose is to extract and cache hyperkube binary from image.
This binary will be used in promenade-api container as a backup plan.

Init container stores binary in a shared volume where
promenade-api container can use it. It will use it when
promenade config has no docker endpoint to call docker API
from promenade source code.

See https://review.opendev.org/657953 for reference.

Change-Id: I7edcb1acbe0d864324a4341c682bbcb9b110c4eb
2019-06-28 12:46:28 -07:00
Kumar, Nishant(nk613n) 75d3a86234 Add release uuid annotation to POD spec
Change-Id: Id4a96de7da9233589b54217e04a346281eaea68c
2019-06-25 14:55:05 +00: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
Zuul 2741ea1f90 Merge "Use apps/v1 k8s controllers and add labels" 2019-04-24 13:08:37 +00:00
Sean Eagan 2e2a30515c Use apps/v1 k8s controllers and add labels
Daemonset update strategy defaults to OnDelete in v1beta1, whereas
it defaults to RollingUpdate in v1, which seems prefereable.

This also adds helm-toolkit based labels at the controller level
to match standard usage such as for example by armada as wait labels.

This change has been tested using the promenade resiliency gate.

Change-Id: I9fd1bc4caedc0a6717b779e5333640ca8dc78b7e
2019-04-23 09:24:53 -05:00
RAHUL KHIYANI 479433aa80 Promenade: Add security context for pod/container
This adds a security context to the promenade chart, which
changes the pod's user from root to the nobody user instead

This also adds the container security context to set
allowPrivilegeEscalation to false and readOnlyRootFilesystem to true

Change-Id: I269d034f6f8a1c14f2897bb375e899abc99e0c01
2019-04-09 20:21:02 -05:00
Mark Burnett 621669d7d4 Fix incorrect volumeMount entry for policy.yaml
Change-Id: I49ad7e897543f230475f9c7d1aec5d002293077d
2018-12-20 16:24:22 -06:00
Rahul Khiyani e7f61a12fa [US:349446] Adding capabilites for reading policy.yaml file.
Change-Id: I202a98d37988d57e0f09e15200d719f9111231d3
2018-12-12 11:09:44 -05:00
Matt McEuen eae60aba15 Add release uuid to pods and rc objects (prom)
This PS adds the ability to attach a release uuid to pods and rc
objects as desired.  This can be used, for example, to force an
artificial manifest change in CICD scenarios, for upgradability
testing purposes.

Change-Id: I8d0ffac306258f940c63799e86e7e26b5c2c5add
2018-10-16 12:43:32 -05:00
Mark Burnett 9cb2c5a5ca Add local file cache for Builder tarball fetch
Change-Id: I4741b50c4a4b505f4f70ff2cbc5e9689b9f28b7b
2018-06-25 07:51:44 -05:00
Mark Burnett b4449434a5 Fix DNS name list for kube services in certs
* Also adds liveness and readiness probes for Prom deployment

Change-Id: Id65d1e555e14478f2439c14dd6d6d7952411256d
2018-02-14 15:33:41 -06:00
Mark Burnett ff3787c2ad Use HAProxy for apiserver discovery
This removes the reliance on coredns for APIserver discovery, allowing
a simpler configuration that is compatible with corednx 1.0.x

Change-Id: Ia3b7b5627c16ec47af6b0d6d5e8dee2674e9b1ee
2018-02-08 14:30:35 -06:00
Mark Burnett eeee591f8e Add deckhand design_ref support
* Add ability to fetch design from Deckhand
* Add functional testing for Deckhand design_ref integration
* Update complete example to work with changes to Ceph chart

Change-Id: Ice25a27b340e68a8ab38a23021cd91e032ca537b
2018-01-22 08:28:19 -06:00
Mark Burnett 8992927f4d Support HTTP proxy in the Promenade API deployment
Change-Id: Iac99c4ea7c5b6f381910fd97207b3a16d644de75
2018-01-08 12:49:15 -05:00
Mark Burnett 2215843d72 Remove unneeded configuration
Removing use of some helm-toolkit features that are not needed.

Change-Id: Ic9e01e3669604d2329eb0b10303e1b38ac9f60fc
2018-01-08 10:25:22 -05:00
Anthony Lin c944b71b02 Update Promenade Chart
We are getting the following error [0] when we try to deploy the
Promenade Helm Chart with Armada. The problem occurs after [1] was
merged. Note that [1] is the updates for RBAC changes.

This p.s. is meant to correct that behavior

[0] StatusCode.UNKNOWN, error validating "": error validating data: found invalid field rules for v1.Job
[1] https://review.gerrithub.io/#/c/393196/

Change-Id: I6917a0176841046e60b24066f72cb0931c034a0b
2018-01-03 08:49:08 -06:00
Anthony Lin 83cfb760c4 RBAC: Update serviceaccount and k8s rbac for promenade
This patch set brings the promenade chart to be inline with OSH* RBAC
approach used in [0] and [1].

[0] https://review.openstack.org/#/c/526464/52
[1] https://review.openstack.org/#/c/529378/

Change-Id: Ida951702dadc8280d81ececac417ef53b936c8fe
2018-01-02 17:42:32 +00:00
Mark Burnett 527b2ad096 Add keystone integration test
* Adds "g2" gate for testing keystone integration
* Adds policy enforcement for join-scripts endpoint
* Updates ceph to luminous

Change-Id: Id52c1e51b567afc5a16d46c72145e21316c00a49
2017-12-19 16:00:20 -06:00
Mark Burnett 6caf7fb54d Add initial chart for Promenade API
Co-author: Mark Burnett <mark.m.burnett@gmail.com>
Co-author: Samantha Blanco <spblanco.1@gmail.com>

Change-Id: I2e6af00b7905d9070f79b8c536385ebdae877d50
2017-11-15 14:19:43 -06:00