humio / humio-operator

Kubernetes Operator for Humio
Apache License 2.0
33 stars 32 forks source link

Ingress Address Conflict Issue #334

Open zach-robinson opened 3 years ago

zach-robinson commented 3 years ago

Created a Humio cluster with these settings:

spec:
  environmentVariables:
  - name: PUBLIC_URL
    valueFrom:
      secretKeyRef:
        key: TRUSTED_URI_PREFIX_2
        name: cphumio-cloudpakhumiocluster-oidc
  helperImage: humio/humio-operator-helper:0.0.8
  image: humio/humio-core:1.18.1
  ingress:
    annotations:
      kubernetes.io/ingress.class: ibm-icp-management
    controller: nginx
    enabled: true
    tls: false
  path: /humio

This results in a conflict where cphumio-cloudpakhumiocluster-es-ingest and cphumio-cloudpakhumiocluster-general both point to the same path:

spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: cphumio-cloudpakhumiocluster
          servicePort: 9200
        path: /humio
        pathType: ImplementationSpecific
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: cphumio-cloudpakhumiocluster
          servicePort: 8080
        path: /humio
        pathType: ImplementationSpecific

This results in only one of these endpoints getting served by Nginx depending on the order in which the ingresses were reconciled.

zach-robinson commented 3 years ago

@SaaldjorMike Bug

SaaldjorMike commented 3 years ago

@zach-robinson I don't see anything that seems like a bug in what you shared here. The esHostname and hostname in HumioCluster.Spec is assumed to be set to different hostnames which means those ingress snippets should be related to separate hostnames and thus not conflict.

zach-robinson commented 3 years ago

Any way we can add an option to set different paths for them?

zach-robinson commented 3 years ago

Or if that's not possible then would it be possible to be able to set a different set of annotations of the es Ingress?