Commit Graph

20 Commits

Author SHA1 Message Date
Phil Sphicas 6a17e4fccd Use curl (not socat) in apiserver anchor readiness
Update the kubernetes apiserver anchor pod to use curl instead of socat
for its readiness probe.

Change-Id: Id102d6542fa21b6d692781f81d250a3231e18771
2022-04-25 14:22:01 -07:00
Phil Sphicas 08906262fd Update tolerations and priority classes
* Give kube-proxy a blanket toleration
* Replace scheduler.alpha.kubernetes.io/critical-pod annotation with
    priorityClassName: system-node-critical

Change-Id: I810333913c09531eefa1ded014fe090d4cca7f7d
2021-10-18 11:33:54 -07:00
Phil Sphicas 41b3ad3dbb Adjust kube-apiserver anchor readiness
To avoid cycling the pods in the anchor daemonset too quickly, only
consider a kubernetes-apiserver-anchor pod ready if:
- it created the static manifest kubernetes-apiserver.yaml
- the kubernetes-apiserver pod on the same host is ready

Change-Id: I53dd1c044332946eeb965f07ae828910f00b04c6
2021-08-10 16:48:14 +00:00
Phil Sphicas 27f181a9d3 Add configmap-etc-hash to apiserver anchor
The apiserver anchor pods already have an annotation to detect changes
in the apiserver-bin configmap, but not for apiserver-etc.

This change adds the hash annotation, so that the daemonset pods will
cycle if a chart upgrade should result in a config change to the
apiserver static pod.

Change-Id: If3aa1b77ea9a737705b8be5e4938b183e310e265
2021-03-15 17:18:58 +00:00
Phil Sphicas 946a28dc76 Use HostToContainer mountPropagation
For any host mounts that include /var/lib/kubelet, use HostToContainer
mountPropagation, which avoids creating extra references to mounts in
other containers.

Affects the following resources:
* haproxy-anchor daemonset
* kubernetes-apiserver-anchor daemonset
* kubernetes-controller-manager-anchor daemonset
* kubernetes-scheduler-anchor daemonset

Change-Id: Ib7fb018c4c1916d00311a73f64f77a99b682d4c8
2021-01-08 01:05:04 +00:00
KHIYANI, RAHUL (rk0850) 89e2f84357 Add Docker default AppArmor profile to apiserver
Change-Id: I2d00b08ad23df693134c61b02d01df26ec751437
2020-02-05 15:17:16 +00:00
Pete Birley 64807416b7 Probes: Ensure newline between key and cert in probe concat
This PS ensures there is a newline present between the cert and its
key when concatenating them together.

Change-Id: I72319c1a415d683f19ff8f96060eb39bbec34b75
Signed-off-by: Pete Birley <pete@port.direct>
2019-12-06 14:21:56 -06:00
Zuul 18e80654ff Merge "Apiserver: Add pod/container security context" 2019-11-07 20:15:22 +00:00
Phil Sphicas a7c7282ba4 Fix: anchor pre-stop failures
kubernetes-controller-manager-anchor pods get stuck in Terminating state
because the pre-stop script tries to touch /tmp/stop, which is on a read
only root filesystem.

This change mounts an emptyDir at /tmp to resolve the issue.

The same change is applied to apiserver, etcd, and scheduler anchors, to
prevent the issue if readOnlyRootFilesystem is enabled.

Related change for haproxy:
https://review.opendev.org/685711/

Change-Id: I784498e0dc24da91a983716029973919b96a3055
2019-11-04 15:14:27 -08:00
KHIYANI, RAHUL (rk0850) 154e0b5464 Apiserver: Add pod/container security context
This updates the apiserver chart to include the pod
security context on the pod template.

This also adds the container security context to set
readOnlyRootFilesystem flag to false

Change-Id: I76d80c4cbf40d1e3e518a3d2969c86f4d5c8c3f4
2019-11-04 22:11:35 +00:00
Scott Hussey ad30aa7382 (apiserver) support key rotation
- Support key rotation for the etcd encryption key in the
  apiserver chart
- Remove configmap annotations from the apiserver anchor pods
  as the pod is built to pickup changes in configmap contents
  without restart.
- Also update the apiserver anchor DaemonSet to apps/v1 and
  make required updates to support that update.

Change-Id: I2d18996bbe04bada9da2bce01a502550d3681c97
2019-04-29 09:31:24 -05: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
Bryan Strassner 425d8bdff8 [FIX] liveness probe file location fix
Fixes the destination for the file created during the liveness probe for
the apiserver anchor pod so that it exists in the desired location for
the subsequent check.

Change-Id: I29966ee47524f73b018cc6ea85854a42a406dfc3
2018-11-30 15:39:43 -06: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
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
Scott Hussey 88681e754a Missing resource limits on apiserver pod
- Add resource limits to the static defintion for the
  apiserver pod

Change-Id: I473c67e53da148f92441563187d6e026cf697582
2018-04-03 10:15:29 -05:00
Mark Burnett 78d7437193 Add rest of UCP to complete example
* Adds missing services to tools/g2/manifests/genesis.json
* Removes init containers from kubernetes component anchors
* Forces refresh of "latest" containers in gate.sh image cache

Change-Id: I7cce39dd77cc7f60dc3824c36b39e0c7034db245
2017-11-30 10:09:50 -06:00
Anthony Lin dee0960ed7 Refactor apiserver Chart
Refactor apiserver chart to align with OSH
standards

Change-Id: I9d168226622d8fc2047a0b71cf390c086d3efe40
2017-11-07 23:41:26 +00:00
Mark Burnett 95643147c5 Migrate to self hosted using charts
This change includes several interconnected features:

* Migration to Deckhand-based configuration.  This is integrated here,
  because new configuration data were needed, so it would have been
  wasted effort to either implement it in the old format or to update
  the old configuration data to Dechkand format.
* Failing faster with stronger validation.  Migration to Deckhand
  configuration was a good opportunity to add schema validation, which
  is a requirement in the near term anyway.  Additionally, rendering
  all templates up front adds an additional layer of "fail-fast".
* Separation of certificate generation and configuration assembly into
  different commands.  Combined with Deckhand substitution, this creates
  a much clearer distinction between Promenade configuration and
  deployable secrets.
* Migration of components to charts.  This is a key step that will
  enable support for dynamic node management.  Additionally, this paves
  the way for significant configurability in component deployment.
* Version of kubelet is configurable & controlled via download url.
* Restructuring templates to be more intuitive.  Many of the templates
  require changes or deletion due to the migration to charts.
* Installation of pre-configured useful tools on hosts, including calicoctl.
* DNS is now provided by coredns, which is highly configurable.

Change-Id: I9f2d8da6346f4308be5083a54764ce6035a2e10c
2017-10-17 13:29:46 -05:00