This commit is contained in:
Graham McIntire 2023-04-30 13:56:22 -05:00
parent b91e26e971
commit 03e47ba865
No known key found for this signature in database
6 changed files with 131 additions and 0 deletions

View file

@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: portal-deployment
namespace: portal
spec:
selector:
matchLabels:
app: portal
replicas: 1
template:
metadata:
labels:
app: portal
spec:
containers:
- name: portal
image: sonarsoftware/customerportal:stable
ports:
- name: http
containerPort: 80
protocol: TCP
env:
- name: NGINX_HOST
value: portaltest.vntx.net
- name: API_USERNAME
value: api
- name: API_PASSWORD
value: MlgGynhWD20uoMdt4eaeomryVXW
- name: SONAR_URL
value: https://vntx.sonar.software
- name: REDIS_HOST
value: redis-
- name: APP_KEY
value: base64:O+Bxk/ww7D35liT3tWjwJmpf3gecrxZYd62rRAn7/XA=
imagePullPolicy: Always

View file

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: portal-headless
namespace: portal
spec:
selector:
app: portal
type: ClusterIP
clusterIP: None
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP

View file

@ -0,0 +1,29 @@
## More detailed template
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: portal-deployment
namespace: portal
labels:
app.kubernetes.io/name: portal-deployment
app.kubernetes.io/instance: portal-deployment
app.kubernetes.io/version: "1"
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
tls:
- hosts:
- portaltest.vntx.net
secretName: portal-deployment-ingress-secret
rules:
- host: portaltest.vntx.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: portal-service
port:
number: 4000

View file

@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
namespace: portal
spec:
selector:
matchLabels:
app: portal
replicas: 1
template:
metadata:
labels:
app: portal
spec:
containers:
- name: redis
image: redis:5.0.4-alpine
ports:
- name: redis
containerPort: 6379
protocol: TCP
imagePullPolicy: Always

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: redis-service
namespace: portal
spec:
selector:
app: redis
type: ClusterIP
ports:
- name: redis
port: 6379
targetPort: 6379
protocol: TCP

View file

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: portal-service
namespace: portal
spec:
selector:
app: portal
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP