Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OpenShift Routes #184

Open
kenmoini opened this issue Dec 13, 2023 · 3 comments
Open

Support for OpenShift Routes #184

kenmoini opened this issue Dec 13, 2023 · 3 comments

Comments

@kenmoini
Copy link
Contributor

kenmoini commented Dec 13, 2023

Problem Statement:
Many enterprise organizations rely on Red Hat OpenShift for their Kubernetes platform. When deploying to OpenShift, it provides a type of Ingress called a Route.
It's not a traditional Ingress and instead uses a CustomResource called Routes. It would look something like this:

kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: cribl
  namespace: cribl-stream
  labels:
    app.kubernetes.io/instance: ls-wg-pci
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: logstream-workergroup
    app.kubernetes.io/version: 4.4.3
    helm.sh/chart: logstream-workergroup-4.4.3
  annotations:
    openshift.io/host.generated: 'true'
spec:
  host: cribl-cribl-stream.apps.core-ocp.d70.lab.kemo.network # optional
  to:
    kind: Service
    name: ls-leader
    weight: 100
  port:
    targetPort: api
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Allow
  wildcardPolicy: None

This would be another optional template provided by the logstream-leader chart, similar to how Hashicorp provides the capability: https://github.com/hashicorp/vault-helm/blob/main/templates/server-route.yaml

Solution Option(s):

  • Create an optional template that creates a Route object such as how Ingresses are created.

I'd be happy to create the PR with the needed template and values patch, though I'd like to hear thoughts around this before I start lobbing over larger changes. 😃

@bdalpe
Copy link
Contributor

bdalpe commented Dec 13, 2023

@kenmoini This should already be covered by the extraObjects value (see the extras.yaml template). Let me know if that doesn't work for your use case.

I'm not opposed to adding OpenShift-specific templates to the chart 🙂

@kenmoini
Copy link
Contributor Author

Hey @bdalpe - the extraObjects value should be useful for maybe custom things like Jobs for niche deployments where a user is doing some init/batch processing, and could certainly be used for the OpenShift route.

However, I think it'd probably be more valuable and easier for both of our user bases if you could simply toggle openshift.enable=true instead of having them provide the full manifest for a Route - what do you think?

I've already made the needed changes here in my fork: https://github.com/kenmoini/cribl-helm-charts/tree/patch-184/helm-chart-sources/logstream-leader

Includes a default of assuming it is not an OpenShift deployment for backwards compat, ability to disable the Route object in case they're using a different Ingress on OpenShift, as well as the needed tests for all the various inputs. The use of the openshift.enable=true value should also provide simplicity for some other patches we'll need to make running Cribl on OpenShift much easier for users.

If you think it's suitable to provide users a quick and easy toggle to deploy to OpenShift with use of Routes, lemme know and I can make a quick PR.

@bdalpe
Copy link
Contributor

bdalpe commented Dec 13, 2023

I like the openshift.enable value idea. This would allow for setting other important things like namespace annotations, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants