This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
71
stars
64
forks
source link
fix: (IAC-536): fixed rabbitmq pods failed after adding a new node pool #391
The rabbitmq-pod-security patch transformer resolves the 'sas-rabbitmq-server' pod failures on Kubernetes with the error "[error] Cookie file /rabbitmq/data/.erlang.cookie must be accessible by owner only" - when adding or removing the 'connect' node pool on AWS EKS.
This 'PatchTransformer' modifies the pod's 'securityContext' configuration of the 'sas-rabbitmq-server' container, which resolves the file permission issue that leads to the error message. Specifically, by setting the 'runAsUser' attribute to 1001, the container runs as a non-root user, which ensures that the '.erlang.cookie' file is accessible only by the owner.
Additionally, the patch disables privilege escalation and sets the container to run in read-only mode, further enhancing the security of the container. Overall, these modifications should ensure that the 'sas-rabbitmq-server' pods run correctly without any issues related to the '.erlang.cookie' file permissions.
Testing
See internal ticket for details and test artifacts:
Changes
The
rabbitmq-pod-security
patch transformer resolves the 'sas-rabbitmq-server' pod failures on Kubernetes with the error "[error] Cookie file /rabbitmq/data/.erlang.cookie must be accessible by owner only
" - when adding or removing the 'connect' node pool on AWS EKS.This 'PatchTransformer' modifies the pod's 'securityContext' configuration of the 'sas-rabbitmq-server' container, which resolves the file permission issue that leads to the error message. Specifically, by setting the 'runAsUser' attribute to 1001, the container runs as a non-root user, which ensures that the '.erlang.cookie' file is accessible only by the owner.
Additionally, the patch disables privilege escalation and sets the container to run in read-only mode, further enhancing the security of the container. Overall, these modifications should ensure that the 'sas-rabbitmq-server' pods run correctly without any issues related to the '.erlang.cookie' file permissions.
Testing
See internal ticket for details and test artifacts: