diff --git a/README.md b/README.md index 7b7368dc..c064b6cc 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ $ CONFIG_PATH=$(pwd)/config/prow/config.yaml JOB_CONFIG_PATH=$(pwd)/config/jobs/ ## Tools exposed via this repository - https://prow.ppc64le-cloud.cis.ibm.net/ - Dashboard for internal prow jobs that run on ppc64le build cluster and a few on IKS(x86) cluster. -- https://search.ppc64le-cloud.cis.ibm.net/ - ci-search tool by openshift, configured to our internal prow jobs that have logs uploaded to GCS storage. +- https://search.ppc64le-cloud.cis.ibm.net/ - ci-search tool by openshift, configured to our internal prow jobs that have logs uploaded to GCS bucket ppc64le-kubernetes. +- https://k8ssearch.ppc64le-cloud.cis.ibm.net/ - ci-search tool by openshift, configured to upstream k8s prow jobs that have logs uploaded to GCS bucket kubernetes-ci-logs. - https://jenkins.ppc64le-cloud.cis.ibm.net/ - Jenkins dashboard for OCP jobs run on Jenkins infra. - https://grafana.ppc64le-cloud.cis.ibm.net - Grafana dashboard for analysing OCP jobs from Jenkins. diff --git a/config/prow/cluster/cik8ssearch_deployment.yaml b/config/prow/cluster/cik8ssearch_deployment.yaml new file mode 100644 index 00000000..02fd4a9f --- /dev/null +++ b/config/prow/cluster/cik8ssearch_deployment.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ci-search-k8s + namespace: prow + labels: + app: ci-search-k8s +spec: + replicas: 1 # Do not scale up. + strategy: + type: Recreate + selector: + matchLabels: + app: ci-search-k8s + template: + metadata: + labels: + app: ci-search-k8s + spec: + serviceAccountName: ci-search + terminationGracePeriodSeconds: 30 + containers: + - name: ci-search-k8s + image: quay.io/powercloud/ci-search:k8s + ports: + - containerPort: 8080 diff --git a/config/prow/cluster/cik8ssearch_ingress.yaml b/config/prow/cluster/cik8ssearch_ingress.yaml new file mode 100755 index 00000000..e0014362 --- /dev/null +++ b/config/prow/cluster/cik8ssearch_ingress.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + namespace: prow + name: ci-search-k8s + annotations: + kubernetes.io/ingress.class: public-iks-k8s-nginx +spec: + rules: + - host: k8ssearch.ppc64le-cloud.cis.ibm.net + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: ci-search-k8s + port: + number: 8080 + tls: + - hosts: + - k8ssearch.ppc64le-cloud.cis.ibm.net + secretName: ppc64le-cloud-cis diff --git a/config/prow/cluster/cik8ssearch_service.yaml b/config/prow/cluster/cik8ssearch_service.yaml new file mode 100644 index 00000000..2b9c0955 --- /dev/null +++ b/config/prow/cluster/cik8ssearch_service.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: Service +metadata: + namespace: prow + name: ci-search-k8s +spec: + selector: + app: ci-search-k8s + ports: + - port: 8080 + targetPort: 8080 diff --git a/config/prow/cluster/cisearch_deployment.yaml b/config/prow/cluster/cisearch_deployment.yaml index 6fb05f95..b350d6e6 100644 --- a/config/prow/cluster/cisearch_deployment.yaml +++ b/config/prow/cluster/cisearch_deployment.yaml @@ -21,6 +21,6 @@ spec: terminationGracePeriodSeconds: 30 containers: - name: ci-search - image: quay.io/powercloud/ci-search:latest + image: quay.io/powercloud/ci-search:ppc64le-cloud ports: - containerPort: 8080 diff --git a/images/ci-search/Dockerfile b/images/ci-search/Dockerfile index 8777e89c..0b3753fa 100644 --- a/images/ci-search/Dockerfile +++ b/images/ci-search/Dockerfile @@ -2,12 +2,12 @@ FROM golang WORKDIR /go/src/github.com/openshift RUN git clone https://github.com/openshift/ci-search \ && cd ci-search \ - && grep -rl origin-ci-test . | xargs sed -i 's/origin-ci-test/ppc64le-kubernetes/g' \ - && grep -rl "OpenShift" . | xargs sed -i 's/OpenShift/Kubernetes-ppc64le/g' \ - && grep -rl "prow\.ci\.openshift" . | xargs sed -i 's/prow\.ci\.openshift/prow\.ppc64le-cloud/g' \ - && make build + && grep -rl test-platform-results . | xargs sed -i 's/test-platform-results/ppc64le-kubernetes/g' \ + && grep -rl "OpenShift" . | xargs sed -i 's/OpenShift/ppc64le-cloud/g' \ + && grep -rl "ci\.openshift\.org" . | xargs sed -i 's/ci\.openshift\.org/ppc64le-cloud\.cis\.ibm\.net/g' \ + && GO_BUILD_PACKAGES=./cmd/search make GO_REQUIRED_MIN_VERSION:= build -FROM quay.io/centos/centos:stream8 +FROM quay.io/centos/centos:stream9 COPY --from=0 /go/src/github.com/openshift/ci-search/search /usr/bin/ RUN curl -L https://github.com/BurntSushi/ripgrep/releases/download/12.0.1/ripgrep-12.0.1-x86_64-unknown-linux-musl.tar.gz | \ tar xvzf - --wildcards --no-same-owner --strip-components=1 -C /usr/bin '*/rg' diff --git a/images/ci-search/Dockerfile-k8s b/images/ci-search/Dockerfile-k8s new file mode 100644 index 00000000..aaf02f9d --- /dev/null +++ b/images/ci-search/Dockerfile-k8s @@ -0,0 +1,18 @@ +FROM golang +WORKDIR /go/src/github.com/openshift +RUN git clone https://github.com/openshift/ci-search \ + && cd ci-search \ + && grep -rl test-platform-results . | xargs sed -i 's/test-platform-results/kubernetes-ci-logs/g' \ + && grep -rl "OpenShift" . | xargs sed -i 's/OpenShift/Kubernetes-ppc64le/g' \ + && grep -rl "prow\.ci\.openshift\.org" . | xargs sed -i 's/prow\.ci\.openshift\.org/prow\.k8s\.io/g' \ + && GO_BUILD_PACKAGES=./cmd/search make GO_REQUIRED_MIN_VERSION:= build + +FROM quay.io/centos/centos:stream9 +COPY --from=0 /go/src/github.com/openshift/ci-search/search /usr/bin/ +RUN curl -L https://github.com/BurntSushi/ripgrep/releases/download/12.0.1/ripgrep-12.0.1-x86_64-unknown-linux-musl.tar.gz | \ + tar xvzf - --wildcards --no-same-owner --strip-components=1 -C /usr/bin '*/rg' +RUN mkdir /var/lib/ci-search && chown 1000:1000 /var/lib/ci-search && chmod 1777 /var/lib/ci-search +USER 1000:1000 +ENTRYPOINT ["search"] +CMD ["--path=/var/lib/ci-search/", "--deck-uri=https://prow.k8s.io"] +EXPOSE 8080