diff --git a/bin/generate.sh b/bin/generate.sh
index 5c7058f6..f73fffbe 100755
--- a/bin/generate.sh
+++ b/bin/generate.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# shellcheck disable=SC2034 # Unused variables left for readability
helmfile () {
@@ -10,30 +11,30 @@ bases:
- ../envs/environments.yaml.gotmpl
commonLabels:
- tier: $tier
+ tier: ${tier}
releases:
-- name: $name
- namespace: {{ .Environment.Name }}-$name
- chart: ../charts/$name
- condition: $name.enabled
+- name: ${name}
+ namespace: {{ .Environment.Name }}-${name}
+ chart: ../charts/${name}
+ condition: ${name}.enabled
values:
- - ../values/$name/values/values.yaml.gotmpl
- - ../values/$name/values/values-{{ .Environment.Name }}.yaml
+ - ../values/${name}/values/values.yaml.gotmpl
+ - ../values/${name}/values/values-{{ .Environment.Name }}.yaml
postRenderer: ../bin/kustomizer
postRendererArgs:
- - ../values/$name/kustomize/{{ .Environment.Name }}
+ - ../values/${name}/kustomize/{{ .Environment.Name }}
missingFileHandler: Info
- name: manifests
- namespace: {{ .Environment.Name }}-$name
+ namespace: {{ .Environment.Name }}-${name}
chart: manifests
- condition: $name.enabled
+ condition: ${name}.enabled
missingFileHandler: Info
values:
- ../values/env.yaml
- ../values/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml
- - ../values/$name/env.yaml.gotmpl
- - ../values/$name/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml.gotmpl
+ - ../values/${name}/env.yaml.gotmpl
+ - ../values/${name}/env-{{ requiredEnv "ARGOCD_ENV_CLUSTER_NAME" }}.yaml.gotmpl
hooks:
- events: [ prepare, cleanup ]
showlogs: true
@@ -42,7 +43,7 @@ releases:
- '{{\`{{ if eq .Event.Name "prepare" }}build{{ else }}clean{{ end }}\`}}'
- '{{\`{{ .Release.Chart }}\`}}'
- '{{\`{{ .Environment.Name }}\`}}'
- - ../values/$name/manifests
+ - ../values/${name}/manifests
- manifests
EOF
}
@@ -59,10 +60,10 @@ done
name=$1
tier=$2
-if [ -n "$ns" ]; then
- namespace="namespace: {{ .Environment.Name }}-$name"
+if [[ -n "${ns}" ]]; then
+ namespace="namespace: {{ .Environment.Name }}-${name}"
else
- namespace="namespace: $name"
+ namespace="namespace: ${name}"
fi
-helmfile $1 $2
+helmfile "$1" "$2"
diff --git a/bin/helmify b/bin/helmify
index 545e88ff..082ea78c 100755
--- a/bin/helmify
+++ b/bin/helmify
@@ -4,39 +4,38 @@ set -o pipefail
cmd=$1
chart=$2
-env=$3
manifests=${4:-manifests}
outdir=${5:-_manifests}
build() {
- mkdir -p $outdir/templates
- echo "Creating $outdir/templates"
+ mkdir -p "${outdir}"/templates
+ echo "Creating ${outdir}/templates"
- echo "generating $outdir/Chart.yaml" 1>&2
+ echo "generating ${outdir}/Chart.yaml" 1>&2
- cat < $outdir/Chart.yaml
+ cat < "${outdir}"/Chart.yaml
apiVersion: v1
appVersion: "1.0"
# description: A Helm chart for Kubernetes
-name: $chart
+name: ${chart}
version: 0.1.0
EOF
-if [ -d $manifests ]; then
- cp -r $manifests/* $outdir/templates
-elif [ -f $manifests ]; then
- cp $manifests $outdir/templates
+if [[ -d "${manifests}" ]]; then
+ cp -r "${manifests}"/* "${outdir}"/templates
+elif [[ -f "${manifests}" ]]; then
+ cp "${manifests}" "${outdir}"/templates
fi
}
clean() {
- echo "cleaning $outdir" 1>&2
- rm -rf $outdir
+ echo "cleaning ${outdir}" 1>&2
+ rm -rf "${outdir}"
}
-case "$cmd" in
+case "${cmd}" in
"build" ) build ;;
"clean" ) clean ;;
- * ) echo "unsupported command: $cmd" 1>&2; exit 1 ;;
+ * ) echo "unsupported command: ${cmd}" 1>&2; exit 1 ;;
esac
diff --git a/bin/kustomizer b/bin/kustomizer
index 99207bf0..0ff19a65 100755
--- a/bin/kustomizer
+++ b/bin/kustomizer
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
-[ $# != 1 ] && exit 1
+[[ $# != 1 ]] && exit 1
dir=$1
-base=$dir/../base
+base=${dir}/../base
-if [ -f $base/kustomization.yaml -a -f $dir/kustomization.yaml ]; then
- cat > $base/_manifest.yaml
- kubectl kustomize $dir
+if [[ -f "${base}"/kustomization.yaml ]] && [[ -f "${dir}"/kustomization.yaml ]]; then
+ cat > "${base}"/_manifest.yaml
+ kubectl kustomize "${dir}"
else
cat
fi
diff --git a/bootstrap/helm-kustomize-cmp/deploy.sh b/bootstrap/helm-kustomize-cmp/deploy.sh
index aedb1d1e..415fa268 100755
--- a/bootstrap/helm-kustomize-cmp/deploy.sh
+++ b/bootstrap/helm-kustomize-cmp/deploy.sh
@@ -3,5 +3,5 @@
img=registry.gitlab.com/oceanbox/manifests/helm-kustomize-cmp
tag=${1:-latest}
-docker build -t $img:$tag .
-docker push $img:$tag
+docker build -t "${img}":"${tag}" .
+docker push "${img}":"${tag}"
diff --git a/bootstrap/helm-kustomize-cmp/generate.sh b/bootstrap/helm-kustomize-cmp/generate.sh
index c273f723..896d2c08 100644
--- a/bootstrap/helm-kustomize-cmp/generate.sh
+++ b/bootstrap/helm-kustomize-cmp/generate.sh
@@ -1,14 +1,15 @@
#!/bin/sh
+# shellcheck disable=SC2154
export HOME=/plugin
-env > /tmp/$ARGOCD_APP_NAME.env
+env > /tmp/"${ARGOCD_APP_NAME}".env
-echo "$ARGOCD_APP_PARAMETERS" | jq '.[] | select(.name == "helm-parameters") | .map' | yq -P -oy > parameters.yaml
-cp parameters.yaml /tmp/$ARGOCD_APP_NAME-parameters.yaml
+echo "${ARGOCD_APP_PARAMETERS}" | jq '.[] | select(.name == "helm-parameters") | .map' | yq -P -oy > parameters.yaml
+cp parameters.yaml /tmp/"${ARGOCD_APP_NAME}"-parameters.yaml
-if [ -n "$PARAM_CHART" -a "$PARAM_CHART" != "." ]; then
- CHART=$PARAM_CHART
+if [ -n "${PARAM_CHART}" ] && [ "${PARAM_CHART}" != "." ]; then
+ CHART=${PARAM_CHART}
elif [ -d chart ]; then
CHART=chart
elif [ -f chart ]; then
@@ -18,19 +19,19 @@ else
fi
[ -f chart/values.yaml ] && VALUES="-f chart/values.yaml"
-[ -f values-chart.yaml ] && VALUES="$VALUES -f values-chart.yaml"
-[ -f values.yaml ] && VALUES="$VALUES -f values.yaml"
-[ -f values-$PARAM_ENV.yaml ] && VALUES="$VALUES -f values-$PARAM_ENV.yaml"
-VALUES="$VALUES -f parameters.yaml"
+[ -f values-chart.yaml ] && VALUES="${VALUES} -f values-chart.yaml"
+[ -f values.yaml ] && VALUES="${VALUES} -f values.yaml"
+[ -f values-"${PARAM_ENV}".yaml ] && VALUES="${VALUES} -f values-${PARAM_ENV}.yaml"
+VALUES="${VALUES} -f parameters.yaml"
-helm dependency update $CHART >/tmp/$ARGOCD_APP_NAME-helm-dependency-build.out
+helm dependency update "${CHART}" >/tmp/"${ARGOCD_APP_NAME}"-helm-dependency-build.out
mkdir -p base
-echo "helm template -n $ARGOCD_APP_NAMESPACE $PARAM_FLAGS $VALUES $ARGOCD_APP_NAME $CHART" > /tmp/$ARGOCD_APP_NAME-helm.sh
-helm template -n $ARGOCD_APP_NAMESPACE $PARAM_FLAGS $VALUES $ARGOCD_APP_NAME $CHART > ./base/_manifest.yaml
+echo "helm template -n ${ARGOCD_APP_NAMESPACE} ${PARAM_FLAGS} ${VALUES} ${ARGOCD_APP_NAME} ${CHART}" > /tmp/"${ARGOCD_APP_NAME}"-helm.sh
+helm template -n "${ARGOCD_APP_NAMESPACE}" "${PARAM_FLAGS}" "${VALUES}" "${ARGOCD_APP_NAME}" "${CHART}" > ./base/_manifest.yaml
-cp ./base/_manifest.yaml /tmp/$ARGOCD_APP_NAME-manifest.yaml
+cp ./base/_manifest.yaml /tmp/"${ARGOCD_APP_NAME}"-manifest.yaml
-[ -d "$PARAM_ENV" ] && kubectl kustomize $PARAM_ENV > /tmp/$ARGOCD_APP_NAME-manifest.yaml
+[ -d "${PARAM_ENV}" ] && kubectl kustomize "${PARAM_ENV}" > /tmp/"${ARGOCD_APP_NAME}"-manifest.yaml
-cat /tmp/$ARGOCD_APP_NAME-manifest.yaml
+cat /tmp/"${ARGOCD_APP_NAME}"-manifest.yaml
diff --git a/bootstrap/helm-kustomize-cmp/get-values.sh b/bootstrap/helm-kustomize-cmp/get-values.sh
index 738905f5..632bb3f3 100644
--- a/bootstrap/helm-kustomize-cmp/get-values.sh
+++ b/bootstrap/helm-kustomize-cmp/get-values.sh
@@ -18,7 +18,7 @@ EOF
exit 0
fi
-yq e -o=p $VALUES | jq --slurp --raw-input '
+yq e -o=p "${VALUES}" | jq --slurp --raw-input '
[{
name: "helm-parameters",
title: "Helm Parameters",
diff --git a/bootstrap/helm-kustomize-cmp/init-helm-repos.sh b/bootstrap/helm-kustomize-cmp/init-helm-repos.sh
index 38e85390..f219ca38 100644
--- a/bootstrap/helm-kustomize-cmp/init-helm-repos.sh
+++ b/bootstrap/helm-kustomize-cmp/init-helm-repos.sh
@@ -1,8 +1,9 @@
#!/bin/sh
+# shellcheck disable=SC2154
export HOME=/plugin
-helm repo add --username argocd-helm --password "$OCEANBOX_HELM_ACCESS_TOKEN" oceanbox \
+helm repo add --username argocd-helm --password "${OCEANBOX_HELM_ACCESS_TOKEN}" oceanbox \
https://gitlab.com/api/v4/projects/54396343/packages/helm/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
diff --git a/bootstrap/helm-kustomize-cmp/init.sh b/bootstrap/helm-kustomize-cmp/init.sh
index a61d2cfd..4a272d97 100644
--- a/bootstrap/helm-kustomize-cmp/init.sh
+++ b/bootstrap/helm-kustomize-cmp/init.sh
@@ -4,9 +4,9 @@ export HOME=/plugin
helm repo update oceanbox
-if [ -n "$PARAM_CHART" -a "$PARAM_CHART" != "." ]; then
- helm show values $PARAM_CHART > values-chart.yaml
+if [ -n "${PARAM_CHART}" ] && [ "${PARAM_CHART}" != "." ]; then
+ helm show values "${PARAM_CHART}" > values-chart.yaml
elif [ -f chart ]; then
CHART=$(cat chart)
- helm show values $CHART > values-chart.yaml
+ helm show values "${CHART}" > values-chart.yaml
fi
diff --git a/bootstrap/helmfile-cmp/deploy.sh b/bootstrap/helmfile-cmp/deploy.sh
index b2319ffc..73dbc751 100755
--- a/bootstrap/helmfile-cmp/deploy.sh
+++ b/bootstrap/helmfile-cmp/deploy.sh
@@ -3,5 +3,5 @@
img=registry.gitlab.com/oceanbox/manifests/helmfile-cmp
tag=${1:-latest}
-docker build -t $img:$tag .
-docker push $img:$tag
+docker build -t "${img}":"${tag}" .
+docker push "${img}":"${tag}"
diff --git a/bootstrap/helmfile-cmp/generate.sh b/bootstrap/helmfile-cmp/generate.sh
index 695f7009..2dc3c9a6 100644
--- a/bootstrap/helmfile-cmp/generate.sh
+++ b/bootstrap/helmfile-cmp/generate.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# shellcheck disable=SC2154
# NOTE: Ensure errors are part of exitcode
# set -o pipefail
@@ -10,7 +11,7 @@ export HELM_CONFIG_HOME=/tmp/helm/config
export HELMFILE_CACHE_HOME=/tmp/helmfile/cache
export HELMFILE_TEMPDIR=/tmp/helmfile/tmp
-test -n ARGOCD_ENV_HELMFILE_ENVIRONMENT && export HELMFILE_ENVIRONMENT=$ARGOCD_ENV_HELMFILE_ENVIRONMENT
-test -n ARGOCD_ENV_HELMFILE_FILE_PATH && export HELMFILE_FILE_PATH=$ARGOCD_ENV_HELMFILE_FILE_PATH
+test -n ARGOCD_ENV_HELMFILE_ENVIRONMENT && export HELMFILE_ENVIRONMENT="${ARGOCD_ENV_HELMFILE_ENVIRONMENT}"
+test -n ARGOCD_ENV_HELMFILE_FILE_PATH && export HELMFILE_FILE_PATH="${ARGOCD_ENV_HELMFILE_FILE_PATH}"
-helmfile -n "$ARGOCD_APP_NAMESPACE" $ARGS template -q --include-crds
+helmfile -n "${ARGOCD_APP_NAMESPACE}" "${ARGS}" template -q --include-crds
diff --git a/bootstrap/reset-ekman-cluster.sh b/bootstrap/reset-ekman-cluster.sh
index d326eab2..ecc46a08 100755
--- a/bootstrap/reset-ekman-cluster.sh
+++ b/bootstrap/reset-ekman-cluster.sh
@@ -13,7 +13,7 @@ kubectl --context ekman apply -f cluster-admin-token.yaml
# kubectl --context oceanbox apply -f _cluster-ekman.yaml
token=$(kubectl --context ekman get secret -n kube-system argocd-manager-token -o yaml | grep ' token:' | cut -d' ' -f4 | base64 -d)
-sed "s/@token@/$token/" cluster-ekman.yaml > _cluster-ekman.yaml
+sed "s/@token@/${token}/" cluster-ekman.yaml > _cluster-ekman.yaml
echo "configure argocd ekman-cluster..."
cat _cluster-ekman.yaml
kubectl --context oceanbox apply -f _cluster-ekman.yaml
diff --git a/nix/checks.nix b/nix/checks.nix
new file mode 100644
index 00000000..9a3b2383
--- /dev/null
+++ b/nix/checks.nix
@@ -0,0 +1,65 @@
+let
+ sources = import ./default.nix;
+ pkgs = import sources.nixpkgs { };
+ pre-commit = import sources.git-hooks;
+
+ globalExcludes = [
+ "nix/default.nix"
+ ".*vendor"
+ ".*chart/.*"
+ ".*schema.json"
+ ];
+
+in
+pre-commit.run {
+ src = pkgs.nix-gitignore.gitignoreSource [ ] ../.;
+ # Do not run at pre-commit time
+ default_stages = [
+ "pre-push"
+ ];
+ # TODO(mrtz): Remove when default
+ package = pkgs.prek;
+ # Linters From https://github.com/cachix/pre-commit-hooks.nix
+ hooks = {
+ nixfmt-rfc-style = {
+ enable = true;
+ excludes = globalExcludes;
+ };
+
+ trim-trailing-whitespace.enable = true;
+
+ shellcheck = {
+ enable = true;
+ excludes = [
+ "vcluster/"
+ ];
+ args = [
+ "-x"
+ "-o"
+ "all"
+ ];
+ };
+
+ yamllint = {
+ enable = false;
+ excludes = [
+ "attic/"
+ "charts/templates/"
+ "charts/charts/"
+ ];
+ settings = {
+ strict = true;
+ configData = ''{ extends: default, rules: { document-start: disable, line-length: {max: 165} } }'';
+ };
+ };
+
+ check-json.enable = true;
+
+ renovate-config-validator = {
+ enable = true;
+ files = "renovate.json$";
+ entry = "renovate-config-validator";
+ };
+
+ };
+}
diff --git a/nix/sources.json b/nix/sources.json
index 737b35e8..eb4fb596 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -1,5 +1,18 @@
{
"pins": {
+ "git-hooks": {
+ "type": "Git",
+ "repository": {
+ "type": "GitHub",
+ "owner": "cachix",
+ "repo": "git-hooks.nix"
+ },
+ "branch": "master",
+ "submodules": false,
+ "revision": "b68b780b69702a090c8bb1b973bab13756cc7a27",
+ "url": "https://github.com/cachix/git-hooks.nix/archive/b68b780b69702a090c8bb1b973bab13756cc7a27.tar.gz",
+ "hash": "1k99smax7zpa5cdw9afa4v4y4155amy21a8z5z8x3cikdz3gyx5p"
+ },
"nixpkgs": {
"type": "Channel",
"name": "nixpkgs-unstable",
diff --git a/raw/tos/oceanbox/database/upload-img.sh b/raw/tos/oceanbox/database/upload-img.sh
index d3f3eb08..ad3b56c1 100755
--- a/raw/tos/oceanbox/database/upload-img.sh
+++ b/raw/tos/oceanbox/database/upload-img.sh
@@ -3,7 +3,7 @@
# Simple script for uploading a base64 encoded image into our database. For
# grafana business image panels.
-if [ $# -ne 2 ]
+if [[ $# -ne 2 ]]
then
echo "Usage: $0 .png"
exit 1
@@ -12,9 +12,9 @@ fi
filename=$1
file=$2
-if [ ! -e $file ]
+if [[ ! -e "${file}" ]]
then
- echo "file $file does not exist"
+ echo "file ${file} does not exist"
exit 1
fi
@@ -22,9 +22,9 @@ function create_image() {
local filename=$1
local data=$2
cat << EOF
-INSERT INTO images VALUES('$filename', '$data');
+INSERT INTO images VALUES('${filename}', '${data}');
EOF
}
-data=$(cat $file | base64 -w0)
-create_image $filename $data
+data=$(base64 -w0 < "${file}")
+create_image "${filename}" "${data}"
diff --git a/renovate.json b/renovate.json
index b0a6af6b..b8178855 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,4 +1,3 @@
-// -*- mode: jsonc -*-
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
diff --git a/shell.nix b/shell.nix
index 2fc16656..55bd8ea2 100644
--- a/shell.nix
+++ b/shell.nix
@@ -6,35 +6,45 @@ let
config = { };
overlays = [ ];
};
+ checks = import ./nix/checks.nix;
in
pkgs.mkShellNoCC {
name = "clstr";
- packages = with pkgs; [
- just
- npins
+ packages =
+ with pkgs;
+ [
+ # dev tools
+ just
+ npins
- # helm
- helmfile
- kubernetes-helm
+ # helm
+ helmfile
+ kubernetes-helm
- # kubectl tools
- kubectl-cnpg
- kubectl-neat
- kubelogin
- kubelogin-oidc
- kubectl-rook-ceph
+ # kubectl tools
+ kubectl-cnpg
+ kubectl-neat
+ kubelogin
+ kubelogin-oidc
+ kubectl-rook-ceph
- # other tools
- step-cli
- linkerd
- velero
- cmctl
+ # other tools
+ step-cli
+ linkerd
+ velero
+ cmctl
+ renovate
- # dapr
- dapr-cli
- ];
+ # dapr
+ dapr-cli
+ ]
+ ++ checks.enabledPackages;
- ARGOCD_ENV_CLUSTER_NAME = "rossby";
+ ARGOCD_ENV_CLUSTER_NAME = "hel1";
HELM_GIT_ACCESS_TOKEN = "glpat-xxx";
+
+ shellHook = builtins.concatStringsSep "\n" [
+ checks.shellHook
+ ];
}
diff --git a/values/atlantis/kustomize/prod/appsettings.json b/values/atlantis/kustomize/prod/appsettings.json
index ba173e47..d6eebde4 100644
--- a/values/atlantis/kustomize/prod/appsettings.json
+++ b/values/atlantis/kustomize/prod/appsettings.json
@@ -73,7 +73,7 @@
"connString": "Username=postgres;Password=secret;Host=localhost;Port=5432;Database=app;Pooling=true;",
"sorcerer" : "https://sorcerer.data.oceanbox.io",
"allowedOrigins": [
- "https://maps.oceanbox.io",
+ "https://maps.oceanbox.io"
],
"appName": "atlantis",
"appEnv": "prod",
diff --git a/values/linkerd/values/linkerd.yaml.gotmpl b/values/linkerd/values/linkerd.yaml.gotmpl
index 47413e35..d743d5f1 100644
--- a/values/linkerd/values/linkerd.yaml.gotmpl
+++ b/values/linkerd/values/linkerd.yaml.gotmpl
@@ -4,14 +4,14 @@ identity:
scheme: {{ .Values.linkerd.secretScheme }}
{{- if .Values.linkerd.identityIssuerPEM }}
tls:
- crtPEM: {{- .Values.linkerd.identityIssuerPEM | toYaml | indent 14 }}
+ crtPEM: {{- .Values.linkerd.identityIssuerPEM | toYaml | indent 14 }}
{{- end }}
policyValidator:
externalSecret: true
- caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
+ caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
proxyInjector:
externalSecret: true
- caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
+ caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
profileValidator:
externalSecret: true
- caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
+ caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }}
diff --git a/values/metrics-server/values/metrics-server.yaml.gotmpl b/values/metrics-server/values/metrics-server.yaml.gotmpl
index 21658d31..ac2ece2a 100644
--- a/values/metrics-server/values/metrics-server.yaml.gotmpl
+++ b/values/metrics-server/values/metrics-server.yaml.gotmpl
@@ -1,5 +1,5 @@
containerPort: 10250
-resources:
+resources:
requests:
cpu: 100m
memory: 200Mi
diff --git a/values/nfs-provisioner/manifests/nfs-provisioner.yaml b/values/nfs-provisioner/manifests/nfs-provisioner.yaml
index 7d6f32cd..9a12bc8f 100644
--- a/values/nfs-provisioner/manifests/nfs-provisioner.yaml
+++ b/values/nfs-provisioner/manifests/nfs-provisioner.yaml
@@ -6,7 +6,7 @@ metadata:
namespace: argocd
spec:
destination:
- namespace: kube-system
+ namespace: kube-system
server: 'https://kubernetes.default.svc'
sources:
- repoURL: {{ .Values.clusterConfig.manifests }}
diff --git a/values/plume/kustomize/prod/appsettings.json b/values/plume/kustomize/prod/appsettings.json
index 63e14f4c..06bda9f4 100644
--- a/values/plume/kustomize/prod/appsettings.json
+++ b/values/plume/kustomize/prod/appsettings.json
@@ -6,5 +6,5 @@
"appVersion": "1.0.0",
"cacheDir": "/data/archives/cache/prod",
"otelCollector": "http://10.255.241.12:4317",
- "sentryUrl": "https://2b68ecf0c4d02e6cc9433c371321ac9d@o4509530141622272.ingest.de.sentry.io/4509910315237456",
+ "sentryUrl": "https://2b68ecf0c4d02e6cc9433c371321ac9d@o4509530141622272.ingest.de.sentry.io/4509910315237456"
}
diff --git a/values/prometheus/manifests/policies/prometheus-add-folder-to-default-dashboards.yaml b/values/prometheus/manifests/policies/prometheus-add-folder-to-default-dashboards.yaml
index c3505a1d..0fb12eca 100644
--- a/values/prometheus/manifests/policies/prometheus-add-folder-to-default-dashboards.yaml
+++ b/values/prometheus/manifests/policies/prometheus-add-folder-to-default-dashboards.yaml
@@ -24,7 +24,7 @@ spec:
grafana_folder: Prometheus-stack
targets:
- apiVersion: v1
- kind: ConfigMap
+ kind: ConfigMap
name: "{{`{{ request.object.metadata.name }}`}}"
name: generate-dashboard-folder-annotation
skipBackgroundRequests: true
diff --git a/values/redis/env.yaml.gotmpl b/values/redis/env.yaml.gotmpl
index fc71bdd3..1a39fe59 100644
--- a/values/redis/env.yaml.gotmpl
+++ b/values/redis/env.yaml.gotmpl
@@ -1,5 +1,5 @@
redis:
- enabled: true
+ enabled: true
envs:
- prod
- staging
\ No newline at end of file
diff --git a/values/redis/manifests/redis.yaml b/values/redis/manifests/redis.yaml
index 0d3731dd..e0364c13 100644
--- a/values/redis/manifests/redis.yaml
+++ b/values/redis/manifests/redis.yaml
@@ -3,7 +3,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
- name: {{ . }}-redis
+ name: {{ . }}-redis
namespace: argocd
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
diff --git a/values/sorcerer/kustomize/prod-rossby/appsettings.json b/values/sorcerer/kustomize/prod-rossby/appsettings.json
index a8be6dd8..f022a0b5 100644
--- a/values/sorcerer/kustomize/prod-rossby/appsettings.json
+++ b/values/sorcerer/kustomize/prod-rossby/appsettings.json
@@ -60,7 +60,7 @@
"https://maps.beta.oceanbox.io",
"https://atlantis.beta.oceanbox.io",
"https://jonas-atlantis.dev.oceanbox.io",
- "https://stig-atlantis.dev.oceanbox.io",
+ "https://stig-atlantis.dev.oceanbox.io"
],
"appName": "sorcerer",
"appEnv": "prod",
diff --git a/values/system/hel1/kyverno/sync-regcred.yaml b/values/system/hel1/kyverno/sync-regcred.yaml
index b8c65f3f..9ab9100d 100644
--- a/values/system/hel1/kyverno/sync-regcred.yaml
+++ b/values/system/hel1/kyverno/sync-regcred.yaml
@@ -13,7 +13,7 @@ metadata:
is time consuming and error prone. This policy will copy a
Secret called `regcred` which exists in the `default` Namespace to
new Namespaces when they are created. It will also push updates to
- the copied Secrets should the source Secret be changed.
+ the copied Secrets should the source Secret be changed.
spec:
rules:
- name: sync-image-pull-secret
diff --git a/values/system/manifests/kube-proxy-rbac.yaml b/values/system/manifests/kube-proxy-rbac.yaml
index 0b53b301..a695d238 100644
--- a/values/system/manifests/kube-proxy-rbac.yaml
+++ b/values/system/manifests/kube-proxy-rbac.yaml
@@ -37,7 +37,7 @@ rules:
resources:
- events
verbs: ["*"]
-
+
- nonResourceURLs: ["*"]
verbs: ["*"]
- apiGroups:
diff --git a/values/system/oceanbox/kyverno/sync-regcred.yaml b/values/system/oceanbox/kyverno/sync-regcred.yaml
index b8c65f3f..9ab9100d 100644
--- a/values/system/oceanbox/kyverno/sync-regcred.yaml
+++ b/values/system/oceanbox/kyverno/sync-regcred.yaml
@@ -13,7 +13,7 @@ metadata:
is time consuming and error prone. This policy will copy a
Secret called `regcred` which exists in the `default` Namespace to
new Namespaces when they are created. It will also push updates to
- the copied Secrets should the source Secret be changed.
+ the copied Secrets should the source Secret be changed.
spec:
rules:
- name: sync-image-pull-secret
diff --git a/values/umami/queries/query b/values/umami/queries/query
index e1513099..9045a597 100755
--- a/values/umami/queries/query
+++ b/values/umami/queries/query
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-if [ $# -ne 1 ]
+if [[ $# -ne 1 ]]
then
echo "Usage: $0 .sql"
exit 1
@@ -8,11 +8,11 @@ fi
file=$1
-if [ ! -e $file ]
+if [[ ! -e "${file}" ]]
then
- echo "file $file does not exist"
+ echo "file ${file} does not exist"
exit 1
fi
-cat $file | kubectl -n analytics exec -i svc/prod-umami-db-rw -c postgres -- psql app
+kubectl -n analytics exec -i svc/prod-umami-db-rw -c postgres -- psql app < "${file}"
diff --git a/values/umami/queries/sim_count.sql b/values/umami/queries/sim_count.sql
index 9fdd6870..4d98d8ac 100644
--- a/values/umami/queries/sim_count.sql
+++ b/values/umami/queries/sim_count.sql
@@ -32,7 +32,7 @@ GROUP BY
SELECT
*
-FROM
+FROM
crosstab_integer_5_cols(
'SELECT * FROM simulations
WHERE
diff --git a/values/umami/queries/umami-visitors.sql b/values/umami/queries/umami-visitors.sql
index 5441b1b3..f370805b 100644
--- a/values/umami/queries/umami-visitors.sql
+++ b/values/umami/queries/umami-visitors.sql
@@ -1,4 +1,4 @@
-select
+select
s.distinct_id,
count(distinct w.visit_id)
from
@@ -9,7 +9,7 @@ join
where
w.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
and w.event_type = 1
- and w.created_at between '2025-10-13' and '2025-10-19'
+ and w.created_at between '2025-10-13' and '2025-10-19'
and s.distinct_id is not null
and substring(s.distinct_id similar '%#"@%#"' escape '#') not in ('@oceanbox.io')
group by
diff --git a/values/umami/queries/umami.sql b/values/umami/queries/umami.sql
index 6bb035cc..1fb1dbe6 100644
--- a/values/umami/queries/umami.sql
+++ b/values/umami/queries/umami.sql
@@ -9,7 +9,7 @@ join
where
w.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
and w.event_type = 1
- and w.created_at between '2025-10-06' and '2025-10-10'
+ and w.created_at between '2025-10-06' and '2025-10-10'
and s.distinct_id is not null
and s.distinct_id like '%@%'
group by
diff --git a/values/umami/queries/weekly-sim-submit-count-norm.sql b/values/umami/queries/weekly-sim-submit-count-norm.sql
index 61859eb5..671a69a2 100644
--- a/values/umami/queries/weekly-sim-submit-count-norm.sql
+++ b/values/umami/queries/weekly-sim-submit-count-norm.sql
@@ -21,7 +21,7 @@
SELECT
*
-FROM
+FROM
crosstab(
'SELECT "group", sim_type, count::text FROM weekly_sim_submit_count_v2 ORDER BY 1, 2',
'SELECT DISTINCT sim_type FROM weekly_sim_submit_count_v2 ORDER BY 1'