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

do not merge - test trino #5450

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
21 changes: 8 additions & 13 deletions ci/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,33 +94,28 @@ function run_smoke_tests_stage() {
source ${CICD_ROOT}/_common_deploy_logic.sh
export NAMESPACE=$(bonfire namespace reserve --duration ${RESERVATION_TIMEOUT})

oc get secret/koku-aws -o json -n ephemeral-base | jq -r '.data' > aws-creds.json
oc get secret/koku-gcp -o json -n ephemeral-base | jq -r '.data' > gcp-creds.json
oc get secret/koku-oci -o json -n ephemeral-base | jq -r '.data' > oci-creds.json

AWS_CREDENTIALS_EPH=$(jq -r '."aws-credentials"' < aws-creds.json)
GCP_CREDENTIALS_EPH=$(jq -r '."gcp-credentials"' < gcp-creds.json)
OCI_CREDENTIALS_EPH=$(jq -r '."oci-credentials"' < oci-creds.json)
OCI_CONFIG_EPH=$(jq -r '."oci-config"' < oci-creds.json)
oc get secret koku-aws -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -
oc get secret koku-gcp -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -
oc get secret koku-oci -o yaml -n ephemeral-base | grep -v '^\s*namespace:\s' | oc apply --namespace=${NAMESPACE} -f -

bonfire deploy \
${APP_NAME} \
--ref-env insights-production \
--set-template-ref ${APP_NAME}/${COMPONENT_NAME}=${ghprbActualCommit} \
--set-template-ref trino=9d20acdd35ec5049745b8575eff4eb262ba40424 \
--set-image-tag ${IMAGE}=${IMAGE_TAG} \
--namespace ${NAMESPACE} \
${COMPONENTS_ARG} \
${COMPONENTS_RESOURCES_ARG} \
--optional-deps-method hybrid \
--set-parameter rbac/MIN_REPLICAS=1 \
--set-parameter koku/AWS_CREDENTIALS_EPH=${AWS_CREDENTIALS_EPH} \
--set-parameter koku/GCP_CREDENTIALS_EPH=${GCP_CREDENTIALS_EPH} \
--set-parameter koku/OCI_CREDENTIALS_EPH=${OCI_CREDENTIALS_EPH} \
--set-parameter koku/OCI_CONFIG_EPH=${OCI_CONFIG_EPH} \
--set-parameter koku/DBM_IMAGE=${IMAGE} \
--set-parameter koku/DBM_IMAGE_TAG=${IMAGE_TAG} \
--set-parameter koku/DBM_INVOCATION=${DBM_INVOCATION} \
--set-parameter koku/IMAGE=${IMAGE} \
--set-parameter koku/SCHEMA_SUFFIX=_${IMAGE_TAG} \
--set-parameter trino/IMAGE=quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/ubi-trino \
--set-parameter trino/IMAGE_TAG=pr-153-9d20acd \
--no-single-replicas \
--source=appsre \
--timeout 600
Expand Down Expand Up @@ -183,7 +178,7 @@ function wait_for_image() {

local count=0
local max=60 # Try for up to 30 minutes
until podman image search --limit 500 --list-tags "${IMAGE}" | grep -q "${IMAGE_TAG}"; do
until [[ $(curl -k -XGET "https://quay.io/api/v1/repository/redhat-user-workloads/cost-mgmt-dev-tenant/koku/tag?filter_tag_name=like:${IMAGE_TAG}" -Ls | jq '.tags | length') -gt 0 ]]; do
echo "${count}: Checking for image ${IMAGE}:${IMAGE_TAG}..."
sleep 30
((count+=1))
Expand Down
35 changes: 0 additions & 35 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5521,25 +5521,6 @@ objects:
kind: Secret
metadata:
name: koku-secret
- apiVersion: v1
data:
aws-credentials: ${AWS_CREDENTIALS_EPH}
kind: Secret
metadata:
name: koku-aws
- apiVersion: v1
data:
gcp-credentials: ${GCP_CREDENTIALS_EPH}
kind: Secret
metadata:
name: koku-gcp
- apiVersion: v1
data:
oci-config: ${OCI_CONFIG_EPH}
oci-credentials: ${OCI_CREDENTIALS_EPH}
kind: Secret
metadata:
name: koku-oci
- apiVersion: v1
data:
nginx.conf: |-
Expand Down Expand Up @@ -5944,22 +5925,6 @@ parameters:
generate: expression
name: SECRET_KEY
required: true
- displayName: AWS credentials file
name: AWS_CREDENTIALS_EPH
required: true
value: W2RlZmF1bHRdCmF3c19hY2Nlc3Nfa2V5X2lkPUFXU19BQ0NFU1NfS0VZX0lECmF3c19zZWNyZXRfYWNjZXNzX2tleT1BV1NfU0VDUkVUX0FDQ0VTU19LRVkK
- displayName: GCP Credentials (Ephemeral)
name: GCP_CREDENTIALS_EPH
required: true
value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
- displayName: OCI Credentials (Ephemeral)
name: OCI_CREDENTIALS_EPH
required: true
value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
- displayName: OCI Config (Ephemeral)
name: OCI_CONFIG_EPH
required: true
value: W0RFRkFVTFRdCnVzZXI9b2NpZDEudXNlci5pZApmaW5nZXJwcmludD0wMDAwMDAwMDAwMDAwMDAwMAp0ZW5hbmN5PW9jaWQxLnRlbmFuY3kuaWQK
- description: Enhanced Org Admin
displayName: Enhanced Org Admin
name: ENHANCED_ORG_ADMIN
Expand Down
70 changes: 35 additions & 35 deletions deploy/kustomize/base/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,25 @@ objects:
name: koku-secret
data:
django-secret-key: "${SECRET_KEY}"
- apiVersion: v1
kind: Secret # For ephemeral/local environment only
metadata:
name: koku-aws
data:
aws-credentials: "${AWS_CREDENTIALS_EPH}"
- apiVersion: v1
kind: Secret # For ephemeral/local environment only
metadata:
name: koku-gcp
data:
gcp-credentials: "${GCP_CREDENTIALS_EPH}"
- apiVersion: v1
kind: Secret # For ephemeral/local environment only
metadata:
name: koku-oci
data:
oci-credentials: "${OCI_CREDENTIALS_EPH}"
oci-config: "${OCI_CONFIG_EPH}"
# - apiVersion: v1
# kind: Secret # For ephemeral/local environment only
# metadata:
# name: koku-aws
# data:
# aws-credentials: "${AWS_CREDENTIALS_EPH}"
# - apiVersion: v1
# kind: Secret # For ephemeral/local environment only
# metadata:
# name: koku-gcp
# data:
# gcp-credentials: "${GCP_CREDENTIALS_EPH}"
# - apiVersion: v1
# kind: Secret # For ephemeral/local environment only
# metadata:
# name: koku-oci
# data:
# oci-credentials: "${OCI_CREDENTIALS_EPH}"
# oci-config: "${OCI_CONFIG_EPH}"

- apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -597,22 +597,22 @@ parameters:
required: true
from: "[a-f0-9]{20}"
generate: expression
- displayName: AWS credentials file
name: AWS_CREDENTIALS_EPH
required: true
value: W2RlZmF1bHRdCmF3c19hY2Nlc3Nfa2V5X2lkPUFXU19BQ0NFU1NfS0VZX0lECmF3c19zZWNyZXRfYWNjZXNzX2tleT1BV1NfU0VDUkVUX0FDQ0VTU19LRVkK
- name: GCP_CREDENTIALS_EPH
displayName: GCP Credentials (Ephemeral)
required: true
value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
- name: OCI_CREDENTIALS_EPH
displayName: OCI Credentials (Ephemeral)
required: true
value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
- name: OCI_CONFIG_EPH
displayName: OCI Config (Ephemeral)
required: true
value: W0RFRkFVTFRdCnVzZXI9b2NpZDEudXNlci5pZApmaW5nZXJwcmludD0wMDAwMDAwMDAwMDAwMDAwMAp0ZW5hbmN5PW9jaWQxLnRlbmFuY3kuaWQK
# - displayName: AWS credentials file
# name: AWS_CREDENTIALS_EPH
# required: true
# value: W2RlZmF1bHRdCmF3c19hY2Nlc3Nfa2V5X2lkPUFXU19BQ0NFU1NfS0VZX0lECmF3c19zZWNyZXRfYWNjZXNzX2tleT1BV1NfU0VDUkVUX0FDQ0VTU19LRVkK
# - name: GCP_CREDENTIALS_EPH
# displayName: GCP Credentials (Ephemeral)
# required: true
# value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
# - name: OCI_CREDENTIALS_EPH
# displayName: OCI Credentials (Ephemeral)
# required: true
# value: aW5zZXJ0LWJhc2U2NC1lbmNvZGVkLXZhbHVl
# - name: OCI_CONFIG_EPH
# displayName: OCI Config (Ephemeral)
# required: true
# value: W0RFRkFVTFRdCnVzZXI9b2NpZDEudXNlci5pZApmaW5nZXJwcmludD0wMDAwMDAwMDAwMDAwMDAwMAp0ZW5hbmN5PW9jaWQxLnRlbmFuY3kuaWQK
- description: Enhanced Org Admin
displayName: Enhanced Org Admin
name: ENHANCED_ORG_ADMIN
Expand Down