Skip to content

Commit d965575

Browse files
committed
1529
1 parent 7c878e1 commit d965575

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

Jenkinsfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,22 @@ pipeline {
4545
}
4646
}
4747
*/
48-
stage('5. Deploy to K3s') {
48+
/* stage('5. Deploy to K3s') {
4949
steps {
5050
sh '''
5151
export KUBECONFIG=/home/vagrant/.kube/config
5252
kubectl apply -f k8s-deployment.yaml
5353
'''
5454
}
5555
}
56+
*/
57+
stage('6. Deploy with Helm') {
58+
steps {
59+
sh '''
60+
export KUBECONFIG=/home/vagrant/.kube/config
61+
helm upgrade --install ex02-app ./charts/ex02-app --namespace default
62+
'''
63+
}
64+
}
5665
}
5766
}

charts/ex02-app/Chart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: v2
2+
name: ex02-app
3+
version: 0.1.0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: {{ .Values.pod.name }}
5+
labels:
6+
app: {{ .Values.pod.name }}
7+
spec:
8+
containers:
9+
- name: {{ .Values.pod.name }}
10+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
11+
ports:
12+
- containerPort: {{ .Values.containerPort }}
13+

charts/ex02-app/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pod:
2+
name: ex01-app
3+
4+
image:
5+
repository: belokana/ex01-app
6+
tag: latest
7+
8+
containerPort: 8081
9+

0 commit comments

Comments
 (0)