Skip to content

Commit d3aa33e

Browse files
committed
redis admin password for dev script. Cronjob toleration & nodeSelector
1 parent 27a6dee commit d3aa33e

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

api/kubernetes/cronjob/.gitkeep

Whitespace-only changes.

api/kubernetes/deploy_cronjob.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ spec:
7676
spec:
7777
template:
7878
spec:
79+
nodeSelector:
80+
"cosmotech.com/tier": "db"
81+
tolerations:
82+
- key: "vendor"
83+
operator: "Equal"
84+
value: "cosmotech"
85+
effect: "NoSchedule"
7986
containers:
8087
- name: adt-connector-full-sync-container
8188
image: ghcr.io/cosmo-tech/adt-twincache-connector:0.0.4
@@ -104,4 +111,4 @@ EOF
104111

105112
kubectl create -n "${NAMESPACE}" -f adt-sync-cronjob.yaml
106113

107-
rm -rf "${CRONJOB_DIR_PATH}"
114+
rm -rf "${CRONJOB_DIR_PATH}"

api/kubernetes/deploy_via_helm-dev.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ help() {
2222
echo "- PROM_CPU_MEM_REQUESTS | memory size requested for prometheus (default is 2Gi)"
2323
echo "- PROM_REPLICAS_NUMBER | number of prometheus replicas (default is 1)"
2424
echo "- PROM_ADMIN_PASSWORD | admin password for grafana (generated if not specified)"
25+
echo "- REDIS_ADMIN_PASSWORD | admin password for redis (generated if not specified)"
2526
echo
2627
echo "Usage: ./$(basename "$0") API_IMAGE_TAG NAMESPACE ARGO_POSTGRESQL_PASSWORD API_VERSION [any additional options to pass as is to the cosmotech-api Helm Chart]"
2728
}
@@ -143,9 +144,12 @@ helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx \
143144
--values /tmp/values-ingress-nginx.yaml
144145

145146
# Redis Cluster
147+
REDIS_ADMIN_PASSWORD_VAR=${REDIS_ADMIN_PASSWORD:-$(date +%s | sha256sum | base64 | head -c 32)}
146148
helm repo add bitnami https://charts.bitnami.com/bitnami
147149

148150
cat <<EOF > values-redis.yaml
151+
auth:
152+
password: ${REDIS_ADMIN_PASSWORD_VAR}
149153
image:
150154
registry: ghcr.io
151155
repository: cosmo-tech/cosmotech-redis
@@ -229,7 +233,6 @@ helm upgrade --install \
229233
--values values-redis-insight.yaml \
230234
--timeout 10m0s
231235

232-
REDIS_PASSWORD=$(kubectl get secret --namespace ${NAMESPACE} cosmotechredis -o jsonpath="{.data.redis-password}" | base64 --decode)
233236

234237
# Minio
235238
cat <<EOF > values-minio.yaml
@@ -466,7 +469,7 @@ config:
466469
host: "cosmotechredis-master.${NAMESPACE}.svc.cluster.local"
467470
port: "6379"
468471
username: "default"
469-
password: "${REDIS_PASSWORD}"
472+
password: "${REDIS_ADMIN_PASSWORD_VAR}"
470473
471474
ingress:
472475
enabled: ${COSMOTECH_API_INGRESS_ENABLED}

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ version = scmVersion.version
4040

4141
val kotlinJvmTarget = 17
4242
val cosmotechApiCommonVersion = "0.1.20-SNAPSHOT"
43-
val cosmotechApiAzureVersion = "0.1.7-SNAPSHOT"
43+
val cosmotechApiAzureVersion = "0.1.6-SNAPSHOT"
4444
val azureSpringBootBomVersion = "3.14.0"
4545

4646
allprojects {

0 commit comments

Comments
 (0)