File tree 3 files changed +75
-0
lines changed
3 files changed +75
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM openjdk:17-jdk-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ COPY Main.java /app/Main.java
6
+
7
+ RUN javac Main.java
8
+
9
+ CMD ["java" , "-Xms80m" , "Main" ]
Original file line number Diff line number Diff line change
1
+ public class Main {
2
+ public static void main (String [] args ) {
3
+ try {
4
+ System .out .println ("Application is waiting indefinitely..." );
5
+ while (true ) {
6
+ Thread .sleep (Long .MAX_VALUE );
7
+ }
8
+ } catch (InterruptedException e ) {
9
+ System .out .println ("Application interrupted" );
10
+ }
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ # Create a service account, role, roleBinding and a Pod.
2
+ # The Pod will have Kondense enabled and will do dynamic resources resize of the nginx container.
3
+ ---
4
+ apiVersion : v1
5
+ kind : ServiceAccount
6
+ metadata :
7
+ name : kondense-user
8
+ namespace : default
9
+ ---
10
+ apiVersion : rbac.authorization.k8s.io/v1
11
+ kind : Role
12
+ metadata :
13
+ name : kondense
14
+ rules :
15
+ - apiGroups : [""]
16
+ resources : ["pods"]
17
+ verbs : ["get", "list", "watch", "patch"]
18
+ - apiGroups : [""]
19
+ resources : ["pods/exec"]
20
+ verbs : ["create"]
21
+ ---
22
+ apiVersion : rbac.authorization.k8s.io/v1
23
+ kind : RoleBinding
24
+ metadata :
25
+ name : kondense
26
+ subjects :
27
+ - kind : ServiceAccount
28
+ name : kondense-user
29
+ namespace : default
30
+ roleRef :
31
+ apiGroup : rbac.authorization.k8s.io
32
+ kind : Role
33
+ name : kondense
34
+ ---
35
+ apiVersion : v1
36
+ kind : Pod
37
+ metadata :
38
+ name : kondense-test
39
+ spec :
40
+ serviceAccountName : kondense-user
41
+ containers :
42
+ - name : jvm-test
43
+ image : jvm
44
+ imagePullPolicy : Never
45
+ resources :
46
+ limits :
47
+ cpu : 100m
48
+ memory : 100M
49
+ - name : kondense
50
+ image : kondense/kondense:1.1.0
51
+ resources :
52
+ limits :
53
+ cpu : 80m
54
+ memory : 50M
You can’t perform that action at this time.
0 commit comments