diff --git a/.gitignore b/.gitignore index bdf57ce3..0fe77643 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ nb-configuration.xml # Local environment .env + +.odo/env \ No newline at end of file diff --git a/outerloop-deploy.yaml b/deploy.yaml similarity index 73% rename from outerloop-deploy.yaml rename to deploy.yaml index c5a4b270..e786831c 100644 --- a/outerloop-deploy.yaml +++ b/deploy.yaml @@ -23,3 +23,16 @@ spec: limits: memory: "1024Mi" cpu: "500m" +--- +kind: Service +apiVersion: v1 +metadata: + name: my-java-quarkus-svc +spec: +ports: + - name: http-8081 + port: 8081 + protocol: TCP + targetPort: 8081 +selector: + app: java-quarkus-app \ No newline at end of file diff --git a/devfile.yaml b/devfile.yaml index 4dde2726..afef7e77 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,7 +1,7 @@ schemaVersion: 2.2.0 metadata: name: java-quarkus - version: 1.1.0 + version: 1.2.0 provider: Red Hat supportUrl: https://github.com/devfile-samples/devfile-support#support-information website: https://quarkus.io @@ -16,14 +16,14 @@ parent: id: java-quarkus registryUrl: "https://registry.devfile.io" components: - - name: outerloop-build + - name: image-build image: imageName: java-quarkus-image:latest dockerfile: uri: src/main/docker/Dockerfile.jvm.staged buildContext: . rootRequired: false - - name: outerloop-deploy + - name: kubernetes-deploy attributes: deployment/replicas: 1 deployment/cpuLimit: "100m" @@ -32,14 +32,18 @@ components: deployment/memoryRequest: 100Mi deployment/container-port: 8081 kubernetes: - uri: outerloop-deploy.yaml + uri: deploy.yaml + endpoints: + - name: http-8081 + targetPort: 8081 + path: / commands: - id: build-image apply: - component: outerloop-build + component: image-build - id: deployk8s apply: - component: outerloop-deploy + component: kubernetes-deploy - id: deploy composite: commands: @@ -47,4 +51,4 @@ commands: - deployk8s group: kind: deploy - isDefault: true \ No newline at end of file + isDefault: true diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index f7dc2403..29acb042 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -37,7 +37,7 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ && chown 1001:root /deployments \ && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ + && chmod 555 /deployments/run-java.sh \ && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security # Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size. diff --git a/src/main/docker/Dockerfile.jvm.staged b/src/main/docker/Dockerfile.jvm.staged index 9724112d..2275a7a2 100644 --- a/src/main/docker/Dockerfile.jvm.staged +++ b/src/main/docker/Dockerfile.jvm.staged @@ -47,7 +47,7 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ && chown 1001:root /deployments \ && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \ && chown 1001 /deployments/run-java.sh \ - && chmod 540 /deployments/run-java.sh \ + && chmod 555 /deployments/run-java.sh \ && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security # Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size.