@abgov/nx-oc 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/nx-oc",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "src/index.js",
6
6
  "description": "Government of Alberta - Nx plugin for OpenShift.",
@@ -1,4 +1,4 @@
1
- apiVersion: v1
1
+ apiVersion: template.openshift.io/v1
2
2
  kind: Template
3
3
  metadata:
4
4
  name: <%= projectName %>
@@ -25,12 +25,12 @@ parameters:
25
25
  value: latest
26
26
  required: true
27
27
  objects:
28
- - apiVersion: v1
28
+ - apiVersion: image.openshift.io/v1
29
29
  kind: ImageStream
30
30
  metadata:
31
31
  name: ${APP_NAME}
32
32
  namespace: ${INFRA_PROJECT}
33
- - apiVersion: v1
33
+ - apiVersion: build.openshift.io/v1
34
34
  kind: BuildConfig
35
35
  metadata:
36
36
  name: ${APP_NAME}
@@ -40,10 +40,17 @@ objects:
40
40
  to:
41
41
  kind: ImageStreamTag
42
42
  name: '${APP_NAME}:latest'
43
+ resources:
44
+ limits:
45
+ cpu: 300m
46
+ memory: 1Gi
47
+ requests:
48
+ cpu: 100m
49
+ memory: 200Mi
43
50
  runPolicy: Serial
44
51
  source:
45
- binary: {}
46
- type: Binary
52
+ binary: {}
53
+ type: Binary
47
54
  strategy:
48
55
  dockerStrategy:
49
56
  buildArgs:
@@ -78,7 +85,7 @@ objects:
78
85
  "AllowedHosts": "*",
79
86
  "Urls": "http://${APP_NAME}:5000"
80
87
  }
81
- - apiVersion: v1
88
+ - apiVersion: apps.openshift.io/v1
82
89
  kind: DeploymentConfig
83
90
  metadata:
84
91
  name: ${APP_NAME}
@@ -91,7 +98,13 @@ objects:
91
98
  activeDeadlineSeconds: 21600
92
99
  recreateParams:
93
100
  timeoutSeconds: 600
94
- resources: {}
101
+ resources:
102
+ limits:
103
+ cpu: 200m
104
+ memory: 200Mi
105
+ requests:
106
+ cpu: 20m
107
+ memory: 50Mi
95
108
  type: Recreate
96
109
  template:
97
110
  metadata:
@@ -111,7 +124,13 @@ objects:
111
124
  - containerPort: 5000
112
125
  name: http
113
126
  protocol: TCP
114
- resources: {}
127
+ resources:
128
+ limits:
129
+ cpu: 200m
130
+ memory: 1Gi
131
+ requests:
132
+ cpu: 20m
133
+ memory: 200Mi
115
134
  terminationMessagePath: /dev/termination-log
116
135
  volumeMounts:
117
136
  - mountPath: /opt/app-root/app/appsettings.json
@@ -149,7 +168,7 @@ objects:
149
168
  name: ${APP_NAME}
150
169
  sessionAffinity: None
151
170
  type: ClusterIP
152
- - apiVersion: v1
171
+ - apiVersion: route.openshift.io/v1
153
172
  kind: Route
154
173
  metadata:
155
174
  name: ${APP_NAME}
@@ -1,4 +1,4 @@
1
- apiVersion: v1
1
+ apiVersion: template.openshift.io/v1
2
2
  kind: Template
3
3
  metadata:
4
4
  name: <%= projectName %>
@@ -25,12 +25,12 @@ parameters:
25
25
  value: latest
26
26
  required: true
27
27
  objects:
28
- - apiVersion: v1
28
+ - apiVersion: image.openshift.io/v1
29
29
  kind: ImageStream
30
30
  metadata:
31
31
  name: ${APP_NAME}
32
32
  namespace: ${INFRA_PROJECT}
33
- - apiVersion: v1
33
+ - apiVersion: build.openshift.io/v1
34
34
  kind: BuildConfig
35
35
  metadata:
36
36
  name: ${APP_NAME}
@@ -40,10 +40,17 @@ objects:
40
40
  to:
41
41
  kind: ImageStreamTag
42
42
  name: '${APP_NAME}:latest'
43
+ resources:
44
+ limits:
45
+ cpu: 300m
46
+ memory: 1Gi
47
+ requests:
48
+ cpu: 100m
49
+ memory: 200Mi
43
50
  runPolicy: Serial
44
51
  source:
45
- binary: {}
46
- type: Binary
52
+ binary: {}
53
+ type: Binary
47
54
  strategy:
48
55
  dockerStrategy:
49
56
  buildArgs:
@@ -60,7 +67,7 @@ objects:
60
67
  data:
61
68
  TENANT_REALM: <%= tenantRealm %>
62
69
  ACCESS_SERVICE_URL: <%= accessServiceUrl %>
63
- - apiVersion: v1
70
+ - apiVersion: apps.openshift.io/v1
64
71
  kind: DeploymentConfig
65
72
  metadata:
66
73
  name: ${APP_NAME}
@@ -73,7 +80,13 @@ objects:
73
80
  activeDeadlineSeconds: 21600
74
81
  recreateParams:
75
82
  timeoutSeconds: 600
76
- resources: {}
83
+ resources:
84
+ limits:
85
+ cpu: 200m
86
+ memory: 200Mi
87
+ requests:
88
+ cpu: 20m
89
+ memory: 50Mi
77
90
  type: Recreate
78
91
  template:
79
92
  metadata:
@@ -95,7 +108,13 @@ objects:
95
108
  - containerPort: 3333
96
109
  name: http
97
110
  protocol: TCP
98
- resources: {}
111
+ resources:
112
+ limits:
113
+ cpu: 200m
114
+ memory: 200Mi
115
+ requests:
116
+ cpu: 20m
117
+ memory: 50Mi
99
118
  terminationMessagePath: /dev/termination-log
100
119
  dnsPolicy: ClusterFirst
101
120
  restartPolicy: Always
@@ -124,7 +143,7 @@ objects:
124
143
  name: ${APP_NAME}
125
144
  sessionAffinity: None
126
145
  type: ClusterIP
127
- - apiVersion: v1
146
+ - apiVersion: route.openshift.io/v1
128
147
  kind: Route
129
148
  metadata:
130
149
  name: ${APP_NAME}
@@ -1,4 +1,4 @@
1
- apiVersion: v1
1
+ apiVersion: template.openshift.io/v1
2
2
  kind: Template
3
3
  metadata:
4
4
  name: <%= projectName %>
@@ -25,12 +25,12 @@ parameters:
25
25
  value: latest
26
26
  required: true
27
27
  objects:
28
- - apiVersion: v1
28
+ - apiVersion: image.openshift.io/v1
29
29
  kind: ImageStream
30
30
  metadata:
31
31
  name: ${APP_NAME}
32
32
  namespace: ${INFRA_PROJECT}
33
- - apiVersion: v1
33
+ - apiVersion: build.openshift.io/v1
34
34
  kind: BuildConfig
35
35
  metadata:
36
36
  name: ${APP_NAME}
@@ -40,10 +40,17 @@ objects:
40
40
  to:
41
41
  kind: ImageStreamTag
42
42
  name: '${APP_NAME}:latest'
43
+ resources:
44
+ limits:
45
+ cpu: 300m
46
+ memory: 1Gi
47
+ requests:
48
+ cpu: 100m
49
+ memory: 200Mi
43
50
  runPolicy: Serial
44
51
  source:
45
- binary: {}
46
- type: Binary
52
+ binary: {}
53
+ type: Binary
47
54
  strategy:
48
55
  dockerStrategy:
49
56
  buildArgs:
@@ -66,7 +73,7 @@ objects:
66
73
  "client_id": "urn:ads:<%= tenant %>:<%= projectName %>"
67
74
  }
68
75
  }
69
- - apiVersion: v1
76
+ - apiVersion: apps.openshift.io/v1
70
77
  kind: DeploymentConfig
71
78
  metadata:
72
79
  name: ${APP_NAME}
@@ -79,7 +86,13 @@ objects:
79
86
  activeDeadlineSeconds: 21600
80
87
  recreateParams:
81
88
  timeoutSeconds: 600
82
- resources: {}
89
+ resources:
90
+ limits:
91
+ cpu: 200m
92
+ memory: 200Mi
93
+ requests:
94
+ cpu: 20m
95
+ memory: 50Mi
83
96
  type: Recreate
84
97
  template:
85
98
  metadata:
@@ -93,7 +106,13 @@ objects:
93
106
  - containerPort: 3333
94
107
  name: http
95
108
  protocol: TCP
96
- resources: {}
109
+ resources:
110
+ limits:
111
+ cpu: 200m
112
+ memory: 200Mi
113
+ requests:
114
+ cpu: 20m
115
+ memory: 50Mi
97
116
  terminationMessagePath: /dev/termination-log
98
117
  volumeMounts:
99
118
  - mountPath: /opt/app-root/src/config
@@ -133,7 +152,7 @@ objects:
133
152
  name: ${APP_NAME}
134
153
  sessionAffinity: None
135
154
  type: ClusterIP
136
- - apiVersion: v1
155
+ - apiVersion: route.openshift.io/v1
137
156
  kind: Route
138
157
  metadata:
139
158
  name: ${APP_NAME}
@@ -101,6 +101,8 @@ jobs:
101
101
  environment:
102
102
  name: <%= envs[i] %>
103
103
  steps:
104
+ # Checkout the source code for manifests
105
+ - uses: actions/checkout@v2
104
106
  - name: Oc login
105
107
  uses: redhat-actions/oc-login@v1
106
108
  with:
@@ -119,7 +121,7 @@ jobs:
119
121
  run: |
120
122
  for app in $AFFECTED_APPS
121
123
  do
122
- oc process -f .openshift/managed/$app.yml -p NAMESPACE=<%= ocEnvProject %> -p DEPLOY_TAG=<%= envs[i].toLowerCase() %> | oc apply -f -
124
+ oc process -f .openshift/$app/$app.yml -p PROJECT=<%= ocEnvProject %> -p DEPLOY_TAG=<%= envs[i].toLowerCase() %> | oc apply -f -
123
125
  done
124
126
  - name: Deploy <%= envs[i] %>
125
127
  run: |