mirror of
https://github.com/hanzo-ml/kuberay.git
synced 2026-10-30 19:48:47 +00:00
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.
16 lines
613 B
Bash
Executable File
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
|