diff --git a/Dockerfile b/Dockerfile index 4324eba4..2b625e58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ # test FROM bitnami/tomcat ENV ALLOW_EMPTY_PASSWORD=yes -COPY addressbook.war /opt/bitnami/tomcat/webapps_default/addressbook.war +COPY target/addressbook.war /opt/bitnami/tomcat/webapps_default/addressbook.war diff --git a/deployment.yaml b/deployment.yaml index ab6ace49..0eb7b978 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -1,30 +1,38 @@ -# test apiVersion: apps/v1 kind: Deployment metadata: - creationTimestamp: null + name: mydeploy labels: app: mydeploy - name: mydeploy spec: replicas: 1 selector: matchLabels: app: mydeploy - strategy: {} + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% template: metadata: - creationTimestamp: null labels: app: mydeploy spec: + imagePullSecrets: + - name: ecr-secret containers: - - image: rajendrait99/addressbook:1.0 - name: addressbook + - name: addressbook + image: bitnami/tomcat:latest ports: - containerPort: 8080 - resources: {} env: - - name: ALLOW_EMPTY_PASSWORD - value: "yes" -status: {} + - name: ALLOW_EMPTY_PASSWORD + value: "yes" + resources: + requests: + cpu: "100m" + memory: "128Mi" + limits: + cpu: "500m" + memory: "512Mi" diff --git a/pom.xml b/pom.xml index 6bebf532..0898aa0d 100644 --- a/pom.xml +++ b/pom.xml @@ -162,10 +162,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.2 + 3.10.1 - 1.8 - 1.8 + 11 + 11 @@ -173,6 +173,12 @@ jetty-maven-plugin 9.2.3.v20140905 + + org.apache.maven.plugins + maven-war-plugin + 3.3.2 + + org.apache.maven.plugins @@ -274,7 +280,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 1.0 + 3.2.1 enforce-versions @@ -299,7 +305,7 @@ maven-project-info-reports-plugin - 2.7 + 3.8.7 org.jacoco diff --git a/service.yaml b/service.yaml new file mode 100644 index 00000000..9f831ed7 --- /dev/null +++ b/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: mydeploy-service +spec: + type: NodePort + selector: + app: mydeploy + ports: + - port: 80 + targetPort: 8080 + nodePort: 30080