29 Commits

Author SHA1 Message Date
Vasyl Saienko
725dc5518d [memcached] Allign with security best practices
* Add runAsNonRoot directive
* Drop all capabilities
* Mount bianries with 550 and 65534 fsgroup

Change-Id: I0636088b40ce8ebaef84dad017ddbcaaecfc8221
2025-01-06 13:07:53 +00:00
Vasyl Saienko
8c6fb7afec [memcached] Enasure liveness probe is enabled
Change-Id: I4980d2e9ec4fbfc8e57bd643b703d37c12b32dfa
2024-12-24 19:12:58 +02:00
Vasyl Saienko
3f230251b4 [memcached] Drop max_surge option
We do not use service proxy to comminicate to memcached.
All services has exact number of endpoints to communicate.
Having max_surge is useless as clients will never use it.

Change-Id: I74a665c96cfc99cbb8d31c4a17700c467c746c9e
2024-12-24 19:12:18 +02:00
Vasyl Saienko
5eb63ac2c1 Ensure memcached pods antiaffinity
Use required* antiaffinity to make sure we do not have
two pods sitting on same node as it does not make any
sense.

Change-Id: I6c0c55733b75eb1bd53eee855907533d672dbf22
2024-12-24 19:11:10 +02:00
Vasyl Saienko
14b84a79db [memcached] Change deployment type to statefulset
For effective cache use all endpoints should be specified
explicitly as memcache client use specific algorithm to
identify on which cache server key is stored based on
servers availability and key name.
If memcached deployed behind the service unless same key is
stored on all memcached instances clients will always got
cache misses and will require to use heavy calls to database.
So in the end all keys will be stored on all memcached instances.
Furthermore delete operations such as revoke token or remove
keystone group call logic in service to remove data from cache
if Loadbalancer is used this functionality can't work as we
can't remove keys from all backends behind LB with single call.

Change-Id: I253cfa2740fed5e1c70ced7308a489568e0f10b9
2024-09-18 11:34:36 +00:00
Vasyl Saienko
10fca14997 [memcached] Allow to configure additional service parameters
Use the following structure in values to define addtional service
parameters:

Values: network:
    memcached:
      service:
        type: loadBalancer
        loadBalancerIP: 1.1.1.1
Change-Id: I94c87e530d90f603949ccacbf0602273feec741a
2024-09-14 18:08:06 +00:00
Vladimir Kozhukalov
8077898106 Update kubernetes-entrypoint image
Use quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
by default instead of 1.0.0 which is v1 formatted and
not supported any more by docker.

Change-Id: I6349a57494ed8b1e3c4b618f5bd82705bef42f7a
2024-07-12 13:52:07 -05:00
Samuel Liu
6034a00bf7 Replace node-role.kubernetes.io/master with control-plane
The master label is no longer present on kubeadm control plane nodes(v1.24). For new clusters, the label 'node-role.kubernetes.io/master' will no longer be added to control plane nodes, only the label 'node-role.kubernetes.io/control-plane' will be added. For more information, refer to KEP-2067[https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint]: Rename the kubeadm "master" label and taint.

the kubernetes pr: https://github.com/kubernetes/kubernetes/pull/107533

Change-Id: I3056b642db0a1799089998e3c020b4203c9a93ab
2023-03-20 13:38:07 +08:00
Brian Haley
f31cfb2ef9 support image registries with authentication
Based on spec in openstack-helm repo,
support-OCI-image-registry-with-authentication-turned-on.rst

Each Helm chart can configure an OCI image registry and
credentials to use. A Kubernetes secret is then created with these
info. Service Accounts then specify an imagePullSecret specifying
the Secret with creds for the registry. Then any pod using one
of these ServiceAccounts may pull images from an authenticated
container registry.

Change-Id: Iebda4c7a861aa13db921328776b20c14ba346269
2022-07-20 14:28:47 -05:00
Thiago Brito
010664e87e Enable taint toleration for memcached
This adds taint toleration support for openstack jobs

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: If0e02fe8df0bef5065ab99f71263b55f03ab5c3a
2022-03-24 14:56:28 -03:00
Mohammed Naser
696e37e3f7 memcached: switch to sidecar
Instead of running the exporter as a seperate deployemnt that talks
to the service, which will NOT be reporting reliable information if
you have more than 1 replica of memcached, this patch insteads moves
things into a sidecar model that runs in the same pod and exposes
the service.

Change-Id: Ia4801b47f44df91db10886f7cb4e8e174557aded
2022-01-28 03:07:05 -05:00
Thiago Brito
5a0ba49d50 Prepending library/ to docker official images
This will ease mirroring capabilities for the docker official images.

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: I0f9177b0b83e4fad599ae0c3f3820202bf1d450d
2021-06-02 15:04:38 -03:00
Huy Tran
c60c138777 Enhancements to make stats cachedump configurable
Memcached stats cachedump is enabled by default. Changes in this
pathset provide an option to configure stats cachedump as desired
during deployment i.e. the stats cachedump can be disabled to
prevent user obtaining sensitive info via the cachedump data.

Change-Id: Ic6254f89b1478a414ac275436ddd659b16b75f98
2021-04-14 22:52:18 +00:00
Andrii Ostapenko
731a6b4cfa Enable yamllint checks
- document-end
- document-start
- empty-lines
- hyphens
- indentation
- key-duplicates
- new-line-at-end-of-file
- new-lines
- octal-values

with corresponding code adjustment.

Change-Id: I92d6aa20df82aa0fe198f8ccd535cfcaf613f43a
2020-05-29 19:49:05 +00:00
Gage Hugo
d14d826b26 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
2020-05-07 02:11:15 +00:00
laizhen
9b4931fc78 Remove duplicate key in memcached
Remove the duplicate key'namespace' in the endpoints configuration of oslo_cache

Change-Id: Ib4611f27ffa1146fc3d714c85ec263b379925e31
2020-01-09 13:52:00 +00:00
Steve Wilkerson
b50fae62a4 Update kubernetes-entrypoint image reference
This updates the kubernetes-entrypoint image reference to consume
the publicly available kubernetes-entrypoint image that is built
and maintained under the airshipit namespace, as the stackanetes
image is no longer actively maintained

Change-Id: I5bfdc156ae228ab16da57569ac6b05a9a125cb6a
Signed-off-by: Steve Wilkerson <sw5822@att.com>
2019-10-18 18:20:11 +00:00
Gage Hugo
ab3ab66bcb Add open egress rules to multiple infra charts
This change adds egress rules to the following charts:
- ingress
- memcache
- libvirt
- rabbitmq

These rules will be tightend down in future changes

Change-Id: I6f297d50ca4c06234c7c79986a12cccf3beb5efb
2019-09-12 13:07:19 -05:00
Roy Tang (rt7380)
85bd731562 Expose Anti-Affinity Weight Setting
This ps exposes the anti-affinity weight value, including
default, that will be consumed by the updated htk function.

Change-Id: Id8eb303674764ef8b0664f62040723aaf77e0a54
2019-05-14 17:04:52 -05:00
RAHUL KHIYANI
2cc0317fc3 Memcached: Fix security context
This PS adds the missing allowPrivilegeEscalation flag in container
securityContext

Change-Id: Ie10951bd43de563fec09795feedc0050dcd4ebbe
2019-04-23 13:29:44 +00:00
Rahul Khiyani
2b84120034 Memcached securityContext
securityContext with readOnlyRootFilesystem is implemented at container
level and leveraged the helm-toolkit snippet

Change-Id: I8b16e9c17154a2bac162f31939b510fcd773126b
2019-03-18 14:07:44 +00:00
Cliff Parsons
8bbe8452c2 Implement Security Context for Memcached
Implement a pod security context for the following Memcached resources:
 - Memcached server deployment

Change-Id: I8628ceb246e7c435a2ddd20bf1bcecd94db8ea26
2019-03-06 06:35:11 +00:00
Steve Wilkerson
96a3cf2f6e Memcached: Add security context for exporter pod/container
This adds the security context to the memcached prometheus
exporter pod, which changes the default user from root to the
nobody user instead

This also adds the container security context to explicitly set
allowPrivilegeEscalation to false

Change-Id: I3401c1a67f17cef49a478be98f9ab42691b84d66
2019-01-03 16:14:50 -06:00
Pete Birley
0bf3674539 Revert "Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA"
This reverts commit 8d33a2911cda0c9e88406b9eeacbd8dfa70286f2.

Change-Id: Ic861b9bf9b337449b47a3558da8355e7a5bcacee
2018-12-16 04:21:46 +00:00
Mike Pham
8d33a2911c Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA
This PS implements the helm toolkit function to generate the
Egress in kubernetes network policy manifest based on overrideable values.
It also enbale the K8s network policy at Osh-infra gate.

Change-Id: Icbe2a18c98dba795d15398dcdcac64228f6a7b4c
2018-12-14 16:32:40 -05:00
Tin Lam
92e68d33ea Add network policy toolkit function
This patch set implements the helm toolkit function to generate a
kubernetes network policy manifest based on overrideable values.
This also adds a chart that shuts down all the ingress and egress
traffics in the namespace. This can be used to ensure the
whitelisted network policy works as intended.

Additionally, implementation is done for some infrastructure charts.

Change-Id: I78e87ef3276e948ae4dd2eb462b4b8012251c8c8
Co-Authored-By: Mike Pham <tp6510@att.com>
Signed-off-by: Tin Lam <tin@irrational.io>
2018-10-15 13:50:50 +00:00
Jean-Philippe Evrard
bf069b2311 Revert "Update OSH Author copyrights to OSF"
This reverts commit 178aa271a44956e86f4e962bf815fa827d93c9af.

Change-Id: I38a52d866527dfff2689b618e055f439bc248c13
2018-08-28 17:25:54 +00:00
Matt McEuen
178aa271a4 Update OSH Author copyrights to OSF
This PS updates the "Openstack-Helm Authors" copyright attribution
to be the "OpenStack Foundation", as decided in the 2018-03-20
team meeting:
http://eavesdrop.openstack.org/meetings/openstack_helm/2018/openstack_helm.2018-03-20-15.00.log.html

No other copyright attributions were changed.

Change-Id: I1137dee2ae5728771835f4b33fcaff60fcc22ca9
2018-08-26 17:17:06 -05:00
Pete Birley
a29da8c70f Memcached: move Memcached chart to OSH-Infra
This PS moves the Memcached chart to OSH-Infra

Story: 2002204
Task: 21727

Change-Id: I47a226ba90a84cddcbf4911af4bf23257827e79e
Signed-off-by: Pete Birley <pete@port.direct>
2018-07-26 19:35:13 +00:00