Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions kubernetes/charts/Chart.yaml → charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
apiVersion: v2
name: Chart to install MPS, RPS and Backend db
description: A Helm chart for Kubernetes
name: console
description: Helm chart for Device Management Toolkit (Console) — cloud or on-prem

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -22,7 +22,7 @@ version: 1.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.4.0
appVersion: 1.24.3

dependencies:
- name: vault
Expand All @@ -32,3 +32,4 @@ dependencies:
- name: kong
version: "^3.0.2"
repository: https://charts.konghq.com
condition: kong.enabled
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
{{- if .Values.console.enabled }}
apiVersion: v1
kind: Service
metadata:
labels:
app: mps
name: mps
app: console
name: console
spec:
ports:
- port: 4433
Expand All @@ -19,28 +20,28 @@ spec:
protocol: TCP
targetPort: 3000
selector:
app: mps
app: console
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mps
name: console
namespace: default
spec:
replicas: {{ .Values.mps.replicaCount }}
replicas: {{ .Values.console.replicaCount }}
selector:
matchLabels:
app: mps
app: console
template:
metadata:
labels:
app: mps
app: console
spec:
imagePullSecrets:
- name: registrycredentials
containers:
- name: mps
image: {{ .Values.images.mps }}
- name: console
image: {{ .Values.images.console }}
readinessProbe:
httpGet:
path: /api/v1/health
Expand All @@ -49,54 +50,55 @@ spec:
timeoutSeconds: 12
failureThreshold: 3
env:
- name: "MPS_LOG_LEVEL"
value: "{{ .Values.mps.logLevel }}"
- name: "MPS_COMMON_NAME"
value: "{{ .Values.mps.commonName }}"
- name: "MPS_CONNECTION_STRING"
- name: "CONSOLE_HEADLESS"
value: "{{ .Values.console.headless }}"
- name: "CONSOLE_LOG_LEVEL"
value: "{{ .Values.console.logLevel }}"
- name: "CONSOLE_COMMON_NAME"
value: "{{ .Values.console.commonName }}"
- name: "CONSOLE_CONNECTION_STRING"
valueFrom:
secretKeyRef:
name: mps
name: console
key: connectionString
- name: "MPS_VAULT_ADDRESS"
- name: "CONSOLE_VAULT_ADDRESS"
value: "http://{{ .Release.Name }}-vault:8200"
- name: "MPS_SECRETS_PATH"
- name: "CONSOLE_SECRETS_PATH"
value: 'kv/data/'
- name: "MPS_PORT"
- name: "CONSOLE_PORT"
value: '4433'
- name: "MPS_INSTANCE_NAME"
- name: "CONSOLE_INSTANCE_NAME"
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: "MPS_JWT_EXPIRATION"
value: "{{ .Values.mps.jwtExpiration }}"
- name: "MPS_JWT_SECRET"
- name: "CONSOLE_JWT_SECRET"
valueFrom:
secretKeyRef:
name: device-mgmt-toolkit-admin-jwt
key: secret
- name: "MPS_JWT_ISSUER"
- name: "CONSOLE_JWT_ISSUER"
valueFrom:
secretKeyRef:
name: device-mgmt-toolkit-admin-jwt
key: key
- name: MPS_WEB_ADMIN_USER
- name: CONSOLE_WEB_ADMIN_USER
valueFrom:
secretKeyRef:
name: mpsweb
name: consoleweb
key: user
- name: MPS_WEB_ADMIN_PASSWORD
- name: CONSOLE_WEB_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: mpsweb
name: consoleweb
key: password
- name: MPS_VAULT_TOKEN
- name: CONSOLE_VAULT_TOKEN
valueFrom:
secretKeyRef:
name: vault
key: vaultKey
ports:
- containerPort: 3000
name: mps
name: webapi
- containerPort: 4433
name: mpsws
name: cira
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.kong.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -57,8 +58,8 @@ spec:
pathType: Exact
backend:
service:
name: mps
port:
name: console
port:
number: 3000
---
apiVersion: configuration.konghq.com/v1
Expand Down Expand Up @@ -152,7 +153,7 @@ spec:
rules:
- port: 4433
backend:
serviceName: mps
serviceName: console
servicePort: 4433
---
apiVersion: configuration.konghq.com/v1
Expand Down Expand Up @@ -188,3 +189,4 @@ metadata:
plugin: acl
config:
allow: ["device-mgmt-toolkit-admin"]
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
{{- if .Values.mpsrouter.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -61,4 +62,4 @@ spec:
ports:
- containerPort: 8003
name: mpsrouter
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
{{- if .Values.rps.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -75,3 +76,4 @@ spec:
name: rps
- containerPort: 8081
name: rpsweb
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
{{- if .Values.webui.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -50,7 +51,7 @@ kind: Deployment
metadata:
name: webui
spec:
replicas: {{ .Values.ui.replicaCount }}
replicas: {{ .Values.webui.replicaCount }}
selector:
matchLabels:
app: webui
Expand All @@ -77,9 +78,10 @@ spec:
subPath: nginx.conf
env:
- name: "MPS_SERVER"
value: "https://{{.Values.mps.commonName}}/mps"
value: "https://{{.Values.console.commonName}}/mps"
- name: "RPS_SERVER"
value: "https://{{.Values.mps.commonName}}/rps"
value: "https://{{.Values.console.commonName}}/rps"
ports:
- containerPort: 80
name: ui
name: ui
{{- end }}
22 changes: 22 additions & 0 deletions charts/values-cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#/*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
# Cloud overlay: headless Console + sample-web-ui + kong + mps-router.
# Use: helm install console ./charts -f ./charts/values-cloud.yaml

console:
headless: true

webui:
enabled: true

mpsrouter:
enabled: true

kong:
enabled: true

vault:
ui:
serviceType: "LoadBalancer"
18 changes: 18 additions & 0 deletions charts/values-onprem.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#/*********************************************************************
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
# On-prem overlay: Console with built-in UI; no sample-web-ui, no kong, no mps-router.
# Use: helm install console ./charts -f ./charts/values-onprem.yaml

console:
headless: false

webui:
enabled: false

mpsrouter:
enabled: false

kong:
enabled: false
44 changes: 27 additions & 17 deletions kubernetes/charts/values.yaml → charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@
# Copyright (c) Intel Corporation 2020
# SPDX-License-Identifier: Apache-2.0
#**********************************************************************/
# Default values for installServersChart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# Base values for the Console chart.
# Override per-flavor with values-cloud.yaml or values-onprem.yaml.

images:
mps: "intel/device-mgmt-toolkit-mps:latest"
console: "intel/device-mgmt-toolkit-console:latest"
rps: "intel/device-mgmt-toolkit-rps:latest"
webui: "intel/device-mgmt-toolkit-web-ui:latest"
mpsrouter: "intel/device-mgmt-toolkit-mps-router:latest"
mps:
commonName:
replicaCount: 1
logLevel: "silly"
jwtExpiration: 1440
ui:

console:
enabled: true
headless: false
commonName:
replicaCount: 1
logLevel: "info"

rps:
enabled: true
replicaCount: 1
logLevel: "info"

webui:
enabled: false
replicaCount: 1

mpsrouter:
enabled: false
replicaCount: 1
logLevel: "silly"

vault:
injector:
annotations:
Expand All @@ -32,11 +42,13 @@ vault:
annotations:
kuma.io/sidecar-injection: disabled
enabled: true
serviceType: "LoadBalancer"
kong:
serviceType: "ClusterIP"

kong:
enabled: false
podAnnotations:
kuma.io/sidecar-injection: enabled
kuma.io/gateway: enabled
kuma.io/sidecar-injection: enabled
kuma.io/gateway: enabled
env:
UPSTREAM_KEEPALIVE_POOL_SIZE: 0
proxy:
Expand All @@ -48,5 +60,3 @@ kong:
parameters: []
http:
enabled: false
mpsrouter:
replicaCount: 1
10 changes: 0 additions & 10 deletions kubernetes/config.json

This file was deleted.

Loading