Skip to content

Commit c30f49c

Browse files
authored
Merge pull request #297 from galiacheng/wls-autoscaling-0131
2 parents 1ab587c + 005fb8d commit c30f49c

32 files changed

+1169
-112
lines changed

.github/workflows/testWlsAksWithDependencyCreation.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -326,13 +326,14 @@ jobs:
326326
az aks get-credentials --resource-group ${{ env.resourceGroupForWlsAks }} --name $aksClusterName
327327
- name: Generate&Apply configmap
328328
run: |
329+
wlsDomainNS=sample-domain1-ns
329330
wlsConfigmapName=sample-domain1-wdt-config-map
330331
wlsConfigmapJson=cargo-tracker-db.json
331332
modelFilePath=models
332333
mkdir ${modelFilePath}
333334
echo "create configmap"
334335
echo "export exisiting configmap"
335-
kubectl -n sample-domain1-ns get configmap ${wlsConfigmapName} -o json >${wlsConfigmapJson}
336+
kubectl -n ${wlsDomainNS} get configmap ${wlsConfigmapName} -o json >${wlsConfigmapJson}
336337
337338
echo "query model keys"
338339
keyList=$(cat ${wlsConfigmapJson} | jq '.data | keys[]' | tr -d "\"")
@@ -343,24 +344,25 @@ jobs:
343344
done
344345
345346
# remove current configmap and create a new one
346-
kubectl -n sample-domain1-ns delete configmap ${wlsConfigmapName}
347+
kubectl -n ${wlsDomainNS} delete configmap ${wlsConfigmapName}
347348
348349
cp cargotracker/src/test/aks/cargo-tracker-jms.yaml ${modelFilePath}/cargo-tracker-jms.yaml
349350
350-
kubectl -n sample-domain1-ns create configmap ${wlsConfigmapName} \
351+
kubectl -n ${wlsDomainNS} create configmap ${wlsConfigmapName} \
351352
--from-file=${modelFilePath}
352353
353-
kubectl -n sample-domain1-ns label configmap ${wlsConfigmapName} \
354+
kubectl -n ${wlsDomainNS} label configmap ${wlsConfigmapName} \
354355
weblogic.domainUID=sample-domain1
355-
restartVersion=$(kubectl -n sample-domain1-ns get domain sample-domain1 '-o=jsonpath={.spec.restartVersion}')
356+
restartVersion=$(kubectl -n ${wlsDomainNS} get domain sample-domain1 '-o=jsonpath={.spec.restartVersion}')
356357
# increase restart version
357358
restartVersion=$((restartVersion + 1))
358359
# record timestamp before apply changes
359360
timestampBeforePatchingDomain=$(date +%s)
360-
# get the replica number
361-
replicas=$(kubectl -n sample-domain1-ns get domain sample-domain1 -o json | jq '. | .spec.clusters[] | .replicas')
361+
# get the replica number
362+
clusterName=$(kubectl get cluster -n ${wlsDomainNS} -o json | jq -r '.items[0].metadata.name')
363+
replicas=$(kubectl -n ${wlsDomainNS} get cluster ${clusterName} -o json | jq '. | .spec.replicas')
362364
echo "append configmap and update restart version"
363-
kubectl -n sample-domain1-ns patch domain sample-domain1 \
365+
kubectl -n ${wlsDomainNS} patch domain sample-domain1 \
364366
--type=json \
365367
'-p=[{"op": "replace", "path": "/spec/restartVersion", "value": "'${restartVersion}'" }, {"op": "add", "path": "/spec/configuration/model/configMap", "value": "'${wlsConfigmapName}'" }]'
366368
echo "timestampBeforePatchingDomain=${timestampBeforePatchingDomain}" >> $GITHUB_ENV

.github/workflows/testWlsAksWithoutDependencyCreation.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,14 @@ jobs:
282282
az aks get-credentials --resource-group ${{ needs.preflight.outputs.resourceGroupForWlsAks }} --name $aksClusterName
283283
- name: Generate&Apply configmap
284284
run: |
285+
wlsDomainNS=sample-domain1-ns
285286
wlsConfigmapName=sample-domain1-wdt-config-map
286287
wlsConfigmapJson=cargo-tracker-db.json
287288
modelFilePath=models
288289
mkdir ${modelFilePath}
289290
echo "create configmap"
290291
echo "export exisiting configmap"
291-
kubectl -n sample-domain1-ns get configmap ${wlsConfigmapName} -o json >${wlsConfigmapJson}
292+
kubectl -n ${wlsDomainNS} get configmap ${wlsConfigmapName} -o json >${wlsConfigmapJson}
292293
293294
echo "query model keys"
294295
keyList=$(cat ${wlsConfigmapJson} | jq '.data | keys[]' | tr -d "\"")
@@ -299,24 +300,25 @@ jobs:
299300
done
300301
301302
# remove current configmap and create a new one
302-
kubectl -n sample-domain1-ns delete configmap ${wlsConfigmapName}
303+
kubectl -n ${wlsDomainNS} delete configmap ${wlsConfigmapName}
303304
304305
cp cargotracker/src/test/aks/cargo-tracker-jms.yaml ${modelFilePath}/cargo-tracker-jms.yaml
305306
306-
kubectl -n sample-domain1-ns create configmap ${wlsConfigmapName} \
307+
kubectl -n ${wlsDomainNS} create configmap ${wlsConfigmapName} \
307308
--from-file=${modelFilePath}
308309
309-
kubectl -n sample-domain1-ns label configmap ${wlsConfigmapName} \
310+
kubectl -n ${wlsDomainNS} label configmap ${wlsConfigmapName} \
310311
weblogic.domainUID=sample-domain1
311-
restartVersion=$(kubectl -n sample-domain1-ns get domain sample-domain1 '-o=jsonpath={.spec.restartVersion}')
312+
restartVersion=$(kubectl -n ${wlsDomainNS} get domain sample-domain1 '-o=jsonpath={.spec.restartVersion}')
312313
# increase restart version
313314
restartVersion=$((restartVersion + 1))
314315
# record timestamp before apply changes
315316
timestampBeforePatchingDomain=$(date +%s)
316-
# get the replica number
317-
replicas=$(kubectl -n sample-domain1-ns get domain sample-domain1 -o json | jq '. | .spec.clusters[] | .replicas')
317+
# get the replica number
318+
clusterName=$(kubectl get cluster -n ${wlsDomainNS} -o json | jq -r '.items[0].metadata.name')
319+
replicas=$(kubectl -n ${wlsDomainNS} get cluster ${clusterName} -o json | jq '. | .spec.replicas')
318320
echo "append configmap and update restart version"
319-
kubectl -n sample-domain1-ns patch domain sample-domain1 \
321+
kubectl -n ${wlsDomainNS} patch domain sample-domain1 \
320322
--type=json \
321323
'-p=[{"op": "replace", "path": "/spec/restartVersion", "value": "'${restartVersion}'" }, {"op": "add", "path": "/spec/configuration/model/configMap", "value": "'${wlsConfigmapName}'" }]'
322324
echo "timestampBeforePatchingDomain=${timestampBeforePatchingDomain}" >> $GITHUB_ENV

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<properties>
4141
<!-- versions start -->
4242
<!-- weblogic azure aks versions -->
43-
<version.wls-on-aks-azure-marketplace>1.0.74</version.wls-on-aks-azure-marketplace>
43+
<version.wls-on-aks-azure-marketplace>1.0.75</version.wls-on-aks-azure-marketplace>
4444
<!-- weblogic azure vm versions -->
4545
<version.arm-oraclelinux-wls>1.0.27</version.arm-oraclelinux-wls>
4646
<version.arm-oraclelinux-wls-admin>1.0.50</version.arm-oraclelinux-wls-admin>

resources/azure-common.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ azure.apiVersionForTags=2023-07-01
4242
azure.apiVersionForStorage=2023-01-01
4343
# Microsoft.Storage/storageAccounts/fileServices
4444
azure.apiVersionForStorageFileService=2023-01-01
45+
# Microsoft.Monitor/accounts
46+
azure.apiVersionForMonitorAccount=2023-04-03
4547

4648
# AzureAzCLI version
4749
azure.cli.version=2.53.0

0 commit comments

Comments
 (0)