From b9ab7a9008cfaf6c3f110026756372b7600bb0e9 Mon Sep 17 00:00:00 2001 From: Periklis Tsirakidis Date: Fri, 5 Apr 2024 15:57:08 +0200 Subject: [PATCH] openshift-loki: Add config and image mirroring for branch release-5.9 (#50626) --- .../loki/openshift-loki-release-5.9.yaml | 147 +++++++ ...penshift-loki-release-5.9-postsubmits.yaml | 63 +++ ...openshift-loki-release-5.9-presubmits.yaml | 368 ++++++++++++++++++ .../mapping_logging_5_9_quay | 2 + 4 files changed, 580 insertions(+) create mode 100644 ci-operator/config/openshift/loki/openshift-loki-release-5.9.yaml create mode 100644 ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-postsubmits.yaml create mode 100644 ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-presubmits.yaml create mode 100644 core-services/image-mirroring/openshift-logging/mapping_logging_5_9_quay diff --git a/ci-operator/config/openshift/loki/openshift-loki-release-5.9.yaml b/ci-operator/config/openshift/loki/openshift-loki-release-5.9.yaml new file mode 100644 index 000000000000..d292f7d7d1bb --- /dev/null +++ b/ci-operator/config/openshift/loki/openshift-loki-release-5.9.yaml @@ -0,0 +1,147 @@ +base_images: + base: + name: "4.15" + namespace: ocp + tag: base-rhel9 + loki: + name: v2.9.6 + namespace: logging + tag: loki + lokistack-gateway: + name: mirror-5.y + namespace: logging + tag: lokistack-gateway + ocp_builder_rhel-9-golang-1.21-openshift-4.16: + name: builder + namespace: ocp + tag: rhel-9-golang-1.21-openshift-4.16 + opa-openshift: + name: mirror-5.y + namespace: logging + tag: opa-openshift +build_root: + image_stream_tag: + name: builder + namespace: ocp + tag: rhel-9-golang-1.21-openshift-4.16 +images: +- context_dir: operator + dockerfile_path: Dockerfile + from: base + inputs: + ocp_builder_rhel-9-golang-1.21-openshift-4.16: + as: + - golang:1.21.7 + to: loki-operator +operator: + bundles: + - as: loki-operator-bundle + context_dir: operator/bundle/openshift + dockerfile_path: bundle.Dockerfile + substitutions: + - pullspec: quay.io/openshift-logging/loki-operator:0.1.0 + with: pipeline:loki-operator + - pullspec: quay.io/openshift-logging/loki:v2.9.6 + with: pipeline:loki + - pullspec: quay.io/observatorium/api:latest + with: pipeline:lokistack-gateway + - pullspec: quay.io/observatorium/opa-openshift:latest + with: pipeline:opa-openshift +promotion: + to: + - additional_images: + loki-operator-bundle: loki-operator-bundle + name: "5.9" + namespace: logging +releases: + latest: + release: + channel: stable + version: "4.15" +resources: + '*': + requests: + cpu: 100m + memory: 200Mi +tests: +- as: lint + steps: + test: + - as: lint + commands: cd operator && GOFLAGS="" make lint + from: src + resources: + requests: + cpu: 100m + memory: 200Mi +- as: test + steps: + test: + - as: unit + commands: cd operator && GOFLAGS="" go test ./... + from: src + resources: + requests: + cpu: 100m + memory: 200Mi + - as: prometheus-rules + commands: cd operator && make test-unit-prometheus + from: src + resources: + requests: + cpu: 100m + memory: 200Mi +- as: build + steps: + test: + - as: manager + commands: cd operator && GOFLAGS="" make manager + from: src + resources: + requests: + cpu: 100m + memory: 200Mi + - as: broker + commands: cd operator && GOFLAGS="" make bin/loki-broker + from: src + resources: + requests: + cpu: 100m + memory: 200Mi + - as: storage-size-calculator + commands: cd operator && GOFLAGS="" make size-calculator + from: src + resources: + requests: + cpu: 100m + memory: 200Mi +- as: test-operator + cluster_claim: + architecture: amd64 + cloud: aws + owner: openshift-ci + product: ocp + timeout: 1h0m0s + version: "4.15" + steps: + dependencies: + OO_INDEX: ci-index-loki-operator-bundle + env: + OO_CHANNEL: stable + OO_INSTALL_NAMESPACE: openshift-operators-redhat + OO_PACKAGE: loki-operator + OO_TARGET_NAMESPACES: '!all' + test: + - as: install + cli: latest + commands: | + oc -n openshift-operators-redhat rollout status deployment loki-operator-controller-manager + from: src + resources: + requests: + cpu: 100m + workflow: optional-operators-ci-generic-claim +zz_generated_metadata: + branch: release-5.9 + org: openshift + repo: loki diff --git a/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-postsubmits.yaml b/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-postsubmits.yaml new file mode 100644 index 000000000000..4c0b6f872537 --- /dev/null +++ b/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-postsubmits.yaml @@ -0,0 +1,63 @@ +postsubmits: + openshift/loki: + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + cluster: build03 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/is-promotion: "true" + ci.openshift.io/generator: prowgen + max_concurrency: 1 + name: branch-ci-openshift-loki-release-5.9-images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson + - --promote + - --report-credentials-file=/etc/report/credentials + - --target=[images] + - --target=loki-operator-bundle + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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/push-secret + name: push-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: push-secret + secret: + secretName: registry-push-credentials-ci-central + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-presubmits.yaml b/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-presubmits.yaml new file mode 100644 index 000000000000..4653ba8bc953 --- /dev/null +++ b/ci-operator/jobs/openshift/loki/openshift-loki-release-5.9-presubmits.yaml @@ -0,0 +1,368 @@ +presubmits: + openshift/loki: + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/build + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-build + rerun_command: /test build + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=build + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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: 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 + trigger: (?m)^/test( | .* )build,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/ci-index-loki-operator-bundle + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-ci-index-loki-operator-bundle + rerun_command: /test ci-index-loki-operator-bundle + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=ci-index-loki-operator-bundle + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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: 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 + trigger: (?m)^/test( | .* )ci-index-loki-operator-bundle,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-images + rerun_command: /test images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=[images] + - --target=loki-operator-bundle + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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: 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 + trigger: (?m)^/test( | .* )images,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/lint + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-lint + rerun_command: /test lint + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=lint + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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: 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 + trigger: (?m)^/test( | .* )lint,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/test + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-test + rerun_command: /test test + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=test + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - 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: 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 + trigger: (?m)^/test( | .* )test,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^release-5\.9$ + - ^release-5\.9- + cluster: build03 + context: ci/prow/test-operator + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-loki-release-5.9-test-operator + rerun_command: /test test-operator + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --hive-kubeconfig=/secrets/hive-hive-credentials/kubeconfig + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=test-operator + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/hive-hive-credentials + name: hive-hive-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: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: hive-hive-credentials + secret: + secretName: hive-hive-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 + trigger: (?m)^/test( | .* )test-operator,?($|\s.*) diff --git a/core-services/image-mirroring/openshift-logging/mapping_logging_5_9_quay b/core-services/image-mirroring/openshift-logging/mapping_logging_5_9_quay new file mode 100644 index 000000000000..bca3f8b1714c --- /dev/null +++ b/core-services/image-mirroring/openshift-logging/mapping_logging_5_9_quay @@ -0,0 +1,2 @@ +registry.ci.openshift.org/logging/5.9:loki-operator-bundle quay.io/openshift-logging/loki-operator-bundle:5.9.0 quay.io/openshift-logging/loki-operator-bundle:5.9 +registry.ci.openshift.org/logging/5.9:loki-operator quay.io/openshift-logging/loki-operator:5.9.0 quay.io/openshift-logging/loki-operator:5.9 \ No newline at end of file