File tree Expand file tree Collapse file tree 4 files changed +36
-40
lines changed
package-examples/wordpress Expand file tree Collapse file tree 4 files changed +36
-40
lines changed Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
- apiVersion : apps/v1 # for versions before 1.9.0 use apps/v1beta2
14
+ apiVersion : apps/v1
16
15
kind : Deployment
17
16
metadata :
18
17
name : wordpress
@@ -23,17 +22,18 @@ spec:
23
22
matchLabels :
24
23
app : wordpress
25
24
tier : frontend
26
- strategy :
27
- type : Recreate
28
25
template :
29
26
metadata :
30
27
labels :
31
28
app : wordpress
32
29
tier : frontend
33
30
spec :
34
31
containers :
35
- - image : wordpress:4.8-apache # {"$kpt-set":"image-tag"}
36
- name : wordpress
32
+ - name : wordpress
33
+ image : wordpress:4.8-apache # kpt-set: ${wp-image}:${wp-tag}
34
+ ports :
35
+ - name : wordpress
36
+ containerPort : 80
37
37
env :
38
38
- name : WORDPRESS_DB_HOST
39
39
value : wordpress-mysql
@@ -42,13 +42,12 @@ spec:
42
42
secretKeyRef :
43
43
name : mysql-pass
44
44
key : password
45
- ports :
46
- - containerPort : 80
47
- name : wordpress
48
45
volumeMounts :
49
46
- name : wordpress-persistent-storage
50
47
mountPath : /var/www/html
51
48
volumes :
52
49
- name : wordpress-persistent-storage
53
50
persistentVolumeClaim :
54
51
claimName : wp-pv-claim
52
+ strategy :
53
+ type : Recreate
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
14
apiVersion : v1
16
15
kind : PersistentVolumeClaim
17
16
metadata :
18
17
name : wp-pv-claim
19
18
labels :
20
19
app : wordpress
21
20
spec :
22
- accessModes :
23
- - ReadWriteOnce
24
21
resources :
25
22
requests :
26
23
storage : 20Gi
24
+ accessModes :
25
+ - ReadWriteOnce
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
14
apiVersion : v1
16
15
kind : Service
17
16
metadata :
18
17
name : wordpress-mysql
19
18
labels :
20
19
app : wordpress
21
20
spec :
22
- ports :
23
- - port : 3306
24
21
selector :
25
22
app : wordpress
26
23
tier : mysql
24
+ ports :
25
+ - port : 3306
27
26
clusterIP : None
28
27
---
29
28
apiVersion : v1
@@ -33,11 +32,11 @@ metadata:
33
32
labels :
34
33
app : wordpress
35
34
spec :
36
- accessModes :
37
- - ReadWriteOnce
38
35
resources :
39
36
requests :
40
37
storage : 20Gi
38
+ accessModes :
39
+ - ReadWriteOnce
41
40
---
42
41
apiVersion : apps/v1 # for versions before 1.9.0 use apps/v1beta2
43
42
kind : Deployment
@@ -50,30 +49,30 @@ spec:
50
49
matchLabels :
51
50
app : wordpress
52
51
tier : mysql
53
- strategy :
54
- type : Recreate
55
52
template :
56
53
metadata :
57
54
labels :
58
55
app : wordpress
59
56
tier : mysql
60
57
spec :
61
58
containers :
62
- - image : mysql:5.6 # kpt-set: ${ms-image}:${ms-tag}
63
- name : mysql
64
- env :
65
- - name : MYSQL_ROOT_PASSWORD
66
- valueFrom :
67
- secretKeyRef :
68
- name : mysql-pass
69
- key : password
70
- ports :
71
- - containerPort : 3306
72
- name : mysql
73
- volumeMounts :
74
- - name : mysql-persistent-storage
75
- mountPath : /var/lib/mysql
59
+ - name : mysql
60
+ image : mysql:5.6 # kpt-set: ${ms-image}:${ms-tag}
61
+ ports :
62
+ - name : mysql
63
+ containerPort : 3306
64
+ env :
65
+ - name : MYSQL_ROOT_PASSWORD
66
+ valueFrom :
67
+ secretKeyRef :
68
+ name : mysql-pass
69
+ key : password
70
+ volumeMounts :
71
+ - name : mysql-persistent-storage
72
+ mountPath : /var/lib/mysql
76
73
volumes :
77
- - name : mysql-persistent-storage
78
- persistentVolumeClaim :
79
- claimName : mysql-pv-claim
74
+ - name : mysql-persistent-storage
75
+ persistentVolumeClaim :
76
+ claimName : mysql-pv-claim
77
+ strategy :
78
+ type : Recreate
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
-
15
14
apiVersion : v1
16
15
kind : Service
17
16
metadata :
18
17
name : wordpress
19
18
labels :
20
19
app : wordpress
21
20
spec :
22
- ports :
23
- - port : 80
21
+ type : LoadBalancer
24
22
selector :
25
23
app : wordpress
26
24
tier : frontend
27
- type : LoadBalancer
25
+ ports :
26
+ - port : 80
You can’t perform that action at this time.
0 commit comments