Skip to content

Commit 930d08e

Browse files
authored
Merge pull request #2317 from jimdaga/issue-2150/move-perfdash
Move perfdash under /apps
2 parents 23c7cd1 + 5fdc4ec commit 930d08e

File tree

7 files changed

+68
-13
lines changed

7 files changed

+68
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Kubernetes project infrastructure, managed by the kubernetes comunity via [wg-k8
66
- `gcsweb`: instance of [gcsweb] at https://gcsweb.k8s.io - owned by [sig-testing]
77
- `kubernetes-external-secrets`: instance of [kubernetes-external-secrets] - owned by [sig-testing]
88
- `node-perf-dash`: instance of [node-perf-dash] - owned by [sig-node]
9+
- `perfdash`: instance of [perfdash] - owned by [sig-scalability]
910
- `publishing-bot`: instance of [publishing-bot] - owned by [sig-release]
1011
- `sippy`: instance of [sippy] at https://sippy.k8s.io - owned by [sig-architecture] (on behalf of [wg-reliability])
1112
- `slack-infra`: instance of [slack-infra] including https://slack.k8s.io - owned by [sig-contributor-experience]
@@ -21,7 +22,6 @@ Kubernetes project infrastructure, managed by the kubernetes comunity via [wg-k8
2122
- `clusters/projects`: terraform to manage (parts of) GCP projects
2223
- `k8s.gcr.io`: container images published by the project, promoted from `gcr.io/k8s-staging-*` repos
2324
- `k8s.io`: instance of nginx that provides redirects/reverse-proxying for k8s.io and its subdomains - owned by [sig-contributor-experience] and [sig-testing] (TODO(https://github.com/kubernetes/k8s.io/issues/2150) migrate to apps/)
24-
- `perf-dash.k8s.io`: instance of [perfdash] - owned by [sig-scalability] (TODO(https://github.com/kubernetes/k8s.io/issues/2150) migrate to apps/)
2525
- `prow`: work-in-pogress instance of [prow] - owned by [sig-testing] (TODO(https://github.com/kubernetes/k8s.io/issues/2150) migrate to apps/)
2626
- `registry.k8s.io`: work-in-progress to support cross-cloud mirroring/hosting of containers and binaries
2727

File renamed without changes.

apps/perfdash/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## How to deploy Perfdash
2+
3+
To bootstrap [Perfdash](https://github.com/kubernetes/perf-tests/tree/master/perfdash):
4+
5+
- Have [access](https://github.com/kubernetes/k8s.io/blob/main/running-in-community-clusters.md) to the GKE cluster `aaa`.
6+
7+
- From the `apps/perfdash` directory run:
8+
```console
9+
./deploy.sh
10+
```

perf-dash.k8s.io/certificate.yaml renamed to apps/perfdash/certificate.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kind: ManagedCertificate
33
metadata:
44
name: perfdash-k8s-io
55
namespace: perfdash
6+
labels:
7+
app: perfdash
68
spec:
79
domains:
810
- perf-dash.k8s.io

apps/perfdash/deploy.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2021 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# Deploys this app to the aaa cluster, or whatever cluster is pointed to
18+
# by KUBECTL_CONTEXT if set. Assumes the app's namespace already exists.
19+
#
20+
# Members of k8s-infra-rbac-${app}@kubernetes.io can run this.
21+
22+
set -o errexit
23+
set -o nounset
24+
set -o pipefail
25+
26+
SCRIPT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)
27+
28+
app=$(basename "${SCRIPT_ROOT}")
29+
30+
# coordinates to locate the target cluster in gke
31+
cluster_name="aaa"
32+
cluster_project="kubernetes-public"
33+
cluster_region="us-central1"
34+
35+
# coordinates to locate the app on the target cluster
36+
namespace="${app}"
37+
38+
# custom var(s) specific to this apps deployment
39+
perfdash_repo_url="https://raw.githubusercontent.com/kubernetes/perf-tests/master/perfdash"
40+
41+
# well known name set by `gcloud container clusters get-credentials`
42+
gke_context="gke_${cluster_project}_${cluster_region}_${cluster_name}"
43+
context="${KUBECTL_CONTEXT:-${gke_context}}"
44+
45+
# ensure we have a context to talk to the target cluster
46+
if ! kubectl config get-contexts "${context}" >/dev/null 2>&1; then
47+
gcloud container clusters get-credentials "${cluster_name}" --project="${cluster_project}" --region="${cluster_region}"
48+
context="${gke_context}"
49+
fi
50+
51+
# deploy kubernetes resources
52+
pushd "${SCRIPT_ROOT}" >/dev/null
53+
kubectl --context="${context}" --namespace="${namespace}" apply -f "${perfdash_repo_url}/deployment.yaml"
54+
kubectl --context="${context}" --namespace="${namespace}" apply -f "${perfdash_repo_url}/perfdash-service.yaml"
55+
kubectl --context="${context}" --namespace="${namespace}" apply -f .
File renamed without changes.

perf-dash.k8s.io/README.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)