trigger update

This commit is contained in:
2020-03-03 20:33:28 +01:00
parent 9338f28581
commit bbe673d32b
5 changed files with 28 additions and 8 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
config.json config.json
manifests/triggers/webhook-secret.yaml manifests/resources/secrets.yaml
venv venv

View File

@@ -28,6 +28,7 @@ spec:
containers: containers:
- name: front-end - name: front-end
image: beppev/server-a:latest image: beppev/server-a:latest
imagePullPolicy: "Always"
ports: ports:
- containerPort: 5000 - containerPort: 5000
--- ---
@@ -55,6 +56,7 @@ spec:
containers: containers:
- name: front-end - name: front-end
image: beppev/server-b:latest image: beppev/server-b:latest
imagePullPolicy: "Always"
ports: ports:
- containerPort: 6000 - containerPort: 6000
--- ---
@@ -82,6 +84,7 @@ spec:
containers: containers:
- name: front-end - name: front-end
image: beppev/server-c:latest image: beppev/server-c:latest
imagePullPolicy: "Always"
ports: ports:
- containerPort: 6000 - containerPort: 6000
--- ---
@@ -159,18 +162,18 @@ metadata:
app: "project-1" app: "project-1"
spec: spec:
hosts: hosts:
"*" - "*"
gateways: gateways:
- expose-server-gateway - expose-server-gateway
http: http:
- match: - match:
- uri: - uri:
prefix: /server-a/ prefix: /server-a
route: route:
- destination: - destination:
port: port:
number: 5000 number: 5000
host: expose-server-service host: expose-server-service
--- # TODO fix gateway zodat we ingress gateway kunnen gebruike ipv de fuken loadbalancer. --- # TODO fix gateway zodat we ingress gateway kunnen gebruike ipv de fuken loadbalancer.
apiVersion: networking.istio.io/v1alpha3 apiVersion: networking.istio.io/v1alpha3
kind: Gateway kind: Gateway

View File

@@ -38,4 +38,10 @@ spec:
- name: imageTag-b - name: imageTag-b
value: "latest" value: "latest"
- name: pathToContext-b - name: pathToContext-b
value: "./serverB" value: "./serverB"
- name: imageUrl-c
value: "server-c"
- name: imageTag-c
value: "latest"
- name: pathToContext-c
value: "./serverC"

View File

@@ -8,7 +8,7 @@ spec:
inputs: inputs:
params: params:
- name: GitHubOrg - name: GitHubOrg
value: "github.com" value: "beppevanrolleghem"
- name: GitHubUser - name: GitHubUser
value: "beppevanrolleghem" value: "beppevanrolleghem"
- name: GitHubRepo - name: GitHubRepo

View File

@@ -5,11 +5,22 @@ app = Flask(__name__)
URL = "http://server-check:6000" URL = "http://server-check:6000"
@app.errorhandler(404)
def page_not_found(error):
return "beppe's 404 error"
@app.route('/') @app.route('/')
def doRequest(): def doRequest():
return "it works" return "it works"
@app.route('/server-a')
def checkThis():
return "server-a is apparently something to worry abt"
@app.route("/server-a/check")
def itAlsoWorks():
return requests.get(URL).json()
@app.route('/check') @app.route('/check')
def itWorks(): def itWorks():
return requests.get(URL).json() return requests.get(URL).json()