Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
camba1 committed Apr 10, 2021
1 parent a21f11e commit 1ce02e0
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
PG_EXPORTER_AUTO_DISCOVER_DATABASES: "true"
kind: ConfigMap
metadata:
labels:
io.kompose.service: pgdbexporter-docker-compose-env
name: pgdbexporter-docker-compose-env
6 changes: 6 additions & 0 deletions cicd/K8s/dbsAndBroker/pgdbexporter-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
data:
DATA_SOURCE_NAME: cG9zdGdyZXNxbDovL3Bvc3RncmVzOlRlc3REQkBob21lMkBsb2NhbGhvc3QvP2FwcGxpY2F0aW9uX25hbWU9cGdkYmV4cG9ydGVyJnNzbG1vZGU9ZGlzYWJsZQ==
kind: Secret
metadata:
name: pgdbexporter-secret
6 changes: 6 additions & 0 deletions cicd/K8s/dbsAndBroker/redisexporter-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
data:
REDIS_ADDR: cmVkaXM6Ly86VGVzdERCQGhvbWUyQGxvY2FsaG9zdDo2Mzc5
kind: Secret
metadata:
name: redisexporter-secret
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
data:
PG_EXPORTER_AUTO_DISCOVER_DATABASES: "true"
kind: ConfigMap
metadata:
labels:
io.kompose.service: timescaledbexporter-docker-compose-env
name: timescaledbexporter-docker-compose-env
6 changes: 6 additions & 0 deletions cicd/K8s/dbsAndBroker/timescaledbexporter-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
data:
DATA_SOURCE_NAME: cG9zdGdyZXNxbDovL3Bvc3RncmVzOlRlc3REQkBob21lMkBsb2NhbGhvc3QvcG9zdGdyZXM/YXBwbGljYXRpb25fbmFtZT10aW1lc2NhbGVleHBvcnRlciZzc2xtb2RlPWRpc2FibGU=
kind: Secret
metadata:
name: timescaledbexporter-secret
5 changes: 5 additions & 0 deletions cicd/K8s/microservicesPatch/audit-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spec:
ports:
- name: "2115"
port: 2115
targetPort: 2115
5 changes: 5 additions & 0 deletions cicd/K8s/microservicesPatch/customer-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spec:
ports:
- name: "2112"
port: 2112
targetPort: 2112
5 changes: 5 additions & 0 deletions cicd/K8s/microservicesPatch/product-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spec:
ports:
- name: "2113"
port: 2113
targetPort: 2113
5 changes: 5 additions & 0 deletions cicd/K8s/microservicesPatch/promotion-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spec:
ports:
- name: "2114"
port: 2114
targetPort: 2114
5 changes: 5 additions & 0 deletions cicd/K8s/microservicesPatch/user-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
spec:
ports:
- name: "2111"
port: 2111
targetPort: 2111
41 changes: 41 additions & 0 deletions cicd/K8s/monitoring/prometheus-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yml
kompose.version: 1.21.0 ()
labels:
io.kompose.service: prometheus
name: prometheus
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: prometheus
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yml
kompose.version: 1.21.0 ()
labels:
io.kompose.service: prometheus
spec:
containers:
- image: prom/prometheus
imagePullPolicy: ""
name: prometheus
ports:
- containerPort: 9090
resources: {}
volumeMounts:
- mountPath: /etc/prometheus
name: prometheus-prometheusyml-configmap
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: prometheus-prometheusyml-configmap
configMap:
name: prometheus-prometheusyml-configmap
#
54 changes: 54 additions & 0 deletions cicd/K8s/monitoring/prometheus-prometheusyml-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: v1
data:
prometheus.yml: |-
global:
scrape_interval: 15s
evaluation_interval: 30s
# scrape_timeout is set to the global default (10s).
external_labels:
appname: gotemp
scrape_configs:
- job_name: arangodb
metrics_path: /_admin/metrics
basic_auth:
username: root
password: TestDB@home2
static_configs:
- targets:
[arangodb:8529]
- job_name: pgdbexporter
static_configs:
- targets: [pgdb:9187]
labels:
gtsource: postgres
- job_name: redisexporter
static_configs:
- targets: [redis:9121]
- job_name: natsexporter
static_configs:
- targets: [nats:7777]
- job_name: timescaleexporter
static_configs:
- targets: [ timescaledb:9187 ]
labels:
gtsource: timescale
- job_name: auditsrv
static_configs:
- targets: [ audit:2115 ]
- job_name: customersrv
static_configs:
- targets: [ customer:2112 ]
- job_name: productsrv
static_configs:
- targets: [ product:2113 ]
- job_name: promotionsrv
static_configs:
- targets: [ promotion:2114 ]
- job_name: usersrv
static_configs:
- targets: [ user:2111 ]
kind: ConfigMap
metadata:
name: prometheus-prometheusyml-configmap
17 changes: 17 additions & 0 deletions cicd/K8s/monitoring/prometheus-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f ../docker-compose.yml
kompose.version: 1.21.0 ()
labels:
io.kompose.service: prometheus
name: prometheus
spec:
ports:
- name: "9090"
port: 9090
targetPort: 9090
selector:
io.kompose.service: prometheus
type: NodePort

0 comments on commit 1ce02e0

Please sign in to comment.