generated from edgexfoundry-holding/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kyle Morton <[email protected]> Signed-off-by: Kyle Morton <[email protected]> Co-authored-by: Kyle Morton <[email protected]>
- Loading branch information
1 parent
d1db7a9
commit ae28201
Showing
34 changed files
with
486 additions
and
6 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
deployment/helm/templates/configmaps/as-common-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
8 changes: 8 additions & 0 deletions
8
deployment/helm/templates/configmaps/device-common-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 115 additions & 0 deletions
115
...templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "edgex-app-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}} |
17 changes: 17 additions & 0 deletions
17
...lm/templates/edgex-app-external-mqtt-trigger/edgex-app-external-mqtt-trigger-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.