diff --git a/Makefile b/Makefile index d5d562f04bc72..f43a7eb0090f1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SHELL=/usr/bin/env bash -o errexit + .PHONY: check check-core check-services dry-core-admin dry-services-admin core-admin services-admin dry-core core dry-services services all-admin all all: core-admin core services-admin services @@ -305,6 +307,13 @@ prow-monitoring: make -C cluster/ci/monitoring prow-monitoring-deploy .PHONY: prow-monitoring +build-farm-consistency: + @echo "diffing ns-ttl-controller assets ..." + diff -Naup ./core-services/ci-ns-ttl-controller/ci-ns-ttl-controller_dc.yaml ./clusters/build-clusters/01_cluster/openshift/ci-ns-ttl-controller/ci-ns-ttl-controller_dc.yaml + @echo "diffing rpms-ocp assets ..." + for file in ./core-services/release-controller/rpms-ocp-*.yaml; do diff -Naup "$${file}" "./clusters/build-clusters/01_cluster/openshift/release-controller/$${file##*/}"; done +.PHONY: build-farm-consistency + logging: $(MAKE) apply WHAT=cluster/ci/config/logging/fluentd-daemonset.yaml $(MAKE) apply WHAT=cluster/ci/config/logging/fluentd-configmap.yaml diff --git a/ci-operator/jobs/openshift/release/openshift-release-master-presubmits.yaml b/ci-operator/jobs/openshift/release/openshift-release-master-presubmits.yaml index 185e9edf8865b..f422c91b72880 100644 --- a/ci-operator/jobs/openshift/release/openshift-release-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/release/openshift-release-master-presubmits.yaml @@ -18,6 +18,34 @@ presubmits: requests: cpu: 10m trigger: ((?m)^/test promrules,?(\s+|$)) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/build-farm-consistency + decorate: true + labels: + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-release-master-build-farm-consistency + rerun_command: /test build-farm-consistency + spec: + containers: + - args: + - -c + - | + set -o errexit + set -o nounset + set -o pipefail + make build-farm-consistency + command: + - /bin/bash + image: registry.svc.ci.openshift.org/openshift/release:golang-1.13 + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + trigger: (?m)^/test( | .* )build-farm-consistency,?($|\s.*) - agent: kubernetes always_run: true branches: diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/content-mirror_imagestream.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/content-mirror_imagestream.yaml new file mode 100644 index 0000000000000..12400a877185b --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/content-mirror_imagestream.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ImageStream +metadata: + name: content-mirror + namespace: ci +spec: + lookupPolicy: + local: true + tags: + - from: + kind: DockerImage + name: registry.svc.ci.openshift.org/ci/content-mirror:latest + importPolicy: + scheduled: true + name: "latest" diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/ocp_namespace.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/ocp_namespace.yaml new file mode 100644 index 0000000000000..8fdf185d4b7fd --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/ocp_namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ocp diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.1.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.1.yaml new file mode 100644 index 0000000000000..a5dde9c555491 --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.1.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: List +items: + +# each RPM (group,release) pair gets a service and deployment to serve RPM content from the mirrors +- apiVersion: v1 + kind: Service + metadata: + name: base-4-1 + namespace: ocp + spec: + selector: + app: base-4-1 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-1 + namespace: ocp + labels: + app: base-4-1 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-1 + template: + metadata: + labels: + app: base-4-1 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.1-default.repo + path: ocp-4.1-default.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.2.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.2.yaml new file mode 100644 index 0000000000000..8ab19f75fc5a6 --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.2.yaml @@ -0,0 +1,210 @@ +apiVersion: v1 +kind: List +items: + +# each RPM (group,release) pair gets a service and deployment to serve RPM content from the mirrors +- apiVersion: v1 + kind: Service + metadata: + name: base-4-2 + namespace: ocp + spec: + selector: + app: base-4-2 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-2 + namespace: ocp + labels: + app: base-4-2 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-2 + template: + metadata: + labels: + app: base-4-2 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.2-default.repo + path: ocp-4.2-default.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# OpenStack repos +- apiVersion: v1 + kind: Service + metadata: + name: base-openstack-4-2 + namespace: ocp + spec: + selector: + app: base-openstack-4-2 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-openstack-4-2 + namespace: ocp + labels: + app: base-openstack-4-2 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-openstack-4-2 + template: + metadata: + labels: + app: base-openstack-4-2 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.2-openstack.repo + path: ocp-4.2-openstack.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# Multiarch repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-2-s390x + namespace: ocp + spec: + selector: + app: base-4-2-s390x + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-2-s390x + namespace: ocp + labels: + app: base-4-2-s390x + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-2-s390x + template: + metadata: + labels: + app: base-4-2-s390x + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.2-s390x.repo + path: ocp-4.2-s390x.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.3.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.3.yaml new file mode 100644 index 0000000000000..7bafa5131a111 --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.3.yaml @@ -0,0 +1,414 @@ +apiVersion: v1 +kind: List +items: + +# each RPM (group,release) pair gets a service and deployment to serve RPM content from the mirrors +- apiVersion: v1 + kind: Service + metadata: + name: base-4-3 + namespace: ocp + spec: + selector: + app: base-4-3 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-3 + namespace: ocp + labels: + app: base-4-3 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-3 + template: + metadata: + labels: + app: base-4-3 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-default.repo + path: ocp-4.3-default.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# OpenStack repos +- apiVersion: v1 + kind: Service + metadata: + name: base-openstack-4-3 + namespace: ocp + spec: + selector: + app: base-openstack-4-3 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-openstack-4-3 + namespace: ocp + labels: + app: base-openstack-4-3 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-openstack-4-3 + template: + metadata: + labels: + app: base-openstack-4-3 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-openstack.repo + path: ocp-4.3-openstack.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +- apiVersion: v1 + kind: Service + metadata: + name: openstack-beta-4-3 + namespace: ocp + spec: + selector: + app: openstack-beta-4-3 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: openstack-beta-4-3 + namespace: ocp + labels: + app: openstack-beta-4-3 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: openstack-beta-4-3 + template: + metadata: + labels: + app: openstack-beta-4-3 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-openstack-beta.repo + path: ocp-4.3-openstack-beta.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# RHEL8 repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-3-rhel8 + namespace: ocp + spec: + selector: + app: base-4-3-rhel8 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-3-rhel8 + namespace: ocp + labels: + app: base-4-3-rhel8 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-3-rhel8 + template: + metadata: + labels: + app: base-4-3-rhel8 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-rhel8.repo + path: ocp-4.3-rhel8.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# Multi-arch repos, s390x and ppc64le +- apiVersion: v1 + kind: Service + metadata: + name: base-4-3-s390x + namespace: ocp + spec: + selector: + app: base-4-3-s390x + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-3-s390x + namespace: ocp + labels: + app: base-4-3-s390x + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-3-s390x + template: + metadata: + labels: + app: base-4-3-s390x + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-s390x.repo + path: ocp-4.3-s390x.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-3-ppc64le + namespace: ocp + spec: + selector: + app: base-4-3-ppc64le + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-3-ppc64le + namespace: ocp + labels: + app: base-4-3-ppc64le + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-3-ppc64le + template: + metadata: + labels: + app: base-4-3-ppc64le + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.3-ppc64le.repo + path: ocp-4.3-ppc64le.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.4.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.4.yaml new file mode 100644 index 0000000000000..8f387f60aa507 --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.4.yaml @@ -0,0 +1,414 @@ +apiVersion: v1 +kind: List +items: + +# each RPM (group,release) pair gets a service and deployment to serve RPM content from the mirrors +- apiVersion: v1 + kind: Service + metadata: + name: base-4-4 + namespace: ocp + spec: + selector: + app: base-4-4 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-4 + namespace: ocp + labels: + app: base-4-4 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-4 + template: + metadata: + labels: + app: base-4-4 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-default.repo + path: ocp-4.4-default.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# OpenStack repos +- apiVersion: v1 + kind: Service + metadata: + name: base-openstack-4-4 + namespace: ocp + spec: + selector: + app: base-openstack-4-4 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-openstack-4-4 + namespace: ocp + labels: + app: base-openstack-4-4 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-openstack-4-4 + template: + metadata: + labels: + app: base-openstack-4-4 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-openstack.repo + path: ocp-4.4-openstack.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +- apiVersion: v1 + kind: Service + metadata: + name: openstack-beta-4-4 + namespace: ocp + spec: + selector: + app: openstack-beta-4-4 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: openstack-beta-4-4 + namespace: ocp + labels: + app: openstack-beta-4-4 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: openstack-beta-4-4 + template: + metadata: + labels: + app: openstack-beta-4-4 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-openstack-beta.repo + path: ocp-4.4-openstack-beta.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# RHEL8 repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-4-rhel8 + namespace: ocp + spec: + selector: + app: base-4-4-rhel8 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-4-rhel8 + namespace: ocp + labels: + app: base-4-4-rhel8 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-4-rhel8 + template: + metadata: + labels: + app: base-4-4-rhel8 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-rhel8.repo + path: ocp-4.4-rhel8.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# Multi-arch repos, s390x and ppc64le +- apiVersion: v1 + kind: Service + metadata: + name: base-4-4-s390x + namespace: ocp + spec: + selector: + app: base-4-4-s390x + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-4-s390x + namespace: ocp + labels: + app: base-4-4-s390x + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-4-s390x + template: + metadata: + labels: + app: base-4-4-s390x + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-s390x.repo + path: ocp-4.4-s390x.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-4-ppc64le + namespace: ocp + spec: + selector: + app: base-4-4-ppc64le + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-4-ppc64le + namespace: ocp + labels: + app: base-4-4-ppc64le + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-4-ppc64le + template: + metadata: + labels: + app: base-4-4-ppc64le + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.4-ppc64le.repo + path: ocp-4.4-ppc64le.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos diff --git a/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.5.yaml b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.5.yaml new file mode 100644 index 0000000000000..b9feb7835c7f1 --- /dev/null +++ b/clusters/build-clusters/01_cluster/openshift/release-controller/rpms-ocp-4.5.yaml @@ -0,0 +1,414 @@ +apiVersion: v1 +kind: List +items: + +# each RPM (group,release) pair gets a service and deployment to serve RPM content from the mirrors +- apiVersion: v1 + kind: Service + metadata: + name: base-4-5 + namespace: ocp + spec: + selector: + app: base-4-5 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-5 + namespace: ocp + labels: + app: base-4-5 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-5 + template: + metadata: + labels: + app: base-4-5 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-default.repo + path: ocp-4.5-default.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# OpenStack repos +- apiVersion: v1 + kind: Service + metadata: + name: base-openstack-4-5 + namespace: ocp + spec: + selector: + app: base-openstack-4-5 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-openstack-4-5 + namespace: ocp + labels: + app: base-openstack-4-5 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-openstack-4-5 + template: + metadata: + labels: + app: base-openstack-4-5 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-openstack.repo + path: ocp-4.5-openstack.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +- apiVersion: v1 + kind: Service + metadata: + name: openstack-beta-4-5 + namespace: ocp + spec: + selector: + app: openstack-beta-4-5 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: openstack-beta-4-5 + namespace: ocp + labels: + app: openstack-beta-4-5 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: openstack-beta-4-5 + template: + metadata: + labels: + app: openstack-beta-4-5 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-openstack-beta.repo + path: ocp-4.5-openstack-beta.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# RHEL8 repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-5-rhel8 + namespace: ocp + spec: + selector: + app: base-4-5-rhel8 + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-5-rhel8 + namespace: ocp + labels: + app: base-4-5-rhel8 + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-5-rhel8 + template: + metadata: + labels: + app: base-4-5-rhel8 + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-rhel8.repo + path: ocp-4.5-rhel8.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos + +# Multi-arch repos, s390x and ppc64le +- apiVersion: v1 + kind: Service + metadata: + name: base-4-5-s390x + namespace: ocp + spec: + selector: + app: base-4-5-s390x + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-5-s390x + namespace: ocp + labels: + app: base-4-5-s390x + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-5-s390x + template: + metadata: + labels: + app: base-4-5-s390x + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-s390x.repo + path: ocp-4.5-s390x.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos +- apiVersion: v1 + kind: Service + metadata: + name: base-4-5-ppc64le + namespace: ocp + spec: + selector: + app: base-4-5-ppc64le + ports: + - port: 80 + targetPort: 8080 + type: ClusterIP +- apiVersion: apps/v1 + kind: Deployment + metadata: + name: base-4-5-ppc64le + namespace: ocp + labels: + app: base-4-5-ppc64le + annotations: + image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"content-mirror:latest","namespace":"ci"},"fieldPath":"spec.template.spec.containers[?(@.name==\"mirror\")].image"}]' + spec: + replicas: 2 + selector: + matchLabels: + app: base-4-5-ppc64le + template: + metadata: + labels: + app: base-4-5-ppc64le + spec: + volumes: + - name: repos + configMap: + name: base-repos + items: + - key: ocp-4.5-ppc64le.repo + path: ocp-4.5-ppc64le.repo + - name: key + secret: + secretName: mirror.openshift.com + - name: cache + emptyDir: {} + - name: run + emptyDir: {} + containers: + - name: mirror + ports: + - name: http + containerPort: 8080 + volumeMounts: + - name: repos + mountPath: /tmp/repos + readOnly: true + - name: key + mountPath: /tmp/key + readOnly: true + - name: cache + mountPath: /tmp/cache + image: " " + workingDir: /tmp/repos + command: + - content-mirror + - --path=/tmp/config + - --max-size=5g + - --timeout=30m + - /tmp/repos diff --git a/clusters/build-clusters/01_cluster/prow/03_deployment/admin_config_updater_rbac.yaml b/clusters/build-clusters/01_cluster/prow/03_deployment/admin_config_updater_rbac.yaml index a6adbe7459514..6d051eea67c29 100644 --- a/clusters/build-clusters/01_cluster/prow/03_deployment/admin_config_updater_rbac.yaml +++ b/clusters/build-clusters/01_cluster/prow/03_deployment/admin_config_updater_rbac.yaml @@ -244,3 +244,68 @@ items: - kind: ServiceAccount name: config-updater namespace: ci +- kind: Role + apiVersion: rbac.authorization.k8s.io/v1 + metadata: + name: config-updater + namespace: ocp + rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - create + - update + - patch + - apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - get + - create + - update + - patch + - apiGroups: + - "" + resources: + - serviceaccounts + - services + - secrets + - configmaps + verbs: + - get + - create + - update + - patch + - apiGroups: + - image.openshift.io + resources: + - imagestreams + verbs: + - get + - create + - update + - patch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - patch +- kind: RoleBinding + apiVersion: rbac.authorization.k8s.io/v1 + metadata: + name: config-updater + namespace: ocp + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: config-updater + subjects: + - kind: ServiceAccount + name: config-updater + namespace: ci