-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
9,379 additions
and
85 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 |
---|---|---|
|
@@ -35,7 +35,9 @@ runs: | |
env: | ||
ARTIFACTS_DIR: ${{ runner.temp }}/e2e-artifacts | ||
run: | | ||
set -x | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
mkdir "${ARTIFACTS_DIR}" | ||
echo "ARTIFACTS_DIR=${ARTIFACTS_DIR}" | tee -a ${GITHUB_ENV} | ||
- uses: actions/download-artifact@v3 | ||
|
@@ -45,7 +47,9 @@ runs: | |
- name: Load image | ||
shell: bash | ||
run: | | ||
set -x | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
unlz4 ~/operatorimage.tar.lz4 - | docker load | ||
# docker looses the registry part on save/load | ||
docker tag "$( echo "${image_repo_ref}:ci" | sed -E -e 's~[^/]+/(.*)~\1~' )" "${image_repo_ref}:ci" | ||
|
@@ -57,7 +61,9 @@ runs: | |
- name: Install tools | ||
shell: bash | ||
run: | | ||
set -x | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
go install github.com/mikefarah/yq/[email protected] | ||
- name: Setup minikube | ||
uses: ./go/src/github.com/scylladb/scylla-operator/.github/actions/setup-minikube | ||
|
@@ -67,7 +73,8 @@ runs: | |
env: | ||
SCYLLA_OPERATOR_FEATURE_GATES: '${{ inputs.featureGates }}' | ||
run: | | ||
set -x | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
timeout 10m ./hack/ci-deploy.sh '${{ env.image_repo_ref }}:ci' | ||
|
@@ -83,11 +90,15 @@ runs: | |
shell: bash | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
echo "FLAKE_ATTEMPTS=5" | tee -a ${GITHUB_ENV} | ||
- name: Run e2e | ||
shell: bash | ||
run: | | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
e2e_timeout_minutes='${{ inputs.baseTimeoutMinutes }}' | ||
flake_attempts=0 | ||
|
@@ -96,7 +107,10 @@ runs: | |
e2e_timeout_minutes="$(( ${e2e_timeout_minutes} + ${flake_attempts} * 10 ))" | ||
fi | ||
docker run --user="$( id -u ):$( id -g )" --rm \ | ||
user="$( id -u )" | ||
group="$( id -g )" | ||
ingress_address="$( kubectl -n haproxy-ingress get svc haproxy-ingress --template='{{ .spec.clusterIP }}' )" | ||
docker run --user="${user}:${group}" --rm \ | ||
--entrypoint=/usr/bin/scylla-operator-tests \ | ||
-v="${ARTIFACTS_DIR}:${ARTIFACTS_DIR}:rw" \ | ||
-v="${HOME}/.kube/config:/kubeconfig:ro" -e='KUBECONFIG=/kubeconfig' \ | ||
|
@@ -106,13 +120,18 @@ runs: | |
--artifacts-dir="${ARTIFACTS_DIR}" \ | ||
--flake-attempts="${flake_attempts}" \ | ||
--timeout="${e2e_timeout_minutes}m" \ | ||
--feature-gates='${{ inputs.featureGates }}' | ||
--feature-gates='${{ inputs.featureGates }}' \ | ||
--override-ingress-address="${ingress_address}" \ | ||
${{ inputs.extraArgs }} | ||
- name: Dump cluster state | ||
if: ${{ always() }} | ||
working-directory: ${{ runner.temp }} | ||
shell: bash | ||
run: timeout 10m ${{ inputs.repositoryPath }}/hack/ci-gather-artifacts.sh | ||
run: | | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
timeout 10m ${{ inputs.repositoryPath }}/hack/ci-gather-artifacts.sh | ||
- name: Get machine logs and info | ||
if: ${{ always() }} | ||
working-directory: ${{ runner.temp }}/e2e-artifacts | ||
|
@@ -142,15 +161,19 @@ runs: | |
working-directory: ${{ runner.temp }}/e2e-artifacts | ||
shell: bash | ||
run: | | ||
set -euEx -o pipefail | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
sudo cat $( ls /var/log/kube-apiserver-audit*.log | sort -n ) > ./kube-apiserver-audit.log | ||
jq -s 'group_by(.user.username) | map({"user": .[0].user.username, "total": length, "verbs": (group_by(.verb) | map({"key":.[0].verb, "value": length}) | from_entries)}) | sort_by(.total) | reverse' ./kube-apiserver-audit.log > ./api-call-stats.json | ||
- name: Compress artifacts | ||
if: ${{ always() }} | ||
working-directory: ${{ runner.temp }} | ||
shell: bash | ||
run: | | ||
set -x | ||
set -euExo pipefail | ||
shopt -s inherit_errexit | ||
tar -c --use-compress-program=lz4 -f ./e2e-artifacts.tar.lz4 "e2e-artifacts/" | ||
- name: Upload artifacts | ||
if: ${{ always() }} | ||
|
7 changes: 7 additions & 0 deletions
7
assets/monitoring/grafana/v1alpha1/admin-credentials.secret.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,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "{{ .name }}" | ||
data: | ||
username: {{ "admin" | toBytes | toBase64 }} | ||
password: {{ .password | toBase64 }} |
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,42 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "{{ .scyllaDBMonitoringName }}-grafana-configs" | ||
data: | ||
grafana.ini: | | ||
[auth] | ||
disable_login_form = false | ||
disable_signout_menu = false | ||
{{ if .enableAnonymousAccess -}} | ||
[auth.anonymous] | ||
enabled = true | ||
{{- end }} | ||
[dashboards] | ||
default_home_dashboard_path = /var/run/dashboards/scylladb/overview.json | ||
[log] | ||
level = error | ||
mode = console | ||
[log.frontend] | ||
enabled = true | ||
[paths] | ||
data = /var/lib/grafana | ||
logs = /var/log/grafana | ||
plugins = /var/lib/grafana/plugins | ||
provisioning = /var/run/configmaps/grafana-provisioning | ||
[security] | ||
admin_user = $__file{/var/run/secrets/grafana-admin-credentials/username} | ||
admin_password = $__file{/var/run/secrets/grafana-admin-credentials/password} | ||
[server] | ||
protocol = https | ||
cert_file = /var/run/secrets/grafana-serving-certs/tls.crt | ||
cert_key = /var/run/secrets/grafana-serving-certs/tls.key | ||
[panels] | ||
disable_sanitize_html = true |
Oops, something went wrong.