Skip to content

Commit

Permalink
Merge branch 'main' into buxFix
Browse files Browse the repository at this point in the history
  • Loading branch information
drkfmorton authored Dec 9, 2022
2 parents dc0ee3e + 5002ffd commit 5b84e7a
Show file tree
Hide file tree
Showing 45 changed files with 1,480 additions and 24 deletions.
10 changes: 10 additions & 0 deletions deployment/helm/templates/configmaps/as-common-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: as-common-variables
data:
DATABASE_HOST: edgex-redis
{{- if (eq .Values.edgex.features.messagebusbackend "redis") }}
TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST: edgex-redis
TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST: edgex-redis
{{- end}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: device-common-variables
data:
{{- if (eq .Values.edgex.features.messagebusbackend "redis") }}
MESSAGEQUEUE_HOST: edgex-redis
{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ data:
CLIENTS_CORE_COMMAND_HOST: {{.Values.edgex.app.core.command}}
CLIENTS_SUPPORT_NOTIFICATIONS_HOST: {{.Values.edgex.app.support.notifications}}
CLIENTS_SUPPORT_SCHEDULER_HOST: {{.Values.edgex.app.support.scheduler}}
MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}}
REGISTRY_HOST: {{.Values.edgex.app.consul}}
DATABASES_PRIMARY_HOST: {{.Values.edgex.app.redis}}
{{- if (eq .Values.edgex.features.messagebusbackend "redis") }}
MESSAGEQUEUE_HOST: {{.Values.edgex.app.redis}}
{{- end}}
{{- if .Values.edgex.security.enabled }}
EDGEX_SECURITY_SECRET_STORE: "true"
SECRETSTORE_HOST: edgex-vault
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}}
name: {{.Values.edgex.app.appservice.externalmqtttrigger}}
spec:
replicas: {{.Values.edgex.replicas.appservice.externalmqtttrigger}}
selector:
matchLabels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}}
strategy: {}
template:
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}}
spec:
{{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}}
topologyKey: "kubernetes.io/hostname"
{{- end}}
automountServiceAccountToken: false
containers:
- name: {{.Values.edgex.app.appservice.externalmqtttrigger}}
image: {{.Values.edgex.image.appservice.externalmqtttrigger.repository}}:{{.Values.edgex.image.appservice.externalmqtttrigger.tag}}
imagePullPolicy: {{.Values.edgex.image.appservice.externalmqtttrigger.pullPolicy}}
{{- if .Values.edgex.security.enabled }}
command: ["/edgex-init/ready_to_run_wait_install.sh"]
args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"]
{{- end}}
ports:
- containerPort: {{.Values.edgex.port.appservice.externalmqtttrigger}}
{{- if not .Values.edgex.security.enabled }}
hostPort: {{.Values.edgex.port.appservice.externalmqtttrigger}}
hostIP: {{.Values.edgex.hostPortInternalBind}}
{{- end}}
envFrom:
- configMapRef:
name: edgex-common-variables
env:
- name: EDGEX_PROFILE
value: "external-mqtt-trigger"
- name: SERVICE_HOST
value: {{.Values.edgex.app.appservice.externalmqtttrigger}}
- name: WRITABLE_LOGLEVEL
value: INFO
{{- if (eq .Values.edgex.features.messagebusbackend "redis") }}
- name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST
value: {{.Values.edgex.app.redis}}
- name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST
value: {{.Values.edgex.app.redis}}
{{- end}}
{{- if (eq .Values.edgex.features.messagebusbackend "mqtt") }}
- name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_BROKERADDRESS
value: "{{.Values.edgex.features.mqttBrokerAddress}}"
- name: WRITABLE_PIPELINE_FUNCTIONS_MQTTEXPORT_PARAMETERS_TOPIC
value: edgex-export
- name: TRIGGER_EXTERNALMQTT_URL
value: "{{.Values.edgex.features.mqttBrokerAddress}}"
{{- end}}


securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
startupProbe:
httpGet:
path: /api/v2/ping
port: {{.Values.edgex.port.appservice.externalmqtttrigger}}
periodSeconds: 1
failureThreshold: 120
livenessProbe:
httpGet:
path: /api/v2/ping
port: {{.Values.edgex.port.appservice.externalmqtttrigger}}
{{- if .Values.edgex.security.enabled }}
volumeMounts:
- mountPath: /edgex-init
name: edgex-init
- mountPath: /tmp/edgex/secrets
name: edgex-secrets
{{- end }}
{{- if .Values.edgex.resources.appservice.externalmqtttrigger.enforceLimits }}
resources:
limits:
memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.memory }}
cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.limits.cpu }}
requests:
memory: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.memory }}
cpu: {{ .Values.edgex.resources.appservice.externalmqtttrigger.requests.cpu }}
{{- end}}
hostname: {{.Values.edgex.app.appservice.externalmqtttrigger}}
restartPolicy: Always
securityContext:
runAsNonRoot: true
runAsUser: {{ .Values.edgex.security.runAsUser }}
runAsGroup: {{ .Values.edgex.security.runAsGroup }}
{{- if .Values.edgex.security.enabled }}
volumes:
- name: edgex-init
persistentVolumeClaim:
claimName: edgex-init
- name: edgex-secrets
persistentVolumeClaim:
claimName: edgex-secrets
{{- end}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
apiVersion: v1
kind: Service
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}}
name: {{.Values.edgex.app.appservice.externalmqtttrigger}}
spec:
ports:
- name: "http"
port: {{.Values.edgex.port.appservice.externalmqtttrigger}}
selector:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.externalmqtttrigger}}
type: {{.Values.expose.type}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}}
name: {{.Values.edgex.app.appservice.httpexport}}
spec:
replicas: {{.Values.edgex.replicas.appservice.httpexport}}
selector:
matchLabels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}}
strategy:
type: Recreate
template:
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}}
spec:
{{- if and (eq .Values.edgex.security.enabled true) (or (eq .Values.edgex.storage.sharedVolumesAccessMode "ReadWriteOnce") (eq .Values.edgex.storage.useHostPath true))}}
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
org.edgexfoundry.service: {{ .Values.edgex.app.secretstoresetup}}
topologyKey: "kubernetes.io/hostname"
{{- end}}
automountServiceAccountToken: false
containers:
- name: {{.Values.edgex.app.appservice.httpexport}}
image: {{.Values.edgex.image.appservice.httpexport.repository}}:{{.Values.edgex.image.appservice.httpexport.tag}}
imagePullPolicy: {{.Values.edgex.image.appservice.httpexport.pullPolicy}}
{{- if .Values.edgex.security.enabled }}
command: ["/edgex-init/ready_to_run_wait_install.sh"]
args: ["/app-service-configurable", "-cp=consul.http://edgex-core-consul:8500", "--registry", "--confdir=/res"]
{{- end}}
ports:
- containerPort: {{.Values.edgex.port.appservice.httpexport}}
{{- if not .Values.edgex.security.enabled }}
hostPort: {{.Values.edgex.port.appservice.httpexport}}
hostIP: {{.Values.edgex.hostPortInternalBind}}
{{- end}}
env:
- name: EDGEX_PROFILE
value: "http-export"
- name: SERVICE_HOST
value: {{.Values.edgex.app.appservice.httpexport}}
{{- if (eq .Values.edgex.features.messagebusbackend "redis") }}
- name: TRIGGER_EDGEXMESSAGEBUS_PUBLISHHOST_HOST
value: {{.Values.edgex.app.redis}}
- name: TRIGGER_EDGEXMESSAGEBUS_SUBSCRIBEHOST_HOST
value: {{.Values.edgex.app.redis}}
{{- end}}
{{- if (eq .Values.edgex.features.messagebusbackend "nats") }}
- name: WRITABLE_PIPELINE_FUNCTIONS_HTTPEXPORT_PARAMETERS_URL
value: "{{.Values.edgex.features.httpExportURL}}"
- name: WRITABLE_LOGLEVEL
value: INFO
{{- end}}
envFrom:
- configMapRef:
name: edgex-common-variables
- configMapRef:
name: as-common-variables
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
startupProbe:
httpGet:
path: /api/v2/ping
port: {{.Values.edgex.port.appservice.httpexport}}
periodSeconds: 1
failureThreshold: 120
livenessProbe:
httpGet:
path: /api/v2/ping
port: {{.Values.edgex.port.appservice.httpexport}}
{{- if .Values.edgex.security.enabled }}
volumeMounts:
- mountPath: /edgex-init
name: edgex-init
- mountPath: /tmp/edgex/secrets
name: edgex-secrets
{{- end }}
{{- if .Values.edgex.resources.appservice.httpexport.enforceLimits }}
resources:
limits:
memory: {{ .Values.edgex.resources.appservice.httpexport.limits.memory }}
cpu: {{ .Values.edgex.resources.appservice.httpexport.limits.cpu }}
requests:
memory: {{ .Values.edgex.resources.appservice.httpexport.requests.memory }}
cpu: {{ .Values.edgex.resources.appservice.httpexport.requests.cpu }}
{{- end}}
hostname: {{.Values.edgex.app.appservice.httpexport}}
restartPolicy: Always
securityContext:
runAsNonRoot: true
runAsUser: {{ .Values.edgex.security.runAsUser }}
runAsGroup: {{ .Values.edgex.security.runAsGroup }}
{{- if .Values.edgex.security.enabled }}
volumes:
- name: edgex-init
persistentVolumeClaim:
claimName: edgex-init
- name: edgex-secrets
persistentVolumeClaim:
claimName: edgex-secrets
{{- end}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
apiVersion: v1
kind: Service
metadata:
labels:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}}
name: {{.Values.edgex.app.appservice.httpexport}}
spec:
ports:
- name: "{{.Values.edgex.port.appservice.httpexport}}"
port: {{.Values.edgex.port.appservice.httpexport}}
selector:
org.edgexfoundry.service: {{.Values.edgex.app.appservice.httpexport}}
type: {{.Values.expose.type}}

Loading

0 comments on commit 5b84e7a

Please sign in to comment.