Skip to content

Commit

Permalink
feat: code changes to make deployment strategy derive from values and…
Browse files Browse the repository at this point in the history
… also update to 48.6
  • Loading branch information
mishraomp authored Feb 20, 2024
1 parent 4a39b9f commit 10d8b70
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/nr-metabase/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.48.5
version: 0.48.6
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.48.5" # aligned with metabase version. ALso update the global values appversion, there is no way to pass to
appVersion: "v0.48.6" # aligned with metabase version. ALso update the global values appversion, there is no way to pass to
dependencies:
- name: database
condition: database.enabled
Expand Down
2 changes: 2 additions & 0 deletions charts/nr-metabase/charts/database/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
labels:
{{- include "database.labels" . | nindent 4 }}
spec:
strategy:
type: {{ .Values.deploymentStrategy }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/nr-metabase/templates/metabase/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
labels:
{{- include "metabase.labels" . | nindent 4 }}
spec:
strategy:
type: {{ .Values.metabase.deploymentStrategy }}
{{- if not .Values.metabase.autoscaling.enabled }}
replicas: {{ .Values.metabase.replicaCount }}
{{- end }}
Expand Down
11 changes: 10 additions & 1 deletion charts/nr-metabase/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
},
"metabase": {
"type": "object",
"additionalProperties": true,
"properties": {

"enabled": {
"type": "boolean",
"default": true
Expand All @@ -64,6 +66,10 @@
"minimum": 0,
"default": 1
},
"deploymentStrategy":{
"type": "string"
},

"nameOverride": {
"type": "string"
},
Expand Down Expand Up @@ -172,8 +178,11 @@
},
"affinity": {
"type": "object"
}
},
"additionalItems": true

}

},
"database": {
"type": "object",
Expand Down
8 changes: 7 additions & 1 deletion charts/nr-metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ metabase:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
deploymentStrategy: Recreate
image:
repository: ghcr.io/bcgov/nr-metabase/metabase
pullPolicy: Always
# this is for renovate give updated image alert.
tag: 0.48.5
tag: 0.48.6
# the below is for renovate to keep pushing PRs, so that it keeps getting updated.
metabaseImage:
repository: metabase/metabase
tag: v0.48.6
containerPort: 3000
environment: production
service:
Expand Down Expand Up @@ -49,6 +54,7 @@ database:
replicaCount: 1
nameOverride: ""
fullnameOverride: ""
deploymentStrategy: Recreate
image:
repository: ghcr.io/bcgov/nr-containers/postgres
pullPolicy: Always
Expand Down

0 comments on commit 10d8b70

Please sign in to comment.