Chg: switch to a single servie and disable ingress usage by default

This commit is contained in:
Dmitry Dunaev
2021-06-23 13:15:46 +03:00
parent 754d1e35e8
commit c3ec4f0097
2 changed files with 25 additions and 27 deletions

View File

@@ -17,10 +17,7 @@ spec:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ include "ucentralgw.name" . }} app.kubernetes.io/name: {{ include "ucentralgw.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.services.ucentralgwl4.labels }} {{- with .Values.services.ucentralgw.labels }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.services.ucentralgwl7.labels }}
{{- toYaml . | nindent 6 }} {{- toYaml . | nindent 6 }}
{{- end }} {{- end }}
template: template:
@@ -28,10 +25,7 @@ spec:
labels: labels:
app.kubernetes.io/name: {{ include "ucentralgw.name" . }} app.kubernetes.io/name: {{ include "ucentralgw.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.services.ucentralgwl4.labels }} {{- with .Values.services.ucentralgw.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.services.ucentralgwl7.labels }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
@@ -42,6 +36,10 @@ spec:
image: "{{ .Values.images.ucentralgw.repository }}:{{ .Values.images.ucentralgw.tag }}" image: "{{ .Values.images.ucentralgw.repository }}:{{ .Values.images.ucentralgw.tag }}"
imagePullPolicy: {{ .Values.images.ucentralgw.pullPolicy }} imagePullPolicy: {{ .Values.images.ucentralgw.pullPolicy }}
command:
- /ucentral/ucentralgw
- --file=/ucentral-data/ucentral.properties
env: env:
- name: KUBERNETES_DEPLOYED - name: KUBERNETES_DEPLOYED
value: "{{ now }}" value: "{{ now }}"
@@ -58,12 +56,7 @@ spec:
{{- end }} {{- end }}
ports: ports:
{{- range $port, $portValue := .Values.services.ucentralgwl4.ports }} {{- range $port, $portValue := .Values.services.ucentralgw.ports }}
- name: {{ $port }}
containerPort: {{ $portValue.targetPort }}
protocol: {{ $portValue.protocol }}
{{- end }}
{{- range $port, $portValue := .Values.services.ucentralgwl7.ports }}
- name: {{ $port }} - name: {{ $port }}
containerPort: {{ $portValue.targetPort }} containerPort: {{ $portValue.targetPort }}
protocol: {{ $portValue.protocol }} protocol: {{ $portValue.protocol }}

View File

@@ -16,15 +16,13 @@ images:
# password: password # password: password
services: services:
ucentralgwl4: ucentralgw:
type: ClusterIP type: LoadBalancer
ports: ports:
websocket: websocket:
servicePort: 15002 servicePort: 15002
targetPort: 15002 targetPort: 15002
protocol: TCP protocol: TCP
ucentralgwl7:
type: NodePort
ports: ports:
restapi: restapi:
servicePort: 16001 servicePort: 16001
@@ -48,7 +46,7 @@ checks:
ingresses: ingresses:
restapi: restapi:
enabled: true enabled: false
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
@@ -56,10 +54,10 @@ ingresses:
- restapi.chart-example.local - restapi.chart-example.local
paths: paths:
- path: / - path: /
serviceName: ucentralgwl7 serviceName: ucentralgw
servicePort: restapi servicePort: restapi
fileuploader: fileuploader:
enabled: true enabled: false
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
@@ -67,7 +65,7 @@ ingresses:
- fileuploader.chart-example.local - fileuploader.chart-example.local
paths: paths:
- path: / - path: /
serviceName: ucentralgwl7 serviceName: ucentralgw
servicePort: fileuploader servicePort: fileuploader
volumes: volumes:
@@ -212,14 +210,18 @@ config: |
# #
# NLB Support # NLB Support
# #
nlb.enable = true alb.enable = true
nlb.port = 15015 alb.port = 15015
oui.download.uri = https://linuxnet.ca/ieee/oui.txt
# #
# Kafka # Kafka
# #
ucentral.kafka.enable = false ucentral.kafka.enable = false
ucentral.kafka.brokerlist = 127.0.0.1:9092 ucentral.kafka.brokerlist = 127.0.0.1:9092
ucentral.kafka.auto.commit = false
ucentral.kafka.queue.buffering.max.ms = 50
# #
# This section select which form of persistence you need # This section select which form of persistence you need
@@ -231,7 +233,7 @@ config: |
#storage.type = mysql #storage.type = mysql
#storage.type = odbc #storage.type = odbc
storage.type.sqlite.db = /ucentral-data/persist/devices.db storage.type.sqlite.db = devices.db
storage.type.sqlite.idletime = 120 storage.type.sqlite.idletime = 120
storage.type.sqlite.maxsessions = 128 storage.type.sqlite.maxsessions = 128
@@ -258,7 +260,7 @@ config: |
# #
authentication.enabled = true authentication.enabled = true
authentication.default.username = tip@ucentral.com authentication.default.username = tip@ucentral.com
authentication.default.password = openwifi authentication.default.password = 13268b7daa751240369d125e79c873bd8dd3bef7981bdfd38ea03dbb1fbe7dcf
authentication.default.access = master authentication.default.access = master
authentication.service.type = internal authentication.service.type = internal
@@ -291,11 +293,14 @@ config: |
logging.formatters.f1.times = UTC logging.formatters.f1.times = UTC
logging.channels.c1.class = ConsoleChannel logging.channels.c1.class = ConsoleChannel
logging.channels.c1.formatter = f1 logging.channels.c1.formatter = f1
logging.channels.c2.class = FileChannel
# This is where the logs will be written. This path MUST exist # This is where the logs will be written. This path MUST exist
logging.channels.c2.class = FileChannel
logging.channels.c2.path = /dev/stdout logging.channels.c2.path = /dev/stdout
logging.channels.c2.formatter.class = PatternFormatter logging.channels.c2.formatter.class = PatternFormatter
logging.channels.c2.formatter.pattern = %Y-%m-%d %H:%M:%S %s: [%p] %t logging.channels.c2.formatter.pattern = %Y-%m-%d %H:%M:%S %s: [%p] %t
logging.channels.c2.rotation = 20 M
logging.channels.c2.archive = timestamp
logging.channels.c2.purgeCount = 20
logging.channels.c3.class = ConsoleChannel logging.channels.c3.class = ConsoleChannel
logging.channels.c3.pattern = %s: [%p] %t logging.channels.c3.pattern = %s: [%p] %t
# External Channel # External Channel