-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update YQ everywhere and deploy-renku wants split values files. #60
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,14 @@ echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin | |
# set up kube context and values file | ||
echo "$RENKUBOT_KUBECONFIG" > "$KUBECONFIG" && chmod 400 "$KUBECONFIG" | ||
|
||
# set up the values file | ||
printf "%s" "$RENKU_VALUES" | sed "s/<replace>/${RENKU_RELEASE}/" > $RENKU_VALUES_FILE | ||
export RENKU_VALUES_FILE="/renku-values.yaml" | ||
|
||
# merge the secret and clear value files | ||
printf "%s" "$RENKU_SECRET_VALUES" > $RENKU_VALUES_FILE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to update the README.md for these changes accordingly. According to the README the secret values are called just |
||
yq eval-all --inplace '. as $item ireduce ({}; . * $item )' $RENKU_VALUES_FILE $RENKU_CLEAR_VALUES_FILE | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is better to let helm take care of this if we simply pass the files on to the helm command in the python script that does |
||
|
||
# replace the release name | ||
sed --in-place "s/<replace>/${RENKU_RELEASE}/" $RENKU_VALUES_FILE | ||
|
||
# register the GitLab app | ||
if test -n "$GITLAB_TOKEN" ; then | ||
|
@@ -22,12 +28,12 @@ if test -n "$GITLAB_TOKEN" ; then | |
--data "name=${RENKU_RELEASE}" \ | ||
--data "redirect_uri=https://${RENKU_RELEASE}.dev.renku.ch/auth/realms/Renku/broker/dev-renku/endpoint https://${RENKU_RELEASE}.dev.renku.ch/api/auth/gitlab/token" \ | ||
--data "scopes=api read_user read_repository read_registry openid") | ||
APP_ID=$(echo $gitlab_app | jq -r '.application_id') | ||
APP_SECRET=$(echo $gitlab_app | jq -r '.secret') | ||
export APP_ID=$(echo $gitlab_app | jq -r '.application_id') | ||
export APP_SECRET=$(echo $gitlab_app | jq -r '.secret') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am pretty sure we don't need the export here and in front of |
||
|
||
# gateway gitlab app/secret | ||
yq w -i $RENKU_VALUES_FILE "gateway.gitlabClientId" "$APP_ID" | ||
yq w -i $RENKU_VALUES_FILE "gateway.gitlabClientSecret" "$APP_SECRET" | ||
yq eval --inplace '.gateway.gitlabClientId = strenv(APP_ID)' $RENKU_VALUES_FILE | ||
yq eval --inplace '.gateway.gitlabClientSecret = strenv(APP_SECRET)' $RENKU_VALUES_FILE | ||
fi | ||
|
||
# create namespace and ignore error in case it already exists | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
FROM python:3.7-alpine3.10 | ||
FROM python:3.9-alpine3.18 | ||
|
||
# install dependencies | ||
RUN apk add --no-cache git bash && \ | ||
apk add --no-cache --virtual .build-deps gcc g++ make && \ | ||
wget -O /usr/bin/yq "https://github.com/mikefarah/yq/releases/download/3.1.1/yq_linux_amd64" && \ | ||
chmod a+x /usr/bin/yq && \ | ||
pip install -U pip chartpress==2.1.0 six==1.16.0 && \ | ||
apk del .build-deps | ||
RUN apk add --no-cache git bash yq && \ | ||
pip install -U pip \ | ||
chartpress==2.1.0 \ | ||
'ruamel.yaml<0.17.10' \ | ||
'ruamel.yaml.clib<0.2.4' | ||
|
||
COPY update-upstream.sh / | ||
ENTRYPOINT [ "/update-upstream.sh" ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.15 | ||
FROM alpine:3.18 | ||
|
||
RUN apk add --no-cache yq | ||
COPY entrypoint.sh / | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a RENKU_VALUES_FILE variable defined (or at least that is what the README says) and that contains the values.yaml file that comes with the helm chart. But here this is something else I think? Is this supposed to contain the non-secret CI values?