Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Implement service monitoring support for java-openliberty and add timeoutSeconds for readinessProbe #443

Open
Kamran64 opened this issue Oct 24, 2019 · 4 comments
Labels
enhancement New feature or request stack/java-openliberty Issues related to java-openliberty stack

Comments

@Kamran64
Copy link
Collaborator

Kamran64 commented Oct 24, 2019

Following appsody/appsody-operator#125, the Appsody operator supports creating service monitor if there is a spec.monitoring entry in the app-deploy.yaml file. The only requirement to utilise this is a label field, like so:

apiVersion: appsody.dev/v1beta1
kind: AppsodyApplication
metadata:
  name: example-appsodyapplication
spec:
  ....
  monitoring:
    endpoints:
    - basicAuth:
        password:
          key: password
          name: pass
        username:
          key: username
          name: user
      interval: 5s
      tlsConfig:
        insecureSkipVerify: true
    labels:
      k8s-app: APPSODY_PROJECT_NAME

We introduced this functionality for Python Flask, Node.js-Express, and Node.js-functions but it would be nice to see this for the Open Liberty stack also.

Currently, we also see a Knative error if a stack uses the readinessProbe and timeoutSeconds is not defined.

Describe the solution you'd like
Add a new field (monitoring) to the app-deploy file underneath spec. The java-microprofile stack has authenticated endpoints and therefore requires a basicAuth field also.

Also add a new field, timeoutSeconds under the readinessProbe and assign it an appropriate value e.g. 1.

Additional context
Example PR to implement service monitor support into a stack: https://github.com/appsody/stacks/pull/419/files

Note: The PR above is for a stack without an authenticated endpoint, see: appsody/appsody-operator#125 for a more suitable approach for microprofile.

@Kamran64 Kamran64 changed the title Implement service monitoring support for java-microprofile Implement service monitoring support for java-microprofile and add timeoutSeconds for readinessProbe Oct 25, 2019
@neeraj-laad neeraj-laad added stack/java-microprofile Issues related to java-microprofile stack enhancement New feature or request labels Nov 18, 2019
@scottkurz scottkurz added stack/java-openliberty Issues related to java-openliberty stack and removed stack/java-microprofile Issues related to java-microprofile stack labels Jan 14, 2020
@scottkurz
Copy link
Contributor

Though this issue hasn't been solved in the java-microprofile stack, relabeling to the java-openliberty stack, which is where we would prioritize a solution if we decide to fix this.

@Kamran64 Kamran64 changed the title Implement service monitoring support for java-microprofile and add timeoutSeconds for readinessProbe Implement service monitoring support for java-openliberty and add timeoutSeconds for readinessProbe Jan 14, 2020
@Kamran64
Copy link
Collaborator Author

Thanks @scottkurz - I've updated the issue title and description :)

@scottkurz
Copy link
Contributor

@arthurdm correct me if I'm wrong and you see a need here... but I think this is a moot point now that we've switched to the Open Liberty operator. Closing.

@awisniew90
Copy link
Collaborator

I think we can resolve this issue with doc showing how to add a service monitor to the app-config.yaml. We actually show how to do this already here: https://developer.ibm.com/tutorials/configure-an-observable-microservice-with-appsody-openshift-open-liberty/

My concern with adding this to the default app-deploy.yaml is that it requires SSL to be enabled in the deployment which we are choosing not to do by default. Instead, we are adding doc in our readme on how to enable the HTTPS port and configure user credentials via ENV vars from a Secret. (#750 )

Other than the above doc, we can also add a section to our readme on how to enable a Service Monitor after SSL is enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stack/java-openliberty Issues related to java-openliberty stack
Projects
None yet
Development

No branches or pull requests

4 participants