3 changed files with 144 additions and 2 deletions
@ -0,0 +1,142 @@ |
|||||
|
# Deployment description |
||||
|
apiVersion: apps/v1 |
||||
|
kind: Deployment |
||||
|
metadata: |
||||
|
name: pgwatch2-deployment |
||||
|
namespace: infra-environment |
||||
|
labels: |
||||
|
app: pgwatch2 |
||||
|
spec: |
||||
|
strategy: |
||||
|
type: Recreate |
||||
|
replicas: 1 |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: pgwatch2 |
||||
|
template: |
||||
|
metadata: |
||||
|
labels: |
||||
|
app: pgwatch2 |
||||
|
spec: |
||||
|
containers: |
||||
|
- name: pgwatch2 |
||||
|
image: cybertec/pgwatch2-postgres:1.8.5 |
||||
|
imagePullPolicy: Always |
||||
|
resources: |
||||
|
requests: |
||||
|
memory: "256Mi" |
||||
|
cpu: "100m" |
||||
|
limits: |
||||
|
memory: "512Mi" |
||||
|
cpu: "4" |
||||
|
ports: |
||||
|
- containerPort: 8080 |
||||
|
name: pgwatch2-http |
||||
|
protocol: TCP |
||||
|
- containerPort: 3000 |
||||
|
name: grafana-http |
||||
|
protocol: TCP |
||||
|
volumeMounts: |
||||
|
- mountPath: /var/lib/grafana |
||||
|
name: pgwatch2-pv-dev |
||||
|
- mountPath: /pgwatch2/persistent-config |
||||
|
name: pgwatch2-pv-dev |
||||
|
- mountPath: /var/lib/postgresql |
||||
|
name: pgwatch2-pv-dev |
||||
|
volumes: |
||||
|
- name: pgwatch2-pv-dev |
||||
|
persistentVolumeClaim: |
||||
|
claimName: pgwatch2-pvc-dev |
||||
|
|
||||
|
|
||||
|
# --- |
||||
|
# apiVersion: v1 |
||||
|
# kind: ConfigMap |
||||
|
# metadata: |
||||
|
# namespace: infra-environment |
||||
|
# name: pgwatch2-backend-conf |
||||
|
# labels: |
||||
|
# app: pgwatch2 |
||||
|
# data: |
||||
|
# DB_CONNECTION: "pgsql" |
||||
|
--- |
||||
|
|
||||
|
# Persistent Volume Claim description |
||||
|
apiVersion: v1 |
||||
|
kind: PersistentVolumeClaim |
||||
|
metadata: |
||||
|
name: pgwatch2-pvc-dev |
||||
|
namespace: infra-environment |
||||
|
labels: |
||||
|
app: pgwatch2 |
||||
|
spec: |
||||
|
storageClassName: longhorn |
||||
|
accessModes: |
||||
|
- ReadWriteOnce |
||||
|
resources: |
||||
|
requests: |
||||
|
storage: 512Mi |
||||
|
--- |
||||
|
|
||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
name: pgwatch2-service |
||||
|
namespace: infra-environment |
||||
|
spec: |
||||
|
selector: |
||||
|
app: pgwatch2 |
||||
|
ports: |
||||
|
- name: pgwatch2-http |
||||
|
port: 8080 |
||||
|
targetPort: pgwatch2-http |
||||
|
type: NodePort |
||||
|
--- |
||||
|
|
||||
|
apiVersion: v1 |
||||
|
kind: Service |
||||
|
metadata: |
||||
|
name: pgwatch2-grafana-service |
||||
|
namespace: infra-environment |
||||
|
spec: |
||||
|
selector: |
||||
|
app: pgwatch2 |
||||
|
ports: |
||||
|
- name: grafana-http |
||||
|
port: 3000 |
||||
|
targetPort: grafana-http |
||||
|
type: NodePort |
||||
|
|
||||
|
--- |
||||
|
|
||||
|
# Ingress description |
||||
|
apiVersion: networking.k8s.io/v1 |
||||
|
kind: Ingress |
||||
|
metadata: |
||||
|
name: pgwatch2-ingress |
||||
|
namespace: infra-environment |
||||
|
annotations: |
||||
|
kubernetes.io/ingress.class: "traefik" |
||||
|
spec: |
||||
|
rules: |
||||
|
- host: pgwatch2.k3s.semapp.lan |
||||
|
http: |
||||
|
paths: |
||||
|
- backend: |
||||
|
service: |
||||
|
name: pgwatch2-service |
||||
|
port: |
||||
|
number: 8080 |
||||
|
path: / |
||||
|
pathType: ImplementationSpecific |
||||
|
- host: pgwatch2-grafana.k3s.semapp.lan |
||||
|
http: |
||||
|
paths: |
||||
|
- backend: |
||||
|
service: |
||||
|
name: pgwatch2-grafana-service |
||||
|
port: |
||||
|
number: 3000 |
||||
|
path: / |
||||
|
pathType: ImplementationSpecific |
||||
|
|
||||
Loading…
Reference in new issue