Configure secret references for the configurations defined in micro-gw.conf file in Kubernetes— WSO2 Micro Gateway

Implementation

[listenerConfig]
...
httpPort = 9090
...
apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
port: ODAwMA==
kubectl apply -f file-path/secret.yaml
[kubernetes]
[kubernetes.kubernetesDeployment]
enable = true
...
env = '{ "listenerConfig_httpPort": {secretKeyRef: {key: "port",name: "test-secret"}} }'
micro-gw build k8s_project --deployment-config deployment.toml
...
spec:
containers:
- env:
- name: "listenerConfig_httpPort"
valueFrom:
secretKeyRef:
key: "port"
name: "test-secret"
- name: "CONFIG_FILE"
value: "/home/ballerina/conf/ballerina.conf"
...

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store