Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviPtrs committed Dec 4, 2024
2 parents 41662e6 + ccac13b commit 764dea8
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 21 deletions.
36 changes: 36 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down Expand Up @@ -101,6 +107,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down Expand Up @@ -165,6 +177,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down Expand Up @@ -229,6 +247,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down Expand Up @@ -293,6 +317,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down Expand Up @@ -357,6 +387,12 @@ steps:
- export COMMIT_SHORT_SHA=${DRONE_COMMIT_SHA:0:7}
- env_name=$( [ "$DRONE_BRANCH" = "main" ] && echo "prod" || echo "dev" )
- release_name=$( [ "$env_name" = "prod" ] && echo "$APP_NAME" || echo "$env_name""-""$APP_NAME" )
# Install shared resources
- >-
helm template commune-"$env_name"-aux
-f values-utils.yaml -n commune-"$env_name"-web-apps
--set environmentName="$env_name"
renlabs/utils | kubectl apply -f -
# Install application chart
- >-
helm upgrade --install "$release_name" -n commune-"$env_name"-web-apps
Expand Down
4 changes: 2 additions & 2 deletions apps/commune-governance/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ deployment:
JWT_SECRET:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: jwt_secret
POSTGRES_URL:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: community_validator_db_url
4 changes: 2 additions & 2 deletions apps/commune-validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ deployment:
JWT_SECRET:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: jwt_secret
POSTGRES_URL:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: community_validator_db_url
6 changes: 3 additions & 3 deletions apps/commune-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ deployment:
COMMUNITY_VALIDATOR_MNEMONIC:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: community_validator_mnemonic
POSTGRES_URL:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: community_validator_db_url
DAO_NOTIFIER_DISCORD_WEBHOOK_URL:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: dao_notifier_discord_webhook_url

additionalContainers:
Expand Down
13 changes: 13 additions & 0 deletions values-utils.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
staticSecret:
enabled: true
secrets:
commune-{{ .Values.environmentName }}-web-apps:
type: kv-v2
mount: commune_infra
path: '{{ .Values.environmentName }}_web_apps'
destination:
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
create: true
overwrite: true
refreshAfter: 30s
vaultAuthRef: 'commune-{{ .Values.environmentName }}-web-apps-commune-{{ .Values.environmentName }}-web-apps-default'
15 changes: 1 addition & 14 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deployment:
PINATA_JWT:
valueFrom:
secretKeyRef:
name: '{{ .Values.environmentName }}-web-apps-secret'
name: 'commune-{{ .Values.environmentName }}-web-apps-secret'
key: pinata_jwt

startupProbe:
Expand Down Expand Up @@ -88,16 +88,3 @@ configMap:
next_public_ws_url: "{{ .Values.wssApiEndpoint }}"
next_public_cache_provider_url: "{{ .Values.cacheUrl }}"

staticSecret:
enabled: true
secrets:
- name: web-apps
type: kv-v2
mount: commune_infra
path: '{{ .Values.environmentName }}_web_apps'
destination:
name: '{{ .Values.environmentName }}-web-apps-secret'
create: true
overwrite: true
refreshAfter: 30s
vaultAuthRef: 'commune-{{ .Values.environmentName }}-web-apps-commune-{{ .Values.environmentName }}-web-apps-default'

0 comments on commit 764dea8

Please sign in to comment.