diff --git a/ci-operator/config/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main__periodics.yaml b/ci-operator/config/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main__periodics.yaml index cf285f93d2f68..3ad91af6af02d 100644 --- a/ci-operator/config/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main__periodics.yaml +++ b/ci-operator/config/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main__periodics.yaml @@ -52,9 +52,12 @@ tests: test: - as: monitor commands: | + set -euo pipefail set +x source /tmp/nutanix-creds/secrets.sh + umask 077 mkdir -p /tmp/nutanix-auth + trap 'rm -rf /tmp/nutanix-auth' EXIT echo -n "${prism_central_username}" > /tmp/nutanix-auth/nutanix-username echo -n "${prism_central_password}" > /tmp/nutanix-auth/nutanix-password set -x @@ -69,6 +72,46 @@ tests: name: nutanix-pc namespace: test-credentials from: src + grace_period: 30s + resources: + requests: + cpu: 100m + memory: 256Mi +- as: capacity-monitor + cluster: build01 + cron: 0 */6 * * * + reporter_config: + channel: '#forum-ocp-splat-alerts' + job_states_to_report: + - failure + - error + report_template: Capacity Monitor alert - check logs for details. <{{.Status.URL}}|View + logs> + steps: + cluster_profile: nutanix + test: + - as: monitor + commands: | + set -euo pipefail + set +x + source /tmp/nutanix-creds/secrets.sh + umask 077 + mkdir -p /tmp/nutanix-auth + trap 'rm -rf /tmp/nutanix-auth' EXIT + echo -n "${prism_central_username}" > /tmp/nutanix-auth/nutanix-username + echo -n "${prism_central_password}" > /tmp/nutanix-auth/nutanix-password + set -x + make build + ./bin/capacity-monitor --config config/nutanix.yaml \ + --credentials-dir /tmp/nutanix-auth \ + --endpoint "${prism_central_host}" \ + --port "${prism_central_port}" + credentials: + - mount_path: /tmp/nutanix-creds + name: nutanix-pc + namespace: test-credentials + from: src + grace_period: 30s resources: requests: cpu: 100m diff --git a/ci-operator/jobs/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main-periodics.yaml b/ci-operator/jobs/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main-periodics.yaml index 031a9eb81a323..e073b46b1097b 100644 --- a/ci-operator/jobs/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main-periodics.yaml +++ b/ci-operator/jobs/openshift-splat-team/ci-cluster-monitor/openshift-splat-team-ci-cluster-monitor-main-periodics.yaml @@ -1,4 +1,95 @@ periodics: +- agent: kubernetes + cluster: build01 + cron: 0 */6 * * * + decorate: true + decoration_config: + skip_cloning: true + extra_refs: + - base_ref: main + org: openshift-splat-team + repo: ci-cluster-monitor + labels: + ci-operator.openshift.io/cloud: nutanix + ci-operator.openshift.io/cloud-cluster-profile: nutanix + ci-operator.openshift.io/cluster: build01 + ci-operator.openshift.io/variant: periodics + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-splat-team-ci-cluster-monitor-main-periodics-capacity-monitor + reporter_config: + slack: + channel: '#forum-ocp-splat-alerts' + job_states_to_report: + - failure + - error + report_template: Capacity Monitor alert - check logs for details. <{{.Status.URL}}|View + logs> + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=capacity-monitor + - --variant=periodics + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator - agent: kubernetes cluster: build12 cron: 0 9 * * 1-5