mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-14 13:01:01 +00:00
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 }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
image: "{{ .Values.image.frontend.repository }}:{{ .Values.image.frontend.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.frontend.pullPolicy }}
|
||||
{{- if .Values.envVars.frontend }}
|
||||
env:
|
||||
{{- range $key, $val := .Values.envVars.frontend }}
|
||||
@@ -48,18 +48,20 @@ spec:
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
path: /
|
||||
port: http
|
||||
volumeMounts:
|
||||
- name: nginx
|
||||
mountPath: "/etc/nginx/nginx.conf"
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
readOnly: true
|
||||
- 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
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
|
||||
@@ -5,6 +5,6 @@ metadata:
|
||||
data:
|
||||
env-config.js: |
|
||||
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: "",
|
||||
}
|
||||
|
||||
@@ -10,21 +10,13 @@ data:
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name _;
|
||||
}
|
||||
|
||||
events {
|
||||
worker_connections 8000;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
include /etc/nginx/mime.types;
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
@@ -34,4 +26,16 @@ data:
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user