awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Question: Multiple hostnames

Open nidomiro opened this issue 2 years ago • 1 comments

I have a hopefully simple question:

Is it possible to specify multiple hostnames?

My usecase is a machine in a local network that should be accessible via it's machine name and via a domain. So awx should be accessible by typing awx.server-name and by awx.server-name.domain.tld.

nidomiro avatar May 01 '22 11:05 nidomiro

Hello, your question seems like a good one to ask on our mailing list at https://groups.google.com/g/awx-project. You can also join #ansible-awx on https://libera.chat/ and ask your question there.

rebeccahhh avatar May 06 '22 17:05 rebeccahhh

Hello,

I have the same question.

I managed to make it work with this code but it is not persistent :

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  labels:
    app.kubernetes.io/component: awx
    app.kubernetes.io/managed-by: awx-operator
    app.kubernetes.io/name: awx-test
    app.kubernetes.io/operator-version: 1.1.1
    app.kubernetes.io/part-of: awx-test
  name: awx-test-ingress
  namespace: awx
spec:
  ingressClassName: traefik
  rules:
  - host: awx-test.domain.local
    http:
      paths:
      - backend:
          service:
            name: awx-test-service
            port:
              number: 80
        path: /
        pathType: Prefix
  - host: awx-test
    http:
      paths:
      - backend:
          service:
            name: awx-test-service
            port:
              number: 80
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - awx-test.domain.local
    - awx-test
    secretName: awx-test-secret-tls
status:
  loadBalancer:
    ingress:
    - ip: XXX.XXX.XXX.XXX

Any idea to make it permanent ?

sylvain-de-fuster avatar Dec 28 '22 12:12 sylvain-de-fuster

@sylvain-de-fuster as a workaround until the PR gets merged in, you could set the ingress type to "none" and create the ingress in another way (with another template for example). It works, we tested it in our environment. Otherwise the operator will destroy the newly created ingress soon after.

fciava avatar May 04 '23 15:05 fciava