Skip to content

Commit

Permalink
Merge pull request #205 from mezarin/updateOuterLoopOLRes
Browse files Browse the repository at this point in the history
Update outer-loop OpenLibertyApplication resource
  • Loading branch information
mezarin authored Jan 31, 2022
2 parents de89bc7 + 7891122 commit 4b6d200
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 57 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/stack-regression-tests-ol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: 'Setup: Install Minikube'
uses: manusa/[email protected]
with:
minikube version: 'v1.11.0'
kubernetes version: 'v1.17.0'
minikube version: 'v1.25.1'
kubernetes version: 'v1.23.1'
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=registry --addons=ingress --insecure-registry "10.0.0.0/24"'

Expand All @@ -35,7 +35,7 @@ jobs:
- name: 'Setup: Install odo'
run: |
sudo curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o /usr/local/bin/odo
sudo curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o /usr/local/bin/odo
sudo chmod +x /usr/local/bin/odo
- name: 'Setup: Print version info'
Expand Down Expand Up @@ -131,4 +131,4 @@ jobs:

- name: 'Test: OuterLoop: Gradle: Docker build with MPH-off SCC-on args'
if: always()
run: ./test/outer-loop/docker-build-mphOff-sccOn-test.sh ol gradle
run: ./test/outer-loop/docker-build-mphOff-sccOn-test.sh ol gradle
8 changes: 4 additions & 4 deletions .github/workflows/stack-regression-tests-wl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- name: 'Setup: Install Minikube'
uses: manusa/[email protected]
with:
minikube version: 'v1.11.0'
kubernetes version: 'v1.17.0'
minikube version: 'v1.25.1'
kubernetes version: 'v1.23.1'
github token: ${{ secrets.GITHUB_TOKEN }}
start args: '--addons=registry --addons=ingress --insecure-registry "10.0.0.0/24"'

Expand All @@ -35,7 +35,7 @@ jobs:
- name: 'Setup: Install odo'
run: |
sudo curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o /usr/local/bin/odo
sudo curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o /usr/local/bin/odo
sudo chmod +x /usr/local/bin/odo
- name: 'Setup: Print version info'
Expand Down Expand Up @@ -131,4 +131,4 @@ jobs:

- name: 'Test: OuterLoop: Gradle: Docker build with MPH-off SCC-on args'
if: success() || failure()
run: ./test/outer-loop/docker-build-mphOff-sccOn-test.sh wl gradle
run: ./test/outer-loop/docker-build-mphOff-sccOn-test.sh wl gradle
43 changes: 24 additions & 19 deletions stack/open-liberty/outer-loop/app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 IBM Corporation and others
# Copyright (c) 2021, 2022 IBM Corporation and others
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -14,32 +14,37 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: openliberty.io/v1beta1
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: {{.COMPONENT_NAME}}
spec:
# Add fields here
version: 1.0.0
# Add fields here.
applicationVersion: 1.0.0
applicationImage: {{.CONTAINER_IMAGE}}
service:
type: ClusterIP
port: {{.PORT}}
annotations:
prometheus.io/scrape: 'true'
readinessProbe:
failureThreshold: 12
httpGet:
path: /health/ready
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
livenessProbe:
failureThreshold: 12
httpGet:
path: /health/live
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
probes:
readiness:
failureThreshold: 12
httpGet:
path: /health/ready
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
liveness:
failureThreshold: 12
httpGet:
path: /health/live
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
expose: true
route:
# Ingress required entries.
pathType: 'Prefix'
path: '/'
43 changes: 24 additions & 19 deletions stack/websphere-liberty/outer-loop/app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 IBM Corporation and others
# Copyright (c) 2021, 2022 IBM Corporation and others
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -14,32 +14,37 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: openliberty.io/v1beta1
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: {{.COMPONENT_NAME}}
spec:
# Add fields here
version: 1.0.0
# Add fields here.
applicationVersion: 1.0.0
applicationImage: {{.CONTAINER_IMAGE}}
service:
type: ClusterIP
port: {{.PORT}}
annotations:
prometheus.io/scrape: 'true'
readinessProbe:
failureThreshold: 12
httpGet:
path: /health/ready
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
livenessProbe:
failureThreshold: 12
httpGet:
path: /health/live
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
probes:
readiness:
failureThreshold: 12
httpGet:
path: /health/ready
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 1
liveness:
failureThreshold: 12
httpGet:
path: /health/live
port: {{.PORT}}
initialDelaySeconds: 5
periodSeconds: 2
expose: true
route:
# Ingress required entries.
pathType: 'Prefix'
path: '/'
2 changes: 2 additions & 0 deletions test/outer-loop/base-outer-loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ while ! ${livenessResults[@]} | grep -qF '{"checks":[{"data":{},"name":"SampleLi
kubectl describe service ${COMP_NAME} -n ${NAMESPACE}
echo "$(${currentTime[@]}): App ingress resource config:"
kubectl describe ingress ${COMP_NAME} -n ${NAMESPACE}
echo "$(${currentTime[@]}): Open Liberty controller pod:"
$BASE_WORK_DIR/test/utils.sh printPodLog "app.kubernetes.io/name=open-liberty-operator" "default"
echo "$(${currentTime[@]}): Nginx ingress controller config:"
$BASE_WORK_DIR/test/utils.sh printPodConfig "app.kubernetes.io/name=ingress-nginx,app.kubernetes.io/component=controller" "kube-system"
echo "$(${currentTime[@]}): Nginx ingress controller pod log:"
Expand Down
22 changes: 11 additions & 11 deletions test/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ customizeStack() {
# installOpenLibertyOperator installs the Open Liberty operator.
installOpenLibertyOperator() {
echo -e "\n> Installing Open Liberty operator CRDs"
kubectl apply -f https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/master/deploy/releases/0.7.0/openliberty-app-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/main/deploy/releases/0.8.0/kubectl/openliberty-app-crd.yaml

echo -e "\n> Installing Open Liberty operator cluster level roles"
curl -L https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/master/deploy/releases/0.7.0/openliberty-app-cluster-rbac.yaml \
curl -L https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/main/deploy/releases/0.8.0/kubectl/openliberty-app-rbac-watch-all.yaml \
| sed -e "s/OPEN_LIBERTY_OPERATOR_NAMESPACE/default/" \
| kubectl apply -f -

echo -e "\n> Creating an Open Liberty application operator CR instance"
curl -L https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/master/deploy/releases/0.7.0/openliberty-app-operator.yaml \
echo -e "\n> Creating an Open Liberty operator controller instance"
curl -L https://raw.githubusercontent.com/OpenLiberty/open-liberty-operator/main/deploy/releases/0.8.0/kubectl/openliberty-app-operator.yaml \
| sed -e "s/OPEN_LIBERTY_WATCH_NAMESPACE/\"\"/" \
| kubectl apply -n default -f -

echo -e "\n> Wait for the Open Liberty operator application CR instance pod to start"
echo -e "\n> Wait for the Open Liberty operator controller instance pod to start"
count=1
while [[ $(kubectl get pods -n default -l name=open-liberty-operator -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do
while [[ $(kubectl get pods -n default -l app.kubernetes.io/name=open-liberty-operator -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do
kubectl get pods -n default
echo "waiting for the Open Liberty operator application CR instance pod" && sleep 3;
echo "waiting for the Open Liberty operator controller instance pod" && sleep 3;
count=`expr $count + 1`
if [ $count -eq 20 ]; then
echo "Timed out waiting for the Open Liberty operator application CR instance pod to start. Pod Config:"
printPodConfig "name=open-liberty-operator" "default"
echo "Open Liberty operator application CR instance pod log:"
printPodLog "name=open-liberty-operator" "default"
echo "Timed out waiting for the Open Liberty operator controller instance pod to start. Pod Config:"
printPodConfig "app.kubernetes.io/name=open-liberty-operator" "default"
echo "Open Liberty operator controller instance pod log:"
printPodLog "app.kubernetes.io/name=open-liberty-operator" "default"
exit 12
fi
done
Expand Down

0 comments on commit 4b6d200

Please sign in to comment.