@@ -50,11 +50,11 @@ function setup_cloudwatch_logs() {
5050}
5151
5252function setup_configmap() {
53- kubectl -n=$CORTEX_NAMESPACE create configmap ' cortex-config' \
53+ kubectl -n=cortex create configmap ' cortex-config' \
5454 --from-literal=' LOG_GROUP' =$CORTEX_LOG_GROUP \
5555 --from-literal=' BUCKET' =$CORTEX_BUCKET \
5656 --from-literal=' REGION' =$CORTEX_REGION \
57- --from-literal=' NAMESPACE' =$CORTEX_NAMESPACE \
57+ --from-literal=' NAMESPACE' =cortex \
5858 --from-literal=' IMAGE_OPERATOR' =$CORTEX_IMAGE_OPERATOR \
5959 --from-literal=' IMAGE_TF_SERVE' =$CORTEX_IMAGE_TF_SERVE \
6060 --from-literal=' IMAGE_ONNX_SERVE' =$CORTEX_IMAGE_ONNX_SERVE \
@@ -67,7 +67,7 @@ function setup_configmap() {
6767}
6868
6969function setup_secrets() {
70- kubectl -n=$CORTEX_NAMESPACE create secret generic ' aws-credentials' \
70+ kubectl -n=cortex create secret generic ' aws-credentials' \
7171 --from-literal=' AWS_ACCESS_KEY_ID' =$CORTEX_AWS_ACCESS_KEY_ID \
7272 --from-literal=' AWS_SECRET_ACCESS_KEY' =$CORTEX_AWS_SECRET_ACCESS_KEY \
7373 -o yaml --dry-run | kubectl apply -f - > /dev/null
@@ -114,11 +114,11 @@ function validate_cortex() {
114114 echo -n " ."
115115 sleep 5
116116
117- operator_pod_name=$( kubectl -n=$CORTEX_NAMESPACE get pods -o=name --sort-by=.metadata.creationTimestamp | grep " ^pod/operator-" | tail -1)
117+ operator_pod_name=$( kubectl -n=cortex get pods -o=name --sort-by=.metadata.creationTimestamp | grep " ^pod/operator-" | tail -1)
118118 if [ " $operator_pod_name " == " " ]; then
119119 operator_pod_ready_cycles=0
120120 else
121- is_ready=$( kubectl -n=$CORTEX_NAMESPACE get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].ready}' )
121+ is_ready=$( kubectl -n=cortex get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].ready}' )
122122 if [ " $is_ready " == " true" ]; then
123123 (( operator_pod_ready_cycles++ ))
124124 else
@@ -154,10 +154,10 @@ function validate_cortex() {
154154 fi
155155
156156 if [ " $operator_pod_ready_cycles " == " 0" ] && [ " $operator_pod_name " != " " ]; then
157- num_restart=$( kubectl -n=$CORTEX_NAMESPACE get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].restartCount}' )
157+ num_restart=$( kubectl -n=cortex get " $operator_pod_name " -o jsonpath=' {.status.containerStatuses[0].restartCount}' )
158158 if [[ $num_restart -ge 2 ]]; then
159159 echo -e " \n\nAn error occurred when starting the Cortex operator. View the logs with:"
160- echo " kubectl logs $operator_pod_name --namespace=$CORTEX_NAMESPACE "
160+ echo " kubectl logs $operator_pod_name --namespace=cortex "
161161 exit 1
162162 fi
163163 continue
0 commit comments