Refactored test pipeline and manifest to fit new cluster
This commit is contained in:
92
manifests/deploy-app.yml
Normal file
92
manifests/deploy-app.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: experiments
|
||||
labels:
|
||||
name: experiments
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: sampleapi-config
|
||||
namespace: experiments
|
||||
data:
|
||||
appname: "SampleApi"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sampleapi
|
||||
namespace: experiments
|
||||
labels:
|
||||
app: sampleapi
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sampleapi
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sampleapi
|
||||
spec:
|
||||
containers:
|
||||
- name: sampleapi
|
||||
image: registry.registry.svc.cluster.local:5000/experiments/sampleapi:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
- name: https
|
||||
containerPort: 8081
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sampleapi
|
||||
namespace: experiments
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: sampleapi
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: 8081
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: sampleapi-http
|
||||
namespace: experiments
|
||||
spec:
|
||||
entryPoints:
|
||||
- web
|
||||
routes:
|
||||
- match: Host(`sampleapi.apps.mngoma.lab`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: sampleapi
|
||||
port: 80
|
||||
scheme: http
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: sampleapi-https
|
||||
namespace: experiments
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`sampleapi.apps.mngoma.lab`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: sampleapi
|
||||
port: 443
|
||||
scheme: http
|
||||
tls: {}
|
||||
Reference in New Issue
Block a user