Skip to content

Commit

Permalink
fix: use better templating format for yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
todpunk committed Dec 31, 2024
1 parent 99cc77c commit 05f5648
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions ci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
CLUSTER_SERVICES_FILE="./helm_values/cluster-services.yaml"
PROMETHEUS_FILE="./helm_values/prometheus.yaml"

sed -i 's/\$\{cloudflareApiEmail\}/${CLOUDFLARE_API_EMAIL}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{cloudflareApiToken\}/${CLOUDFLARE_API_TOKEN}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{grafanaDatasourceCortexPassword\}/${GRAFANA_CORTEXT_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{grafanaDatasourceLokiPassword\}/${GRAFANA_LOKI_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{grafanaAdminPassword\}/${GRAFANA_ADMIN_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{grafanaNotifierCatalystCommunityAlerts\}/${CATALYST_COMMUNITY_ALERTS_URL}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{linkerdIssuerKeyPEM\}/${LINKERD_ISSUER_KEY_PEM}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/\$\{promtailBasicAuthPassword\}/${PROMTAIL_PASS}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{cloudflareApiEmail}}/${CLOUDFLARE_API_EMAIL}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{cloudflareApiToken}}/${CLOUDFLARE_API_TOKEN}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{grafanaDatasourceCortexPassword}}/${GRAFANA_CORTEXT_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{grafanaDatasourceLokiPassword}}/${GRAFANA_LOKI_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{grafanaAdminPassword}}/${GRAFANA_ADMIN_PASSWORD}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{grafanaNotifierCatalystCommunityAlerts}}/${CATALYST_COMMUNITY_ALERTS_URL}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{linkerdIssuerKeyPEM}}/${LINKERD_ISSUER_KEY_PEM}/g' ${CLUSTER_SERVICES_FILE}
sed -i 's/{{promtailBasicAuthPassword}}/${PROMTAIL_PASS}/g' ${CLUSTER_SERVICES_FILE}

sed -i 's/\$\{clusterName\}/${CLUSTER_NAME}/g' ${PROMETHEUS_FILE}
sed -i 's/{{clusterName}}/${CLUSTER_NAME}/g' ${PROMETHEUS_FILE}

touch runnerenv.sh
echo "REACTORCIDE_JOB_REPO_URL=${REACTORCIDE_JOB_REPO_URL}" >> runnerenv.sh
Expand Down
18 changes: 9 additions & 9 deletions helm_values/cluster-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ certManager:
solvers:
- dns01:
cloudflare:
email: ${cloudflareApiEmail}
email: {{cloudflareApiEmail}}
apiTokenSecretRef:
name: cloudflare-api-token-secret
key: api-token
Expand Down Expand Up @@ -272,18 +272,18 @@ externalDns:
provider: cloudflare
cloudflare:
proxied: true
email: ${cloudflareApiEmail}
apiToken: "${cloudflareApiToken}"
email: {{cloudflareApiEmail}}
apiToken: "{{cloudflareApiToken}}"
sources:
- ingress
grafana:
enabled: true
targetRevision: "~8.8.1"
datasourceAuth:
cortex:
password: "${grafanaDatasourceCortexPassword}"
password: "{{grafanaDatasourceCortexPassword}}"
loki:
password: "${grafanaDatasourceLokiPassword}"
password: "{{grafanaDatasourceLokiPassword}}"
extraDatasources:
- name: ht0-k8s Prometheus
type: prometheus
Expand All @@ -292,7 +292,7 @@ grafana:
access: proxy
isDefault: false
values:
adminPassword: "${grafanaAdminPassword}"
adminPassword: "{{grafanaAdminPassword}}"
serviceAccount:
create: true
name: grafana
Expand All @@ -309,7 +309,7 @@ grafana:
- uid: catalyst-squad-slack
type: slack
settings:
url: "${grafanaNotifierCatalystCommunityAlerts}"
url: "{{grafanaNotifierCatalystCommunityAlerts}}"
title: |
{{`{{ template "custom_slack_title" . }}`}}
text: |
Expand Down Expand Up @@ -385,7 +385,7 @@ linkerd:
Ak8CIQC+JIcDwnBO2YcMoO2NYXU5GjHmXWb7WpOgn8hHqliZqw==
-----END CERTIFICATE-----
keyPEM: |
${linkerdIssuerKeyPEM}
{{linkerdIssuerKeyPEM}}
loki:
enabled: true
targetRevision: "~0.80.0"
Expand Down Expand Up @@ -523,7 +523,7 @@ promtail:
cluster: ht0-k8s
basic_auth:
username: ht0-k8s
password: "${promtailBasicAuthPassword}"
password: "{{promtailBasicAuthPassword}}"
sentry:
enabled: false
storageClasses:
Expand Down
2 changes: 1 addition & 1 deletion helm_values/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ prometheus:
# allow service monitors to be selected from all namespaces and labels
serviceMonitorSelectorNilUsesHelmValues: false
externalLabels:
cluster: ${clusterName}
cluster: {{clusterName}}
remoteWrite:
- url: http://cortex-nginx.cortex.svc.cluster.local/api/v1/push
basicAuth:
Expand Down

0 comments on commit 05f5648

Please sign in to comment.