Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ spec:
- --jira-password-file=/etc/jira/bot-password
- --release-qualifiers-config-path=/etc/qualifiers-config/release-qualifiers.yaml
- -v=4
env:
- name: HOME
value: /tmp/home
- name: XDG_RUNTIME_DIR
value: /tmp/home/run
image: quay-proxy.ci.openshift.org/openshift/ci:ci_release-controller-api_latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -277,6 +282,28 @@ spec:
subPath: .git-credentials
- mountPath: /tmp/pull-secret
name: pull-secret
initContainers:
- command:
- /bin/bash
- -c
- "#!/bin/bash\n set -euo pipefail\n trap 'kill $(jobs -p); exit 0' TERM\n\n SECONDS=0\n\n # ensure we are logged in to our registry\n mkdir -p ${XDG_RUNTIME_DIR}/containers\n cp /tmp/pull-secret/auth.json ${XDG_RUNTIME_DIR}/containers/auth.json || true\n\n # global git config stored to $HOME/.gitconfig which is shared with the main release-controller pods\n git config --global credential.helper store\n git config --global user.name test\n git config --global user.email test@test.com\n oc registry login --to ${XDG_RUNTIME_DIR}/containers/auth.json\n\n RC_SERVICE_AVAILABLE=$(curl -s -o /dev/null -I -w '%{http_code}' https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted)\n if [[ \"$RC_SERVICE_AVAILABLE\" -ne 200 ]]\n then\n FROM=\"\"\n TO=\"\"\n else\n FROM=$(curl -s https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted | jq -r '.[\"4-stable\"][0] // empty')\n TO=$(curl -s https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted | jq -r '.[\"4-dev-preview\"][0] // empty')\n fi\n\n if [[ -n \"$FROM\" && -n \"$TO\" ]]\n then\n echo \"Pre-populating the git cache...\"\n oc adm release info --changelog=/tmp/git quay.io/openshift-release-dev/ocp-release:$FROM-x86_64 quay.io/openshift-release-dev/ocp-release:$TO-x86_64\n else\n echo \"Unable to Pre-populate the git cache!\"\n fi\n\n DURATION=$SECONDS\n echo \"Took: $(($DURATION / 60))m $(($DURATION % 60))s\"\n "
env:
- name: HOME
value: /tmp/home
- name: XDG_RUNTIME_DIR
value: /tmp/home/run
image: quay-proxy.ci.openshift.org/openshift/ci:ci_release-controller_latest
name: oc-prepare
volumeMounts:
- mountPath: /tmp/home
name: home
- mountPath: /tmp/git
name: oc-cache
- mountPath: /tmp/home/.git-credentials
name: git-credentials
subPath: .git-credentials
- mountPath: /tmp/pull-secret
name: pull-secret
Comment thread
hoxhaeris marked this conversation as resolved.
serviceAccountName: release-controller-okd-arm64
volumes:
- name: jira
Expand Down
27 changes: 27 additions & 0 deletions clusters/app.ci/release-controller/deploy-origin-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ spec:
- --jira-password-file=/etc/jira/bot-password
- --release-qualifiers-config-path=/etc/qualifiers-config/release-qualifiers.yaml
- -v=4
env:
- name: HOME
value: /tmp/home
- name: XDG_RUNTIME_DIR
value: /tmp/home/run
image: quay-proxy.ci.openshift.org/openshift/ci:ci_release-controller-api_latest
imagePullPolicy: Always
livenessProbe:
Expand Down Expand Up @@ -277,6 +282,28 @@ spec:
subPath: .git-credentials
- mountPath: /tmp/pull-secret
name: pull-secret
initContainers:
- command:
- /bin/bash
- -c
- "#!/bin/bash\n set -euo pipefail\n trap 'kill $(jobs -p); exit 0' TERM\n\n SECONDS=0\n\n # ensure we are logged in to our registry\n mkdir -p ${XDG_RUNTIME_DIR}/containers\n cp /tmp/pull-secret/auth.json ${XDG_RUNTIME_DIR}/containers/auth.json || true\n\n # global git config stored to $HOME/.gitconfig which is shared with the main release-controller pods\n git config --global credential.helper store\n git config --global user.name test\n git config --global user.email test@test.com\n oc registry login --to ${XDG_RUNTIME_DIR}/containers/auth.json\n\n RC_SERVICE_AVAILABLE=$(curl -s -o /dev/null -I -w '%{http_code}' https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted)\n if [[ \"$RC_SERVICE_AVAILABLE\" -ne 200 ]]\n then\n FROM=\"\"\n TO=\"\"\n else\n FROM=$(curl -s https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted | jq -r '.[\"4-stable\"][0] // empty')\n TO=$(curl -s https://amd64.ocp.releases.ci.openshift.org/api/v1/releasestreams/accepted | jq -r '.[\"4-dev-preview\"][0] // empty')\n fi\n\n if [[ -n \"$FROM\" && -n \"$TO\" ]]\n then\n echo \"Pre-populating the git cache...\"\n oc adm release info --changelog=/tmp/git quay.io/openshift-release-dev/ocp-release:$FROM-x86_64 quay.io/openshift-release-dev/ocp-release:$TO-x86_64\n else\n echo \"Unable to Pre-populate the git cache!\"\n fi\n\n DURATION=$SECONDS\n echo \"Took: $(($DURATION / 60))m $(($DURATION % 60))s\"\n "
env:
- name: HOME
value: /tmp/home
- name: XDG_RUNTIME_DIR
value: /tmp/home/run
image: quay-proxy.ci.openshift.org/openshift/ci:ci_release-controller_latest
name: oc-prepare
volumeMounts:
- mountPath: /tmp/home
name: home
- mountPath: /tmp/git
name: oc-cache
- mountPath: /tmp/home/.git-credentials
name: git-credentials
subPath: .git-credentials
- mountPath: /tmp/pull-secret
name: pull-secret
serviceAccountName: release-controller-okd
volumes:
- name: jira
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from content.utils import get_rc_volumes, get_rc_volume_mounts, get_rcapi_volumes, get_rcapi_volume_mounts
from content.osd_rc_deployments import get_oc_env_vars, get_oc_prepare_container


def add_legacy_origin_deployments_scaled_down(gendoc):
Expand Down Expand Up @@ -295,6 +296,7 @@ def add_okd_deployments(gendoc):
}
},
"spec": {
"initContainers": get_oc_prepare_container(),
Comment thread
hoxhaeris marked this conversation as resolved.
"containers": [
{
"command": [
Expand All @@ -315,6 +317,7 @@ def add_okd_deployments(gendoc):
'imagePullPolicy': 'Always',
"name": "controller",
"volumeMounts": get_rcapi_volume_mounts(),
"env": get_oc_env_vars(),
'livenessProbe': {
'httpGet': {
'path': '/healthz',
Expand Down