Skip to content
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: Use multi-arch images for AIOps #322

Merged
merged 1 commit into from
Jan 31, 2024
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
2 changes: 1 addition & 1 deletion config/cloudpaks/cp4aiops/install-aimgr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Cloud Pak for AIOps - AI Manager
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

version: 0.17.0
version: 0.18.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: config
image: quay.io/openshift/origin-cli:latest
image: registry.redhat.io/openshift4/ose-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: ARGOCD_NAMESPACE
Expand Down Expand Up @@ -40,16 +40,31 @@ spec:

echo "INFO: Install Argo CLI."
# Install it from cluster, not from Internet, so airgap scenarios still work
argo_route=openshift-gitops-server
argo_secret=openshift-gitops-cluster
argo_route="${ARGOCD_NAMESPACE}-server"
argo_secret="${ARGOCD_NAMESPACE}-cluster"

export HOME=/tmp
argo_cmd="${HOME}/argocd"
result=0

linux_arch=$(uname -p)
argocd_cli_arch=amd64
if [ "${linux_arch}" == "ppc64le" ] || [ "${linux_arch}" == "s390x" ]; then
argocd_cli_arch=${linux_arch}
fi

argo_url=$(oc get route ${argo_route} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.spec.host}') \
&& curl -skL "${argo_url}/download/argocd-linux-amd64" -o "${argo_cmd}" \
&& chmod 755 "${argo_cmd}" \
&& cli_status=$(curl -skL "${argo_url}/download/argocd-linux-${argocd_cli_arch}" \
-o "${argo_cmd}" \
-w "%{http_code}") \
|| result=1

if [ "${cli_status}" != "200" ]; then
echo "ERROR: Unable to download argocd client."
exit 2
fi

chmod 755 "${argo_cmd}" \
&& argo_pwd=$(oc get secret ${argo_secret} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.data.admin\.password}' | base64 -d ; echo ) \
&& "${argo_cmd}" login "${argo_url}" --username admin --password "${argo_pwd}" --insecure \
|| result=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: config
image: quay.io/openshift/origin-cli:latest
image: registry.redhat.io/openshift4/ose-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: TARGET_NAMESPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
spec:
containers:
- name: config
image: quay.io/openshift/origin-cli:latest
image: registry.redhat.io/openshift4/ose-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: ARGOCD_NAMESPACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: config
image: quay.io/openshift/origin-cli:latest
image: registry.redhat.io/openshift4/ose-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: TARGET_NAMESPACE
Expand Down
2 changes: 1 addition & 1 deletion config/cloudpaks/cp4aiops/install-ia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.16.0
version: 0.17.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
spec:
containers:
- name: config
image: quay.io/openshift/origin-cli:latest
image: registry.redhat.io/openshift4/ose-cli:latest
imagePullPolicy: IfNotPresent
env:
- name: ARGOCD_NAMESPACE
Expand All @@ -35,16 +35,31 @@ spec:

echo "INFO: Install Argo CLI."
# Install it from cluster, not from Internet, so airgap scenarios still work
argo_route=openshift-gitops-server
argo_secret=openshift-gitops-cluster
argo_route="${ARGOCD_NAMESPACE}-server"
argo_secret="${ARGOCD_NAMESPACE}-cluster"

export HOME=/tmp
argo_cmd="${HOME}/argocd"
result=0

linux_arch=$(uname -p)
argocd_cli_arch=amd64
if [ "${linux_arch}" == "ppc64le" ] || [ "${linux_arch}" == "s390x" ]; then
argocd_cli_arch=${linux_arch}
fi

argo_url=$(oc get route ${argo_route} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.spec.host}') \
&& curl -skL "${argo_url}/download/argocd-linux-amd64" -o "${argo_cmd}" \
&& chmod 755 "${argo_cmd}" \
&& cli_status=$(curl -skL "${argo_url}/download/argocd-linux-${argocd_cli_arch}" \
-o "${argo_cmd}" \
-w "%{http_code}") \
|| result=1

if [ "${cli_status}" != "200" ]; then
echo "ERROR: Unable to download argocd client."
exit 2
fi

chmod 755 "${argo_cmd}" \
&& argo_pwd=$(oc get secret ${argo_secret} -n ${ARGOCD_NAMESPACE} -ojsonpath='{.data.admin\.password}' | base64 -d ; echo ) \
&& "${argo_cmd}" login "${argo_url}" --username admin --password "${argo_pwd}" --insecure \
|| result=1
Expand Down
Loading