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

[Bug]: unable to create ingress object in openshift #1484

Open
alexlionnel opened this issue Apr 11, 2024 · 3 comments
Open

[Bug]: unable to create ingress object in openshift #1484

alexlionnel opened this issue Apr 11, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@alexlionnel
Copy link

alexlionnel commented Apr 11, 2024

Describe the bug
Ingress resource is not created when i create a grafana instance using grafana operator

Version
I am using grafana-operator v5.8.0 and openshift 4.12.53

To Reproduce
Steps to reproduce the behavior:

  1. Install grafana-operator from openshift interface
  2. create a grafana ressource using this yml config
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
  name: grafana
  labels:
    dashboards: "grafana"
  namespace: grafana-project
spec:
  config:
    log:
      mode: "console"
    auth:
      disable_login_form: "false"
    security:
      admin_user: root
      admin_password: secret
  ingress:
    spec:
      ingressClassName: openshift-default
      rules:
        - host: <my_domain.com>
          http:
            paths:
              - backend:
                  service:
                    name: grafana-service
                    port:
                      number: 3000
                path: /
                pathType: Prefix

Expected behavior
Ingress resource should be created but it isn't
Same result with ingressClassName: nginx

@alexlionnel alexlionnel added bug Something isn't working needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 11, 2024
@NissesSenap
Copy link
Collaborator

@alexlionnel do you want to use ingress, or do you actually want to use OCP routes?
There is a root object that you can use instead grafana.spec.route

If I remember correctly, we have more or less removed the possibility to create an ingress from OCP users without thinking of it.

@NissesSenap NissesSenap added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 12, 2024
@alexlionnel
Copy link
Author

alexlionnel commented Apr 12, 2024

In fact, i want to use an ingress with tls config, using cert manager

 ingress:
    metadata:
      cert-manager.io/cluster-issuer: letsencrypt-issuer
    spec:
      ingressClassName: openshift-default
      tls:
        - hosts:
          - <my_domain.com>
        secretName: secret-cert-tls
      rules:
        - host: <my_domain.com>
          http:
            paths:
              - backend:
                  service:
                    name: grafana-service
                    port:
                      number: 3000
                path: /
                pathType: Prefix

But ingress is not created

@NissesSenap
Copy link
Collaborator

With our current implementation, that is not possible.
We did an assumption that anyone using OCP would only want to use routes.

func (r *IngressReconciler) Reconcile(ctx context.Context, cr *v1beta1.Grafana, status *v1beta1.GrafanaStatus, vars *v1beta1.OperatorReconcileVars, scheme *runtime.Scheme) (v1beta1.OperatorStageStatus, error) {
logger := log.FromContext(ctx).WithName("IngressReconciler")
if r.isOpenShift {
logger.Info("reconciling route", "platform", "openshift")
return r.reconcileRoute(ctx, cr, status, vars, scheme)
} else {
logger.Info("reconciling ingress", "platform", "kubernetes")
return r.reconcileIngress(ctx, cr, status, vars, scheme)
}
}

As a workaround, I recommend that you setup an ingress separately from the operator.
I will mark this as a bug, if you or someone else have time to create a fix for this, that would be great.
The maintainers have lots to do, and I don't think this will be a priority one thing for us to solve.

Sorry for the inconvenience.

@NissesSenap NissesSenap added help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Apr 12, 2024
@NissesSenap NissesSenap changed the title [Bug]: Ingress openshift not create [Bug]: unable to create ingress object in openshift Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants