From 513522467905c996171511f8b41c5123359d6922 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 4 Nov 2021 12:34:08 -0400 Subject: [PATCH] update to devfile 220 Signed-off-by: Stephanie --- devfile.yaml | 26 ++++++++++++++------------ outerloop-deploy.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 outerloop-deploy.yaml diff --git a/devfile.yaml b/devfile.yaml index 95ed163d..56eb2460 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,30 +1,32 @@ -schemaVersion: 2.0.0 +schemaVersion: 2.2.0 metadata: name: java-springboot version: 1.1.0 attributes: - alpha.build-context: . - alpha.build-dockerfile: docker/Dockerfile + alpha.dockerimage-port: 8081 displayName: Java Spring Boot description: Java Spring Boot using Maven tags: ["Java", "Spring"] projectType: "springboot" language: "java" + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information starterProjects: - name: springbootproject git: remotes: origin: "https://github.com/odo-devfiles/springboot-ex.git" components: - - name: buildguidance - attributes: - tool: console-import - container: - image: buildguidanceimage-placeholder - memoryLimit: 1024Mi - endpoints: - - name: http-8081 - targetPort: 8081 + - name: outerloop-build + image: + imageName: java-springboot-image:latest + dockerfile: + uri: docker/Dockerfile + buildContext: . + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: outerloop-deploy.yaml - name: tools container: image: quay.io/eclipse/che-java11-maven:nightly diff --git a/outerloop-deploy.yaml b/outerloop-deploy.yaml new file mode 100644 index 00000000..89e587ed --- /dev/null +++ b/outerloop-deploy.yaml @@ -0,0 +1,25 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: my-java-springboot +spec: + replicas: 1 + selector: + matchLabels: + app: java-springboot-app + template: + metadata: + labels: + app: java-springboot-app + spec: + containers: + - name: my-java-springboot + image: java-springboot-image:latest + ports: + - name: http + containerPort: 8081 + protocol: TCP + resources: + limits: + memory: "1024Mi" + cpu: "500m"