This example assumes the BusinessEvents project has defined a Global Variable group named 'HTTP', and added a Global Variable under that group, named 'HTTP_PORT'.
The default value for 'HTTP/HTTP_PORT' (8108) may be overridden in your Kubernetes deployment
*.yaml configuration as follows:
apiVersion: apps/v1 kind: Deployment metadata: name: "beinferenceagent" spec: replicas: 1 selector: matchLabels: name: "beinferenceagent" template: metadata: labels: name: "beinferenceagent" spec: containers: - name: "beinferenceagent-container" image: "fd:6.2.1" env: - name: PU value: "default" - name: HTTP_gv_HTTP_PORT valueFrom: configMapKeyRef: name: my-configmap key: http_port resources: requests: memory: 700Mi
Here, we are specifying the Global Variable name in the
containers --> env section using the
_gv_ separator token, as discussed in the
be-tools wiki. The value is set in a separate ConfigMap named 'my-configmap' using the key named 'http_port'.
The Configmap
*.yaml configuration is as follows:
apiVersion: apps/v1 kind: Configmap: enabled: true name: my-configmap data: http_port=8222