Giter Site home page Giter Site logo

Comments (4)

kurokobo avatar kurokobo commented on August 24, 2024

@jheinitz
Hi,

I've never tried that, but the customization of Ingress resource by using AWX Operator is highly limited since AWX Operator just templates manifest based on this file: ingress.yaml.j2.

So, if your requirements can be achieved by manually created Ingress, I recommend you to:

  • Do not create Ingress using AWX Operator. Remove ingress_* and hostname.
  • Create Ingress resource manually.

Maybe I don't fully understand your requirements, but hou about create the following resource, for example?

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: awx-custom-ingress
  namespace: awx
spec:
  rules:
    - host: ansible.example.com
      http:
        paths:
          - backend:
              service:
                name: awx-service
                port:
                  number: 80
            path: /
            pathType: Prefix
    - host: ansible01.example.com
      http:
        paths:
          - backend:
              service:
                name: awx-service
                port:
                  number: 80
            path: /
            pathType: Prefix
    - host: ansible02.example.com
      http:
        paths:
          - backend:
              service:
                name: awx-service
                port:
                  number: 80
            path: /
            pathType: Prefix
  tls:
    - hosts:
        - ansible.example.com
        - ansible01.example.com
        - ansible02.example.com
      secretName: awx-secret-tls

from awx-on-k3s.

jheinitz avatar jheinitz commented on August 24, 2024

Hello @kurokobo !

That's exactly what I want and it works fine. To be more precise. We are running two servers in parallel and by changing the DNS Alias ansible.example.com between ansible1.example.com and ansible2.example.com we can switch between these two instances. We use this to test a new version before taking that into production. So, basically I would create two custom ingress on both servers that include their own hostname itself and the alias ansible.example.com.

By the way, it all works even with the standard awx-ingress in place. Still searching for the command to remove the awx-ingress resource .... :-)

Thanks for your help. I'm going to close the issue.

Best regards

Jens

from awx-on-k3s.

jheinitz avatar jheinitz commented on August 24, 2024

Hi @kurokobo ,

another short question. You mentioned that I should not create ingress through awx-operator by removing ingress... and hostname. Remove the matching lines from base/kustomization.yaml?

Thanks Jens

from awx-on-k3s.

kurokobo avatar kurokobo commented on August 24, 2024

@jheinitz
Ah sorry for less infomation.

You mentioned that I should not create ingress through awx-operator by removing ingress... and hostname. Remove the matching lines from base/kustomization.yaml?

This is the steps to swap Ingress by AWX Operator for manually created one:

  1. Deploy custom Ingress by using YAML file in my comment above.
  2. Remove the three lines for ingress_type, ingress_tls_secret, hostname from your base/awx.yaml
  3. Apply new configuration by kubectl apply -k base. This makes AWX Operator no longer keep awx-ingress deployed. It's ok that your awx-ingress still exists on your namespace at this step.
  4. Remove old Ingress manually by kubectl -n awx delete ingress awx-ingress

from awx-on-k3s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.