Files
kuberay/scripts/helm-render-yaml.sh
Kai-Hsun ChenandGitHub 34e394f26c [Feature] Consistency check for RBAC (#577)
This PR adds two consistency checks related to RBAC in GitHub Actions.

(1) ray-operator-verify-crd-rbac: Kubebuilder markers in ray-operator/controllers/ray/*_controller.go should be synchronized with RBAC YAML files in ray-operator/config/rbac.

(2) helm-chart-verify-rbac: Check the consistency between RBAC YAML files in helm-chart/kuberay-operator/templates and ray-operator/config/rbac.
2022-09-19 16:57:53 -04:00

16 lines
613 B
Bash
Executable File

#!/usr/bin/env bash
if [ -L ${BASH_SOURCE-$0} ]; then
PWD=$(dirname $(readlink "${BASH_SOURCE-$0}"))
else
PWD=$(dirname ${BASH_SOURCE-$0})
fi
export CURRENT_PATH=$(cd "${PWD}">/dev/null; pwd)
export KUBERAY_HOME=${CURRENT_PATH}/..
cd $KUBERAY_HOME/helm-chart/kuberay-operator/
declare -a YAML_ARRAY=("role.yaml" "ray_rayjob_editor_role.yaml" "ray_rayjob_viewer_role.yaml" "leader_election_role.yaml" "ray_rayservice_editor_role.yaml" "ray_rayservice_viewer_role.yaml" )
mkdir -p $KUBERAY_HOME/scripts/tmp
for name in "${YAML_ARRAY[@]}"; do
helm template -s templates/$name . > $CURRENT_PATH/tmp/$name
done