Skip to content

Commit

Permalink
control-service: multiple namespaces in testing (#2269)
Browse files Browse the repository at this point in the history
# Why
A bug creeped in to the code where we were deploying data jobs to
control namespace and we weren't catching it.
We couldn't catch it because in CICD data jobs and control deploy to the
same namespace.
# What
control and data jobs now use differnt namespace in cicd.

---------

Signed-off-by: murphp15 <murphp15@tcd.ie>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
murphp15 and pre-commit-ci[bot] committed Jun 21, 2023
1 parent 25421c0 commit 9a95e14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Copyright 2021-2023 VMware, Inc.
# SPDX-License-Identifier: Apache-2.0

blank_issues_enabled: false
contact_links:
- name: "\U0001F914 All other questions, including if you're not sure what to do."
url: https://github.com/jupyterlab/jupyterlab/discussions/new?category=q-a
about: Search Github Discussions for similar questions or ask for help there.
- name: "\U0001F4AC Chat with the devs on Versatile Data Kit slack channel in CNCF slack "
url: https://communityinviter.com/apps/cloud-native/cncf
about: Ask short questions about using Versatile Data Kit
url: https://communityinviter.com/apps/cloud-native/cncf
about: Ask short questions about using Versatile Data Kit
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export TESTING_PIPELINES_SERVICE_VALUES_FILE=${TESTING_PIPELINES_SERVICE_VALUES_
RUN_ENVIRONMENT_SETUP=${RUN_ENVIRONMENT_SETUP:-'n'}

if [ "$RUN_ENVIRONMENT_SETUP" = 'y' ]; then
kubectl create namespace cicd-control
kubectl create namespace cicd-deployment
helm repo add valeriano-manassero https://valeriano-manassero.github.io/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
Expand All @@ -40,6 +42,7 @@ if [ "$RUN_ENVIRONMENT_SETUP" = 'y' ]; then
# So we need to set credentials of the service account used to pull images when starting jobs
secret_name=docker-registry
kubectl create secret docker-registry $secret_name \
--namespace="cicd-deployment" \
--docker-server="$CICD_CONTAINER_REGISTRY_URI" \
--docker-username="$CICD_CONTAINER_REGISTRY_USER_NAME" \
--docker-password="$CICD_CONTAINER_REGISTRY_USER_PASSWORD" \
Expand All @@ -49,12 +52,14 @@ if [ "$RUN_ENVIRONMENT_SETUP" = 'y' ]; then
if [ -n "$DOCKERHUB_READONLY_USERNAME" ]; then
dockerhub_secretname='secret-dockerhub-docker'
kubectl create secret docker-registry "$dockerhub_secretname" \
--namespace="cicd-deployment" \
--docker-server="https://index.docker.io/v1/" \
--docker-username="$DOCKERHUB_READONLY_USERNAME" \
--docker-password="$DOCKERHUB_READONLY_PASSWORD" \
--docker-email="versatiledatakit@groups.vmware.com" --dry-run=client -o yaml | kubectl apply -f -

kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"'$secret_name'"},{"name":"'$dockerhub_secretname'"}]}'

fi

fi
Expand Down Expand Up @@ -109,4 +114,6 @@ helm upgrade --install --debug --wait --timeout 10m0s $RELEASE_NAME . \
--set security.oauth2.jwtIssuerUrl=https://gaz-preview.csp-vidm-prod.com \
--set security.authorizationEnabled=false \
--set extraEnvVars.LOGGING_LEVEL_COM_VMWARE_TAURUS=DEBUG \
--set deploymentK8sNamespace="cicd-deployment" \
--set controlK8sNamespace="cicd-control" \
--set extraEnvVars.DATAJOBS_TELEMETRY_WEBHOOK_ENDPOINT="https://vcsa.vmware.com/ph-stg/api/hyper/send?_c=taurus.v0&_i=cicd-control-service"

0 comments on commit 9a95e14

Please sign in to comment.