diff --git a/Dockerfile b/Dockerfile index c459145f..31eb3188 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Using official python runtime base image -FROM image-registry.openshift-image-registry.svc:5000/openshift/python:latest +FROM registry.access.redhat.com/ubi9/python-39:latest # Install our requirements.txt ADD requirements.txt /opt/app-root/src/requirements.txt diff --git a/kustomize/base/deployment.yaml b/kustomize/base/deployment.yaml new file mode 100644 index 00000000..a707ee7f --- /dev/null +++ b/kustomize/base/deployment.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: pipelines-vote-ui + name: pipelines-vote-ui +spec: + replicas: 1 + selector: + matchLabels: + app: pipelines-vote-ui + template: + metadata: + labels: + app: pipelines-vote-ui + spec: + containers: + - image: quay.io/openshift-pipeline/vote-ui:latest + imagePullPolicy: Always + name: pipelines-vote-ui + ports: + - containerPort: 8080 + protocol: TCP + - containerPort: 9090 + protocol: TCP + env: + - name: VOTING_API_SERVICE_HOST + value: pipelines-vote-api + - name: VOTING_API_SERVICE_PORT + value: "9000" diff --git a/kustomize/base/kustomization.yaml b/kustomize/base/kustomization.yaml new file mode 100644 index 00000000..22ecb1c6 --- /dev/null +++ b/kustomize/base/kustomization.yaml @@ -0,0 +1,4 @@ +resources: +- deployment.yaml +- route.yaml +- service.yaml \ No newline at end of file diff --git a/kustomize/base/route.yaml b/kustomize/base/route.yaml new file mode 100644 index 00000000..8457af6c --- /dev/null +++ b/kustomize/base/route.yaml @@ -0,0 +1,13 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: pipelines-vote-ui + name: pipelines-vote-ui +spec: + port: + targetPort: 8080-tcp + to: + kind: Service + name: pipelines-vote-ui + weight: 100 diff --git a/kustomize/base/service.yaml b/kustomize/base/service.yaml new file mode 100644 index 00000000..b6f18485 --- /dev/null +++ b/kustomize/base/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: pipelines-vote-ui + name: pipelines-vote-ui +spec: + type: NodePort + ports: + - name: 8080-tcp + port: 8080 + targetPort: 8080 + protocol: TCP + selector: + app: pipelines-vote-ui diff --git a/kustomize/overlays/kustomization.yaml b/kustomize/overlays/kustomization.yaml new file mode 100644 index 00000000..31cd612b --- /dev/null +++ b/kustomize/overlays/kustomization.yaml @@ -0,0 +1,11 @@ +bases: +- ../base + +patches: +- replicas_limit.yaml + +namePrefix: dev- + +images: +- name: quay.io/openshift-pipeline/vote-ui:latest + newTag: latest \ No newline at end of file diff --git a/kustomize/overlays/replicas_limit.yaml b/kustomize/overlays/replicas_limit.yaml new file mode 100644 index 00000000..7ad36eb7 --- /dev/null +++ b/kustomize/overlays/replicas_limit.yaml @@ -0,0 +1,6 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pipelines-vote-ui +spec: + replicas: 2 \ No newline at end of file