-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci-search: replace bazel based deployment
Replaces the bazel based deployment with kustomize. Signed-off-by: Daniel Hiller <[email protected]>
- Loading branch information
Showing
10 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace: ci-search | ||
|
||
resources: | ||
- manifests/full.yaml | ||
- manifests/ingress.yaml | ||
|
||
patches: | ||
- path: patches/statefulset.yaml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,62 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
# | ||
# This file is part of the KubeVirt project | ||
# | ||
# 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. | ||
# | ||
# Copyright the KubeVirt Authors. | ||
# | ||
# | ||
|
||
set -eo pipefail | ||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
main(){ | ||
local environment=${1} | ||
set -x | ||
|
||
bazelisk run //github/ci/services/ci-search:${environment}.apply | ||
WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
BASE_DIR="$(cd "${WORK_DIR}/.." && pwd)" | ||
|
||
bazelisk run //github/ci/services/common/k8s/cmd/wait -- -namespace ci-search -selector search -kind statefulset | ||
function usage { | ||
cat <<EOF | ||
usage: $0 [-d] <environment> | ||
EOF | ||
} | ||
|
||
main "${@}" | ||
dry_run=false | ||
while getopts "d" opt; do | ||
case "${opt}" in | ||
d ) | ||
dry_run="true" | ||
shift | ||
;; | ||
\? ) | ||
usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
environment="${1}" | ||
[ -d "${BASE_DIR}/overlays/${environment}" ] || exit 1 | ||
|
||
cd "${BASE_DIR}" | ||
|
||
if [ "$dry_run" = "true" ]; then | ||
kubectl kustomize "./overlays/${environment}" | ||
exit 0 | ||
fi | ||
|
||
kubectl apply -k "./overlays/${environment}" | ||
|
||
go run ../common/k8s/cmd/wait -- -namespace ci-search -selector search -kind statefulset |
8 changes: 8 additions & 0 deletions
8
github/ci/services/ci-search/overlays/production/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
resources: | ||
- ../../base | ||
|
||
secretGenerator: | ||
- name: bugzilla-credentials | ||
files: | ||
- api=./secrets/bugzilla-credentials | ||
type: Opaque |
1 change: 1 addition & 0 deletions
1
github/ci/services/ci-search/overlays/production/secrets/bugzilla-credentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
95988ba4a329c1b0a62e679f1bf5ade1fe6158f0 |
9 changes: 9 additions & 0 deletions
9
github/ci/services/ci-search/overlays/testing/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resources: | ||
- ../../base | ||
- ./cluster-issuer.yaml | ||
|
||
secretGenerator: | ||
- name: bugzilla-credentials | ||
files: | ||
- api=./secrets/bugzilla-credentials | ||
type: Opaque |
1 change: 1 addition & 0 deletions
1
github/ci/services/ci-search/overlays/testing/secrets/bugzilla-credentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
95988ba4a329c1b0a62e679f1bf5ade1fe6158f0 |
1 change: 1 addition & 0 deletions
1
github/ci/services/ci-search/secrets/production/bugzilla-credentials/api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
95988ba4a329c1b0a62e679f1bf5ade1fe6158f0 |