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

[Backport] Fix oauth SARs for interactive login #617

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b0289e5
Move the SNMP trap delivery checks (#381) (#384)
leifmadsen Oct 21, 2022
0c4d8aa
Lock the bundle to OCP v4.10 (#385) (#386)
leifmadsen Oct 28, 2022
9c5b82a
Fixes for 17.0 ir script (#380) (#383)
leifmadsen Nov 8, 2022
907dbc4
Make all certs 8yr expiry (#387) (#389)
csibbitt Nov 14, 2022
90ae8ee
Update metadata to reference stable-1.5 (#397)
leifmadsen Nov 30, 2022
c3868c4
GHA checkout action v2 is deprecated (#407) (#408)
leifmadsen Feb 28, 2023
1dbc112
CI change to pre-clean cert-manager-operator (#409)
leifmadsen Mar 1, 2023
ecc5e5e
STF 1.5.1 release ops (#413)
csibbitt Mar 7, 2023
59f0442
Fix default CA cert lifetime values in stf-run-ci (#414)
csibbitt Mar 8, 2023
2085c15
fix/client version mismatch (#415)
leifmadsen Mar 8, 2023
c1fc1db
Allow oc client version override for Jenkins agent (#416) (#417)
leifmadsen Mar 9, 2023
2403533
Merge branch 'master' into import/stf153
leifmadsen Oct 26, 2023
8693f46
Use stable-1.5 channel in the stable-1.5 branch
leifmadsen Oct 26, 2023
e50dc5f
Drop .zuul.yaml for the stable-1.5 branch
leifmadsen Oct 27, 2023
03a5873
Merge pull request #509 from infrawatch/import/stf153
leifmadsen Oct 27, 2023
b063b92
Fix qdr auth one_time_upgrade label check (#518) (#521)
csibbitt Nov 6, 2023
c896687
QDR Auth in smoketest (#525) (#527)
csibbitt Nov 8, 2023
94e343c
QDR Auth for infrared 17.1 script (#517) (#528)
csibbitt Nov 13, 2023
edebfb5
Restart QDR after changing the password (#530) (#534)
csibbitt Nov 14, 2023
03269cd
Support OCP v4.12 through v4.14 (#535) (#536)
leifmadsen Nov 16, 2023
b321394
Adjust Operator dependency version requirements (#538) (#543)
leifmadsen Nov 27, 2023
4ffd1ab
Add optional spec.replaces field to CSV for update graph compliance (…
compi-migui Feb 7, 2024
ad468f2
STF 1.5.4 release ops (#574)
vkmc Feb 14, 2024
cf20fdf
Fix typo in check for setup_from_bundles (#577)
elfiesmelfie Feb 15, 2024
f39dd05
Add related images for Prometheus and Alertmanager (#578) (#580)
vkmc Feb 16, 2024
5f3f9a0
Fix env var naming issue (#581) (#582)
leifmadsen Feb 26, 2024
eb7d5b0
Update smoketest.sh (#583) (#584)
elfiesmelfie Mar 1, 2024
cbefc68
[zuul] Remove OCP 4.13 jobs (#602)
elfiesmelfie May 31, 2024
3b6b1e1
Update nodesets label (#614)
danpawlik Jul 17, 2024
2daaf95
Fix oauth SARs for interactive login (#612)
csibbitt Jul 18, 2024
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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: sudo mv operator-sdk /usr/local/bin

- name: Generate bundle locally
run: operator-sdk generate bundle --manifests --metadata --default-channel unstable --channels unstable
run: operator-sdk generate bundle --manifests --metadata --default-channel stable-1.5 --channels stable-1.5

- name: Check if bundle generation results in local changes
run: git diff --exit-code
Expand Down
8 changes: 8 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[allowlist]
description = "Global Allowlist"

# Ignore based on any subset of the file path
paths = [
# Ignore all example certs
'''roles\/servicetelemetry\/vars\/dummy_user_certs\.yml'''
]
160 changes: 147 additions & 13 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,75 @@
---
- nodeset:
name: stf-crc_extracted-ocp412
nodes:
- name: controller
label: cloud-centos-9-stream-tripleo
- name: crc
label: coreos-crc-extracted-2-19-0-xxl

- nodeset:
name: stf-crc_extracted-ocp414
nodes:
- name: controller
label: cloud-centos-9-stream-tripleo
- name: crc
label: coreos-crc-extracted-2-30-0-xxl

# Based on the 2-node job cookbook at https://github.com/openstack-k8s-operators/ci-framework/blob/main/docs/source/cookbooks/zuul-job-nodeset.md
- job:
name: stf-base-2node
parent: podified-multinode-edpm-deployment-crc
abstract: true
required-projects:
- name: github.com/openstack-k8s-operators/dataplane-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/infra-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/openstack-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/openstack-must-gather
override-checkout: main
pre-run:
- ci/pre-2node.yml
vars:
cifmw_deploy_edpm: false
podified_validation: true
cifmw_run_tests: false
extra-vars:
crc_ci_bootstrap_networking:
networks:
default:
range: 192.168.122.0/24
mtu: 1500
internal-api:
vlan: 20
range: 172.17.0.0/24
storage:
vlan: 21
range: 172.18.0.0/24
tenant:
vlan: 22
range: 172.19.0.0/24
instances:
controller:
networks:
default:
ip: 192.168.122.11
crc:
networks:
default:
ip: 192.168.122.10
internal-api:
ip: 172.17.0.5
storage:
ip: 172.18.0.5
tenant:
ip: 172.19.0.5

- job:
name: stf-base
# defined in: https://review.rdoproject.org/cgit/config/tree/zuul.d/_jobs-crc.yaml
parent: base-simple-crc
parent: stf-base-2node
abstract: true
description: |
Run the stf-run-ci role, and then test stf
Expand All @@ -12,39 +79,106 @@
required-projects:
- name: openstack-k8s-operators/ci-framework
override-checkout: main
- name: github.com/infrawatch/service-telemetry-operator
- name: github.com/infrawatch/smart-gateway-operator
- name: github.com/infrawatch/sg-bridge
- name: github.com/infrawatch/sg-core
- name: github.com/infrawatch/prometheus-webhook-snmp
pre-run:
- ci/prepare.yml
run:
- ci/deploy_stf.yml
- ci/test_stf.yml
post-run:
- ci/post-collect_logs.yml
nodeset: centos-9-crc-xxl
# The default (~30 minutes) is not enough to run through all the job stages
timeout: 3600
vars:
# Pass vars to crc cli https://review.rdoproject.org/cgit/config/tree/playbooks/crc/simple-start.yaml#n30
crc_parameters: '--memory 16000 --disk-size 80 --cpus 6' # Increase from 14336

- job:
name: stf-crc-latest-nightly_bundles
name: stf-crc-nightly_bundles
parent: stf-base
description:
Deploy STF nightly bundles
abstract: true
description: |
Deploy STF using the nightly bundles
vars:
scenario: "nightly_bundles"

- job:
name: stf-crc-latest-local_build
name: stf-crc-local_build
parent: stf-base
abstract: true
description: |
Build images locally and deploy STF
vars:
scenario: "local_build"

- job:
name: stf-crc-local_build-index_deploy
parent: stf-base
abstract: true
description: |
Build STF locally and deploy from index
vars:
scenario: "local_build-index_deploy"

- job:
name: stf-crc-ocp_412-nightly_bundles
parent: stf-crc-nightly_bundles
description: |
Deploy STF using the nightly bundles on OCP 4.12
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_414-nightly_bundles
parent: stf-crc-nightly_bundles
description: |
Deploy STF using the nightly bundles on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- job:
name: stf-crc-ocp_412-local_build
parent: stf-crc-local_build
description: |
Build images locally and deploy STF on OCP 4.12
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_414-local_build
parent: stf-crc-local_build
description: |
Build images locally and deploy STF on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- job:
name: stf-crc-ocp_412-local_build-index_deploy
parent: stf-crc-local_build-index_deploy
description: |
Build STF locally and deploy from index on OCP 4.12
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_414-local_build-index_deploy
parent: stf-crc-local_build-index_deploy
description: |
Build STF locally and deploy from index on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- project-template:
name: stf-crc-jobs
description: |
STF CRC jobs that build and deploy STF
github-check:
jobs:
- stf-crc-ocp_412-local_build
- stf-crc-ocp_414-local_build
- stf-crc-ocp_412-local_build-index_deploy
- stf-crc-ocp_414-local_build-index_deploy

- project:
name: infrawatch/service-telemetry-operator
github-check:
templates:
- stf-crc-jobs
periodic:
jobs:
- stf-crc-latest-nightly_bundles
- stf-crc-latest-local_build
- stf-crc-ocp_412-nightly_bundles
- stf-crc-ocp_414-nightly_bundles
1 change: 0 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ spec:
strategy: ephemeral
transports:
qdr:
auth: none
enabled: true
deploymentSize: 1
web:
Expand Down
1 change: 0 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ USER 1001
# copy in required artifacts for the operator
COPY watches.yaml ${HOME}/watches.yaml
COPY roles/ ${HOME}/roles/
COPY collections/ ${HOME}/.ansible/collections/
23 changes: 22 additions & 1 deletion build/generate_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,21 @@ generate_dockerfile() {
}

generate_bundle() {
REPLACE_REGEX="s#<<CREATED_DATE>>#${CREATED_DATE}#g;s#<<OPERATOR_IMAGE>>#${OPERATOR_IMAGE}#g;s#<<OPERATOR_TAG>>#${OPERATOR_TAG}#g;s#<<RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP>>#${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP}#g;s#<<RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG>>#${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG}#g;s#<<RELATED_IMAGE_OAUTH_PROXY>>#${RELATED_IMAGE_OAUTH_PROXY}#g;s#<<RELATED_IMAGE_OAUTH_PROXY_TAG>>#${RELATED_IMAGE_OAUTH_PROXY_TAG}#g;s#<<OPERATOR_BUNDLE_VERSION>>#${OPERATOR_BUNDLE_VERSION}#g;s#1.99.0#${OPERATOR_BUNDLE_VERSION}#g;s#<<OPERATOR_DOCUMENTATION_URL>>#${OPERATOR_DOCUMENTATION_URL}#g;s#<<BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND>>#${BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND}#g"
REPLACE_REGEX="s#<<CREATED_DATE>>#${CREATED_DATE}#g;s#<<OPERATOR_IMAGE>>#${OPERATOR_IMAGE}#g;s#<<OPERATOR_TAG>>#${OPERATOR_TAG}#g;s#<<RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP>>#${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP}#g;s#<<RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG>>#${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG}#g;s#<<RELATED_IMAGE_OAUTH_PROXY>>#${RELATED_IMAGE_OAUTH_PROXY}#g;s#<<RELATED_IMAGE_OAUTH_PROXY_TAG>>#${RELATED_IMAGE_OAUTH_PROXY_TAG}#g;s#<<RELATED_IMAGE_PROMETHEUS>>#${RELATED_IMAGE_PROMETHEUS}#g;s#<<RELATED_IMAGE_PROMETHEUS_TAG>>#${RELATED_IMAGE_PROMETHEUS_TAG}#g;s#<<RELATED_IMAGE_ALERTMANAGER>>#${RELATED_IMAGE_ALERTMANAGER}#g;s#<<RELATED_IMAGE_ALERTMANAGER_TAG>>#${RELATED_IMAGE_ALERTMANAGER_TAG}#g;s#<<OPERATOR_BUNDLE_VERSION>>#${OPERATOR_BUNDLE_VERSION}#g;s#1.99.0#${OPERATOR_BUNDLE_VERSION}#g;s#<<OPERATOR_DOCUMENTATION_URL>>#${OPERATOR_DOCUMENTATION_URL}#g;s#<<BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND>>#${BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND}#g"

pushd "${REL}/../" > /dev/null 2>&1
${OPERATOR_SDK} generate bundle --verbose --channels ${BUNDLE_CHANNELS} --default-channel ${BUNDLE_DEFAULT_CHANNEL} --manifests --metadata --version "${OPERATOR_BUNDLE_VERSION}" --output-dir "${WORKING_DIR}" >> ${LOGFILE} 2>&1
popd > /dev/null 2>&1

# CSVs without a spec.replaces field are valid, so fall back to those if
# latest released version is unknown.
# Placeholder value is validated by operator-sdk during local bundle
# generation and so needs to conform to RFC1123.
if [[ -n "$BUNDLE_LATEST_RELEASED_VERSION" ]]; then
REPLACE_REGEX="$REPLACE_REGEX;s#---bundle-latest-released-version#${BUNDLE_LATEST_RELEASED_VERSION}#g"
else sed -i '/---bundle-latest-released-version/d' "${WORKING_DIR}/manifests/${OPERATOR_NAME}.clusterserviceversion.yaml"
fi

sed -i -E "${REPLACE_REGEX}" "${WORKING_DIR}/manifests/${OPERATOR_NAME}.clusterserviceversion.yaml"
}

Expand All @@ -49,6 +58,18 @@ copy_extra_metadata() {
cp ./deploy/olm-catalog/service-telemetry-operator/metadata/properties.yaml "${WORKING_DIR}/metadata/"
}

copy_extra_metadata() {
# We add this because our version of operator-sdk for building doesn't
# understand these files, but newer versions of operator-sdk (for testing
# purposes) does, and newer versions of opm (as used in both downstream and
# upstream index image builds) also understands these files. Just copy them
# into the bundle directory during building.
echo "-- Copy extra metadata in"
pushd "${REL}/../"
cp -r ./deploy/olm-catalog/service-telemetry-operator/tests/ "${WORKING_DIR}"
cp ./deploy/olm-catalog/service-telemetry-operator/metadata/properties.yaml "${WORKING_DIR}/metadata/"
}

build_bundle_instructions() {
echo "-- Commands to create a bundle build"
echo docker build -t "${OPERATOR_BUNDLE_IMAGE}:${OPERATOR_BUNDLE_VERSION}" -f "${WORKING_DIR}/Dockerfile" "${WORKING_DIR}"
Expand Down
14 changes: 9 additions & 5 deletions build/metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@ OPERATOR_SDK=${OPERATOR_SDK:-operator-sdk}
OPERATOR_NAME=${OPERATOR_NAME:-service-telemetry-operator}
IMAGE_BUILDER=${IMAGE_BUILDER:-podman}
IMAGE_BUILD_ARGS=${IMAGE_BUILD_ARGS:-''}
IMAGE_TAG=${IMAGE_TAG:-latest}
IMAGE_TAG=${IMAGE_TAG:-stable-1.5}
REQUIRED_OPERATOR_SDK_VERSION=${REQUIRED_OPERATOR_SDK_VERSION:-v0.19.4}
SERVICE_TELEMETRY_SUBSCRIPTION=${SERVICE_TELEMETRY_SUBSCRIPTION:-service-telemetry-operator-stable-infrawatch-operators-openshift-marketplace}
OPERATOR_IMAGE=${OPERATOR_IMAGE:-"quay.io/infrawatch/${OPERATOR_NAME}"}
OPERATOR_TAG=${OPERATOR_TAG:-latest}
OPERATOR_TAG=${OPERATOR_TAG:-stable-1.5}
OPERATOR_CSV_MAJOR_VERSION=${OPERATOR_CSV_MAJOR_VERSION:-1.5}
OPERATOR_DOCUMENTATION_URL=${OPERATOR_DOCUMENTATION_URL:-"https://infrawatch.github.io/documentation"}
BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND=${BUNDLE_OLM_SKIP_RANGE_LOWER_BOUND:-1.3.0}
CREATED_DATE=${CREATED_DATE:-$(date +'%Y-%m-%dT%H:%M:%SZ')}
RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP=${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP:-quay.io/infrawatch/prometheus-webhook-snmp}
RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG=${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG:-latest}
RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG=${RELATED_IMAGE_PROMETHEUS_WEBHOOK_SNMP_TAG:-stable-1.5}
RELATED_IMAGE_OAUTH_PROXY=${RELATED_IMAGE_OAUTH_PROXY:-quay.io/openshift/origin-oauth-proxy}
RELATED_IMAGE_OAUTH_PROXY_TAG=${RELATED_IMAGE_OAUTH_PROXY_TAG:-latest}
RELATED_IMAGE_PROMETHEUS=${RELATED_IMAGE_PROMETHEUS:-quay.io/prometheus/prometheus}
RELATED_IMAGE_PROMETHEUS_TAG=${RELATED_IMAGE_PROMETHEUS_TAG:-latest}
RELATED_IMAGE_ALERTMANAGER=${RELATED_IMAGE_ALERTMANAGER:-quay.io/prometheus/alertmanager}
RELATED_IMAGE_ALERTMANAGER_TAG=${RELATED_IMAGE_ALERTMANAGER_TAG:-latest}
BUNDLE_PATH=${BUNDLE_PATH:-deploy/olm-catalog/service-telemetry-operator}
BUNDLE_CHANNELS=${BUNDLE_CHANNELS:-unstable}
BUNDLE_DEFAULT_CHANNEL=${BUNDLE_DEFAULT_CHANNEL:-unstable}
BUNDLE_CHANNELS=${BUNDLE_CHANNELS:-stable-1.5}
BUNDLE_DEFAULT_CHANNEL=${BUNDLE_DEFAULT_CHANNEL:-stable-1.5}
OPERATOR_BUNDLE_IMAGE=${OPERATOR_BUNDLE_IMAGE:-"quay.io/infrawatch-operators/${OPERATOR_NAME}-bundle"}

# Automatic
Expand Down
9 changes: 7 additions & 2 deletions build/run-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
- name: Run the STF CI system
import_role:
name: stf-run-ci


- name: Create Log directory
file:
path: "{{ playbook_dir }}/working/logs"
state: directory

- name: Collect the logs
import_role:
name: stf-collect-logs
vars:
logfile_dir: "{{ playbook_dir }}/"
logfile_dir: "{{ playbook_dir }}/working/logs/"
Loading
Loading