This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongodb-proxy-external | |
spec: | |
type: LoadBalancer | |
selector: | |
app: haproxy | |
ports: | |
- port: 9291 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongodb-proxy | |
spec: | |
type: ClusterIP | |
selector: | |
app: haproxy | |
ports: | |
- port: 9292 |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: haproxy | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: haproxy | |
template: |
This file contains hidden or 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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: haproxy-config | |
data: | |
haproxy.cfg: | | |
global | |
log stdout format raw local0 | |
maxconn 5000 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mongodb-service | |
namespace: mongo-namespace | |
labels: | |
app: mongodb | |
spec: | |
ports: | |
- port: 27017 |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: mongodb | |
namespace: mongo-namespace | |
spec: | |
serviceName: "mongodb-service" | |
replicas: 3 | |
selector: | |
matchLabels: |
This file contains hidden or 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
kind: StorageClass | |
apiVersion: storage.k8s.io/v1 | |
metadata: | |
name: storageclass-azure-disk | |
provisioner: disk.csi.azure.com | |
parameters: | |
skuname: Standard_LRS | |
allowVolumeExpansion: true | |
reclaimPolicy: Retain | |
volumeBindingMode: Immediate |
This file contains hidden or 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: mongodb-credentials | |
type: Opaque | |
data: | |
username: YWRtaW4= # base64 encoded username (admin) | |
password: ZGVtbw== # base64 encoded password (demo) |
This file contains hidden or 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
name: deploy-env1 | |
on: | |
push: | |
branches: [ "env1" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 |
This file contains hidden or 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
require('dotenv').config(); | |
const envName = process.env.ENV_NAME || 'env1'; | |
const config = { | |
...process.env, | |
... { | |
keyname: `${process.env[`secret_demoapp_${envName}_KEYNAME`]}`, | |
keyname2: `${process.env[`secret_demoapp_${envName}_KEYNAME2`]}`, | |
} | |
}; | |
module.exports = config; |
NewerOlder