mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-27 11:38:04 +00:00
Merge pull request #366 from arshamparity/helm
fixing helm chart issues
This commit is contained in:
@@ -0,0 +1,62 @@
|
|||||||
|
{{- if .Values.ingress.core.enabled -}}
|
||||||
|
{{- $fullName := include "substrate-telemetry.fullname" . -}}
|
||||||
|
{{- $svcPort := .Values.service.core.port -}}
|
||||||
|
{{- if and .Values.ingress.core.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||||
|
{{- if not (hasKey .Values.ingress.core.annotations "kubernetes.io/ingress.class") }}
|
||||||
|
{{- $_ := set .Values.ingress.core.annotations "kubernetes.io/ingress.class" .Values.ingress.core.className}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: telemetry-core
|
||||||
|
labels:
|
||||||
|
{{- include "substrate-telemetry.labels" . | nindent 4 }}
|
||||||
|
telemetry-component: core
|
||||||
|
{{- with .Values.ingress.core.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if and .Values.ingress.core.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||||
|
ingressClassName: {{ .Values.ingress.core.className }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.core.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.core.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.core.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ .path }}
|
||||||
|
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
|
{{- end }}
|
||||||
|
backend:
|
||||||
|
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||||
|
service:
|
||||||
|
name: telemetry-core
|
||||||
|
port:
|
||||||
|
number: {{ $svcPort }}
|
||||||
|
{{- else }}
|
||||||
|
serviceName: telemetry-core
|
||||||
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -33,8 +33,8 @@ spec:
|
|||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.image.frontend.repository }}:{{ .Values.image.frontend.tag | default .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.frontend.pullPolicy }}
|
||||||
{{- if .Values.envVars.frontend }}
|
{{- if .Values.envVars.frontend }}
|
||||||
env:
|
env:
|
||||||
{{- range $key, $val := .Values.envVars.frontend }}
|
{{- range $key, $val := .Values.envVars.frontend }}
|
||||||
@@ -48,18 +48,20 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /
|
||||||
port: http
|
port: http
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /
|
||||||
port: http
|
port: http
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
mountPath: "/etc/nginx/nginx.conf"
|
mountPath: /etc/nginx/nginx.conf
|
||||||
|
subPath: nginx.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: env-config
|
- name: env-config
|
||||||
mountPath: "/usr/share/nginx/html/env-config.js"
|
mountPath: /usr/share/nginx/html/env-config.js
|
||||||
|
subPath: env-config.js
|
||||||
readOnly: true
|
readOnly: true
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
env-config.js: |
|
env-config.js: |
|
||||||
window.process_env = {
|
window.process_env = {
|
||||||
SUBSTRATE_TELEMETRY_URL: "ws://feed.telemetry.parity-stg.parity.io/feed",
|
SUBSTRATE_TELEMETRY_URL: "wss://feed.telemetry.parity-stg.parity.io/feed",
|
||||||
SUBSTRATE_TELEMETRY_SAMPLE: "",
|
SUBSTRATE_TELEMETRY_SAMPLE: "",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,21 +10,13 @@ data:
|
|||||||
error_log /var/log/nginx/error.log warn;
|
error_log /var/log/nginx/error.log warn;
|
||||||
pid /var/run/nginx.pid;
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
server {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html;
|
|
||||||
listen 80;
|
|
||||||
listen [::]:80;
|
|
||||||
server_name _;
|
|
||||||
}
|
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 8000;
|
worker_connections 8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
@@ -34,4 +26,16 @@ data:
|
|||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
gzip on;
|
gzip on;
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
#server_tokens off;
|
||||||
|
|
||||||
|
server {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
listen 8000;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
location = /favicon.ico {
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+32
-28
@@ -12,12 +12,12 @@ image:
|
|||||||
repository: docker.io/parity/substrate-telemetry-backend
|
repository: docker.io/parity/substrate-telemetry-backend
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: master-b4117d3a
|
tag: f089ad17
|
||||||
frontend:
|
frontend:
|
||||||
repository: docker.io/parity/substrate-telemetry-frontend
|
repository: docker.io/parity/substrate-telemetry-frontend
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: master-b4117d3a
|
tag: f089ad17
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
@@ -26,8 +26,8 @@ fullnameOverride: ""
|
|||||||
envVars:
|
envVars:
|
||||||
shard: {}
|
shard: {}
|
||||||
core: {}
|
core: {}
|
||||||
frontend:
|
frontend: {}
|
||||||
SUBSTRATE_TELEMETRY_URL: telemetry-core
|
|
||||||
|
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
@@ -60,13 +60,13 @@ service:
|
|||||||
annotations:
|
annotations:
|
||||||
external-dns.alpha.kubernetes.io/hostname: submit.telemetry.parity-stg.parity.io.
|
external-dns.alpha.kubernetes.io/hostname: submit.telemetry.parity-stg.parity.io.
|
||||||
core:
|
core:
|
||||||
type: LoadBalancer
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8000
|
targetPort: 8000
|
||||||
annotations:
|
annotations: {}
|
||||||
cloud.google.com/load-balancer-type: Internal
|
# cloud.google.com/load-balancer-type: Internal
|
||||||
networking.gke.io/internal-load-balancer-allow-global-access: "true"
|
# networking.gke.io/internal-load-balancer-allow-global-access: "true"
|
||||||
external-dns.alpha.kubernetes.io/hostname: feed.telemetry.parity-stg.parity.io.
|
# external-dns.alpha.kubernetes.io/hostname: feed.telemetry.parity-stg.parity.io.
|
||||||
frontend:
|
frontend:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
@@ -90,28 +90,32 @@ ingress:
|
|||||||
# hosts:
|
# hosts:
|
||||||
# - chart-example.local
|
# - chart-example.local
|
||||||
core:
|
core:
|
||||||
enabled: false
|
|
||||||
className: ""
|
|
||||||
annotations: {}
|
|
||||||
# kubernetes.io/ingress.class: nginx
|
|
||||||
# kubernetes.io/tls-acme: "true"
|
|
||||||
hosts:
|
|
||||||
- host: chart-example.local
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: ImplementationSpecific
|
|
||||||
tls: []
|
|
||||||
# - secretName: chart-example-tls
|
|
||||||
# hosts:
|
|
||||||
# - chart-example.local
|
|
||||||
frontend:
|
|
||||||
enabled: true
|
enabled: true
|
||||||
className: "traefik-internal"
|
className: ""
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: traefik-internal
|
kubernetes.io/ingress.class: traefik-internal
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-dns01
|
cert-manager.io/cluster-issuer: letsencrypt-dns01
|
||||||
external-dns.alpha.kubernetes.io/target: traefik-internal.parity-stg.parity.io.
|
external-dns.alpha.kubernetes.io/target: traefik-internal.parity-stg.parity.io.
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
hosts:
|
||||||
|
- host: feed.telemetry.parity-stg.parity.io
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
tls:
|
||||||
|
- secretName: feed.telemetry.parity-stg.parity.io
|
||||||
|
hosts:
|
||||||
|
- feed.telemetry.parity-stg.parity.io
|
||||||
|
frontend:
|
||||||
|
enabled: true
|
||||||
|
#className: "traefik-internal"
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-internal
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-dns01
|
||||||
|
external-dns.alpha.kubernetes.io/target: traefik-internal.parity-stg.parity.io.
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
hosts:
|
hosts:
|
||||||
- host: telemetry.parity-stg.parity.io
|
- host: telemetry.parity-stg.parity.io
|
||||||
paths:
|
paths:
|
||||||
@@ -139,7 +143,7 @@ resources: {}
|
|||||||
autoscaling:
|
autoscaling:
|
||||||
shard:
|
shard:
|
||||||
enabled: true
|
enabled: true
|
||||||
minReplicas: 3
|
minReplicas: 2
|
||||||
maxReplicas: 6
|
maxReplicas: 6
|
||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
targetMemoryUtilizationPercentage: 80
|
targetMemoryUtilizationPercentage: 80
|
||||||
@@ -151,8 +155,8 @@ autoscaling:
|
|||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
targetMemoryUtilizationPercentage: 80
|
targetMemoryUtilizationPercentage: 80
|
||||||
frontend:
|
frontend:
|
||||||
enabled: true
|
enabled: false
|
||||||
minReplicas: 3
|
minReplicas: 1
|
||||||
maxReplicas: 6
|
maxReplicas: 6
|
||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
targetMemoryUtilizationPercentage: 80
|
targetMemoryUtilizationPercentage: 80
|
||||||
|
|||||||
Reference in New Issue
Block a user