Skip to content

Commit

Permalink
refactored environment and port value
Browse files Browse the repository at this point in the history
  • Loading branch information
ironoa committed Jul 27, 2022
1 parent ed8fe81 commit 67ed1d0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/polkadot-watcher/templates/alertrules.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if and .Values.prometheusRules.enabled ( ne .Values.environment "ci" ) }}
{{ if and .Values.prometheusRules.enabled ( ne .Values.config.environment "ci" ) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down
6 changes: 3 additions & 3 deletions charts/polkadot-watcher/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ spec:
- /app/config/main.yaml
ports:
- name: metrics
containerPort: {{ .Values.port }}
containerPort: {{ .Values.config.port }}
livenessProbe:
httpGet:
path: /healthcheck
port: {{ .Values.port }}
port: {{ .Values.config.port }}
initialDelaySeconds: 10
timeoutSeconds: 200
{{ if ne .Values.environment "ci" }}
{{ if ne .Values.config.environment "ci" }}
resources:
{{- toYaml .Values.resources | nindent 10 }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/polkadot-watcher/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ metadata:
spec:
ports:
- name: metrics
port: {{ .Values.port }}
port: {{ .Values.config.port }}
selector:
app: {{ .Release.Name }}
2 changes: 1 addition & 1 deletion charts/polkadot-watcher/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if and .Values.serviceMonitor.enabled ( ne .Values.environment "ci" ) }}
{{ if and .Values.serviceMonitor.enabled ( ne .Values.config.environment "ci" ) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down
5 changes: 1 addition & 4 deletions charts/polkadot-watcher/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
environment: production
port: 3000

image:
repo: web3f/polkadot-watcher
# tag: latest
Expand All @@ -9,7 +6,7 @@ config:
endpoint: "wss://kusama-rpc.polkadot.io"
port: 3000
logLevel: info
environment: production #it is used to filter the prometheusrules, i.e. to avoid conflicts between production and staging
environment: production #it is used also to filter the prometheusrules, i.e. to avoid conflicts between production and staging
validators: []

serviceMonitor:
Expand Down
2 changes: 1 addition & 1 deletion scripts/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ main(){
fi

/scripts/build-helm.sh \
--set environment=ci \
--set config.environment=ci \
--set image.tag="${CIRCLE_SHA1}" \
polkadot-watcher \
./charts/polkadot-watcher
Expand Down

0 comments on commit 67ed1d0

Please sign in to comment.