Skip to content

Commit

Permalink
Updates for 0.8.2. release of 0.8.x branch (#352)
Browse files Browse the repository at this point in the history
* Update sample to OpenLiberty getting started app

* Update RuntimeComponent mod version to v0.8.2-20220613-1115

* Update version to 0.8.2

* Get minikube tests running on 0.8.x branch

* Add ingress tests to replace route tests in minikube

* Fix up autoscaling test for minikube

minikube isn't happy with a cpu target of 0.5, so reduce
it to 0.2

* Increase memory limit for operator manager

Increase from 256 to 512 as users had reported issues
  • Loading branch information
idlewis authored Jun 25, 2022
1 parent 20d8c35 commit 715fda7
Show file tree
Hide file tree
Showing 29 changed files with 753 additions and 38 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ stages:
# Builds are split into 'e2e-test' and 'build' to allow e2e tests to run first. If e2e fails, don't bother
# building and pushing the images for the other architectures.
- name: e2e-test
if: (branch = main OR tag =~ ^v) AND fork = false AND type != cron
if: (branch = main OR branch = 0.8.x OR tag =~ ^v) AND fork = false AND type != cron
- name: minikube-e2e-test
if: (branch = main OR branch = 0.8.x OR tag =~ ^v) AND fork = false AND type != cron
- name: build
if: (branch = main OR tag =~ ^v) AND fork = false AND type != pull_request AND type != cron
- name: build-manifest
Expand All @@ -40,6 +42,11 @@ jobs:
os: linux
arch: amd64
script: travis_wait 45 make setup test-e2e || travis_terminate 1
- name: Minikube test on amd64
stage: minikube-e2e-test
os: linux
arch: amd64
script: travis_wait 45 make setup minikube-test-e2e || travis_terminate 1
- name: Build image on ppc64le
stage: build
os: linux
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

LABEL vendor="Open Liberty" \
name="Open Liberty Operator" \
version="0.8.1" \
version="0.8.2" \
summary="Image for Open Liberty Operator" \
description="This image contains the controllers for Open Liberty Operator. See https://github.com/OpenLiberty/open-liberty-operator#open-liberty-operator"

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ OPERATOR_SDK_RELEASE_VERSION ?= v1.6.4
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.8.1
VERSION ?= 0.8.2

OPERATOR_IMAGE ?= openliberty/operator

Expand Down Expand Up @@ -238,6 +238,9 @@ test-e2e:
./scripts/e2e-release.sh --registry-name default-route --registry-namespace openshift-image-registry \
--test-tag "${TRAVIS_BUILD_NUMBER}" --target "${RELEASE_TARGET}"

minikube-test-e2e:
./scripts/e2e-minikube.sh --test-tag "${TRAVIS_BUILD_NUMBER}"

build-releases:
./scripts/build-releases.sh --image "${PUBLISH_REGISTRY}/${OPERATOR_IMAGE}" --target "${RELEASE_TARGET}"

Expand Down
10 changes: 5 additions & 5 deletions bundle/manifests/open-liberty.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
"name": "openliberty-app-sample"
},
"spec": {
"applicationImage": "registry.connect.redhat.com/ibm/open-liberty-samples:springPetClinic",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started",
"expose": true,
"replicas": 1,
"service": {
Expand Down Expand Up @@ -52,12 +52,12 @@ metadata:
certified: "true"
createdAt: "2022-03-01T09:00:00Z"
description: Deploy and manage applications running on Liberty
olm.skipRange: <0.8.1
olm.skipRange: <0.8.2
operators.operatorframework.io/builder: operator-sdk-v1.6.1+git
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/OpenLiberty/open-liberty-operator
support: IBM
name: open-liberty.v0.8.1
name: open-liberty.v0.8.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -435,7 +435,7 @@ spec:
resources:
limits:
cpu: 100m
memory: 256Mi
memory: 512Mi
requests:
cpu: 100m
memory: 64Mi
Expand Down Expand Up @@ -602,4 +602,4 @@ spec:
maturity: beta
provider:
name: IBM
version: 0.8.1
version: 0.8.2
2 changes: 1 addition & 1 deletion bundle/tests/scorecard/kuttl/auto3/01-add-scaling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
resources:
requests:
cpu: "0.5"
cpu: "0.2"
autoscaling:
maxReplicas: 5
minReplicas: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
type: kubernetes.io/tls
metadata:
name: ingress-tls-secret
data:
ca.crt: Y2FjcnQK
destCA.crt: ZGVzdENBY3J0Cg==
tls.crt: dGxzY3J0Cg==
tls.key: dGxza2V5Cg==
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: ingress-tls-secret
type: kubernetes.io/tls
data:
# 'tlscrt'
tls.crt: dGxzY3J0Cg==
# 'tlskey'
tls.key: dGxza2V5Cg==
# 'cacrt'
ca.crt: Y2FjcnQK
# 'destCAcrt'
destCA.crt: ZGVzdENBY3J0Cg==
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress-with-cert-ol
status:
replicas: 1
readyReplicas: 1
updatedReplicas: 1
---
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: ingress-with-cert-ol
spec:
tls:
- hosts:
- myapp.mycompany.com
secretName: ingress-tls-secret
rules:
- host: myapp.mycompany.com
http:
paths:
- path: /
pathType: Prefix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: ingress-with-cert-ol
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty:full-java8-openj9-ubi
replicas: 1
expose: true
route:
host: myapp.mycompany.com
path: "/"
pathType: Prefix
certificateSecretRef: ingress-tls-secret
termination: reencrypt

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress-with-cert-ol
status:
replicas: 1
readyReplicas: 1
updatedReplicas: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: ingress-with-cert-ol
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty:full-java8-openj9-ubi
replicas: 1
expose: false

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: ingress-with-cert-ol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
- apiVersion: v1
kind: Secret
name: ingress-tls-secret

21 changes: 21 additions & 0 deletions bundle/tests/scorecard/minikube-kuttl/ingress/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress
status:
replicas: 1
readyReplicas: 1
updatedReplicas: 1
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- host: myapp.mycompany.com
http:
paths:
- path: /
pathType: Prefix

13 changes: 13 additions & 0 deletions bundle/tests/scorecard/minikube-kuttl/ingress/00-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: ingress
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty:full-java8-openj9-ubi
replicas: 1
expose: true
route:
host: myapp.mycompany.com
path: "/"
pathType: Prefix
8 changes: 8 additions & 0 deletions bundle/tests/scorecard/minikube-kuttl/ingress/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress
status:
replicas: 1
readyReplicas: 1
updatedReplicas: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: apps.openliberty.io/v1beta2
kind: OpenLibertyApplication
metadata:
name: ingress
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty:full-java8-openj9-ubi
replicas: 1
expose: false

4 changes: 4 additions & 0 deletions bundle/tests/scorecard/minikube-kuttl/ingress/01-errors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
resources:
limits:
cpu: 100m
memory: 256Mi
memory: 512Mi
requests:
cpu: 100m
memory: 64Mi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
certified: "true"
createdAt: "2022-03-01T09:00:00Z"
description: Deploy and manage applications running on Liberty
olm.skipRange: <0.8.1
olm.skipRange: <0.8.2
repository: https://github.com/OpenLiberty/open-liberty-operator
support: IBM
name: open-liberty.v0.0.0
Expand Down
115 changes: 115 additions & 0 deletions config/rbac/minikube-kuttl-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: scorecard-kuttl
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: scorecard-kuttl
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: scorecard-kuttl
subjects:
- kind: ServiceAccount
name: scorecard-kuttl
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: scorecard-kuttl
rules:
- apiGroups:
- ""
resources:
- secrets
- serviceaccounts
verbs:
- get
- list
- create
- delete
- patch
- apiGroups:
- ""
resources:
- namespaces
- pods
- services
- routes
verbs:
- get
- list
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- get
- create
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- apiGroups:
- image.openshift.io
resources:
- imagestreams
verbs:
- get
- list
- create
- patch
- delete
- apiGroups:
- events.k8s.io
resources:
- events
verbs:
- get
- list
- apiGroups:
- serving.knative.dev
resources:
- services
verbs:
- get
- apiGroups:
- apps.openliberty.io
resources:
- openlibertyapplications
- openlibertydumps
- openlibertytraces
verbs:
- get
- list
- create
- patch
- delete
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- get
- list
- delete
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- delete

Loading

0 comments on commit 715fda7

Please sign in to comment.