OpenLiberty / open-liberty-operator

Eclipse Public License 2.0
29 stars 38 forks source link

Open Liberty Application creation issue #431

Open iamsoorya opened 1 year ago

iamsoorya commented 1 year ago

Bug Report

OpenLibertyApplication not getting created

What did you do?

There is no trace or events logged on the error. The open liberty application object is listed and able to describe however, we do not see the pods.

What did you expect to see?

Application pod successfully getting created.

A clear and concise description of what you expected to happen (or insert a code snippet). If possible, add OpenLibertyApplication CR.

What did you see instead?

No pods created. A clear and concise description of what you expected to happen (or insert a code snippet).

Environment

We tried with the sample manifest file like given like apiVersion: apps.openliberty.io/v1 kind: OpenLibertyApplication metadata: name: my-liberty-app spec: applicationImage: quay.io/my-repo/my-app:1.0 service: type: ClusterIP port: 9080 expose: true securityContext: readOnlyRootFilesystem: true runAsUser: 1001 statefulSet: storage: size: 2Gi mountPath: "/logs"

The above code does not created any pods.

Possible solution

Additional context

Add any other context about the problem here.

leochr commented 1 year ago

@iamsoorya quay.io/my-repo/my-app:1.0 is not an actual image. If you don't have your own application image to deploy and are looking for a sample app to deploy use the sample image icr.io/appcafe/open-liberty/samples/getting-started. We'll consider updating configuration snippets in the documentation to use this sample image.

If your cluster doesn't have storage with dynamic binding/provisioner, then remove .spec.statefulSet field. Otherwise, the pods will not be created.

If your cluster doesn't have cert-manager installed to generate TLS certificates, then disable manageTLS and specify service port 9080:

apiVersion: apps.openliberty.io/v1
kind: OpenLibertyApplication
metadata:
  name: openliberty-app-sample
spec:
  applicationImage: icr.io/appcafe/open-liberty/samples/getting-started
  manageTLS: false
  expose: true
  service:
    port: 9080