Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move triage party under /apps #2303

Merged
merged 2 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The GitHub token is stored in Secret Manager in the `kubernetes-public` project,

- Have [access](https://github.com/kubernetes/k8s.io/blob/main/running-in-community-clusters.md) to the GKE cluster `aaa`.

- From the `triage-party` directory run:
- From the `triageparty-release` directory run:

```console
kubectl apply -f release-team/
```shell
./deploy.sh
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ManagedCertificate
metadata:
name: release-triage-k8s-io
namespace: triageparty-release
labels:
app: triageparty-release
spec:
domains:
- release.triage.k8s.io
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ConfigMap
metadata:
name: triage-party-config-release
namespace: triageparty-release
labels:
app: triageparty-release
data:
# The contents of config/config.yaml
config.yaml: |
Expand Down
50 changes: 50 additions & 0 deletions apps/triageparty-release/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash

# Copyright 2021 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Deploys this app to the aaa cluster, or whatever cluster is pointed to
# by KUBECTL_CONTEXT if set. Assumes the app's namespace already exists.
#
# Members of k8s-infra-rbac-${app}@kubernetes.io can run this.

set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)

app=$(basename "${SCRIPT_ROOT}")

# coordinates to locate the target cluster in gke
cluster_name="aaa"
cluster_project="kubernetes-public"
cluster_region="us-central1"

# coordinates to locate the app on the target cluster
namespace="${app}"

# well known name set by `gcloud container clusters get-credentials`
gke_context="gke_${cluster_project}_${cluster_region}_${cluster_name}"
context="${KUBECTL_CONTEXT:-${gke_context}}"

# ensure we have a context to talk to the target cluster
if ! kubectl config get-contexts "${context}" >/dev/null 2>&1; then
gcloud container clusters get-credentials "${cluster_name}" --project="${cluster_project}" --region="${cluster_region}"
context="${gke_context}"
fi

# deploy kubernetes resources
pushd "${SCRIPT_ROOT}" >/dev/null
kubectl --context="${context}" --namespace="${namespace}" apply --dry-run=client -f .
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ metadata:
name: triage-party
namespace: triageparty-release
labels:
app: triage-party
app: triageparty-release
ameukam marked this conversation as resolved.
Show resolved Hide resolved
spec:
replicas: 1
selector:
matchLabels:
app: triage-party
app: triageparty-release
template:
metadata:
labels:
app: triage-party
app: triageparty-release
spec:
containers:
- name: triage-party
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ kind: Ingress
metadata:
name: triage-party-release
namespace: triageparty-release
labels:
app: triageparty-release
annotations:
kubernetes.io/ingress.allow-http: "false"
kubernetes.io/ingress.class: "gce"
kubernetes.io/ingress.global-static-ip-name: "triage-party-release-ingress-prod"
networking.gke.io/managed-certificates: "release-triage-k8s-io"
labels:
app: triage-party
spec:
backend:
serviceName: triage-party-release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ExternalSecret
metadata:
name: github-token
namespace: triageparty-release
labels:
app: triageparty-release
spec:
backendType: gcpSecretsManager
projectId: kubernetes-public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ kind: Service
metadata:
name: triage-party-release
namespace: triageparty-release
labels:
app: triageparty-release
spec:
type: NodePort
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: triage-party
app: triageparty-release
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: triage-party-persistence
namespace: triageparty-release
labels:
app: triageparty
app: triageparty-release
spec:
accessModes:
- ReadWriteOnce
Expand Down