-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into efoley_add_crc_mult…
…iversion
- Loading branch information
Showing
49 changed files
with
554 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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''' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ spec: | |
strategy: ephemeral | ||
transports: | ||
qdr: | ||
auth: none | ||
enabled: true | ||
deploymentSize: 1 | ||
web: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
FROM quay.io/openshift/origin-ansible-operator:4.12 | ||
|
||
# temporarily switch to root user to adjust image layers | ||
USER 0 | ||
# Upstream CI builds need the additional EPEL sources for python3-passlib and python3-bcrypt but have no working repos to install epel-release | ||
# NO_PROXY is undefined in upstream CI builds, but defined (usually blank) during openshift builds (a possibly brittle hack) | ||
RUN bash -c -- 'if [ "${NO_PROXY:-__ZZZZZ}" == "__ZZZZZ" ]; then echo "Applying upstream EPEL hacks" && echo -e "-----BEGIN PGP PUBLIC KEY BLOC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ufF11040AJQZ7br3rzerlyBOB+Jd1zSPVrAPpeMyJppWFHSDAI\nWK6x+am13VIInXtqB/Cz4GBHLFK5d2/IYspVw47Solj8jiFEtnAq6+1Aq5WH3iB4\nbE2e6z00DSF93frwOyWN7WmPIoc2QsNRJhgfJC+isGQAwwq8xAbHEBeuyMG8GZjz\nxohg0H4bOSEujVLTjH1xbAG4DnhWO/1VXLX+LXELycO8ZQTcjj/4AQKuo4wvMPrv\n9A169oETG+VwQlNd74VBPGCvhnzwGXNbTK/KH1+WRH0YSb+41flB3NKhMSU6dGI0\nSGtIxDSHhVVNmx2/6XiT9U/znrZsG5Kw8nIbbFz+9MGUUWgJMsd1Zl9R8gz7V9fp\nn7L7y5LhJ8HOCMsY/Z7/7HUs+t/A1MI4g7Q5g5UuSZdgi0zxukiWuCkLeAiAP4y7\nzKK4OjJ644NDcWCHa36znwVmkz3ixL8Q0auR15Oqq2BjR/fyog==\n=84m8\n-----END PGP PUBLIC KEY BLOCK-----" > /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 && echo -e "[epel]\nname=Extra Packages for Enterprise Linux 8 - \$basearch\nmetalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=\$basearch&infra=\$infra&content=\$contentdir\nenabled=1\ngpgcheck=1\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8" > /etc/yum.repos.d/epel.repo; fi' | ||
|
||
# Required for oauth-proxy | ||
RUN dnf install -y python3-passlib python3-bcrypt | ||
# update the base image to allow forward-looking optimistic updates during the testing phase, with the added benefit of helping move closer to passing security scans. | ||
# -- excludes ansible so it remains at 2.9 tag as shipped with the base image | ||
# -- installs python3-passlib and python3-bcrypt for oauth-proxy interface | ||
# -- cleans up the cached data from dnf to keep the image as small as possible | ||
RUN dnf update -y --exclude=ansible* && dnf install -y python3-passlib python3-bcrypt && dnf clean all && rm -rf /var/cache/dnf | ||
|
||
# switch back to user 1001 when running the base image (non-root) | ||
USER 1001 | ||
|
||
# copy in required artifacts for the operator | ||
COPY watches.yaml ${HOME}/watches.yaml | ||
COPY roles/ ${HOME}/roles/ | ||
COPY collections/ ${HOME}/.ansible/collections/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
stf-collect-logs | ||
================ | ||
|
||
This role collects logs that are useful for debugging an STF deployment. | ||
|
||
Once the logs are collected, the user will need to fetch the logs themselves. | ||
|
||
Requirements | ||
------------ | ||
|
||
|
||
Role Variables | ||
-------------- | ||
|
||
* `logfile_dir` - The location that the logs will be created in on the remote host(s). | ||
|
||
Dependencies | ||
------------ | ||
|
||
|
||
Example Playbook | ||
---------------- | ||
|
||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: | ||
|
||
- hosts: servers | ||
roles: | ||
- { role: username.rolename, x: 42 } | ||
|
||
License | ||
------- | ||
|
||
Apache 2 | ||
|
||
Author Information | ||
------------------ | ||
|
||
Red Hat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# defaults file for stf-collect-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
galaxy_info: | ||
role_name: stf-collect-logs | ||
namespace: infrawatch | ||
|
||
author: InfraWatch | ||
description: Log collection role for Service Telemetry Framework | ||
company: Red Hat | ||
|
||
license: Apache-2.0 | ||
|
||
min_ansible_version: 2.1 | ||
|
||
galaxy_tags: [] | ||
|
||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
- name: "Get builds" | ||
ansible.builtin.shell: | ||
cmd: | | ||
echo "*** [INFO] Showing oc get builds" > {{ logfile_dir }}/post_oc_get_builds.log 2>&1 | ||
oc -n {{ namespace }} get builds -oyaml >> {{ logfile_dir }}/post_oc_get_builds.log 2>&1 | ||
echo "*** [INFO] Showing oc get builds -oyaml" >> {{ logfile_dir }}/post_oc_get_builds.log 2>&1 | ||
oc -n {{ namespace }} get builds -oyaml >> {{ logfile_dir }}/post_oc_get_builds.log 2>&1 | ||
cat {{ logfile_dir }}/post_oc_get_builds.log | ||
ignore_errors: true | ||
changed_when: false | ||
|
||
- name: "Get subscription details" | ||
ansible.builtin.shell: | ||
cmd: | | ||
oc -n {{ namespace }} get subscriptions > {{ logfile_dir }}/post_oc_get_subscriptions.log 2>&1 | ||
oc -n {{ namespace }} describe subscription service-telemetry-operator >> {{ logfile_dir }}/post_oc_get_subscriptions.log 2>&1 | ||
ignore_errors: true | ||
|
||
- name: "Get image infos" | ||
ansible.builtin.shell: | ||
cmd: | | ||
echo "[INFO] oc get images" > {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
oc -n {{ namespace }} get images >> {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
echo "[INFO] oc get imagestreams" >> {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
oc -n {{ namespace }} get imagestream >> {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
echo "[INFO] oc get imagestream -oyaml" >> {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
oc -n {{ namespace }} get imagestream -oyaml >> {{ logfile_dir }}/post_oc_get_images.log 2>&1 | ||
retries: 3 | ||
delay: 10 | ||
ignore_errors: true | ||
|
||
- name: "Get STO info" | ||
ansible.builtin.shell: | ||
cmd: | | ||
oc -n {{ namespace }} describe pod $(oc -n {{ namespace }} get pod -l name=service-telemetry-operator -ojsonpath='{ .items[].metadata.name }') >> {{ logfile_dir }}/describe_sto.log 2>&1 | ||
ignore_errors: true | ||
retries: 3 | ||
delay: 10 | ||
|
||
- name: "Question the deployment" | ||
ansible.builtin.shell: | ||
cmd: | | ||
echo "What images were created in the internal registry?" > {{ logfile_dir }}/post_question_deployment.log 2>&1 | ||
oc -n {{ namespace }} get images | grep $(oc -n {{ namespace }} registry info --internal) >> {{ logfile_dir }}/post_question_deployment.log 2>&1 | ||
echo "What state is the STO csv in?" >> {{ logfile_dir }}/post_question_deployment.log 2>&1 | ||
oc -n {{ namespace }} get csv | grep service-telemetry-operator >> {{ logfile_dir }}/post_question_deployment.log 2>&1 | ||
oc -n {{ namespace }} get csv $(oc -n {{ namespace }} get csv | grep "service-telemetry-operator" | awk '{ print $1}') -oyaml >> {{ logfile_dir }}/post_question_deployment.log 2>&1 | ||
register: output | ||
retries: 3 | ||
delay: 10 | ||
|
||
- name: "Get pods" | ||
ansible.builtin.command: | ||
cmd: | | ||
oc -n {{ namespace }} get pods > {{ logfile_dir }}/post_oc_get_pods.log 2>&1 | ||
echo "Additional information" >> {{ logfile_dir }}/post_oc_get_pods.log | ||
oc -n {{ namespace }} describe pods >> {{ logfile_dir }}/post_oc_get_pods.log 2>&1 | ||
ignore_errors: true | ||
retries: 3 | ||
delay: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
# vars file for stf-collect-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# https://stackoverflow.com/questions/64073422/importerror-cannot-import-name-oauth1session-from-requests-oauthlib | ||
requests==2.27.1 | ||
requests==2.31.0 | ||
requests_oauthlib==1.3.0 | ||
# https://github.com/domainaware/parsedmarc/issues/318 | ||
oauthlib==3.2.0 | ||
oauthlib==3.2.2 | ||
kubernetes==24.2.0 | ||
openshift==0.13.1 | ||
ansible-core==2.12.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.