Skip to content

Commit 3c5cd3d

Browse files
Merge pull request #336 from kondapally1989/master
adding sample yaml to test examples.jar from with in a pod
2 parents 8d6ab53 + 9e74c31 commit 3c5cd3d

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

examples/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM openjdk:8-alpine
1+
FROM openjdk:8-jre
22

3-
COPY target/client-java-examples-0.2-SNAPSHOT-jar-with-dependencies.jar /examples.jar
3+
COPY target/client-java-examples-3.0.0-beta2-SNAPSHOT-jar-with-dependencies.jar /examples.jar
44

55
CMD ["java", "-jar", "/examples.jar"]
66

examples/createPod.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#creates a pod and runs Example.java(list pods for all namespaces) on starting of pod
2+
export REPO_ROOT=$(pwd)/../
3+
4+
cd ${REPO_ROOT}/kubernetes
5+
mvn install
6+
7+
cd ${REPO_ROOT}/examples
8+
mvn package
9+
eval $(minikube docker-env)
10+
docker build -t test/examples:1.0 .
11+
kubectl apply -f test.yaml

examples/test.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v1
2+
kind: ReplicationController
3+
metadata:
4+
name: test
5+
spec:
6+
replicas: 1
7+
template:
8+
metadata:
9+
labels:
10+
app: test
11+
spec:
12+
containers:
13+
- name: test
14+
image: test/examples:1.0
15+
command: ["/bin/sh","-c"]
16+
args: ["java -jar /examples.jar","while :; do sleep 1; done"]

0 commit comments

Comments
 (0)